@kubex/zinc 1.1.122 → 1.1.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +7 -6
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +3 -3
- package/dist/zn.d.ts +4 -1
- package/dist/zn.min.js +79 -75
- package/docs/pages/components/data-table-search.md +4 -3
- package/package.json +1 -1
- package/src/components/data-table-search/data-table-search.component.ts +9 -2
- package/src/components/data-table-search/data-table-search.scss +31 -2
- package/src/components/header/header.scss +2 -0
- package/src/components/input/input.component.ts +1 -1
- package/src/components/select/select.component.ts +1 -1
package/dist/zn.min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var ju=Fn((Vl,Uu)=>{(function(o,i){typeof Vl=="object"&&typeof Uu=="object"?Uu.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Vl=="object"?Vl.AirDatepicker=i():o.AirDatepicker=i()})(Vl,(function(){return(function(){"use strict";var o={d:function(O,x){for(var E in x)o.o(x,E)&&!o.o(O,E)&&Object.defineProperty(O,E,{enumerable:!0,get:x[E]})},o:function(O,x){return Object.prototype.hasOwnProperty.call(O,x)}},i={};o.d(i,{default:function(){return ae}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(O){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof O=="string"?x.querySelector(O):O}function a(){let{tagName:O="div",className:x="",innerHtml:E="",id:w="",attrs:D={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(O);return x&&q.classList.add(...x.split(" ")),w&&(q.id=w),E&&(q.innerHTML=E),D&&s(q,D),q}function s(O,x){for(let[E,w]of Object.entries(x))w!==void 0&&O.setAttribute(E,w);return O}function l(O){return new Date(O.getFullYear(),O.getMonth()+1,0).getDate()}function p(O){let x=O.getHours(),{hours:E,dayPeriod:w}=h(x);return{year:O.getFullYear(),month:O.getMonth(),fullMonth:O.getMonth()+1<10?"0"+(O.getMonth()+1):O.getMonth()+1,date:O.getDate(),fullDate:O.getDate()<10?"0"+O.getDate():O.getDate(),day:O.getDay(),hours:x,fullHours:m(x),hours12:E,dayPeriod:w,fullHours12:m(E),minutes:O.getMinutes(),fullMinutes:O.getMinutes()<10?"0"+O.getMinutes():O.getMinutes()}}function h(O){return{dayPeriod:O>11?"pm":"am",hours:O%12==0?12:O%12}}function m(O){return O<10?"0"+O:O}function f(O){let x=10*Math.floor(O.getFullYear()/10);return[x,x+9]}function b(){let O=[];for(var x=arguments.length,E=new Array(x),w=0;w<x;w++)E[w]=arguments[w];return E.forEach((D=>{if(typeof D=="object")for(let q in D)D[q]&&O.push(q);else D&&O.push(D)})),O.join(" ")}function g(O,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!O||!x)return!1;let w=p(O),D=p(x);return{[t.days]:w.date===D.date&&w.month===D.month&&w.year===D.year,[t.months]:w.month===D.month&&w.year===D.year,[t.years]:w.year===D.year}[E]}function v(O,x,E){let w=S(O,!1).getTime(),D=S(x,!1).getTime();return E?w>=D:w>D}function y(O,x){return!v(O,x,!0)}function S(O){let x=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],E=new Date(O.getTime());return typeof x!="boolean"||x||(function(w){w.setHours(0,0,0,0)})(E),E}function T(O,x,E){O.length?O.forEach((w=>{w.addEventListener(x,E)})):O.addEventListener(x,E)}function N(O,x){return!(!O||O===document||O instanceof DocumentFragment)&&(O.matches(x)?O:N(O.parentNode,x))}function U(O,x,E){return O>E?E:O<x?x:O}function I(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];return E.filter((D=>D)).forEach((D=>{for(let[q,A]of Object.entries(D))if(A!==void 0&&A.toString()==="[object Object]"){let H=O[q]!==void 0?O[q].toString():void 0,j=A.toString(),Q=Array.isArray(A)?[]:{};O[q]=O[q]?H!==j?Q:O[q]:Q,I(O[q],A)}else O[q]=A})),O}function C(O){let x=O;return O instanceof Date||(typeof O=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(O)&&(O+="T00:00:00"),x=new Date(O)),isNaN(x.getTime())&&(console.log(`Unable to convert value "${O}" to Date object`),x=!1),x}function $(O){let x="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+x+")("+O+")($|<|"+x+")","g")}function L(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class W{constructor(){let{type:x,date:E,dp:w,opts:D,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let H=g(A,this.date,this.type);H?this.focus():!H&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=x,this.singleType=this.type.slice(0,-1),this.date=E,this.dp=w,this.opts=D,this.body=q,this.customData=!1,this.init()}init(){var x,E;let{onRenderCell:w}=this.opts;w&&(this.customData=w({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(x=this.customData)!==null&&x!==void 0&&x.disabled?this.dp.disableDate(this.date):((E=this.customData)===null||E===void 0?void 0:E.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var x;let{year:E,month:w,fullMonth:D,date:q,fullDate:A}=p(this.date),H=((x=this.customData)===null||x===void 0?void 0:x.attrs)||{};this.$cell=a({attrs:{"data-year":E,"data-month":w,"data-date":q,"data-iso-date":`${E}-${D}-${A}`,...H}}),this.$cell.adpCell=this}_getClassName(){var x;let E=new Date,{selectOtherMonths:w,selectOtherYears:D}=this.opts,{minDate:q,maxDate:A,isDateDisabled:H}=this.dp,{day:j}=p(this.date),Q=this._isOutOfMinMaxRange(),ie=H(this.date),te=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(E,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),se="";switch(this.type){case t.days:se=b({"-weekend-":this.dp.isWeekend(j),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!w||Q||ie});break;case t.months:se=b({"-disabled-":Q});break;case t.years:se=b({"-other-decade-":this.isOtherDecade,"-disabled-":Q||this.isOtherDecade&&!D})}return b(te,se,(x=this.customData)===null||x===void 0?void 0:x.classes).split(" ")}_getHtml(){var x;let{year:E,month:w,date:D}=p(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((x=this.customData)!==null&&x!==void 0&&x.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":D;case t.months:return this.dp.locale[this.opts.monthsField][w];case t.years:return!A&&this.isOtherDecade?"":E}}_isOutOfMinMaxRange(){let{minDate:x,maxDate:E}=this.dp,{type:w,date:D}=this,{month:q,year:A,date:H}=p(D),j=w===t.days,Q=w===t.years,ie=!!x&&new Date(A,Q?x.getMonth():q,j?H:x.getDate()),te=!!E&&new Date(A,Q?E.getMonth():q,j?H:E.getDate());return x&&E?y(ie,x)||v(te,E):x?y(ie,x):E?v(te,E):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:x,focusDate:E,rangeDateTo:w,rangeDateFrom:D}=this.dp,q=x.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=D,H=w;if(q===1&&E){let se=v(E,x[0]);A=se?x[0]:E,H=se?E:x[0]}let j=b({"-in-range-":A&&H&&(Q=this.date,ie=A,te=H,v(Q,ie)&&y(Q,te)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":H&&g(this.date,H,this.type)});var Q,ie,te;j&&this.$cell.classList.add(...j.split(" "))}_handleSelectedStatus(){let x=this.dp._checkIfDateIsSelected(this.date,this.type);x?this.select():!x&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function oe(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let xe={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},De=".air-datepicker-cell";class Ne{constructor(x){let{dp:E,type:w,opts:D}=x;oe(this,"handleClick",(q=>{let A=q.target.closest(De).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let H=this.dp._checkIfDateIsSelected(A.date,A.type);H?this.dp._handleAlreadySelectedDates(H,A.date):this.dp.selectDate(A.date)})),oe(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),oe(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),oe(this,"onMouseOverCell",(q=>{let A=N(q.target,De);this.dp.setFocusDate(!!A&&A.adpCell.date)})),oe(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),oe(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,H=q.target;H.closest(De)&&this.handleClick(q),A&&H.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),oe(this,"onMouseDown",(q=>{this.pressed=!0;let A=N(q.target,De),H=A&&A.adpCell;g(H.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(H.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),oe(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=N(q.target,De),H=A&&A.adpCell,{selectedDates:j,rangeDateTo:Q,rangeDateFrom:ie}=this.dp;if(!H||H.isDisabled)return;let{date:te}=H;if(j.length===2){if(this.rangeFromFocused&&!v(te,Q)){let{hours:se,minutes:Ct}=p(ie);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateFrom=te,this.dp.replaceDate(ie,te)}if(this.rangeToFocused&&!y(te,ie)){let{hours:se,minutes:Ct}=p(Q);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateTo=te,this.dp.replaceDate(Q,te)}}})),oe(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),oe(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let H=f(q),j=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(H[0]===j[0]&&H[1]===j[1])return}this.render()})),oe(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=E,this.type=w,this.opts=D,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:x,dynamicRange:E}=this.opts;T(this.$el,"mouseover",this.onMouseOverCell),T(this.$el,"mouseout",this.onMouseOutCell),T(this.$el,"click",this.onClickBody),x&&E&&(T(this.$el,"mousedown",this.onMouseDown),T(this.$el,"mousemove",this.onMouseMove),T(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:xe[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,E="",w=this.dp.isWeekend,{onClickDayName:D}=this.opts,q=x,A=0;for(;A<7;){let H=q%7;E+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:w(H),"-clickable-":!!D})}" data-day-index='${H}'>${this.dp.locale.daysMin[H]}</div>`,A++,q++}return E}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(x){let{type:E,dp:w,opts:D}=this;return new W({type:E,dp:w,opts:D,date:x,body:this})}_generateCells(){Ne.getDatesFunction(this.type)(this.dp,(x=>{this.cells.push(this._generateCell(x))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((x=>x.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(x,E){let{viewDate:w,opts:{fixedHeight:D},locale:{firstDay:q}}=x,A=l(w),{year:H,month:j}=p(w),Q=new Date(H,j,1),ie=new Date(H,j,A),te=Q.getDay()-q,se=6-ie.getDay()+q;te=te<0?te+7:te,se=se>6?se-7:se;let Ct=(function(sa,Uh){let{year:Zc,month:l3,date:c3}=p(sa);return new Date(Zc,l3,c3-Uh)})(Q,te),Yr=A+te+se,zr=Ct.getDate(),{year:yn,month:ml}=p(Ct),oa=0;D&&(Yr=42);let aa=[];for(;oa<Yr;){let sa=new Date(yn,ml,zr+oa);E&&E(sa),aa.push(sa),oa++}return aa}static getMonthsDates(x,E){let{year:w}=x.parsedViewDate,D=0,q=[];for(;D<12;){let A=new Date(w,D);q.push(A),E&&E(A),D++}return q}static getYearsDates(x,E){let w=f(x.viewDate),D=w[0]-1,q=w[1]+1,A=D,H=[];for(;A<=q;){let j=new Date(A,0);H.push(j),E&&E(j),A++}return H}static getDatesFunction(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:Ne.getDaysDates,[t.months]:Ne.getMonthsDates,[t.years]:Ne.getYearsDates}[x]}}function rt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class er{constructor(x){let{dp:E,opts:w}=x;rt(this,"onClickNav",(D=>{let q=N(D.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),rt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),rt(this,"update",(()=>{let{prevHtml:D,nextHtml:q}=this.opts;this.$prev.innerHTML=D,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),rt(this,"renderDelay",(()=>{setTimeout(this.render)})),rt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(D,q){for(let A in q)q[A]?D.classList.add(A):D.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=E,this.opts=w,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:x,opts:E}=this,w=E.navTitles[x.currentView];return typeof w=="function"?w(x):x.formatDate(x.viewDate,w)}handleNavStatus(){let{disableNavWhenOutOfRange:x}=this.opts,{minDate:E,maxDate:w}=this.dp;if(!E&&!w||!x)return;let{year:D,month:q}=this.dp.parsedViewDate,A=!!E&&p(E),H=!!w&&p(w);switch(this.dp.currentView){case t.days:E&&A.month>=q&&A.year>=D&&this._disableNav("prev"),w&&H.month<=q&&H.year<=D&&this._disableNav("next");break;case t.months:E&&A.year>=D&&this._disableNav("prev"),w&&H.year<=D&&this._disableNav("next");break;case t.years:{let j=f(this.dp.viewDate);E&&A.year>=j[0]&&this._disableNav("prev"),w&&H.year<=j[1]&&this._disableNav("next");break}}}_disableNav(x){n('[data-action="'+x+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(x){for(var E=arguments.length,w=new Array(E>1?E-1:0),D=1;D<E;D++)w[D-1]=arguments[D];x.length?x.forEach((q=>{q.classList.remove(...w)})):x.classList.remove(...w)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:x,nextHtml:E}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${x}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${E}</div>`}get isNavIsFunction(){let{navTitles:x}=this.opts;return Object.keys(x).find((E=>typeof x[E]=="function"))}}var Pr={today:{content:O=>O.locale.today,onClick:O=>O.setViewDate(new Date)},clear:{content:O=>O.locale.clear,onClick:O=>O.clear()}};class wr{constructor(x){let{dp:E,opts:w}=x;this.dp=E,this.opts=w,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:x}=this.opts;Array.isArray(x)||(x=[x]),x.forEach((E=>{let w=E;typeof E=="string"&&Pr[E]&&(w=Pr[E]);let D=this.createButton(w);w.onClick&&this.attachEventToButton(D,w.onClick),this.$el.appendChild(D)}))}attachEventToButton(x,E){x.addEventListener("click",(()=>{E(this.dp)}))}createButton(x){let{content:E,className:w,tagName:D="button",attrs:q={}}=x;return a({tagName:D,innerHtml:`<span tabindex='-1'>${typeof E=="function"?E(this.dp):E}</span>`,className:b("air-datepicker-button",w),attrs:q})}render(){this.generateButtons()}}function Nt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class tr{constructor(){let{opts:x,dp:E}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(this,"toggleTimepickerIsActive",(D=>{this.dp.timepickerIsActive=D})),Nt(this,"onChangeSelectedDate",(D=>{let{date:q,updateTime:A=!1}=D;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),Nt(this,"onChangeLastSelectedDate",(D=>{D&&(this.setTime(D),this.render())})),Nt(this,"onChangeInputRange",(D=>{let q=D.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Nt(this,"onMouseEnterLeave",(D=>{let q=D.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Nt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Nt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=x,this.dp=E;let{timeFormat:w}=this.dp.locale;w&&(w.match($("h"))||w.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let x="input";navigator.userAgent.match(/trident/gi)&&(x="change"),T(this.$ranges,x,this.onChangeInputRange),T(this.$ranges,"mouseenter",this.onMouseEnterLeave),T(this.$ranges,"mouseleave",this.onMouseEnterLeave),T(this.$ranges,"focus",this.onFocus),T(this.$ranges,"mousedown",this.onFocus),T(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:x,hours:E,displayHours:w,minutes:D,minHours:q,minMinutes:A,maxHours:H,maxMinutes:j,dayPeriod:Q,opts:{hoursStep:ie,minutesStep:te}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(w)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(D)}</span> `+(x?`<span class='air-datepicker-time--current-ampm'>${Q}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${E}" min="${q}" max="${H}" step="${ie}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${D}" min="${A}" max="${j}" step="${te}"/> </div></div>`}defineDOM(){let x=E=>n(E,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=x('[name="hours"]'),this.$minutes=x('[name="minutes"]'),this.$hoursText=x(".air-datepicker-time--current-hours"),this.$minutesText=x(".air-datepicker-time--current-minutes"),this.$ampm=x(".air-datepicker-time--current-ampm")}setTime(x){this.setMinMaxTime(x),this.setCurrentTime(x)}addTimeToDate(x){x&&(x.setHours(this.hours),x.setMinutes(this.minutes))}setMinMaxTime(x){if(this.setMinMaxTimeFromOptions(),x){let{minDate:E,maxDate:w}=this.dp;E&&g(x,E)&&this.setMinTimeFromMinDate(E),w&&g(x,w)&&this.setMaxTimeFromMaxDate(w)}}setCurrentTime(x){let{hours:E,minutes:w}=x?p(x):this;this.hours=U(E,this.minHours,this.maxHours),this.minutes=U(w,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:x,minMinutes:E,maxHours:w,maxMinutes:D}=this.opts;this.minHours=U(x,0,23),this.minMinutes=U(E,0,59),this.maxHours=U(w,0,23),this.maxMinutes=U(D,0,59)}setMinTimeFromMinDate(x){let{lastSelectedDate:E}=this.dp;this.minHours=x.getHours(),E&&E.getHours()>x.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=x.getMinutes()}setMaxTimeFromMaxDate(x){let{lastSelectedDate:E}=this.dp;this.maxHours=x.getHours(),E&&E.getHours()<x.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=x.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(x){this._hours=x;let{hours:E,dayPeriod:w}=h(x);this.displayHours=this.ampm?E:x,this.dayPeriod=w}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function Mt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class uo{constructor(x){let{dp:E,opts:w}=x;Mt(this,"pressedKeys",new Set),Mt(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],D=>D.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],D=>D.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],D=>D.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],D=>D.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],D=>D.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],D=>D.year-=10],[["Control","Shift","ArrowUp"],(D,q)=>q.up()]])),Mt(this,"handleHotKey",(D=>{let q=this.hotKeys.get(D),A=p(this.getInitialFocusDate());q(A,this.dp);let{year:H,month:j,date:Q}=A,ie=l(new Date(H,j));ie<Q&&(Q=ie);let te=this.dp.getClampedDate(new Date(H,j,Q));this.dp.setFocusDate(te,{viewDateTransition:!0})})),Mt(this,"isHotKeyPressed",(()=>{let D=!1,q=this.pressedKeys.size,A=H=>this.pressedKeys.has(H);for(let[H]of this.hotKeys){if(D)break;if(Array.isArray(H[0]))H.forEach((j=>{D||q!==j.length||(D=j.every(A)&&H)}));else{if(q!==H.length)continue;D=H.every(A)&&H}}return D})),Mt(this,"isArrow",(D=>D>=37&&D<=40)),Mt(this,"onKeyDown",(D=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=D,{dp:H,dp:{focusDate:j},opts:Q}=this;this.registerKey(q);let ie=this.isHotKeyPressed();if(ie)return D.preventDefault(),void this.handleHotKey(ie);if(this.isArrow(A))return D.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(H.currentView!==Q.minView)return void H.down();if(j){let te=H._checkIfDateIsSelected(j);return void(te?H._handleAlreadySelectedDates(te,j):H.selectDate(j))}}q==="Escape"&&this.dp.hide()})),Mt(this,"onKeyUp",(D=>{this.removeKey(D.key)})),this.dp=E,this.opts=w,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:x}=this.dp;x.addEventListener("keydown",this.onKeyDown),x.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:x}=this.dp;x.removeEventListener("keydown",this.onKeyDown),x.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:x,currentView:E,selectedDates:w,parsedViewDate:{year:D,month:q}}=this.dp,A=x||w[w.length-1];if(!A)switch(E){case t.days:A=new Date(D,q,new Date().getDate());break;case t.months:A=new Date(D,q,1);break;case t.years:A=new Date(D,0,1)}return A}focusNextCell(x){let E=this.getInitialFocusDate(),{currentView:w}=this.dp,{days:D,months:q,years:A}=t,H=p(E),j=H.year,Q=H.month,ie=H.date;switch(x){case"ArrowLeft":w===D&&(ie-=1),w===q&&(Q-=1),w===A&&(j-=1);break;case"ArrowUp":w===D&&(ie-=7),w===q&&(Q-=3),w===A&&(j-=4);break;case"ArrowRight":w===D&&(ie+=1),w===q&&(Q+=1),w===A&&(j+=1);break;case"ArrowDown":w===D&&(ie+=7),w===q&&(Q+=3),w===A&&(j+=4)}let te=this.dp.getClampedDate(new Date(j,Q,ie));this.dp.setFocusDate(te,{viewDateTransition:!0})}registerKey(x){this.pressedKeys.add(x)}removeKey(x){this.pressedKeys.delete(x)}}let Ya={on(O,x){this.__events||(this.__events={}),this.__events[O]?this.__events[O].push(x):this.__events[O]=[x]},off(O,x){this.__events&&this.__events[O]&&(this.__events[O]=this.__events[O].filter((E=>E!==x)))},removeAllEvents(){this.__events={}},trigger(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];this.__events&&this.__events[O]&&this.__events[O].forEach((D=>{D(...E)}))}};function ue(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let Ki="",Yi="",he=!1;class ae{static buildGlobalContainer(x){he=!0,Ki=a({className:x,id:x}),n("body").appendChild(Ki)}constructor(x,E){var w=this;if(ue(this,"viewIndexes",[t.days,t.months,t.years]),ue(this,"next",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H+1,1));break;case t.months:this.setViewDate(new Date(A+1,H,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ue(this,"prev",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H-1,1));break;case t.months:this.setViewDate(new Date(A-1,H,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ue(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ue(this,"setPosition",(function(A){let H=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||w.opts.position)=="function")return void(w.customHide=A({$datepicker:w.$datepicker,$target:w.$el,$pointer:w.$pointer,isViewChange:H,done:w._finishHide}));let j,Q,{isMobile:ie}=w.opts,te=w.$el.getBoundingClientRect(),se=w.$el.getBoundingClientRect(),Ct=w.$datepicker.offsetParent,Yr=w.$el.offsetParent,zr=w.$datepicker.getBoundingClientRect(),yn=A.split(" "),ml=window.scrollY,oa=window.scrollX,aa=w.opts.offset,sa=yn[0],Uh=yn[1];if(ie)w.$datepicker.style.cssText="left: 50%; top: 50%";else{if(Ct===Yr&&Ct!==document.body&&(se={top:w.$el.offsetTop,left:w.$el.offsetLeft,width:te.width,height:w.$el.offsetHeight},ml=0,oa=0),Ct!==Yr&&Ct!==document.body){let Zc=Ct.getBoundingClientRect();se={top:te.top-Zc.top,left:te.left-Zc.left,width:te.width,height:te.height},ml=0,oa=0}switch(sa){case"top":j=se.top-zr.height-aa;break;case"right":Q=se.left+se.width+aa;break;case"bottom":j=se.top+se.height+aa;break;case"left":Q=se.left-zr.width-aa}switch(Uh){case"top":j=se.top;break;case"right":Q=se.left+se.width-zr.width;break;case"bottom":j=se.top+se.height-zr.height;break;case"left":Q=se.left;break;case"center":/left|right/.test(sa)?j=se.top+se.height/2-zr.height/2:Q=se.left+se.width/2-zr.width/2}w.$datepicker.style.cssText=`left: ${Q+oa}px; top: ${j+ml}px`}})),ue(this,"_setInputValue",(()=>{let{opts:A,$altField:H,locale:{dateFormat:j}}=this,{altFieldDateFormat:Q,altField:ie}=A;ie&&H&&(H.value=this._getInputValue(Q)),this.$el.value=this._getInputValue(j),this.$el.dispatchEvent(new Event("change"))})),ue(this,"_getInputValue",(A=>{let{selectedDates:H,opts:j}=this,{multipleDates:Q,multipleDatesSeparator:ie}=j;if(!H.length)return"";let te=typeof A=="function",se=te?A(Q?H:H[0]):H.map((Ct=>this.formatDate(Ct,A)));return se=te?se:se.join(ie),se})),ue(this,"_checkIfDateIsSelected",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,j=!1;return w.selectedDates.some((Q=>{let ie=g(A,Q,H);return j=ie&&Q,ie})),j})),ue(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ue(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ue(this,"setViewDate",(A=>{if(!((A=C(A))instanceof Date)||g(A,this.viewDate))return;let H=this.viewDate;this.viewDate=A;let{onChangeViewDate:j}=this.opts;if(j){let{month:Q,year:ie}=this.parsedViewDate;j({month:Q,year:ie,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,H)})),ue(this,"setFocusDate",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=C(A))instanceof Date)&&(w.focusDate=A,w.trigger(t.eventChangeFocusDate,A,H))})),ue(this,"setCurrentView",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w.viewIndexes.includes(A)){if(w.currentView=A,w.elIsInput&&w.visible&&w.setPosition(void 0,!0),w.trigger(t.eventChangeCurrentView,A),!w.views[A]){let j=w.views[A]=new Ne({dp:w,opts:w.opts,type:A});w.shouldUpdateDOM&&w.$content.appendChild(j.$el)}w.opts.onChangeView&&!H.silent&&w.opts.onChangeView(A)}})),ue(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ue(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:H}=this.opts,j=this.$datepicker.parentNode;j&&j.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),H&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ue(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=I({},w.opts),{silent:Q}=H;I(w.opts,A);let{timepicker:ie,buttons:te,range:se,selectedDates:Ct,isMobile:Yr}=w.opts,zr=w.visible||w.treatAsInline;w._createMinMaxDates(),w._limitViewDateByMaxMinDates(),w._handleLocale(),Ct&&(w.selectedDates=[],w.selectDate(Ct,{silent:Q})),A.view&&w.setCurrentView(A.view,{silent:Q}),w._setInputValue(),j.range&&!se?(w.rangeDateTo=!1,w.rangeDateFrom=!1):!j.range&&se&&w.selectedDates.length&&(w.rangeDateFrom=w.selectedDates[0],w.rangeDateTo=w.selectedDates[1]),j.timepicker&&!ie?(zr&&w.timepicker.destroy(),w.timepicker=!1,w.$timepicker.parentNode.removeChild(w.$timepicker)):!j.timepicker&&ie&&w._addTimepicker(),!j.buttons&&te?w._addButtons():j.buttons&&!te?(w.buttons.destroy(),w.$buttons.parentNode.removeChild(w.$buttons)):zr&&j.buttons&&te&&w.buttons.clearHtml().render(),!j.isMobile&&Yr?(w.treatAsInline||Yi||w._createMobileOverlay(),w._addMobileAttributes(),w.visible&&w._showMobileOverlay()):j.isMobile&&!Yr&&(w._removeMobileAttributes(),w.visible&&(Yi.classList.remove("-active-"),typeof w.opts.position!="function"&&w.setPosition())),zr&&(w.nav.update(),w.views[w.currentView].render(),w.currentView===t.days&&w.views[w.currentView].renderDayNames())})),ue(this,"disableDate",((A,H)=>{(Array.isArray(A)?A:[A]).forEach((j=>{let Q=C(j);if(!Q)return;let ie=H?"delete":"add";this.disabledDates[ie](this.formatDate(Q,"yyyy-MM-dd"));let te=this.getCell(Q,this.currentViewSingular);te&&te.adpCell.render()}),[])})),ue(this,"enableDate",(A=>{this.disableDate(A,!0)})),ue(this,"isDateDisabled",(A=>{let H=C(A);return this.disabledDates.has(this.formatDate(H,"yyyy-MM-dd"))})),ue(this,"isOtherMonth",(A=>{let{month:H}=p(A);return H!==this.parsedViewDate.month})),ue(this,"isOtherYear",(A=>{let{year:H}=p(A);return H!==this.parsedViewDate.year})),ue(this,"isOtherDecade",(A=>{let{year:H}=p(A),[j,Q]=f(this.viewDate);return H<j||H>Q})),ue(this,"_onChangeSelectedDate",(A=>{let{silent:H}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!H&&this._triggerOnSelect()}))})),ue(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let j=!1;H&&(j=w.isOtherMonth(A)||w.isOtherYear(A)||w.isOtherDecade(A)),j&&w.setViewDate(A),w.opts.onFocus&&w.opts.onFocus({datepicker:w,date:A})})),ue(this,"_onChangeTime",(A=>{let{hours:H,minutes:j}=A,Q=new Date,{lastSelectedDate:ie,opts:{onSelect:te}}=this,se=ie;ie||(se=Q);let Ct=this.getCell(se,this.currentViewSingular),Yr=Ct&&Ct.adpCell;Yr&&Yr.isDisabled||(se.setHours(H),se.setMinutes(j),ie?(this._setInputValue(),te&&this._triggerOnSelect()):this.selectDate(se))})),ue(this,"_onFocus",(A=>{this.visible||this.show()})),ue(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ue(this,"_onMouseDown",(A=>{this.inFocus=!0})),ue(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ue(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ue(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ue(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return Ne.getDatesFunction(A)(w)})),ue(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ue(this,"getClampedDate",(A=>{let{minDate:H,maxDate:j}=this,Q=A;return j&&v(A,j)?Q=j:H&&y(A,H)&&(Q=H),Q})),this.$el=n(x),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,E),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:D,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=D,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:x,treatAsInline:E,opts:{inline:w,isMobile:D,selectedDates:q,keyboardNav:A,onlyTimepicker:H}}=this,j=n("body");(!he||he&&Ki&&!j.contains(Ki))&&!w&&this.elIsInput&&!this.$customContainer&&ae.buildGlobalContainer(ae.defaultGlobalContainerId),!D||Yi||E||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(w||this._bindEvents(),A&&!H&&(this.keyboardNav=new uo({dp:this,opts:x}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!E&&this.show(),D&&!E&&this.$el.setAttribute("readonly",!0),E&&this._createComponents()}_createMobileOverlay(){Yi=a({className:"air-datepicker-overlay"}),Ki.appendChild(Yi)}_createComponents(){let{opts:x,treatAsInline:E,opts:{inline:w,buttons:D,timepicker:q,position:A,classes:H,onlyTimepicker:j,isMobile:Q}}=this;this._buildBaseHtml(),this.elIsInput&&(w||this._setPositionClasses(A)),!w&&this.elIsInput||this.$datepicker.classList.add("-inline-"),H&&this.$datepicker.classList.add(...H.split(" ")),j&&this.$datepicker.classList.add("-only-timepicker-"),Q&&!E&&this._addMobileAttributes(),this.views[this.currentView]=new Ne({dp:this,type:this.currentView,opts:x}),this.nav=new er({dp:this,opts:x}),q&&this._addTimepicker(),D&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let x in this.views)this.views[x].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Yi.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Yi.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:x,maxDate:E}=this.opts;this.minDate=!!x&&C(x),this.maxDate=!!E&&C(E)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new tr({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new wr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:x}=this.opts;var E,w;this.elIsInput?x?(E=this.$datepicker,(w=this.$el).parentNode.insertBefore(E,w.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:x,dateFormat:E,firstDay:w,timepicker:D,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:H}=this.opts;var j;this.locale=(j=x,JSON.parse(JSON.stringify(j))),E&&(this.locale.dateFormat=E),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Q}=this.locale;if(w!==""&&(this.locale.firstDay=w),D&&typeof E!="function"){let ie=Q?H:"";this.locale.dateFormat=[this.locale.dateFormat,Q||""].join(ie)}q&&typeof E!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(x){if(typeof x=="function")return void this.$datepicker.classList.add("-custom-position-");let E=(x=x.split(" "))[0],w=`air-datepicker -${E}-${x[1]}- -from-${E}-`;this.$datepicker.classList.add(...w.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:x,minDate:E,maxDate:w}=this;w&&v(x,w)&&this.setViewDate(w),E&&y(x,E)&&this.setViewDate(E)}formatDate(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,E=arguments.length>1?arguments[1]:void 0;if(x=C(x),!(x instanceof Date))return;let w=E,D=this.locale,q=p(x),A=q.dayPeriod,H=f(x),j=ae.replacer,Q={T:x.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:D.daysShort[q.day],EEEE:D.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:D.monthsShort[q.month],MMMM:D.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:H[0],yyyy2:H[1]};for(let[ie,te]of Object.entries(Q))w=j(w,$(ie),te);return w}down(x){this._handleUpDownActions(x,"down")}up(x){this._handleUpDownActions(x,"up")}selectDate(x){let E,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:D,parsedViewDate:q,selectedDates:A}=this,{updateTime:H,silent:j}=w,{moveToOtherMonthsOnSelect:Q,moveToOtherYearsOnSelect:ie,multipleDates:te,range:se,autoClose:Ct,onBeforeSelect:Yr}=this.opts,zr=A.length;if(Array.isArray(x))return x.forEach((yn=>{this.selectDate(yn,w)})),new Promise((yn=>{setTimeout(yn)}));if((x=C(x))instanceof Date){if(Yr&&!j&&!Yr({date:x,datepicker:this}))return Promise.resolve();if(D===t.days&&x.getMonth()!==q.month&&Q&&(E=new Date(x.getFullYear(),x.getMonth(),1)),D===t.years&&x.getFullYear()!==q.year&&ie&&(E=new Date(x.getFullYear(),0,1)),E&&this.setViewDate(E),te&&!se){if(zr===te)return;this._checkIfDateIsSelected(x)||A.push(x)}else if(se)switch(zr){case 1:A.push(x),this.rangeDateTo||(this.rangeDateTo=x),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=x),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[x],this.rangeDateFrom=x,this.rangeDateTo="";break;default:this.selectedDates=[x],this.rangeDateFrom=x}else this.selectedDates=[x];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:w?.silent,date:x,updateTime:H}),this._updateLastSelectedDate(x),Ct&&!this.timepickerIsActive&&this.visible&&(te||se?se&&zr===1&&this.hide():this.hide()),new Promise((yn=>{setTimeout(yn)}))}}unselectDate(x){let E=this.selectedDates,w=this;if((x=C(x))instanceof Date)return E.some(((D,q)=>{if(g(D,x))return E.splice(q,1),w.selectedDates.length?(w.rangeDateTo="",w.rangeDateFrom=E[0],w._updateLastSelectedDate(w.selectedDates[w.selectedDates.length-1])):(w.rangeDateFrom="",w.rangeDateTo="",w._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:x}),!0}))}replaceDate(x,E){let w=this.selectedDates.find((q=>g(q,x,this.currentView))),D=this.selectedDates.indexOf(w);D<0||g(this.selectedDates[D],E,this.currentView)||(this.selectedDates[D]=E,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:E,updateTime:!0}),this._updateLastSelectedDate(E))}clear(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:x.silent}),new Promise((E=>{setTimeout(E)}))}show(){let{onShow:x,isMobile:E}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,x&&this._scheduleCallAfterTransition(x),E&&this._showMobileOverlay()}hide(){let{onHide:x,isMobile:E}=this.opts,w=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((D=>{!this.customHide&&(D&&w||!D&&!w)&&this._finishHide(),x&&x(D)})),E&&Yi.classList.remove("-active-")}_triggerOnSelect(){let x=[],E=[],{selectedDates:w,locale:D,opts:{onSelect:q,multipleDates:A,range:H}}=this,j=A||H,Q=typeof D.dateFormat=="function";w.length&&(x=w.map(S),E=Q?A?D.dateFormat(x):x.map((ie=>D.dateFormat(ie))):x.map((ie=>this.formatDate(ie,D.dateFormat)))),q({date:j?x:x[0],formattedDate:j?E:E[0],datepicker:this})}_handleAlreadySelectedDates(x,E){let{selectedDates:w,rangeDateFrom:D,rangeDateTo:q}=this,{range:A,toggleSelected:H}=this.opts,j=w.length,Q=typeof H=="function"?H({datepicker:this,date:E}):H,ie=!!(A&&j===1&&x),te=ie?S(E):E;A&&!Q&&(j!==2&&this.selectDate(te),j===2&&g(D,q))||(Q?this.unselectDate(te):this._updateLastSelectedDate(ie?te:x))}_handleUpDownActions(x,E){if(!((x=C(x||this.focusDate||this.viewDate))instanceof Date))return;let w=E==="up"?this.viewIndex+1:this.viewIndex-1;w>2&&(w=2),w<0&&(w=0),this.setViewDate(new Date(x.getFullYear(),x.getMonth(),1)),this.setCurrentView(this.viewIndexes[w])}getCell(x){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((x=C(x))instanceof Date))return;let{year:w,month:D,date:q}=p(x),A=`[data-year="${w}"]`,H=`[data-month="${D}"]`,j={[t.day]:`${A}${H}[data-date="${q}"]`,[t.month]:`${A}${H}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(j[E]):void 0}_showMobileOverlay(){Yi.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((x,E)=>parseFloat(E)+x),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return p(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Ki}static replacer(x,E,w){return x.replace(E,(function(D,q,A,H){return q+w+H}))}}var ze;return ue(ae,"defaults",r),ue(ae,"version","3.6.0"),ue(ae,"defaultGlobalContainerId","air-datepicker-global-container"),ze=ae.prototype,Object.assign(ze,Ya),i.default})()}))});var O1=Fn((Die,N1)=>{var wi=-1,Br=1,Yt=0;function Gl(o,i,t,r,n){if(o===i)return o?[[Yt,o]]:[];if(t!=null){var a=w8(o,i,t);if(a)return a}var s=cm(o,i),l=o.substring(0,s);o=o.substring(s),i=i.substring(s),s=rp(o,i);var p=o.substring(o.length-s);o=o.substring(0,o.length-s),i=i.substring(0,i.length-s);var h=u8(o,i);return l&&h.unshift([Yt,l]),p&&h.push([Yt,p]),dm(h,n),r&&g8(h),h}function u8(o,i){var t;if(!o)return[[Br,i]];if(!i)return[[wi,o]];var r=o.length>i.length?o:i,n=o.length>i.length?i:o,a=r.indexOf(n);if(a!==-1)return t=[[Br,r.substring(0,a)],[Yt,n],[Br,r.substring(a+n.length)]],o.length>i.length&&(t[0][0]=t[2][0]=wi),t;if(n.length===1)return[[wi,o],[Br,i]];var s=f8(o,i);if(s){var l=s[0],p=s[1],h=s[2],m=s[3],f=s[4],b=Gl(l,h),g=Gl(p,m);return b.concat([[Yt,f]],g)}return m8(o,i)}function m8(o,i){for(var t=o.length,r=i.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),p=new Array(s),h=0;h<s;h++)l[h]=-1,p[h]=-1;l[a+1]=0,p[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,y=0,S=0;S<n;S++){for(var T=-S+b;T<=S-g;T+=2){var N=a+T,U;T===-S||T!==S&&l[N-1]<l[N+1]?U=l[N+1]:U=l[N-1]+1;for(var I=U-T;U<t&&I<r&&o.charAt(U)===i.charAt(I);)U++,I++;if(l[N]=U,U>t)g+=2;else if(I>r)b+=2;else if(f){var C=a+m-T;if(C>=0&&C<s&&p[C]!==-1){var $=t-p[C];if(U>=$)return T1(o,i,U,I)}}}for(var L=-S+v;L<=S-y;L+=2){var C=a+L,$;L===-S||L!==S&&p[C-1]<p[C+1]?$=p[C+1]:$=p[C-1]+1;for(var W=$-L;$<t&&W<r&&o.charAt(t-$-1)===i.charAt(r-W-1);)$++,W++;if(p[C]=$,$>t)y+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var U=l[N],I=a+U-N;if($=t-$,U>=$)return T1(o,i,U,I)}}}}return[[wi,o],[Br,i]]}function T1(o,i,t,r){var n=o.substring(0,t),a=i.substring(0,r),s=o.substring(t),l=i.substring(r),p=Gl(n,a),h=Gl(s,l);return p.concat(h)}function cm(o,i){if(!o||!i||o.charAt(0)!==i.charAt(0))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(a,n)==i.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return q1(o.charCodeAt(n-1))&&n--,n}function $1(o,i){var t=o.length,r=i.length;if(t==0||r==0)return 0;t>r?o=o.substring(t-r):t<r&&(i=i.substring(0,t));var n=Math.min(t,r);if(o==i)return n;for(var a=0,s=1;;){var l=o.substring(n-s),p=i.indexOf(l);if(p==-1)return a;s+=p,(p==0||o.substring(n-s)==i.substring(0,s))&&(a=s,s++)}}function rp(o,i){if(!o||!i||o.slice(-1)!==i.slice(-1))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(o.length-n,o.length-a)==i.substring(i.length-n,i.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return I1(o.charCodeAt(o.length-n))&&n--,n}function f8(o,i){var t=o.length>i.length?o:i,r=o.length>i.length?i:o;if(t.length<4||r.length*2<t.length)return null;function n(g,v,y){for(var S=g.substring(y,y+Math.floor(g.length/4)),T=-1,N="",U,I,C,$;(T=v.indexOf(S,T+1))!==-1;){var L=cm(g.substring(y),v.substring(T)),W=rp(g.substring(0,y),v.substring(0,T));N.length<W+L&&(N=v.substring(T-W,T)+v.substring(T,T+L),U=g.substring(0,y-W),I=g.substring(y+L),C=v.substring(0,T-W),$=v.substring(T+L))}return N.length*2>=g.length?[U,I,C,$,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var p,h,m,f;o.length>i.length?(p=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],p=l[2],h=l[3]);var b=l[4];return[p,h,m,f,b]}function g8(o){for(var i=!1,t=[],r=0,n=null,a=0,s=0,l=0,p=0,h=0;a<o.length;)o[a][0]==Yt?(t[r++]=a,s=p,l=h,p=0,h=0,n=o[a][1]):(o[a][0]==Br?p+=o[a][1].length:h+=o[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(p,h)&&(o.splice(t[r-1],0,[wi,n]),o[t[r-1]+1][0]=Br,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,p=0,h=0,n=null,i=!0)),a++;for(i&&dm(o),y8(o),a=1;a<o.length;){if(o[a-1][0]==wi&&o[a][0]==Br){var m=o[a-1][1],f=o[a][1],b=$1(m,f),g=$1(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(o.splice(a,0,[Yt,f.substring(0,b)]),o[a-1][1]=m.substring(0,m.length-b),o[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(o.splice(a,0,[Yt,m.substring(0,g)]),o[a-1][0]=Br,o[a-1][1]=f.substring(0,f.length-g),o[a+1][0]=wi,o[a+1][1]=m.substring(g),a++),a++}a++}}var A1=/[^a-zA-Z0-9]/,M1=/\s/,L1=/[\r\n]/,b8=/\n\r?\n$/,v8=/^\r?\n\r?\n/;function y8(o){function i(g,v){if(!g||!v)return 6;var y=g.charAt(g.length-1),S=v.charAt(0),T=y.match(A1),N=S.match(A1),U=T&&y.match(M1),I=N&&S.match(M1),C=U&&y.match(L1),$=I&&S.match(L1),L=C&&g.match(b8),W=$&&v.match(v8);return L||W?5:C||$?4:T&&!U&&I?3:U||I?2:T||N?1:0}for(var t=1;t<o.length-1;){if(o[t-1][0]==Yt&&o[t+1][0]==Yt){var r=o[t-1][1],n=o[t][1],a=o[t+1][1],s=rp(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var p=r,h=n,m=a,f=i(r,n)+i(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=i(r,n)+i(n,a);b>=f&&(f=b,p=r,h=n,m=a)}o[t-1][1]!=p&&(p?o[t-1][1]=p:(o.splice(t-1,1),t--),o[t][1]=h,m?o[t+1][1]=m:(o.splice(t+1,1),t--))}t++}}function dm(o,i){o.push([Yt,""]);for(var t=0,r=0,n=0,a="",s="",l;t<o.length;){if(t<o.length-1&&!o[t][1]){o.splice(t,1);continue}switch(o[t][0]){case Br:n++,s+=o[t][1],t++;break;case wi:r++,a+=o[t][1],t++;break;case Yt:var p=t-n-r-1;if(i){if(p>=0&&R1(o[p][1])){var h=o[p][1].slice(-1);if(o[p][1]=o[p][1].slice(0,-1),a=h+a,s=h+s,!o[p][1]){o.splice(p,1),t--;var m=p-1;o[m]&&o[m][0]===Br&&(n++,s=o[m][1]+s,m--),o[m]&&o[m][0]===wi&&(r++,a=o[m][1]+a,m--),p=m}}if(D1(o[t][1])){var h=o[t][1].charAt(0);o[t][1]=o[t][1].slice(1),a+=h,s+=h}}if(t<o.length-1&&!o[t][1]){o.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=cm(s,a),l!==0&&(p>=0?o[p][1]+=s.substring(0,l):(o.splice(0,0,[Yt,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=rp(s,a),l!==0&&(o[t][1]=s.substring(s.length-l)+o[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(o.splice(t-f,f),t=t-f):a.length===0?(o.splice(t-f,f,[Br,s]),t=t-f+1):s.length===0?(o.splice(t-f,f,[wi,a]),t=t-f+1):(o.splice(t-f,f,[wi,a],[Br,s]),t=t-f+2)}t!==0&&o[t-1][0]===Yt?(o[t-1][1]+=o[t][1],o.splice(t,1)):t++,n=0,r=0,a="",s="";break}}o[o.length-1][1]===""&&o.pop();var b=!1;for(t=1;t<o.length-1;)o[t-1][0]===Yt&&o[t+1][0]===Yt&&(o[t][1].substring(o[t][1].length-o[t-1][1].length)===o[t-1][1]?(o[t][1]=o[t-1][1]+o[t][1].substring(0,o[t][1].length-o[t-1][1].length),o[t+1][1]=o[t-1][1]+o[t+1][1],o.splice(t-1,1),b=!0):o[t][1].substring(0,o[t+1][1].length)==o[t+1][1]&&(o[t-1][1]+=o[t+1][1],o[t][1]=o[t][1].substring(o[t+1][1].length)+o[t+1][1],o.splice(t+1,1),b=!0)),t++;b&&dm(o,i)}function q1(o){return o>=55296&&o<=56319}function I1(o){return o>=56320&&o<=57343}function D1(o){return I1(o.charCodeAt(0))}function R1(o){return q1(o.charCodeAt(o.length-1))}function x8(o){for(var i=[],t=0;t<o.length;t++)o[t][1].length>0&&i.push(o[t]);return i}function lm(o,i,t,r){return R1(o)||D1(r)?null:x8([[Yt,o],[wi,i],[Br,t],[Yt,r]])}function w8(o,i,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=o.length,s=i.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,p=o.slice(0,l),h=o.slice(l),m=n?n.index:null;e:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break e;var b=i.slice(0,f),g=i.slice(f);if(g!==h)break e;var v=Math.min(l,f),y=p.slice(0,v),S=b.slice(0,v);if(y!==S)break e;var T=p.slice(v),N=b.slice(v);return lm(y,T,N,h)}e:{if(m!==null&&m!==l)break e;var U=l,b=i.slice(0,U),g=i.slice(U);if(b!==p)break e;var I=Math.min(a-U,s-U),C=h.slice(h.length-I),$=g.slice(g.length-I);if(C!==$)break e;var T=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return lm(p,T,N,C)}}if(r.length>0&&n&&n.length===0)e:{var y=o.slice(0,r.index),C=o.slice(r.index+r.length),v=y.length,I=C.length;if(s<v+I)break e;var S=i.slice(0,v),$=i.slice(s-I);if(y!==S||C!==$)break e;var T=o.slice(v,a-I),N=i.slice(v,s-I);return lm(y,T,N,C)}return null}function ip(o,i,t,r){return Gl(o,i,t,r,!0)}ip.INSERT=Br;ip.DELETE=wi;ip.EQUAL=Yt;N1.exports=ip});var Cm=Fn((Wl,vs)=>{var z8=200,Q1="__lodash_hash_undefined__",X1=9007199254740991,vm="[object Arguments]",_8="[object Array]",J1="[object Boolean]",Z1="[object Date]",k8="[object Error]",ym="[object Function]",ey="[object GeneratorFunction]",np="[object Map]",ty="[object Number]",xm="[object Object]",P1="[object Promise]",ry="[object RegExp]",op="[object Set]",iy="[object String]",ny="[object Symbol]",hm="[object WeakMap]",oy="[object ArrayBuffer]",ap="[object DataView]",ay="[object Float32Array]",sy="[object Float64Array]",ly="[object Int8Array]",cy="[object Int16Array]",dy="[object Int32Array]",py="[object Uint8Array]",hy="[object Uint8ClampedArray]",uy="[object Uint16Array]",my="[object Uint32Array]",C8=/[\\^$.*+?()[\]{}|]/g,S8=/\w*$/,E8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,et={};et[vm]=et[_8]=et[oy]=et[ap]=et[J1]=et[Z1]=et[ay]=et[sy]=et[ly]=et[cy]=et[dy]=et[np]=et[ty]=et[xm]=et[ry]=et[op]=et[iy]=et[ny]=et[py]=et[hy]=et[uy]=et[my]=!0;et[k8]=et[ym]=et[hm]=!1;var $8=typeof global=="object"&&global&&global.Object===Object&&global,A8=typeof self=="object"&&self&&self.Object===Object&&self,Kn=$8||A8||Function("return this")(),fy=typeof Wl=="object"&&Wl&&!Wl.nodeType&&Wl,H1=fy&&typeof vs=="object"&&vs&&!vs.nodeType&&vs,M8=H1&&H1.exports===fy;function L8(o,i){return o.set(i[0],i[1]),o}function q8(o,i){return o.add(i),o}function I8(o,i){for(var t=-1,r=o?o.length:0;++t<r&&i(o[t],t,o)!==!1;);return o}function D8(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function gy(o,i,t,r){var n=-1,a=o?o.length:0;for(r&&a&&(t=o[++n]);++n<a;)t=i(t,o[n],n,o);return t}function R8(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function N8(o,i){return o?.[i]}function by(o){var i=!1;if(o!=null&&typeof o.toString!="function")try{i=!!(o+"")}catch{}return i}function F1(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function wm(o,i){return function(t){return o(i(t))}}function B1(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var O8=Array.prototype,P8=Function.prototype,sp=Object.prototype,pm=Kn["__core-js_shared__"],V1=(function(){var o=/[^.]+$/.exec(pm&&pm.keys&&pm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),vy=P8.toString,$o=sp.hasOwnProperty,lp=sp.toString,H8=RegExp("^"+vy.call($o).replace(C8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U1=M8?Kn.Buffer:void 0,j1=Kn.Symbol,G1=Kn.Uint8Array,F8=wm(Object.getPrototypeOf,Object),B8=Object.create,V8=sp.propertyIsEnumerable,U8=O8.splice,W1=Object.getOwnPropertySymbols,j8=U1?U1.isBuffer:void 0,G8=wm(Object.keys,Object),um=ws(Kn,"DataView"),Kl=ws(Kn,"Map"),mm=ws(Kn,"Promise"),fm=ws(Kn,"Set"),gm=ws(Kn,"WeakMap"),Yl=ws(Object,"create"),W8=Ta(um),K8=Ta(Kl),Y8=Ta(mm),Q8=Ta(fm),X8=Ta(gm),K1=j1?j1.prototype:void 0,Y1=K1?K1.valueOf:void 0;function Ea(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function J8(){this.__data__=Yl?Yl(null):{}}function Z8(o){return this.has(o)&&delete this.__data__[o]}function e9(o){var i=this.__data__;if(Yl){var t=i[o];return t===Q1?void 0:t}return $o.call(i,o)?i[o]:void 0}function t9(o){var i=this.__data__;return Yl?i[o]!==void 0:$o.call(i,o)}function r9(o,i){var t=this.__data__;return t[o]=Yl&&i===void 0?Q1:i,this}Ea.prototype.clear=J8;Ea.prototype.delete=Z8;Ea.prototype.get=e9;Ea.prototype.has=t9;Ea.prototype.set=r9;function Yn(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function i9(){this.__data__=[]}function n9(o){var i=this.__data__,t=cp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():U8.call(i,t,1),!0}function o9(o){var i=this.__data__,t=cp(i,o);return t<0?void 0:i[t][1]}function a9(o){return cp(this.__data__,o)>-1}function s9(o,i){var t=this.__data__,r=cp(t,o);return r<0?t.push([o,i]):t[r][1]=i,this}Yn.prototype.clear=i9;Yn.prototype.delete=n9;Yn.prototype.get=o9;Yn.prototype.has=a9;Yn.prototype.set=s9;function ys(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function l9(){this.__data__={hash:new Ea,map:new(Kl||Yn),string:new Ea}}function c9(o){return dp(this,o).delete(o)}function d9(o){return dp(this,o).get(o)}function p9(o){return dp(this,o).has(o)}function h9(o,i){return dp(this,o).set(o,i),this}ys.prototype.clear=l9;ys.prototype.delete=c9;ys.prototype.get=d9;ys.prototype.has=p9;ys.prototype.set=h9;function xs(o){this.__data__=new Yn(o)}function u9(){this.__data__=new Yn}function m9(o){return this.__data__.delete(o)}function f9(o){return this.__data__.get(o)}function g9(o){return this.__data__.has(o)}function b9(o,i){var t=this.__data__;if(t instanceof Yn){var r=t.__data__;if(!Kl||r.length<z8-1)return r.push([o,i]),this;t=this.__data__=new ys(r)}return t.set(o,i),this}xs.prototype.clear=u9;xs.prototype.delete=m9;xs.prototype.get=f9;xs.prototype.has=g9;xs.prototype.set=b9;function v9(o,i){var t=_m(o)||B9(o)?R8(o.length,String):[],r=t.length,n=!!r;for(var a in o)(i||$o.call(o,a))&&!(n&&(a=="length"||O9(a,r)))&&t.push(a);return t}function yy(o,i,t){var r=o[i];(!($o.call(o,i)&&_y(r,t))||t===void 0&&!(i in o))&&(o[i]=t)}function cp(o,i){for(var t=o.length;t--;)if(_y(o[t][0],i))return t;return-1}function y9(o,i){return o&&xy(i,km(i),o)}function bm(o,i,t,r,n,a,s){var l;if(r&&(l=a?r(o,n,a,s):r(o)),l!==void 0)return l;if(!pp(o))return o;var p=_m(o);if(p){if(l=D9(o),!i)return L9(o,l)}else{var h=Sa(o),m=h==ym||h==ey;if(U9(o))return C9(o,i);if(h==xm||h==vm||m&&!a){if(by(o))return a?o:{};if(l=R9(m?{}:o),!i)return q9(o,y9(l,o))}else{if(!et[h])return a?o:{};l=N9(o,h,bm,i)}}s||(s=new xs);var f=s.get(o);if(f)return f;if(s.set(o,l),!p)var b=t?I9(o):km(o);return I8(b||o,function(g,v){b&&(v=g,g=o[v]),yy(l,v,bm(g,i,t,r,v,o,s))}),l}function x9(o){return pp(o)?B8(o):{}}function w9(o,i,t){var r=i(o);return _m(o)?r:D8(r,t(o))}function z9(o){return lp.call(o)}function _9(o){if(!pp(o)||H9(o))return!1;var i=Cy(o)||by(o)?H8:E8;return i.test(Ta(o))}function k9(o){if(!zy(o))return G8(o);var i=[];for(var t in Object(o))$o.call(o,t)&&t!="constructor"&&i.push(t);return i}function C9(o,i){if(i)return o.slice();var t=new o.constructor(o.length);return o.copy(t),t}function zm(o){var i=new o.constructor(o.byteLength);return new G1(i).set(new G1(o)),i}function S9(o,i){var t=i?zm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}function E9(o,i,t){var r=i?t(F1(o),!0):F1(o);return gy(r,L8,new o.constructor)}function T9(o){var i=new o.constructor(o.source,S8.exec(o));return i.lastIndex=o.lastIndex,i}function $9(o,i,t){var r=i?t(B1(o),!0):B1(o);return gy(r,q8,new o.constructor)}function A9(o){return Y1?Object(Y1.call(o)):{}}function M9(o,i){var t=i?zm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function L9(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}function xy(o,i,t,r){t||(t={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(t[s],o[s],s,t,o):void 0;yy(t,s,l===void 0?o[s]:l)}return t}function q9(o,i){return xy(o,wy(o),i)}function I9(o){return w9(o,km,wy)}function dp(o,i){var t=o.__data__;return P9(i)?t[typeof i=="string"?"string":"hash"]:t.map}function ws(o,i){var t=N8(o,i);return _9(t)?t:void 0}var wy=W1?wm(W1,Object):W9,Sa=z9;(um&&Sa(new um(new ArrayBuffer(1)))!=ap||Kl&&Sa(new Kl)!=np||mm&&Sa(mm.resolve())!=P1||fm&&Sa(new fm)!=op||gm&&Sa(new gm)!=hm)&&(Sa=function(o){var i=lp.call(o),t=i==xm?o.constructor:void 0,r=t?Ta(t):void 0;if(r)switch(r){case W8:return ap;case K8:return np;case Y8:return P1;case Q8:return op;case X8:return hm}return i});function D9(o){var i=o.length,t=o.constructor(i);return i&&typeof o[0]=="string"&&$o.call(o,"index")&&(t.index=o.index,t.input=o.input),t}function R9(o){return typeof o.constructor=="function"&&!zy(o)?x9(F8(o)):{}}function N9(o,i,t,r){var n=o.constructor;switch(i){case oy:return zm(o);case J1:case Z1:return new n(+o);case ap:return S9(o,r);case ay:case sy:case ly:case cy:case dy:case py:case hy:case uy:case my:return M9(o,r);case np:return E9(o,r,t);case ty:case iy:return new n(o);case ry:return T9(o);case op:return $9(o,r,t);case ny:return A9(o)}}function O9(o,i){return i=i??X1,!!i&&(typeof o=="number"||T8.test(o))&&o>-1&&o%1==0&&o<i}function P9(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function H9(o){return!!V1&&V1 in o}function zy(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||sp;return o===t}function Ta(o){if(o!=null){try{return vy.call(o)}catch{}try{return o+""}catch{}}return""}function F9(o){return bm(o,!0,!0)}function _y(o,i){return o===i||o!==o&&i!==i}function B9(o){return V9(o)&&$o.call(o,"callee")&&(!V8.call(o,"callee")||lp.call(o)==vm)}var _m=Array.isArray;function ky(o){return o!=null&&j9(o.length)&&!Cy(o)}function V9(o){return G9(o)&&ky(o)}var U9=j8||K9;function Cy(o){var i=pp(o)?lp.call(o):"";return i==ym||i==ey}function j9(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=X1}function pp(o){var i=typeof o;return!!o&&(i=="object"||i=="function")}function G9(o){return!!o&&typeof o=="object"}function km(o){return ky(o)?v9(o):k9(o)}function W9(){return[]}function K9(){return!1}vs.exports=F9});var Nm=Fn((Ql,_s)=>{var Y9=200,Rm="__lodash_hash_undefined__",yp=1,Ny=2,Oy=9007199254740991,hp="[object Arguments]",$m="[object Array]",Q9="[object AsyncFunction]",Py="[object Boolean]",Hy="[object Date]",Fy="[object Error]",By="[object Function]",X9="[object GeneratorFunction]",up="[object Map]",Vy="[object Number]",J9="[object Null]",zs="[object Object]",Sy="[object Promise]",Z9="[object Proxy]",Uy="[object RegExp]",mp="[object Set]",jy="[object String]",e6="[object Symbol]",t6="[object Undefined]",Am="[object WeakMap]",Gy="[object ArrayBuffer]",fp="[object DataView]",r6="[object Float32Array]",i6="[object Float64Array]",n6="[object Int8Array]",o6="[object Int16Array]",a6="[object Int32Array]",s6="[object Uint8Array]",l6="[object Uint8ClampedArray]",c6="[object Uint16Array]",d6="[object Uint32Array]",p6=/[\\^$.*+?()[\]{}|]/g,h6=/^\[object .+?Constructor\]$/,u6=/^(?:0|[1-9]\d*)$/,st={};st[r6]=st[i6]=st[n6]=st[o6]=st[a6]=st[s6]=st[l6]=st[c6]=st[d6]=!0;st[hp]=st[$m]=st[Gy]=st[Py]=st[fp]=st[Hy]=st[Fy]=st[By]=st[up]=st[Vy]=st[zs]=st[Uy]=st[mp]=st[jy]=st[Am]=!1;var Wy=typeof global=="object"&&global&&global.Object===Object&&global,m6=typeof self=="object"&&self&&self.Object===Object&&self,Qn=Wy||m6||Function("return this")(),Ky=typeof Ql=="object"&&Ql&&!Ql.nodeType&&Ql,Ey=Ky&&typeof _s=="object"&&_s&&!_s.nodeType&&_s,Yy=Ey&&Ey.exports===Ky,Sm=Yy&&Wy.process,Ty=(function(){try{return Sm&&Sm.binding&&Sm.binding("util")}catch{}})(),$y=Ty&&Ty.isTypedArray;function f6(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}function g6(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function b6(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}function v6(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function y6(o){return function(i){return o(i)}}function x6(o,i){return o.has(i)}function w6(o,i){return o?.[i]}function z6(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function _6(o,i){return function(t){return o(i(t))}}function k6(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var C6=Array.prototype,S6=Function.prototype,xp=Object.prototype,Em=Qn["__core-js_shared__"],Qy=S6.toString,$n=xp.hasOwnProperty,Ay=(function(){var o=/[^.]+$/.exec(Em&&Em.keys&&Em.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Xy=xp.toString,E6=RegExp("^"+Qy.call($n).replace(p6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),My=Yy?Qn.Buffer:void 0,gp=Qn.Symbol,Ly=Qn.Uint8Array,Jy=xp.propertyIsEnumerable,T6=C6.splice,$a=gp?gp.toStringTag:void 0,qy=Object.getOwnPropertySymbols,$6=My?My.isBuffer:void 0,A6=_6(Object.keys,Object),Mm=ks(Qn,"DataView"),Xl=ks(Qn,"Map"),Lm=ks(Qn,"Promise"),qm=ks(Qn,"Set"),Im=ks(Qn,"WeakMap"),Jl=ks(Object,"create"),M6=La(Mm),L6=La(Xl),q6=La(Lm),I6=La(qm),D6=La(Im),Iy=gp?gp.prototype:void 0,Tm=Iy?Iy.valueOf:void 0;function Aa(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function R6(){this.__data__=Jl?Jl(null):{},this.size=0}function N6(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}function O6(o){var i=this.__data__;if(Jl){var t=i[o];return t===Rm?void 0:t}return $n.call(i,o)?i[o]:void 0}function P6(o){var i=this.__data__;return Jl?i[o]!==void 0:$n.call(i,o)}function H6(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Jl&&i===void 0?Rm:i,this}Aa.prototype.clear=R6;Aa.prototype.delete=N6;Aa.prototype.get=O6;Aa.prototype.has=P6;Aa.prototype.set=H6;function Xn(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function F6(){this.__data__=[],this.size=0}function B6(o){var i=this.__data__,t=wp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():T6.call(i,t,1),--this.size,!0}function V6(o){var i=this.__data__,t=wp(i,o);return t<0?void 0:i[t][1]}function U6(o){return wp(this.__data__,o)>-1}function j6(o,i){var t=this.__data__,r=wp(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}Xn.prototype.clear=F6;Xn.prototype.delete=B6;Xn.prototype.get=V6;Xn.prototype.has=U6;Xn.prototype.set=j6;function Ma(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function G6(){this.size=0,this.__data__={hash:new Aa,map:new(Xl||Xn),string:new Aa}}function W6(o){var i=zp(this,o).delete(o);return this.size-=i?1:0,i}function K6(o){return zp(this,o).get(o)}function Y6(o){return zp(this,o).has(o)}function Q6(o,i){var t=zp(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}Ma.prototype.clear=G6;Ma.prototype.delete=W6;Ma.prototype.get=K6;Ma.prototype.has=Y6;Ma.prototype.set=Q6;function bp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Ma;++i<t;)this.add(o[i])}function X6(o){return this.__data__.set(o,Rm),this}function J6(o){return this.__data__.has(o)}bp.prototype.add=bp.prototype.push=X6;bp.prototype.has=J6;function Mo(o){var i=this.__data__=new Xn(o);this.size=i.size}function Z6(){this.__data__=new Xn,this.size=0}function eC(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}function tC(o){return this.__data__.get(o)}function rC(o){return this.__data__.has(o)}function iC(o,i){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!Xl||r.length<Y9-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Ma(r)}return t.set(o,i),this.size=t.size,this}Mo.prototype.clear=Z6;Mo.prototype.delete=eC;Mo.prototype.get=tC;Mo.prototype.has=rC;Mo.prototype.set=iC;function nC(o,i){var t=vp(o),r=!t&&yC(o),n=!t&&!r&&Dm(o),a=!t&&!r&&!n&&ox(o),s=t||r||n||a,l=s?v6(o.length,String):[],p=l.length;for(var h in o)(i||$n.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||mC(h,p)))&&l.push(h);return l}function wp(o,i){for(var t=o.length;t--;)if(tx(o[t][0],i))return t;return-1}function oC(o,i,t){var r=i(o);return vp(o)?r:g6(r,t(o))}function ec(o){return o==null?o===void 0?t6:J9:$a&&$a in Object(o)?hC(o):vC(o)}function Dy(o){return Zl(o)&&ec(o)==hp}function Zy(o,i,t,r,n){return o===i?!0:o==null||i==null||!Zl(o)&&!Zl(i)?o!==o&&i!==i:aC(o,i,t,r,Zy,n)}function aC(o,i,t,r,n,a){var s=vp(o),l=vp(i),p=s?$m:Ao(o),h=l?$m:Ao(i);p=p==hp?zs:p,h=h==hp?zs:h;var m=p==zs,f=h==zs,b=p==h;if(b&&Dm(o)){if(!Dm(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new Mo),s||ox(o)?ex(o,i,t,r,n,a):dC(o,i,p,t,r,n,a);if(!(t&yp)){var g=m&&$n.call(o,"__wrapped__"),v=f&&$n.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new Mo),n(y,S,t,r,a)}}return b?(a||(a=new Mo),pC(o,i,t,r,n,a)):!1}function sC(o){if(!nx(o)||gC(o))return!1;var i=rx(o)?E6:h6;return i.test(La(o))}function lC(o){return Zl(o)&&ix(o.length)&&!!st[ec(o)]}function cC(o){if(!bC(o))return A6(o);var i=[];for(var t in Object(o))$n.call(o,t)&&t!="constructor"&&i.push(t);return i}function ex(o,i,t,r,n,a){var s=t&yp,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o);if(h&&a.get(i))return h==i;var m=-1,f=!0,b=t&Ny?new bp:void 0;for(a.set(o,i),a.set(i,o);++m<l;){var g=o[m],v=i[m];if(r)var y=s?r(v,g,m,i,o,a):r(g,v,m,o,i,a);if(y!==void 0){if(y)continue;f=!1;break}if(b){if(!b6(i,function(S,T){if(!x6(b,T)&&(g===S||n(g,S,t,r,a)))return b.push(T)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(o),a.delete(i),f}function dC(o,i,t,r,n,a,s){switch(t){case fp:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case Gy:return!(o.byteLength!=i.byteLength||!a(new Ly(o),new Ly(i)));case Py:case Hy:case Vy:return tx(+o,+i);case Fy:return o.name==i.name&&o.message==i.message;case Uy:case jy:return o==i+"";case up:var l=z6;case mp:var p=r&yp;if(l||(l=k6),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=Ny,s.set(o,i);var m=ex(l(o),l(i),r,n,a,s);return s.delete(o),m;case e6:if(Tm)return Tm.call(o)==Tm.call(i)}return!1}function pC(o,i,t,r,n,a){var s=t&yp,l=Ry(o),p=l.length,h=Ry(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:$n.call(i,b)))return!1}var g=a.get(o);if(g&&a.get(i))return g==i;var v=!0;a.set(o,i),a.set(i,o);for(var y=s;++f<p;){b=l[f];var S=o[b],T=i[b];if(r)var N=s?r(T,S,b,i,o,a):r(S,T,b,o,i,a);if(!(N===void 0?S===T||n(S,T,t,r,a):N)){v=!1;break}y||(y=b=="constructor")}if(v&&!y){var U=o.constructor,I=i.constructor;U!=I&&"constructor"in o&&"constructor"in i&&!(typeof U=="function"&&U instanceof U&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(o),a.delete(i),v}function Ry(o){return oC(o,zC,uC)}function zp(o,i){var t=o.__data__;return fC(i)?t[typeof i=="string"?"string":"hash"]:t.map}function ks(o,i){var t=w6(o,i);return sC(t)?t:void 0}function hC(o){var i=$n.call(o,$a),t=o[$a];try{o[$a]=void 0;var r=!0}catch{}var n=Xy.call(o);return r&&(i?o[$a]=t:delete o[$a]),n}var uC=qy?function(o){return o==null?[]:(o=Object(o),f6(qy(o),function(i){return Jy.call(o,i)}))}:_C,Ao=ec;(Mm&&Ao(new Mm(new ArrayBuffer(1)))!=fp||Xl&&Ao(new Xl)!=up||Lm&&Ao(Lm.resolve())!=Sy||qm&&Ao(new qm)!=mp||Im&&Ao(new Im)!=Am)&&(Ao=function(o){var i=ec(o),t=i==zs?o.constructor:void 0,r=t?La(t):"";if(r)switch(r){case M6:return fp;case L6:return up;case q6:return Sy;case I6:return mp;case D6:return Am}return i});function mC(o,i){return i=i??Oy,!!i&&(typeof o=="number"||u6.test(o))&&o>-1&&o%1==0&&o<i}function fC(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function gC(o){return!!Ay&&Ay in o}function bC(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||xp;return o===t}function vC(o){return Xy.call(o)}function La(o){if(o!=null){try{return Qy.call(o)}catch{}try{return o+""}catch{}}return""}function tx(o,i){return o===i||o!==o&&i!==i}var yC=Dy((function(){return arguments})())?Dy:function(o){return Zl(o)&&$n.call(o,"callee")&&!Jy.call(o,"callee")},vp=Array.isArray;function xC(o){return o!=null&&ix(o.length)&&!rx(o)}var Dm=$6||kC;function wC(o,i){return Zy(o,i)}function rx(o){if(!nx(o))return!1;var i=ec(o);return i==By||i==X9||i==Q9||i==Z9}function ix(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Oy}function nx(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}function Zl(o){return o!=null&&typeof o=="object"}var ox=$y?y6($y):lC;function zC(o){return xC(o)?nC(o):cC(o)}function _C(){return[]}function kC(){return!1}_s.exports=wC});var ax=Fn(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var CC=Cm(),SC=Nm(),Om;(function(o){function i(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let p=CC(s);l||(p=Object.keys(p).reduce((h,m)=>(p[m]!=null&&(h[m]=p[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(p[h]=a[h]);return Object.keys(p).length>0?p:void 0}o.compose=i;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((p,h)=>(SC(a[h],s[h])||(p[h]=s[h]===void 0?null:s[h]),p),{});return Object.keys(l).length>0?l:void 0}o.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((p,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(p[h]=s[h]),p),{});return Object.keys(a).reduce((p,h)=>(a[h]!==s[h]&&s[h]===void 0&&(p[h]=null),p),l)}o.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let p=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(p).length>0?p:void 0}o.transform=n})(Om||(Om={}));Pm.default=Om});var Bm=Fn(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var Hm;(function(o){function i(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}o.length=i})(Hm||(Hm={}));Fm.default=Hm});var lx=Fn(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var sx=Bm(),Vm=class{constructor(i){this.ops=i,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(i){i||(i=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=sx.default.length(t);if(i>=n-r?(i=n-r,this.index+=1,this.offset=0):this.offset+=i,typeof t.delete=="number")return{delete:i};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=i:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,i):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?sx.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let i=this.ops[this.index];return i?typeof i.delete=="number"?"delete":typeof i.retain=="number"||typeof i.retain=="object"&&i.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let i=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=i,this.index=t,[r].concat(n)}}else return[]}};Um.default=Vm});var ei=Fn((Zn,kp)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AttributeMap=Zn.OpIterator=Zn.Op=void 0;var _p=O1(),EC=Cm(),jm=Nm(),qa=ax();Zn.AttributeMap=qa.default;var Jn=Bm();Zn.Op=Jn.default;var Ri=lx();Zn.OpIterator=Ri.default;var TC="\0",cx=(o,i)=>{if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);let t=Object.keys(o)[0];if(!t||t!==Object.keys(i)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(i)[0]}`);return[t,o[t],i[t]]},eo=class o{constructor(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}static registerEmbed(i,t){this.handlers[i]=t}static unregisterEmbed(i){delete this.handlers[i]}static getHandler(i){let t=this.handlers[i];if(!t)throw new Error(`no handlers for embed type "${i}"`);return t}insert(i,t){let r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(i){return i<=0?this:this.push({delete:i})}retain(i,t){if(typeof i=="number"&&i<=0)return this;let r={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(i){let t=this.ops.length,r=this.ops[t-1];if(i=EC(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(i),this;if(jm(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this}chop(){let i=this.ops[this.ops.length-1];return i&&typeof i.retain=="number"&&!i.attributes&&this.ops.pop(),this}filter(i){return this.ops.filter(i)}forEach(i){this.ops.forEach(i)}map(i){return this.ops.map(i)}partition(i){let t=[],r=[];return this.forEach(n=>{(i(n)?t:r).push(n)}),[t,r]}reduce(i,t){return this.ops.reduce(i,t)}changeLength(){return this.reduce((i,t)=>t.insert?i+Jn.default.length(t):t.delete?i-t.delete:i,0)}length(){return this.reduce((i,t)=>i+Jn.default.length(t),0)}slice(i=0,t=1/0){let r=[],n=new Ri.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<i?s=n.next(i-a):(s=n.next(t-a),r.push(s)),a+=Jn.default.length(s)}return new o(r)}compose(i){let t=new Ri.default(this.ops),r=new Ri.default(i.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new o(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),p=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof p.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")p.retain==null?m.insert=p.insert:m.retain=p.retain;else{let b=p.retain==null?"insert":"retain",[g,v,y]=cx(p[b],h.retain),S=o.getHandler(g);m[b]={[g]:S.compose(v,y,b==="retain")}}let f=qa.default.compose(p.attributes,h.attributes,typeof p.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&jm(s.ops[s.ops.length-1],m)){let b=new o(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof p.retain=="number"||typeof p.retain=="object"&&p.retain!==null)&&s.push(h)}return s.chop()}concat(i){let t=new o(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t}diff(i,t){if(this.ops===i.ops)return new o;let r=[this,i].map(p=>p.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:TC;let m=p===i?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new o,a=_p(r[0],r[1],t,!0),s=new Ri.default(this.ops),l=new Ri.default(i.ops);return a.forEach(p=>{let h=p[1].length;for(;h>0;){let m=0;switch(p[0]){case _p.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case _p.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case _p.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);jm(f.insert,b.insert)?n.retain(m,qa.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(i,t=`
|
|
2
|
-
`){let r=new
|
|
1
|
+
import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var ju=Fn((Vl,Uu)=>{(function(o,i){typeof Vl=="object"&&typeof Uu=="object"?Uu.exports=i():typeof define=="function"&&define.amd?define([],i):typeof Vl=="object"?Vl.AirDatepicker=i():o.AirDatepicker=i()})(Vl,(function(){return(function(){"use strict";var o={d:function(O,x){for(var E in x)o.o(x,E)&&!o.o(O,E)&&Object.defineProperty(O,E,{enumerable:!0,get:x[E]})},o:function(O,x){return Object.prototype.hasOwnProperty.call(O,x)}},i={};o.d(i,{default:function(){return ae}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(O){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof O=="string"?x.querySelector(O):O}function a(){let{tagName:O="div",className:x="",innerHtml:E="",id:w="",attrs:D={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(O);return x&&q.classList.add(...x.split(" ")),w&&(q.id=w),E&&(q.innerHTML=E),D&&s(q,D),q}function s(O,x){for(let[E,w]of Object.entries(x))w!==void 0&&O.setAttribute(E,w);return O}function l(O){return new Date(O.getFullYear(),O.getMonth()+1,0).getDate()}function p(O){let x=O.getHours(),{hours:E,dayPeriod:w}=h(x);return{year:O.getFullYear(),month:O.getMonth(),fullMonth:O.getMonth()+1<10?"0"+(O.getMonth()+1):O.getMonth()+1,date:O.getDate(),fullDate:O.getDate()<10?"0"+O.getDate():O.getDate(),day:O.getDay(),hours:x,fullHours:m(x),hours12:E,dayPeriod:w,fullHours12:m(E),minutes:O.getMinutes(),fullMinutes:O.getMinutes()<10?"0"+O.getMinutes():O.getMinutes()}}function h(O){return{dayPeriod:O>11?"pm":"am",hours:O%12==0?12:O%12}}function m(O){return O<10?"0"+O:O}function f(O){let x=10*Math.floor(O.getFullYear()/10);return[x,x+9]}function b(){let O=[];for(var x=arguments.length,E=new Array(x),w=0;w<x;w++)E[w]=arguments[w];return E.forEach((D=>{if(typeof D=="object")for(let q in D)D[q]&&O.push(q);else D&&O.push(D)})),O.join(" ")}function g(O,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!O||!x)return!1;let w=p(O),D=p(x);return{[t.days]:w.date===D.date&&w.month===D.month&&w.year===D.year,[t.months]:w.month===D.month&&w.year===D.year,[t.years]:w.year===D.year}[E]}function v(O,x,E){let w=S(O,!1).getTime(),D=S(x,!1).getTime();return E?w>=D:w>D}function y(O,x){return!v(O,x,!0)}function S(O){let x=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],E=new Date(O.getTime());return typeof x!="boolean"||x||(function(w){w.setHours(0,0,0,0)})(E),E}function T(O,x,E){O.length?O.forEach((w=>{w.addEventListener(x,E)})):O.addEventListener(x,E)}function N(O,x){return!(!O||O===document||O instanceof DocumentFragment)&&(O.matches(x)?O:N(O.parentNode,x))}function U(O,x,E){return O>E?E:O<x?x:O}function I(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];return E.filter((D=>D)).forEach((D=>{for(let[q,A]of Object.entries(D))if(A!==void 0&&A.toString()==="[object Object]"){let H=O[q]!==void 0?O[q].toString():void 0,j=A.toString(),Q=Array.isArray(A)?[]:{};O[q]=O[q]?H!==j?Q:O[q]:Q,I(O[q],A)}else O[q]=A})),O}function C(O){let x=O;return O instanceof Date||(typeof O=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(O)&&(O+="T00:00:00"),x=new Date(O)),isNaN(x.getTime())&&(console.log(`Unable to convert value "${O}" to Date object`),x=!1),x}function $(O){let x="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+x+")("+O+")($|<|"+x+")","g")}function L(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class W{constructor(){let{type:x,date:E,dp:w,opts:D,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let H=g(A,this.date,this.type);H?this.focus():!H&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=x,this.singleType=this.type.slice(0,-1),this.date=E,this.dp=w,this.opts=D,this.body=q,this.customData=!1,this.init()}init(){var x,E;let{onRenderCell:w}=this.opts;w&&(this.customData=w({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(x=this.customData)!==null&&x!==void 0&&x.disabled?this.dp.disableDate(this.date):((E=this.customData)===null||E===void 0?void 0:E.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var x;let{year:E,month:w,fullMonth:D,date:q,fullDate:A}=p(this.date),H=((x=this.customData)===null||x===void 0?void 0:x.attrs)||{};this.$cell=a({attrs:{"data-year":E,"data-month":w,"data-date":q,"data-iso-date":`${E}-${D}-${A}`,...H}}),this.$cell.adpCell=this}_getClassName(){var x;let E=new Date,{selectOtherMonths:w,selectOtherYears:D}=this.opts,{minDate:q,maxDate:A,isDateDisabled:H}=this.dp,{day:j}=p(this.date),Q=this._isOutOfMinMaxRange(),ie=H(this.date),te=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(E,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),se="";switch(this.type){case t.days:se=b({"-weekend-":this.dp.isWeekend(j),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!w||Q||ie});break;case t.months:se=b({"-disabled-":Q});break;case t.years:se=b({"-other-decade-":this.isOtherDecade,"-disabled-":Q||this.isOtherDecade&&!D})}return b(te,se,(x=this.customData)===null||x===void 0?void 0:x.classes).split(" ")}_getHtml(){var x;let{year:E,month:w,date:D}=p(this.date),{showOtherMonths:q,showOtherYears:A}=this.opts;if((x=this.customData)!==null&&x!==void 0&&x.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":D;case t.months:return this.dp.locale[this.opts.monthsField][w];case t.years:return!A&&this.isOtherDecade?"":E}}_isOutOfMinMaxRange(){let{minDate:x,maxDate:E}=this.dp,{type:w,date:D}=this,{month:q,year:A,date:H}=p(D),j=w===t.days,Q=w===t.years,ie=!!x&&new Date(A,Q?x.getMonth():q,j?H:x.getDate()),te=!!E&&new Date(A,Q?E.getMonth():q,j?H:E.getDate());return x&&E?y(ie,x)||v(te,E):x?y(ie,x):E?v(te,E):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:x,focusDate:E,rangeDateTo:w,rangeDateFrom:D}=this.dp,q=x.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let A=D,H=w;if(q===1&&E){let se=v(E,x[0]);A=se?x[0]:E,H=se?E:x[0]}let j=b({"-in-range-":A&&H&&(Q=this.date,ie=A,te=H,v(Q,ie)&&y(Q,te)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":H&&g(this.date,H,this.type)});var Q,ie,te;j&&this.$cell.classList.add(...j.split(" "))}_handleSelectedStatus(){let x=this.dp._checkIfDateIsSelected(this.date,this.type);x?this.select():!x&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function oe(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let xe={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},De=".air-datepicker-cell";class Ne{constructor(x){let{dp:E,type:w,opts:D}=x;oe(this,"handleClick",(q=>{let A=q.target.closest(De).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let H=this.dp._checkIfDateIsSelected(A.date,A.type);H?this.dp._handleAlreadySelectedDates(H,A.date):this.dp.selectDate(A.date)})),oe(this,"handleDayNameClick",(q=>{let A=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),oe(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),oe(this,"onMouseOverCell",(q=>{let A=N(q.target,De);this.dp.setFocusDate(!!A&&A.adpCell.date)})),oe(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),oe(this,"onClickBody",(q=>{let{onClickDayName:A}=this.opts,H=q.target;H.closest(De)&&this.handleClick(q),A&&H.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),oe(this,"onMouseDown",(q=>{this.pressed=!0;let A=N(q.target,De),H=A&&A.adpCell;g(H.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(H.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),oe(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let A=N(q.target,De),H=A&&A.adpCell,{selectedDates:j,rangeDateTo:Q,rangeDateFrom:ie}=this.dp;if(!H||H.isDisabled)return;let{date:te}=H;if(j.length===2){if(this.rangeFromFocused&&!v(te,Q)){let{hours:se,minutes:Ct}=p(ie);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateFrom=te,this.dp.replaceDate(ie,te)}if(this.rangeToFocused&&!y(te,ie)){let{hours:se,minutes:Ct}=p(Q);te.setHours(se),te.setMinutes(Ct),this.dp.rangeDateTo=te,this.dp.replaceDate(Q,te)}}})),oe(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),oe(this,"onChangeViewDate",((q,A)=>{if(!this.isVisible)return;let H=f(q),j=f(A);switch(this.dp.currentView){case t.days:if(g(q,A,t.months))return;break;case t.months:if(g(q,A,t.years))return;break;case t.years:if(H[0]===j[0]&&H[1]===j[1])return}this.render()})),oe(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=E,this.type=w,this.opts=D,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:x,dynamicRange:E}=this.opts;T(this.$el,"mouseover",this.onMouseOverCell),T(this.$el,"mouseout",this.onMouseOutCell),T(this.$el,"click",this.onClickBody),x&&E&&(T(this.$el,"mousedown",this.onMouseDown),T(this.$el,"mousemove",this.onMouseMove),T(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:xe[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,E="",w=this.dp.isWeekend,{onClickDayName:D}=this.opts,q=x,A=0;for(;A<7;){let H=q%7;E+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:w(H),"-clickable-":!!D})}" data-day-index='${H}'>${this.dp.locale.daysMin[H]}</div>`,A++,q++}return E}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(x){let{type:E,dp:w,opts:D}=this;return new W({type:E,dp:w,opts:D,date:x,body:this})}_generateCells(){Ne.getDatesFunction(this.type)(this.dp,(x=>{this.cells.push(this._generateCell(x))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((x=>x.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(x,E){let{viewDate:w,opts:{fixedHeight:D},locale:{firstDay:q}}=x,A=l(w),{year:H,month:j}=p(w),Q=new Date(H,j,1),ie=new Date(H,j,A),te=Q.getDay()-q,se=6-ie.getDay()+q;te=te<0?te+7:te,se=se>6?se-7:se;let Ct=(function(sa,Uh){let{year:Zc,month:l3,date:c3}=p(sa);return new Date(Zc,l3,c3-Uh)})(Q,te),Yr=A+te+se,zr=Ct.getDate(),{year:yn,month:ml}=p(Ct),oa=0;D&&(Yr=42);let aa=[];for(;oa<Yr;){let sa=new Date(yn,ml,zr+oa);E&&E(sa),aa.push(sa),oa++}return aa}static getMonthsDates(x,E){let{year:w}=x.parsedViewDate,D=0,q=[];for(;D<12;){let A=new Date(w,D);q.push(A),E&&E(A),D++}return q}static getYearsDates(x,E){let w=f(x.viewDate),D=w[0]-1,q=w[1]+1,A=D,H=[];for(;A<=q;){let j=new Date(A,0);H.push(j),E&&E(j),A++}return H}static getDatesFunction(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:Ne.getDaysDates,[t.months]:Ne.getMonthsDates,[t.years]:Ne.getYearsDates}[x]}}function rt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class er{constructor(x){let{dp:E,opts:w}=x;rt(this,"onClickNav",(D=>{let q=N(D.target,".air-datepicker-nav--action");if(!q)return;let A=q.dataset.action;this.dp[A]()})),rt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),rt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),rt(this,"update",(()=>{let{prevHtml:D,nextHtml:q}=this.opts;this.$prev.innerHTML=D,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),rt(this,"renderDelay",(()=>{setTimeout(this.render)})),rt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(D,q){for(let A in q)q[A]?D.classList.add(A):D.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=E,this.opts=w,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:x,opts:E}=this,w=E.navTitles[x.currentView];return typeof w=="function"?w(x):x.formatDate(x.viewDate,w)}handleNavStatus(){let{disableNavWhenOutOfRange:x}=this.opts,{minDate:E,maxDate:w}=this.dp;if(!E&&!w||!x)return;let{year:D,month:q}=this.dp.parsedViewDate,A=!!E&&p(E),H=!!w&&p(w);switch(this.dp.currentView){case t.days:E&&A.month>=q&&A.year>=D&&this._disableNav("prev"),w&&H.month<=q&&H.year<=D&&this._disableNav("next");break;case t.months:E&&A.year>=D&&this._disableNav("prev"),w&&H.year<=D&&this._disableNav("next");break;case t.years:{let j=f(this.dp.viewDate);E&&A.year>=j[0]&&this._disableNav("prev"),w&&H.year<=j[1]&&this._disableNav("next");break}}}_disableNav(x){n('[data-action="'+x+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(x){for(var E=arguments.length,w=new Array(E>1?E-1:0),D=1;D<E;D++)w[D-1]=arguments[D];x.length?x.forEach((q=>{q.classList.remove(...w)})):x.classList.remove(...w)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:x,nextHtml:E}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${x}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${E}</div>`}get isNavIsFunction(){let{navTitles:x}=this.opts;return Object.keys(x).find((E=>typeof x[E]=="function"))}}var Pr={today:{content:O=>O.locale.today,onClick:O=>O.setViewDate(new Date)},clear:{content:O=>O.locale.clear,onClick:O=>O.clear()}};class wr{constructor(x){let{dp:E,opts:w}=x;this.dp=E,this.opts=w,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:x}=this.opts;Array.isArray(x)||(x=[x]),x.forEach((E=>{let w=E;typeof E=="string"&&Pr[E]&&(w=Pr[E]);let D=this.createButton(w);w.onClick&&this.attachEventToButton(D,w.onClick),this.$el.appendChild(D)}))}attachEventToButton(x,E){x.addEventListener("click",(()=>{E(this.dp)}))}createButton(x){let{content:E,className:w,tagName:D="button",attrs:q={}}=x;return a({tagName:D,innerHtml:`<span tabindex='-1'>${typeof E=="function"?E(this.dp):E}</span>`,className:b("air-datepicker-button",w),attrs:q})}render(){this.generateButtons()}}function Nt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class tr{constructor(){let{opts:x,dp:E}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(this,"toggleTimepickerIsActive",(D=>{this.dp.timepickerIsActive=D})),Nt(this,"onChangeSelectedDate",(D=>{let{date:q,updateTime:A=!1}=D;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!A&&q),this.addTimeToDate(q))})),Nt(this,"onChangeLastSelectedDate",(D=>{D&&(this.setTime(D),this.render())})),Nt(this,"onChangeInputRange",(D=>{let q=D.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Nt(this,"onMouseEnterLeave",(D=>{let q=D.target.getAttribute("name"),A=this.$minutesText;q==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Nt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Nt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=x,this.dp=E;let{timeFormat:w}=this.dp.locale;w&&(w.match($("h"))||w.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let x="input";navigator.userAgent.match(/trident/gi)&&(x="change"),T(this.$ranges,x,this.onChangeInputRange),T(this.$ranges,"mouseenter",this.onMouseEnterLeave),T(this.$ranges,"mouseleave",this.onMouseEnterLeave),T(this.$ranges,"focus",this.onFocus),T(this.$ranges,"mousedown",this.onFocus),T(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:x,hours:E,displayHours:w,minutes:D,minHours:q,minMinutes:A,maxHours:H,maxMinutes:j,dayPeriod:Q,opts:{hoursStep:ie,minutesStep:te}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(w)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(D)}</span> `+(x?`<span class='air-datepicker-time--current-ampm'>${Q}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${E}" min="${q}" max="${H}" step="${ie}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${D}" min="${A}" max="${j}" step="${te}"/> </div></div>`}defineDOM(){let x=E=>n(E,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=x('[name="hours"]'),this.$minutes=x('[name="minutes"]'),this.$hoursText=x(".air-datepicker-time--current-hours"),this.$minutesText=x(".air-datepicker-time--current-minutes"),this.$ampm=x(".air-datepicker-time--current-ampm")}setTime(x){this.setMinMaxTime(x),this.setCurrentTime(x)}addTimeToDate(x){x&&(x.setHours(this.hours),x.setMinutes(this.minutes))}setMinMaxTime(x){if(this.setMinMaxTimeFromOptions(),x){let{minDate:E,maxDate:w}=this.dp;E&&g(x,E)&&this.setMinTimeFromMinDate(E),w&&g(x,w)&&this.setMaxTimeFromMaxDate(w)}}setCurrentTime(x){let{hours:E,minutes:w}=x?p(x):this;this.hours=U(E,this.minHours,this.maxHours),this.minutes=U(w,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:x,minMinutes:E,maxHours:w,maxMinutes:D}=this.opts;this.minHours=U(x,0,23),this.minMinutes=U(E,0,59),this.maxHours=U(w,0,23),this.maxMinutes=U(D,0,59)}setMinTimeFromMinDate(x){let{lastSelectedDate:E}=this.dp;this.minHours=x.getHours(),E&&E.getHours()>x.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=x.getMinutes()}setMaxTimeFromMaxDate(x){let{lastSelectedDate:E}=this.dp;this.maxHours=x.getHours(),E&&E.getHours()<x.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=x.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(x){this._hours=x;let{hours:E,dayPeriod:w}=h(x);this.displayHours=this.ampm?E:x,this.dayPeriod=w}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function Mt(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}class uo{constructor(x){let{dp:E,opts:w}=x;Mt(this,"pressedKeys",new Set),Mt(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],D=>D.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],D=>D.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],D=>D.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],D=>D.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],D=>D.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],D=>D.year-=10],[["Control","Shift","ArrowUp"],(D,q)=>q.up()]])),Mt(this,"handleHotKey",(D=>{let q=this.hotKeys.get(D),A=p(this.getInitialFocusDate());q(A,this.dp);let{year:H,month:j,date:Q}=A,ie=l(new Date(H,j));ie<Q&&(Q=ie);let te=this.dp.getClampedDate(new Date(H,j,Q));this.dp.setFocusDate(te,{viewDateTransition:!0})})),Mt(this,"isHotKeyPressed",(()=>{let D=!1,q=this.pressedKeys.size,A=H=>this.pressedKeys.has(H);for(let[H]of this.hotKeys){if(D)break;if(Array.isArray(H[0]))H.forEach((j=>{D||q!==j.length||(D=j.every(A)&&H)}));else{if(q!==H.length)continue;D=H.every(A)&&H}}return D})),Mt(this,"isArrow",(D=>D>=37&&D<=40)),Mt(this,"onKeyDown",(D=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:A}=D,{dp:H,dp:{focusDate:j},opts:Q}=this;this.registerKey(q);let ie=this.isHotKeyPressed();if(ie)return D.preventDefault(),void this.handleHotKey(ie);if(this.isArrow(A))return D.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(H.currentView!==Q.minView)return void H.down();if(j){let te=H._checkIfDateIsSelected(j);return void(te?H._handleAlreadySelectedDates(te,j):H.selectDate(j))}}q==="Escape"&&this.dp.hide()})),Mt(this,"onKeyUp",(D=>{this.removeKey(D.key)})),this.dp=E,this.opts=w,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:x}=this.dp;x.addEventListener("keydown",this.onKeyDown),x.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:x}=this.dp;x.removeEventListener("keydown",this.onKeyDown),x.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:x,currentView:E,selectedDates:w,parsedViewDate:{year:D,month:q}}=this.dp,A=x||w[w.length-1];if(!A)switch(E){case t.days:A=new Date(D,q,new Date().getDate());break;case t.months:A=new Date(D,q,1);break;case t.years:A=new Date(D,0,1)}return A}focusNextCell(x){let E=this.getInitialFocusDate(),{currentView:w}=this.dp,{days:D,months:q,years:A}=t,H=p(E),j=H.year,Q=H.month,ie=H.date;switch(x){case"ArrowLeft":w===D&&(ie-=1),w===q&&(Q-=1),w===A&&(j-=1);break;case"ArrowUp":w===D&&(ie-=7),w===q&&(Q-=3),w===A&&(j-=4);break;case"ArrowRight":w===D&&(ie+=1),w===q&&(Q+=1),w===A&&(j+=1);break;case"ArrowDown":w===D&&(ie+=7),w===q&&(Q+=3),w===A&&(j+=4)}let te=this.dp.getClampedDate(new Date(j,Q,ie));this.dp.setFocusDate(te,{viewDateTransition:!0})}registerKey(x){this.pressedKeys.add(x)}removeKey(x){this.pressedKeys.delete(x)}}let Ya={on(O,x){this.__events||(this.__events={}),this.__events[O]?this.__events[O].push(x):this.__events[O]=[x]},off(O,x){this.__events&&this.__events[O]&&(this.__events[O]=this.__events[O].filter((E=>E!==x)))},removeAllEvents(){this.__events={}},trigger(O){for(var x=arguments.length,E=new Array(x>1?x-1:0),w=1;w<x;w++)E[w-1]=arguments[w];this.__events&&this.__events[O]&&this.__events[O].forEach((D=>{D(...E)}))}};function ue(O,x,E){return(x=(function(w){var D=(function(q,A){if(typeof q!="object"||q===null)return q;var H=q[Symbol.toPrimitive];if(H!==void 0){var j=H.call(q,"string");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(w);return typeof D=="symbol"?D:String(D)})(x))in O?Object.defineProperty(O,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):O[x]=E,O}let Yi="",Qi="",he=!1;class ae{static buildGlobalContainer(x){he=!0,Yi=a({className:x,id:x}),n("body").appendChild(Yi)}constructor(x,E){var w=this;if(ue(this,"viewIndexes",[t.days,t.months,t.years]),ue(this,"next",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H+1,1));break;case t.months:this.setViewDate(new Date(A+1,H,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),ue(this,"prev",(()=>{let{year:A,month:H}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,H-1,1));break;case t.months:this.setViewDate(new Date(A-1,H,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),ue(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ue(this,"setPosition",(function(A){let H=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||w.opts.position)=="function")return void(w.customHide=A({$datepicker:w.$datepicker,$target:w.$el,$pointer:w.$pointer,isViewChange:H,done:w._finishHide}));let j,Q,{isMobile:ie}=w.opts,te=w.$el.getBoundingClientRect(),se=w.$el.getBoundingClientRect(),Ct=w.$datepicker.offsetParent,Yr=w.$el.offsetParent,zr=w.$datepicker.getBoundingClientRect(),yn=A.split(" "),ml=window.scrollY,oa=window.scrollX,aa=w.opts.offset,sa=yn[0],Uh=yn[1];if(ie)w.$datepicker.style.cssText="left: 50%; top: 50%";else{if(Ct===Yr&&Ct!==document.body&&(se={top:w.$el.offsetTop,left:w.$el.offsetLeft,width:te.width,height:w.$el.offsetHeight},ml=0,oa=0),Ct!==Yr&&Ct!==document.body){let Zc=Ct.getBoundingClientRect();se={top:te.top-Zc.top,left:te.left-Zc.left,width:te.width,height:te.height},ml=0,oa=0}switch(sa){case"top":j=se.top-zr.height-aa;break;case"right":Q=se.left+se.width+aa;break;case"bottom":j=se.top+se.height+aa;break;case"left":Q=se.left-zr.width-aa}switch(Uh){case"top":j=se.top;break;case"right":Q=se.left+se.width-zr.width;break;case"bottom":j=se.top+se.height-zr.height;break;case"left":Q=se.left;break;case"center":/left|right/.test(sa)?j=se.top+se.height/2-zr.height/2:Q=se.left+se.width/2-zr.width/2}w.$datepicker.style.cssText=`left: ${Q+oa}px; top: ${j+ml}px`}})),ue(this,"_setInputValue",(()=>{let{opts:A,$altField:H,locale:{dateFormat:j}}=this,{altFieldDateFormat:Q,altField:ie}=A;ie&&H&&(H.value=this._getInputValue(Q)),this.$el.value=this._getInputValue(j),this.$el.dispatchEvent(new Event("change"))})),ue(this,"_getInputValue",(A=>{let{selectedDates:H,opts:j}=this,{multipleDates:Q,multipleDatesSeparator:ie}=j;if(!H.length)return"";let te=typeof A=="function",se=te?A(Q?H:H[0]):H.map((Ct=>this.formatDate(Ct,A)));return se=te?se:se.join(ie),se})),ue(this,"_checkIfDateIsSelected",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,j=!1;return w.selectedDates.some((Q=>{let ie=g(A,Q,H);return j=ie&&Q,ie})),j})),ue(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ue(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ue(this,"setViewDate",(A=>{if(!((A=C(A))instanceof Date)||g(A,this.viewDate))return;let H=this.viewDate;this.viewDate=A;let{onChangeViewDate:j}=this.opts;if(j){let{month:Q,year:ie}=this.parsedViewDate;j({month:Q,year:ie,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,H)})),ue(this,"setFocusDate",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=C(A))instanceof Date)&&(w.focusDate=A,w.trigger(t.eventChangeFocusDate,A,H))})),ue(this,"setCurrentView",(function(A){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w.viewIndexes.includes(A)){if(w.currentView=A,w.elIsInput&&w.visible&&w.setPosition(void 0,!0),w.trigger(t.eventChangeCurrentView,A),!w.views[A]){let j=w.views[A]=new Ne({dp:w,opts:w.opts,type:A});w.shouldUpdateDOM&&w.$content.appendChild(j.$el)}w.opts.onChangeView&&!H.silent&&w.opts.onChangeView(A)}})),ue(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),ue(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:H}=this.opts,j=this.$datepicker.parentNode;j&&j.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),H&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ue(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=I({},w.opts),{silent:Q}=H;I(w.opts,A);let{timepicker:ie,buttons:te,range:se,selectedDates:Ct,isMobile:Yr}=w.opts,zr=w.visible||w.treatAsInline;w._createMinMaxDates(),w._limitViewDateByMaxMinDates(),w._handleLocale(),Ct&&(w.selectedDates=[],w.selectDate(Ct,{silent:Q})),A.view&&w.setCurrentView(A.view,{silent:Q}),w._setInputValue(),j.range&&!se?(w.rangeDateTo=!1,w.rangeDateFrom=!1):!j.range&&se&&w.selectedDates.length&&(w.rangeDateFrom=w.selectedDates[0],w.rangeDateTo=w.selectedDates[1]),j.timepicker&&!ie?(zr&&w.timepicker.destroy(),w.timepicker=!1,w.$timepicker.parentNode.removeChild(w.$timepicker)):!j.timepicker&&ie&&w._addTimepicker(),!j.buttons&&te?w._addButtons():j.buttons&&!te?(w.buttons.destroy(),w.$buttons.parentNode.removeChild(w.$buttons)):zr&&j.buttons&&te&&w.buttons.clearHtml().render(),!j.isMobile&&Yr?(w.treatAsInline||Qi||w._createMobileOverlay(),w._addMobileAttributes(),w.visible&&w._showMobileOverlay()):j.isMobile&&!Yr&&(w._removeMobileAttributes(),w.visible&&(Qi.classList.remove("-active-"),typeof w.opts.position!="function"&&w.setPosition())),zr&&(w.nav.update(),w.views[w.currentView].render(),w.currentView===t.days&&w.views[w.currentView].renderDayNames())})),ue(this,"disableDate",((A,H)=>{(Array.isArray(A)?A:[A]).forEach((j=>{let Q=C(j);if(!Q)return;let ie=H?"delete":"add";this.disabledDates[ie](this.formatDate(Q,"yyyy-MM-dd"));let te=this.getCell(Q,this.currentViewSingular);te&&te.adpCell.render()}),[])})),ue(this,"enableDate",(A=>{this.disableDate(A,!0)})),ue(this,"isDateDisabled",(A=>{let H=C(A);return this.disabledDates.has(this.formatDate(H,"yyyy-MM-dd"))})),ue(this,"isOtherMonth",(A=>{let{month:H}=p(A);return H!==this.parsedViewDate.month})),ue(this,"isOtherYear",(A=>{let{year:H}=p(A);return H!==this.parsedViewDate.year})),ue(this,"isOtherDecade",(A=>{let{year:H}=p(A),[j,Q]=f(this.viewDate);return H<j||H>Q})),ue(this,"_onChangeSelectedDate",(A=>{let{silent:H}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!H&&this._triggerOnSelect()}))})),ue(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:H}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let j=!1;H&&(j=w.isOtherMonth(A)||w.isOtherYear(A)||w.isOtherDecade(A)),j&&w.setViewDate(A),w.opts.onFocus&&w.opts.onFocus({datepicker:w,date:A})})),ue(this,"_onChangeTime",(A=>{let{hours:H,minutes:j}=A,Q=new Date,{lastSelectedDate:ie,opts:{onSelect:te}}=this,se=ie;ie||(se=Q);let Ct=this.getCell(se,this.currentViewSingular),Yr=Ct&&Ct.adpCell;Yr&&Yr.isDisabled||(se.setHours(H),se.setMinutes(j),ie?(this._setInputValue(),te&&this._triggerOnSelect()):this.selectDate(se))})),ue(this,"_onFocus",(A=>{this.visible||this.show()})),ue(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ue(this,"_onMouseDown",(A=>{this.inFocus=!0})),ue(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),ue(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ue(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ue(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return Ne.getDatesFunction(A)(w)})),ue(this,"isWeekend",(A=>this.opts.weekends.includes(A))),ue(this,"getClampedDate",(A=>{let{minDate:H,maxDate:j}=this,Q=A;return j&&v(A,j)?Q=j:H&&y(A,H)&&(Q=H),Q})),this.$el=n(x),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,E),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:D,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=D,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:x,treatAsInline:E,opts:{inline:w,isMobile:D,selectedDates:q,keyboardNav:A,onlyTimepicker:H}}=this,j=n("body");(!he||he&&Yi&&!j.contains(Yi))&&!w&&this.elIsInput&&!this.$customContainer&&ae.buildGlobalContainer(ae.defaultGlobalContainerId),!D||Qi||E||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(w||this._bindEvents(),A&&!H&&(this.keyboardNav=new uo({dp:this,opts:x}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!E&&this.show(),D&&!E&&this.$el.setAttribute("readonly",!0),E&&this._createComponents()}_createMobileOverlay(){Qi=a({className:"air-datepicker-overlay"}),Yi.appendChild(Qi)}_createComponents(){let{opts:x,treatAsInline:E,opts:{inline:w,buttons:D,timepicker:q,position:A,classes:H,onlyTimepicker:j,isMobile:Q}}=this;this._buildBaseHtml(),this.elIsInput&&(w||this._setPositionClasses(A)),!w&&this.elIsInput||this.$datepicker.classList.add("-inline-"),H&&this.$datepicker.classList.add(...H.split(" ")),j&&this.$datepicker.classList.add("-only-timepicker-"),Q&&!E&&this._addMobileAttributes(),this.views[this.currentView]=new Ne({dp:this,type:this.currentView,opts:x}),this.nav=new er({dp:this,opts:x}),q&&this._addTimepicker(),D&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let x in this.views)this.views[x].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Qi.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Qi.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:x,maxDate:E}=this.opts;this.minDate=!!x&&C(x),this.maxDate=!!E&&C(E)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new tr({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new wr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:x}=this.opts;var E,w;this.elIsInput?x?(E=this.$datepicker,(w=this.$el).parentNode.insertBefore(E,w.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:x,dateFormat:E,firstDay:w,timepicker:D,onlyTimepicker:q,timeFormat:A,dateTimeSeparator:H}=this.opts;var j;this.locale=(j=x,JSON.parse(JSON.stringify(j))),E&&(this.locale.dateFormat=E),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Q}=this.locale;if(w!==""&&(this.locale.firstDay=w),D&&typeof E!="function"){let ie=Q?H:"";this.locale.dateFormat=[this.locale.dateFormat,Q||""].join(ie)}q&&typeof E!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(x){if(typeof x=="function")return void this.$datepicker.classList.add("-custom-position-");let E=(x=x.split(" "))[0],w=`air-datepicker -${E}-${x[1]}- -from-${E}-`;this.$datepicker.classList.add(...w.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:x,minDate:E,maxDate:w}=this;w&&v(x,w)&&this.setViewDate(w),E&&y(x,E)&&this.setViewDate(E)}formatDate(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,E=arguments.length>1?arguments[1]:void 0;if(x=C(x),!(x instanceof Date))return;let w=E,D=this.locale,q=p(x),A=q.dayPeriod,H=f(x),j=ae.replacer,Q={T:x.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:A,AA:A.toUpperCase(),E:D.daysShort[q.day],EEEE:D.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:D.monthsShort[q.month],MMMM:D.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:H[0],yyyy2:H[1]};for(let[ie,te]of Object.entries(Q))w=j(w,$(ie),te);return w}down(x){this._handleUpDownActions(x,"down")}up(x){this._handleUpDownActions(x,"up")}selectDate(x){let E,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:D,parsedViewDate:q,selectedDates:A}=this,{updateTime:H,silent:j}=w,{moveToOtherMonthsOnSelect:Q,moveToOtherYearsOnSelect:ie,multipleDates:te,range:se,autoClose:Ct,onBeforeSelect:Yr}=this.opts,zr=A.length;if(Array.isArray(x))return x.forEach((yn=>{this.selectDate(yn,w)})),new Promise((yn=>{setTimeout(yn)}));if((x=C(x))instanceof Date){if(Yr&&!j&&!Yr({date:x,datepicker:this}))return Promise.resolve();if(D===t.days&&x.getMonth()!==q.month&&Q&&(E=new Date(x.getFullYear(),x.getMonth(),1)),D===t.years&&x.getFullYear()!==q.year&&ie&&(E=new Date(x.getFullYear(),0,1)),E&&this.setViewDate(E),te&&!se){if(zr===te)return;this._checkIfDateIsSelected(x)||A.push(x)}else if(se)switch(zr){case 1:A.push(x),this.rangeDateTo||(this.rangeDateTo=x),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=x),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[x],this.rangeDateFrom=x,this.rangeDateTo="";break;default:this.selectedDates=[x],this.rangeDateFrom=x}else this.selectedDates=[x];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:w?.silent,date:x,updateTime:H}),this._updateLastSelectedDate(x),Ct&&!this.timepickerIsActive&&this.visible&&(te||se?se&&zr===1&&this.hide():this.hide()),new Promise((yn=>{setTimeout(yn)}))}}unselectDate(x){let E=this.selectedDates,w=this;if((x=C(x))instanceof Date)return E.some(((D,q)=>{if(g(D,x))return E.splice(q,1),w.selectedDates.length?(w.rangeDateTo="",w.rangeDateFrom=E[0],w._updateLastSelectedDate(w.selectedDates[w.selectedDates.length-1])):(w.rangeDateFrom="",w.rangeDateTo="",w._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:x}),!0}))}replaceDate(x,E){let w=this.selectedDates.find((q=>g(q,x,this.currentView))),D=this.selectedDates.indexOf(w);D<0||g(this.selectedDates[D],E,this.currentView)||(this.selectedDates[D]=E,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:E,updateTime:!0}),this._updateLastSelectedDate(E))}clear(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:x.silent}),new Promise((E=>{setTimeout(E)}))}show(){let{onShow:x,isMobile:E}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,x&&this._scheduleCallAfterTransition(x),E&&this._showMobileOverlay()}hide(){let{onHide:x,isMobile:E}=this.opts,w=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((D=>{!this.customHide&&(D&&w||!D&&!w)&&this._finishHide(),x&&x(D)})),E&&Qi.classList.remove("-active-")}_triggerOnSelect(){let x=[],E=[],{selectedDates:w,locale:D,opts:{onSelect:q,multipleDates:A,range:H}}=this,j=A||H,Q=typeof D.dateFormat=="function";w.length&&(x=w.map(S),E=Q?A?D.dateFormat(x):x.map((ie=>D.dateFormat(ie))):x.map((ie=>this.formatDate(ie,D.dateFormat)))),q({date:j?x:x[0],formattedDate:j?E:E[0],datepicker:this})}_handleAlreadySelectedDates(x,E){let{selectedDates:w,rangeDateFrom:D,rangeDateTo:q}=this,{range:A,toggleSelected:H}=this.opts,j=w.length,Q=typeof H=="function"?H({datepicker:this,date:E}):H,ie=!!(A&&j===1&&x),te=ie?S(E):E;A&&!Q&&(j!==2&&this.selectDate(te),j===2&&g(D,q))||(Q?this.unselectDate(te):this._updateLastSelectedDate(ie?te:x))}_handleUpDownActions(x,E){if(!((x=C(x||this.focusDate||this.viewDate))instanceof Date))return;let w=E==="up"?this.viewIndex+1:this.viewIndex-1;w>2&&(w=2),w<0&&(w=0),this.setViewDate(new Date(x.getFullYear(),x.getMonth(),1)),this.setCurrentView(this.viewIndexes[w])}getCell(x){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((x=C(x))instanceof Date))return;let{year:w,month:D,date:q}=p(x),A=`[data-year="${w}"]`,H=`[data-month="${D}"]`,j={[t.day]:`${A}${H}[data-date="${q}"]`,[t.month]:`${A}${H}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(j[E]):void 0}_showMobileOverlay(){Qi.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((x,E)=>parseFloat(E)+x),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return p(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Yi}static replacer(x,E,w){return x.replace(E,(function(D,q,A,H){return q+w+H}))}}var ze;return ue(ae,"defaults",r),ue(ae,"version","3.6.0"),ue(ae,"defaultGlobalContainerId","air-datepicker-global-container"),ze=ae.prototype,Object.assign(ze,Ya),i.default})()}))});var O1=Fn((Rie,N1)=>{var zi=-1,Br=1,Yt=0;function Gl(o,i,t,r,n){if(o===i)return o?[[Yt,o]]:[];if(t!=null){var a=w8(o,i,t);if(a)return a}var s=cm(o,i),l=o.substring(0,s);o=o.substring(s),i=i.substring(s),s=rp(o,i);var p=o.substring(o.length-s);o=o.substring(0,o.length-s),i=i.substring(0,i.length-s);var h=u8(o,i);return l&&h.unshift([Yt,l]),p&&h.push([Yt,p]),dm(h,n),r&&g8(h),h}function u8(o,i){var t;if(!o)return[[Br,i]];if(!i)return[[zi,o]];var r=o.length>i.length?o:i,n=o.length>i.length?i:o,a=r.indexOf(n);if(a!==-1)return t=[[Br,r.substring(0,a)],[Yt,n],[Br,r.substring(a+n.length)]],o.length>i.length&&(t[0][0]=t[2][0]=zi),t;if(n.length===1)return[[zi,o],[Br,i]];var s=f8(o,i);if(s){var l=s[0],p=s[1],h=s[2],m=s[3],f=s[4],b=Gl(l,h),g=Gl(p,m);return b.concat([[Yt,f]],g)}return m8(o,i)}function m8(o,i){for(var t=o.length,r=i.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),p=new Array(s),h=0;h<s;h++)l[h]=-1,p[h]=-1;l[a+1]=0,p[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,y=0,S=0;S<n;S++){for(var T=-S+b;T<=S-g;T+=2){var N=a+T,U;T===-S||T!==S&&l[N-1]<l[N+1]?U=l[N+1]:U=l[N-1]+1;for(var I=U-T;U<t&&I<r&&o.charAt(U)===i.charAt(I);)U++,I++;if(l[N]=U,U>t)g+=2;else if(I>r)b+=2;else if(f){var C=a+m-T;if(C>=0&&C<s&&p[C]!==-1){var $=t-p[C];if(U>=$)return T1(o,i,U,I)}}}for(var L=-S+v;L<=S-y;L+=2){var C=a+L,$;L===-S||L!==S&&p[C-1]<p[C+1]?$=p[C+1]:$=p[C-1]+1;for(var W=$-L;$<t&&W<r&&o.charAt(t-$-1)===i.charAt(r-W-1);)$++,W++;if(p[C]=$,$>t)y+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var U=l[N],I=a+U-N;if($=t-$,U>=$)return T1(o,i,U,I)}}}}return[[zi,o],[Br,i]]}function T1(o,i,t,r){var n=o.substring(0,t),a=i.substring(0,r),s=o.substring(t),l=i.substring(r),p=Gl(n,a),h=Gl(s,l);return p.concat(h)}function cm(o,i){if(!o||!i||o.charAt(0)!==i.charAt(0))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(a,n)==i.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return q1(o.charCodeAt(n-1))&&n--,n}function $1(o,i){var t=o.length,r=i.length;if(t==0||r==0)return 0;t>r?o=o.substring(t-r):t<r&&(i=i.substring(0,t));var n=Math.min(t,r);if(o==i)return n;for(var a=0,s=1;;){var l=o.substring(n-s),p=i.indexOf(l);if(p==-1)return a;s+=p,(p==0||o.substring(n-s)==i.substring(0,s))&&(a=s,s++)}}function rp(o,i){if(!o||!i||o.slice(-1)!==i.slice(-1))return 0;for(var t=0,r=Math.min(o.length,i.length),n=r,a=0;t<n;)o.substring(o.length-n,o.length-a)==i.substring(i.length-n,i.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return I1(o.charCodeAt(o.length-n))&&n--,n}function f8(o,i){var t=o.length>i.length?o:i,r=o.length>i.length?i:o;if(t.length<4||r.length*2<t.length)return null;function n(g,v,y){for(var S=g.substring(y,y+Math.floor(g.length/4)),T=-1,N="",U,I,C,$;(T=v.indexOf(S,T+1))!==-1;){var L=cm(g.substring(y),v.substring(T)),W=rp(g.substring(0,y),v.substring(0,T));N.length<W+L&&(N=v.substring(T-W,T)+v.substring(T,T+L),U=g.substring(0,y-W),I=g.substring(y+L),C=v.substring(0,T-W),$=v.substring(T+L))}return N.length*2>=g.length?[U,I,C,$,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var p,h,m,f;o.length>i.length?(p=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],p=l[2],h=l[3]);var b=l[4];return[p,h,m,f,b]}function g8(o){for(var i=!1,t=[],r=0,n=null,a=0,s=0,l=0,p=0,h=0;a<o.length;)o[a][0]==Yt?(t[r++]=a,s=p,l=h,p=0,h=0,n=o[a][1]):(o[a][0]==Br?p+=o[a][1].length:h+=o[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(p,h)&&(o.splice(t[r-1],0,[zi,n]),o[t[r-1]+1][0]=Br,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,p=0,h=0,n=null,i=!0)),a++;for(i&&dm(o),y8(o),a=1;a<o.length;){if(o[a-1][0]==zi&&o[a][0]==Br){var m=o[a-1][1],f=o[a][1],b=$1(m,f),g=$1(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(o.splice(a,0,[Yt,f.substring(0,b)]),o[a-1][1]=m.substring(0,m.length-b),o[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(o.splice(a,0,[Yt,m.substring(0,g)]),o[a-1][0]=Br,o[a-1][1]=f.substring(0,f.length-g),o[a+1][0]=zi,o[a+1][1]=m.substring(g),a++),a++}a++}}var A1=/[^a-zA-Z0-9]/,M1=/\s/,L1=/[\r\n]/,b8=/\n\r?\n$/,v8=/^\r?\n\r?\n/;function y8(o){function i(g,v){if(!g||!v)return 6;var y=g.charAt(g.length-1),S=v.charAt(0),T=y.match(A1),N=S.match(A1),U=T&&y.match(M1),I=N&&S.match(M1),C=U&&y.match(L1),$=I&&S.match(L1),L=C&&g.match(b8),W=$&&v.match(v8);return L||W?5:C||$?4:T&&!U&&I?3:U||I?2:T||N?1:0}for(var t=1;t<o.length-1;){if(o[t-1][0]==Yt&&o[t+1][0]==Yt){var r=o[t-1][1],n=o[t][1],a=o[t+1][1],s=rp(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var p=r,h=n,m=a,f=i(r,n)+i(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=i(r,n)+i(n,a);b>=f&&(f=b,p=r,h=n,m=a)}o[t-1][1]!=p&&(p?o[t-1][1]=p:(o.splice(t-1,1),t--),o[t][1]=h,m?o[t+1][1]=m:(o.splice(t+1,1),t--))}t++}}function dm(o,i){o.push([Yt,""]);for(var t=0,r=0,n=0,a="",s="",l;t<o.length;){if(t<o.length-1&&!o[t][1]){o.splice(t,1);continue}switch(o[t][0]){case Br:n++,s+=o[t][1],t++;break;case zi:r++,a+=o[t][1],t++;break;case Yt:var p=t-n-r-1;if(i){if(p>=0&&R1(o[p][1])){var h=o[p][1].slice(-1);if(o[p][1]=o[p][1].slice(0,-1),a=h+a,s=h+s,!o[p][1]){o.splice(p,1),t--;var m=p-1;o[m]&&o[m][0]===Br&&(n++,s=o[m][1]+s,m--),o[m]&&o[m][0]===zi&&(r++,a=o[m][1]+a,m--),p=m}}if(D1(o[t][1])){var h=o[t][1].charAt(0);o[t][1]=o[t][1].slice(1),a+=h,s+=h}}if(t<o.length-1&&!o[t][1]){o.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=cm(s,a),l!==0&&(p>=0?o[p][1]+=s.substring(0,l):(o.splice(0,0,[Yt,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=rp(s,a),l!==0&&(o[t][1]=s.substring(s.length-l)+o[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(o.splice(t-f,f),t=t-f):a.length===0?(o.splice(t-f,f,[Br,s]),t=t-f+1):s.length===0?(o.splice(t-f,f,[zi,a]),t=t-f+1):(o.splice(t-f,f,[zi,a],[Br,s]),t=t-f+2)}t!==0&&o[t-1][0]===Yt?(o[t-1][1]+=o[t][1],o.splice(t,1)):t++,n=0,r=0,a="",s="";break}}o[o.length-1][1]===""&&o.pop();var b=!1;for(t=1;t<o.length-1;)o[t-1][0]===Yt&&o[t+1][0]===Yt&&(o[t][1].substring(o[t][1].length-o[t-1][1].length)===o[t-1][1]?(o[t][1]=o[t-1][1]+o[t][1].substring(0,o[t][1].length-o[t-1][1].length),o[t+1][1]=o[t-1][1]+o[t+1][1],o.splice(t-1,1),b=!0):o[t][1].substring(0,o[t+1][1].length)==o[t+1][1]&&(o[t-1][1]+=o[t+1][1],o[t][1]=o[t][1].substring(o[t+1][1].length)+o[t+1][1],o.splice(t+1,1),b=!0)),t++;b&&dm(o,i)}function q1(o){return o>=55296&&o<=56319}function I1(o){return o>=56320&&o<=57343}function D1(o){return I1(o.charCodeAt(0))}function R1(o){return q1(o.charCodeAt(o.length-1))}function x8(o){for(var i=[],t=0;t<o.length;t++)o[t][1].length>0&&i.push(o[t]);return i}function lm(o,i,t,r){return R1(o)||D1(r)?null:x8([[Yt,o],[zi,i],[Br,t],[Yt,r]])}function w8(o,i,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=o.length,s=i.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,p=o.slice(0,l),h=o.slice(l),m=n?n.index:null;e:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break e;var b=i.slice(0,f),g=i.slice(f);if(g!==h)break e;var v=Math.min(l,f),y=p.slice(0,v),S=b.slice(0,v);if(y!==S)break e;var T=p.slice(v),N=b.slice(v);return lm(y,T,N,h)}e:{if(m!==null&&m!==l)break e;var U=l,b=i.slice(0,U),g=i.slice(U);if(b!==p)break e;var I=Math.min(a-U,s-U),C=h.slice(h.length-I),$=g.slice(g.length-I);if(C!==$)break e;var T=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return lm(p,T,N,C)}}if(r.length>0&&n&&n.length===0)e:{var y=o.slice(0,r.index),C=o.slice(r.index+r.length),v=y.length,I=C.length;if(s<v+I)break e;var S=i.slice(0,v),$=i.slice(s-I);if(y!==S||C!==$)break e;var T=o.slice(v,a-I),N=i.slice(v,s-I);return lm(y,T,N,C)}return null}function ip(o,i,t,r){return Gl(o,i,t,r,!0)}ip.INSERT=Br;ip.DELETE=zi;ip.EQUAL=Yt;N1.exports=ip});var Cm=Fn((Wl,vs)=>{var z8=200,Q1="__lodash_hash_undefined__",X1=9007199254740991,vm="[object Arguments]",_8="[object Array]",J1="[object Boolean]",Z1="[object Date]",k8="[object Error]",ym="[object Function]",ey="[object GeneratorFunction]",np="[object Map]",ty="[object Number]",xm="[object Object]",P1="[object Promise]",ry="[object RegExp]",op="[object Set]",iy="[object String]",ny="[object Symbol]",hm="[object WeakMap]",oy="[object ArrayBuffer]",ap="[object DataView]",ay="[object Float32Array]",sy="[object Float64Array]",ly="[object Int8Array]",cy="[object Int16Array]",dy="[object Int32Array]",py="[object Uint8Array]",hy="[object Uint8ClampedArray]",uy="[object Uint16Array]",my="[object Uint32Array]",C8=/[\\^$.*+?()[\]{}|]/g,S8=/\w*$/,E8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,et={};et[vm]=et[_8]=et[oy]=et[ap]=et[J1]=et[Z1]=et[ay]=et[sy]=et[ly]=et[cy]=et[dy]=et[np]=et[ty]=et[xm]=et[ry]=et[op]=et[iy]=et[ny]=et[py]=et[hy]=et[uy]=et[my]=!0;et[k8]=et[ym]=et[hm]=!1;var $8=typeof global=="object"&&global&&global.Object===Object&&global,A8=typeof self=="object"&&self&&self.Object===Object&&self,Kn=$8||A8||Function("return this")(),fy=typeof Wl=="object"&&Wl&&!Wl.nodeType&&Wl,H1=fy&&typeof vs=="object"&&vs&&!vs.nodeType&&vs,M8=H1&&H1.exports===fy;function L8(o,i){return o.set(i[0],i[1]),o}function q8(o,i){return o.add(i),o}function I8(o,i){for(var t=-1,r=o?o.length:0;++t<r&&i(o[t],t,o)!==!1;);return o}function D8(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function gy(o,i,t,r){var n=-1,a=o?o.length:0;for(r&&a&&(t=o[++n]);++n<a;)t=i(t,o[n],n,o);return t}function R8(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function N8(o,i){return o?.[i]}function by(o){var i=!1;if(o!=null&&typeof o.toString!="function")try{i=!!(o+"")}catch{}return i}function F1(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function wm(o,i){return function(t){return o(i(t))}}function B1(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var O8=Array.prototype,P8=Function.prototype,sp=Object.prototype,pm=Kn["__core-js_shared__"],V1=(function(){var o=/[^.]+$/.exec(pm&&pm.keys&&pm.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),vy=P8.toString,$o=sp.hasOwnProperty,lp=sp.toString,H8=RegExp("^"+vy.call($o).replace(C8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U1=M8?Kn.Buffer:void 0,j1=Kn.Symbol,G1=Kn.Uint8Array,F8=wm(Object.getPrototypeOf,Object),B8=Object.create,V8=sp.propertyIsEnumerable,U8=O8.splice,W1=Object.getOwnPropertySymbols,j8=U1?U1.isBuffer:void 0,G8=wm(Object.keys,Object),um=ws(Kn,"DataView"),Kl=ws(Kn,"Map"),mm=ws(Kn,"Promise"),fm=ws(Kn,"Set"),gm=ws(Kn,"WeakMap"),Yl=ws(Object,"create"),W8=Ta(um),K8=Ta(Kl),Y8=Ta(mm),Q8=Ta(fm),X8=Ta(gm),K1=j1?j1.prototype:void 0,Y1=K1?K1.valueOf:void 0;function Ea(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function J8(){this.__data__=Yl?Yl(null):{}}function Z8(o){return this.has(o)&&delete this.__data__[o]}function e9(o){var i=this.__data__;if(Yl){var t=i[o];return t===Q1?void 0:t}return $o.call(i,o)?i[o]:void 0}function t9(o){var i=this.__data__;return Yl?i[o]!==void 0:$o.call(i,o)}function r9(o,i){var t=this.__data__;return t[o]=Yl&&i===void 0?Q1:i,this}Ea.prototype.clear=J8;Ea.prototype.delete=Z8;Ea.prototype.get=e9;Ea.prototype.has=t9;Ea.prototype.set=r9;function Yn(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function i9(){this.__data__=[]}function n9(o){var i=this.__data__,t=cp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():U8.call(i,t,1),!0}function o9(o){var i=this.__data__,t=cp(i,o);return t<0?void 0:i[t][1]}function a9(o){return cp(this.__data__,o)>-1}function s9(o,i){var t=this.__data__,r=cp(t,o);return r<0?t.push([o,i]):t[r][1]=i,this}Yn.prototype.clear=i9;Yn.prototype.delete=n9;Yn.prototype.get=o9;Yn.prototype.has=a9;Yn.prototype.set=s9;function ys(o){var i=-1,t=o?o.length:0;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function l9(){this.__data__={hash:new Ea,map:new(Kl||Yn),string:new Ea}}function c9(o){return dp(this,o).delete(o)}function d9(o){return dp(this,o).get(o)}function p9(o){return dp(this,o).has(o)}function h9(o,i){return dp(this,o).set(o,i),this}ys.prototype.clear=l9;ys.prototype.delete=c9;ys.prototype.get=d9;ys.prototype.has=p9;ys.prototype.set=h9;function xs(o){this.__data__=new Yn(o)}function u9(){this.__data__=new Yn}function m9(o){return this.__data__.delete(o)}function f9(o){return this.__data__.get(o)}function g9(o){return this.__data__.has(o)}function b9(o,i){var t=this.__data__;if(t instanceof Yn){var r=t.__data__;if(!Kl||r.length<z8-1)return r.push([o,i]),this;t=this.__data__=new ys(r)}return t.set(o,i),this}xs.prototype.clear=u9;xs.prototype.delete=m9;xs.prototype.get=f9;xs.prototype.has=g9;xs.prototype.set=b9;function v9(o,i){var t=_m(o)||B9(o)?R8(o.length,String):[],r=t.length,n=!!r;for(var a in o)(i||$o.call(o,a))&&!(n&&(a=="length"||O9(a,r)))&&t.push(a);return t}function yy(o,i,t){var r=o[i];(!($o.call(o,i)&&_y(r,t))||t===void 0&&!(i in o))&&(o[i]=t)}function cp(o,i){for(var t=o.length;t--;)if(_y(o[t][0],i))return t;return-1}function y9(o,i){return o&&xy(i,km(i),o)}function bm(o,i,t,r,n,a,s){var l;if(r&&(l=a?r(o,n,a,s):r(o)),l!==void 0)return l;if(!pp(o))return o;var p=_m(o);if(p){if(l=D9(o),!i)return L9(o,l)}else{var h=Sa(o),m=h==ym||h==ey;if(U9(o))return C9(o,i);if(h==xm||h==vm||m&&!a){if(by(o))return a?o:{};if(l=R9(m?{}:o),!i)return q9(o,y9(l,o))}else{if(!et[h])return a?o:{};l=N9(o,h,bm,i)}}s||(s=new xs);var f=s.get(o);if(f)return f;if(s.set(o,l),!p)var b=t?I9(o):km(o);return I8(b||o,function(g,v){b&&(v=g,g=o[v]),yy(l,v,bm(g,i,t,r,v,o,s))}),l}function x9(o){return pp(o)?B8(o):{}}function w9(o,i,t){var r=i(o);return _m(o)?r:D8(r,t(o))}function z9(o){return lp.call(o)}function _9(o){if(!pp(o)||H9(o))return!1;var i=Cy(o)||by(o)?H8:E8;return i.test(Ta(o))}function k9(o){if(!zy(o))return G8(o);var i=[];for(var t in Object(o))$o.call(o,t)&&t!="constructor"&&i.push(t);return i}function C9(o,i){if(i)return o.slice();var t=new o.constructor(o.length);return o.copy(t),t}function zm(o){var i=new o.constructor(o.byteLength);return new G1(i).set(new G1(o)),i}function S9(o,i){var t=i?zm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}function E9(o,i,t){var r=i?t(F1(o),!0):F1(o);return gy(r,L8,new o.constructor)}function T9(o){var i=new o.constructor(o.source,S8.exec(o));return i.lastIndex=o.lastIndex,i}function $9(o,i,t){var r=i?t(B1(o),!0):B1(o);return gy(r,q8,new o.constructor)}function A9(o){return Y1?Object(Y1.call(o)):{}}function M9(o,i){var t=i?zm(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function L9(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}function xy(o,i,t,r){t||(t={});for(var n=-1,a=i.length;++n<a;){var s=i[n],l=r?r(t[s],o[s],s,t,o):void 0;yy(t,s,l===void 0?o[s]:l)}return t}function q9(o,i){return xy(o,wy(o),i)}function I9(o){return w9(o,km,wy)}function dp(o,i){var t=o.__data__;return P9(i)?t[typeof i=="string"?"string":"hash"]:t.map}function ws(o,i){var t=N8(o,i);return _9(t)?t:void 0}var wy=W1?wm(W1,Object):W9,Sa=z9;(um&&Sa(new um(new ArrayBuffer(1)))!=ap||Kl&&Sa(new Kl)!=np||mm&&Sa(mm.resolve())!=P1||fm&&Sa(new fm)!=op||gm&&Sa(new gm)!=hm)&&(Sa=function(o){var i=lp.call(o),t=i==xm?o.constructor:void 0,r=t?Ta(t):void 0;if(r)switch(r){case W8:return ap;case K8:return np;case Y8:return P1;case Q8:return op;case X8:return hm}return i});function D9(o){var i=o.length,t=o.constructor(i);return i&&typeof o[0]=="string"&&$o.call(o,"index")&&(t.index=o.index,t.input=o.input),t}function R9(o){return typeof o.constructor=="function"&&!zy(o)?x9(F8(o)):{}}function N9(o,i,t,r){var n=o.constructor;switch(i){case oy:return zm(o);case J1:case Z1:return new n(+o);case ap:return S9(o,r);case ay:case sy:case ly:case cy:case dy:case py:case hy:case uy:case my:return M9(o,r);case np:return E9(o,r,t);case ty:case iy:return new n(o);case ry:return T9(o);case op:return $9(o,r,t);case ny:return A9(o)}}function O9(o,i){return i=i??X1,!!i&&(typeof o=="number"||T8.test(o))&&o>-1&&o%1==0&&o<i}function P9(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function H9(o){return!!V1&&V1 in o}function zy(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||sp;return o===t}function Ta(o){if(o!=null){try{return vy.call(o)}catch{}try{return o+""}catch{}}return""}function F9(o){return bm(o,!0,!0)}function _y(o,i){return o===i||o!==o&&i!==i}function B9(o){return V9(o)&&$o.call(o,"callee")&&(!V8.call(o,"callee")||lp.call(o)==vm)}var _m=Array.isArray;function ky(o){return o!=null&&j9(o.length)&&!Cy(o)}function V9(o){return G9(o)&&ky(o)}var U9=j8||K9;function Cy(o){var i=pp(o)?lp.call(o):"";return i==ym||i==ey}function j9(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=X1}function pp(o){var i=typeof o;return!!o&&(i=="object"||i=="function")}function G9(o){return!!o&&typeof o=="object"}function km(o){return ky(o)?v9(o):k9(o)}function W9(){return[]}function K9(){return!1}vs.exports=F9});var Nm=Fn((Ql,_s)=>{var Y9=200,Rm="__lodash_hash_undefined__",yp=1,Ny=2,Oy=9007199254740991,hp="[object Arguments]",$m="[object Array]",Q9="[object AsyncFunction]",Py="[object Boolean]",Hy="[object Date]",Fy="[object Error]",By="[object Function]",X9="[object GeneratorFunction]",up="[object Map]",Vy="[object Number]",J9="[object Null]",zs="[object Object]",Sy="[object Promise]",Z9="[object Proxy]",Uy="[object RegExp]",mp="[object Set]",jy="[object String]",e6="[object Symbol]",t6="[object Undefined]",Am="[object WeakMap]",Gy="[object ArrayBuffer]",fp="[object DataView]",r6="[object Float32Array]",i6="[object Float64Array]",n6="[object Int8Array]",o6="[object Int16Array]",a6="[object Int32Array]",s6="[object Uint8Array]",l6="[object Uint8ClampedArray]",c6="[object Uint16Array]",d6="[object Uint32Array]",p6=/[\\^$.*+?()[\]{}|]/g,h6=/^\[object .+?Constructor\]$/,u6=/^(?:0|[1-9]\d*)$/,st={};st[r6]=st[i6]=st[n6]=st[o6]=st[a6]=st[s6]=st[l6]=st[c6]=st[d6]=!0;st[hp]=st[$m]=st[Gy]=st[Py]=st[fp]=st[Hy]=st[Fy]=st[By]=st[up]=st[Vy]=st[zs]=st[Uy]=st[mp]=st[jy]=st[Am]=!1;var Wy=typeof global=="object"&&global&&global.Object===Object&&global,m6=typeof self=="object"&&self&&self.Object===Object&&self,Qn=Wy||m6||Function("return this")(),Ky=typeof Ql=="object"&&Ql&&!Ql.nodeType&&Ql,Ey=Ky&&typeof _s=="object"&&_s&&!_s.nodeType&&_s,Yy=Ey&&Ey.exports===Ky,Sm=Yy&&Wy.process,Ty=(function(){try{return Sm&&Sm.binding&&Sm.binding("util")}catch{}})(),$y=Ty&&Ty.isTypedArray;function f6(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}function g6(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}function b6(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}function v6(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}function y6(o){return function(i){return o(i)}}function x6(o,i){return o.has(i)}function w6(o,i){return o?.[i]}function z6(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}function _6(o,i){return function(t){return o(i(t))}}function k6(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var C6=Array.prototype,S6=Function.prototype,xp=Object.prototype,Em=Qn["__core-js_shared__"],Qy=S6.toString,$n=xp.hasOwnProperty,Ay=(function(){var o=/[^.]+$/.exec(Em&&Em.keys&&Em.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Xy=xp.toString,E6=RegExp("^"+Qy.call($n).replace(p6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),My=Yy?Qn.Buffer:void 0,gp=Qn.Symbol,Ly=Qn.Uint8Array,Jy=xp.propertyIsEnumerable,T6=C6.splice,$a=gp?gp.toStringTag:void 0,qy=Object.getOwnPropertySymbols,$6=My?My.isBuffer:void 0,A6=_6(Object.keys,Object),Mm=ks(Qn,"DataView"),Xl=ks(Qn,"Map"),Lm=ks(Qn,"Promise"),qm=ks(Qn,"Set"),Im=ks(Qn,"WeakMap"),Jl=ks(Object,"create"),M6=La(Mm),L6=La(Xl),q6=La(Lm),I6=La(qm),D6=La(Im),Iy=gp?gp.prototype:void 0,Tm=Iy?Iy.valueOf:void 0;function Aa(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function R6(){this.__data__=Jl?Jl(null):{},this.size=0}function N6(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}function O6(o){var i=this.__data__;if(Jl){var t=i[o];return t===Rm?void 0:t}return $n.call(i,o)?i[o]:void 0}function P6(o){var i=this.__data__;return Jl?i[o]!==void 0:$n.call(i,o)}function H6(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Jl&&i===void 0?Rm:i,this}Aa.prototype.clear=R6;Aa.prototype.delete=N6;Aa.prototype.get=O6;Aa.prototype.has=P6;Aa.prototype.set=H6;function Xn(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function F6(){this.__data__=[],this.size=0}function B6(o){var i=this.__data__,t=wp(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():T6.call(i,t,1),--this.size,!0}function V6(o){var i=this.__data__,t=wp(i,o);return t<0?void 0:i[t][1]}function U6(o){return wp(this.__data__,o)>-1}function j6(o,i){var t=this.__data__,r=wp(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}Xn.prototype.clear=F6;Xn.prototype.delete=B6;Xn.prototype.get=V6;Xn.prototype.has=U6;Xn.prototype.set=j6;function Ma(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}function G6(){this.size=0,this.__data__={hash:new Aa,map:new(Xl||Xn),string:new Aa}}function W6(o){var i=zp(this,o).delete(o);return this.size-=i?1:0,i}function K6(o){return zp(this,o).get(o)}function Y6(o){return zp(this,o).has(o)}function Q6(o,i){var t=zp(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}Ma.prototype.clear=G6;Ma.prototype.delete=W6;Ma.prototype.get=K6;Ma.prototype.has=Y6;Ma.prototype.set=Q6;function bp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Ma;++i<t;)this.add(o[i])}function X6(o){return this.__data__.set(o,Rm),this}function J6(o){return this.__data__.has(o)}bp.prototype.add=bp.prototype.push=X6;bp.prototype.has=J6;function Mo(o){var i=this.__data__=new Xn(o);this.size=i.size}function Z6(){this.__data__=new Xn,this.size=0}function eC(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}function tC(o){return this.__data__.get(o)}function rC(o){return this.__data__.has(o)}function iC(o,i){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!Xl||r.length<Y9-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Ma(r)}return t.set(o,i),this.size=t.size,this}Mo.prototype.clear=Z6;Mo.prototype.delete=eC;Mo.prototype.get=tC;Mo.prototype.has=rC;Mo.prototype.set=iC;function nC(o,i){var t=vp(o),r=!t&&yC(o),n=!t&&!r&&Dm(o),a=!t&&!r&&!n&&ox(o),s=t||r||n||a,l=s?v6(o.length,String):[],p=l.length;for(var h in o)(i||$n.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||mC(h,p)))&&l.push(h);return l}function wp(o,i){for(var t=o.length;t--;)if(tx(o[t][0],i))return t;return-1}function oC(o,i,t){var r=i(o);return vp(o)?r:g6(r,t(o))}function ec(o){return o==null?o===void 0?t6:J9:$a&&$a in Object(o)?hC(o):vC(o)}function Dy(o){return Zl(o)&&ec(o)==hp}function Zy(o,i,t,r,n){return o===i?!0:o==null||i==null||!Zl(o)&&!Zl(i)?o!==o&&i!==i:aC(o,i,t,r,Zy,n)}function aC(o,i,t,r,n,a){var s=vp(o),l=vp(i),p=s?$m:Ao(o),h=l?$m:Ao(i);p=p==hp?zs:p,h=h==hp?zs:h;var m=p==zs,f=h==zs,b=p==h;if(b&&Dm(o)){if(!Dm(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new Mo),s||ox(o)?ex(o,i,t,r,n,a):dC(o,i,p,t,r,n,a);if(!(t&yp)){var g=m&&$n.call(o,"__wrapped__"),v=f&&$n.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new Mo),n(y,S,t,r,a)}}return b?(a||(a=new Mo),pC(o,i,t,r,n,a)):!1}function sC(o){if(!nx(o)||gC(o))return!1;var i=rx(o)?E6:h6;return i.test(La(o))}function lC(o){return Zl(o)&&ix(o.length)&&!!st[ec(o)]}function cC(o){if(!bC(o))return A6(o);var i=[];for(var t in Object(o))$n.call(o,t)&&t!="constructor"&&i.push(t);return i}function ex(o,i,t,r,n,a){var s=t&yp,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o);if(h&&a.get(i))return h==i;var m=-1,f=!0,b=t&Ny?new bp:void 0;for(a.set(o,i),a.set(i,o);++m<l;){var g=o[m],v=i[m];if(r)var y=s?r(v,g,m,i,o,a):r(g,v,m,o,i,a);if(y!==void 0){if(y)continue;f=!1;break}if(b){if(!b6(i,function(S,T){if(!x6(b,T)&&(g===S||n(g,S,t,r,a)))return b.push(T)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(o),a.delete(i),f}function dC(o,i,t,r,n,a,s){switch(t){case fp:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case Gy:return!(o.byteLength!=i.byteLength||!a(new Ly(o),new Ly(i)));case Py:case Hy:case Vy:return tx(+o,+i);case Fy:return o.name==i.name&&o.message==i.message;case Uy:case jy:return o==i+"";case up:var l=z6;case mp:var p=r&yp;if(l||(l=k6),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=Ny,s.set(o,i);var m=ex(l(o),l(i),r,n,a,s);return s.delete(o),m;case e6:if(Tm)return Tm.call(o)==Tm.call(i)}return!1}function pC(o,i,t,r,n,a){var s=t&yp,l=Ry(o),p=l.length,h=Ry(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:$n.call(i,b)))return!1}var g=a.get(o);if(g&&a.get(i))return g==i;var v=!0;a.set(o,i),a.set(i,o);for(var y=s;++f<p;){b=l[f];var S=o[b],T=i[b];if(r)var N=s?r(T,S,b,i,o,a):r(S,T,b,o,i,a);if(!(N===void 0?S===T||n(S,T,t,r,a):N)){v=!1;break}y||(y=b=="constructor")}if(v&&!y){var U=o.constructor,I=i.constructor;U!=I&&"constructor"in o&&"constructor"in i&&!(typeof U=="function"&&U instanceof U&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(o),a.delete(i),v}function Ry(o){return oC(o,zC,uC)}function zp(o,i){var t=o.__data__;return fC(i)?t[typeof i=="string"?"string":"hash"]:t.map}function ks(o,i){var t=w6(o,i);return sC(t)?t:void 0}function hC(o){var i=$n.call(o,$a),t=o[$a];try{o[$a]=void 0;var r=!0}catch{}var n=Xy.call(o);return r&&(i?o[$a]=t:delete o[$a]),n}var uC=qy?function(o){return o==null?[]:(o=Object(o),f6(qy(o),function(i){return Jy.call(o,i)}))}:_C,Ao=ec;(Mm&&Ao(new Mm(new ArrayBuffer(1)))!=fp||Xl&&Ao(new Xl)!=up||Lm&&Ao(Lm.resolve())!=Sy||qm&&Ao(new qm)!=mp||Im&&Ao(new Im)!=Am)&&(Ao=function(o){var i=ec(o),t=i==zs?o.constructor:void 0,r=t?La(t):"";if(r)switch(r){case M6:return fp;case L6:return up;case q6:return Sy;case I6:return mp;case D6:return Am}return i});function mC(o,i){return i=i??Oy,!!i&&(typeof o=="number"||u6.test(o))&&o>-1&&o%1==0&&o<i}function fC(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}function gC(o){return!!Ay&&Ay in o}function bC(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||xp;return o===t}function vC(o){return Xy.call(o)}function La(o){if(o!=null){try{return Qy.call(o)}catch{}try{return o+""}catch{}}return""}function tx(o,i){return o===i||o!==o&&i!==i}var yC=Dy((function(){return arguments})())?Dy:function(o){return Zl(o)&&$n.call(o,"callee")&&!Jy.call(o,"callee")},vp=Array.isArray;function xC(o){return o!=null&&ix(o.length)&&!rx(o)}var Dm=$6||kC;function wC(o,i){return Zy(o,i)}function rx(o){if(!nx(o))return!1;var i=ec(o);return i==By||i==X9||i==Q9||i==Z9}function ix(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Oy}function nx(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}function Zl(o){return o!=null&&typeof o=="object"}var ox=$y?y6($y):lC;function zC(o){return xC(o)?nC(o):cC(o)}function _C(){return[]}function kC(){return!1}_s.exports=wC});var ax=Fn(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var CC=Cm(),SC=Nm(),Om;(function(o){function i(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let p=CC(s);l||(p=Object.keys(p).reduce((h,m)=>(p[m]!=null&&(h[m]=p[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(p[h]=a[h]);return Object.keys(p).length>0?p:void 0}o.compose=i;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((p,h)=>(SC(a[h],s[h])||(p[h]=s[h]===void 0?null:s[h]),p),{});return Object.keys(l).length>0?l:void 0}o.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((p,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(p[h]=s[h]),p),{});return Object.keys(a).reduce((p,h)=>(a[h]!==s[h]&&s[h]===void 0&&(p[h]=null),p),l)}o.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let p=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(p).length>0?p:void 0}o.transform=n})(Om||(Om={}));Pm.default=Om});var Bm=Fn(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var Hm;(function(o){function i(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}o.length=i})(Hm||(Hm={}));Fm.default=Hm});var lx=Fn(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var sx=Bm(),Vm=class{constructor(i){this.ops=i,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(i){i||(i=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=sx.default.length(t);if(i>=n-r?(i=n-r,this.index+=1,this.offset=0):this.offset+=i,typeof t.delete=="number")return{delete:i};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=i:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,i):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?sx.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let i=this.ops[this.index];return i?typeof i.delete=="number"?"delete":typeof i.retain=="number"||typeof i.retain=="object"&&i.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let i=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=i,this.index=t,[r].concat(n)}}else return[]}};Um.default=Vm});var ei=Fn((Zn,kp)=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.AttributeMap=Zn.OpIterator=Zn.Op=void 0;var _p=O1(),EC=Cm(),jm=Nm(),qa=ax();Zn.AttributeMap=qa.default;var Jn=Bm();Zn.Op=Jn.default;var Ni=lx();Zn.OpIterator=Ni.default;var TC="\0",cx=(o,i)=>{if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);let t=Object.keys(o)[0];if(!t||t!==Object.keys(i)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(i)[0]}`);return[t,o[t],i[t]]},eo=class o{constructor(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]}static registerEmbed(i,t){this.handlers[i]=t}static unregisterEmbed(i){delete this.handlers[i]}static getHandler(i){let t=this.handlers[i];if(!t)throw new Error(`no handlers for embed type "${i}"`);return t}insert(i,t){let r={};return typeof i=="string"&&i.length===0?this:(r.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(i){return i<=0?this:this.push({delete:i})}retain(i,t){if(typeof i=="number"&&i<=0)return this;let r={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(i){let t=this.ops.length,r=this.ops[t-1];if(i=EC(i),typeof r=="object"){if(typeof i.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+i.delete},this;if(typeof r.delete=="number"&&i.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(i),this;if(jm(i.attributes,r.attributes)){if(typeof i.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+i.insert},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this;if(typeof i.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+i.retain},typeof i.attributes=="object"&&(this.ops[t-1].attributes=i.attributes),this}}return t===this.ops.length?this.ops.push(i):this.ops.splice(t,0,i),this}chop(){let i=this.ops[this.ops.length-1];return i&&typeof i.retain=="number"&&!i.attributes&&this.ops.pop(),this}filter(i){return this.ops.filter(i)}forEach(i){this.ops.forEach(i)}map(i){return this.ops.map(i)}partition(i){let t=[],r=[];return this.forEach(n=>{(i(n)?t:r).push(n)}),[t,r]}reduce(i,t){return this.ops.reduce(i,t)}changeLength(){return this.reduce((i,t)=>t.insert?i+Jn.default.length(t):t.delete?i-t.delete:i,0)}length(){return this.reduce((i,t)=>i+Jn.default.length(t),0)}slice(i=0,t=1/0){let r=[],n=new Ni.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<i?s=n.next(i-a):(s=n.next(t-a),r.push(s)),a+=Jn.default.length(s)}return new o(r)}compose(i){let t=new Ni.default(this.ops),r=new Ni.default(i.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new o(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),p=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof p.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")p.retain==null?m.insert=p.insert:m.retain=p.retain;else{let b=p.retain==null?"insert":"retain",[g,v,y]=cx(p[b],h.retain),S=o.getHandler(g);m[b]={[g]:S.compose(v,y,b==="retain")}}let f=qa.default.compose(p.attributes,h.attributes,typeof p.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&jm(s.ops[s.ops.length-1],m)){let b=new o(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof p.retain=="number"||typeof p.retain=="object"&&p.retain!==null)&&s.push(h)}return s.chop()}concat(i){let t=new o(this.ops.slice());return i.ops.length>0&&(t.push(i.ops[0]),t.ops=t.ops.concat(i.ops.slice(1))),t}diff(i,t){if(this.ops===i.ops)return new o;let r=[this,i].map(p=>p.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:TC;let m=p===i?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new o,a=_p(r[0],r[1],t,!0),s=new Ni.default(this.ops),l=new Ni.default(i.ops);return a.forEach(p=>{let h=p[1].length;for(;h>0;){let m=0;switch(p[0]){case _p.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case _p.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case _p.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);jm(f.insert,b.insert)?n.retain(m,qa.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(i,t=`
|
|
2
|
+
`){let r=new Ni.default(this.ops),n=new o,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Jn.default.length(s)-r.peekLength(),p=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(p<0)n.push(r.next());else if(p>0)n.push(r.next(p));else{if(i(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new o}}n.length()>0&&i(n,{},a)}invert(i){let t=new o;return this.reduce((r,n)=>{if(n.insert)t.delete(Jn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return i.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Jn.default.length(l),qa.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=i.slice(r,r+1),s=new Ni.default(a.ops).next(),[l,p,h]=cx(n.retain,s.insert),m=o.getHandler(l);return t.retain({[l]:m.invert(p,h)},qa.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(i,t=!1){if(t=!!t,typeof i=="number")return this.transformPosition(i,t);let r=i,n=new Ni.default(this.ops),a=new Ni.default(r.ops),s=new o;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Jn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),p=n.next(l),h=a.next(l);if(p.delete)continue;if(h.delete)s.push(h);else{let m=p.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=o.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,qa.default.transform(p.attributes,h.attributes,t))}}return s.chop()}transformPosition(i,t=!1){t=!!t;let r=new Ni.default(this.ops),n=0;for(;r.hasNext()&&n<=i;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){i-=Math.min(a,i-n);continue}else s==="insert"&&(n<i||!t)&&(i+=a);n+=a}return i}};eo.Op=Jn.default;eo.OpIterator=Ni.default;eo.AttributeMap=qa.default;eo.handlers={};Zn.default=eo;typeof kp=="object"&&(kp.exports=eo,kp.exports.default=eo)});var Cz=Fn((Dpe,pf)=>{"use strict";var dA=Object.prototype.hasOwnProperty,Ur="~";function pc(){}Object.create&&(pc.prototype=Object.create(null),new pc().__proto__||(Ur=!1));function pA(o,i,t){this.fn=o,this.context=i,this.once=t||!1}function kz(o,i,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new pA(t,r||o,n),s=Ur?Ur+i:i;return o._events[s]?o._events[s].fn?o._events[s]=[o._events[s],a]:o._events[s].push(a):(o._events[s]=a,o._eventsCount++),o}function Xp(o,i){--o._eventsCount===0?o._events=new pc:delete o._events[i]}function qr(){this._events=new pc,this._eventsCount=0}qr.prototype.eventNames=function(){var i=[],t,r;if(this._eventsCount===0)return i;for(r in t=this._events)dA.call(t,r)&&i.push(Ur?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i};qr.prototype.listeners=function(i){var t=Ur?Ur+i:i,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};qr.prototype.listenerCount=function(i){var t=Ur?Ur+i:i,r=this._events[t];return r?r.fn?1:r.length:0};qr.prototype.emit=function(i,t,r,n,a,s){var l=Ur?Ur+i:i;if(!this._events[l])return!1;var p=this._events[l],h=arguments.length,m,f;if(p.fn){switch(p.once&&this.removeListener(i,p.fn,void 0,!0),h){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,t),!0;case 3:return p.fn.call(p.context,t,r),!0;case 4:return p.fn.call(p.context,t,r,n),!0;case 5:return p.fn.call(p.context,t,r,n,a),!0;case 6:return p.fn.call(p.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];p.fn.apply(p.context,m)}else{var b=p.length,g;for(f=0;f<b;f++)switch(p[f].once&&this.removeListener(i,p[f].fn,void 0,!0),h){case 1:p[f].fn.call(p[f].context);break;case 2:p[f].fn.call(p[f].context,t);break;case 3:p[f].fn.call(p[f].context,t,r);break;case 4:p[f].fn.call(p[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];p[f].fn.apply(p[f].context,m)}}return!0};qr.prototype.on=function(i,t,r){return kz(this,i,t,r,!1)};qr.prototype.once=function(i,t,r){return kz(this,i,t,r,!0)};qr.prototype.removeListener=function(i,t,r,n){var a=Ur?Ur+i:i;if(!this._events[a])return this;if(!t)return Xp(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&Xp(this,a);else{for(var l=0,p=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&p.push(s[l]);p.length?this._events[a]=p.length===1?p[0]:p:Xp(this,a)}return this};qr.prototype.removeAllListeners=function(i){var t;return i?(t=Ur?Ur+i:i,this._events[t]&&Xp(this,t)):(this._events=new pc,this._eventsCount=0),this};qr.prototype.off=qr.prototype.removeListener;qr.prototype.addListener=qr.prototype.on;qr.prefixed=Ur;qr.EventEmitter=qr;typeof pf<"u"&&(pf.exports=qr)});var gl=globalThis,Kg=o=>o,ed=gl.trustedTypes,Yg=ed?ed.createPolicy("lit-html",{createHTML:o=>o}):void 0,Gh="$lit$",Bn=`lit$${Math.random().toFixed(9).slice(2)}$`,Wh="?"+Bn,p3=`<${Wh}>`,da=document,bl=()=>da.createComment(""),vl=o=>o===null||typeof o!="object"&&typeof o!="function",Kh=Array.isArray,tb=o=>Kh(o)||typeof o?.[Symbol.iterator]=="function",jh=`[
|
|
3
3
|
\f\r]`,fl=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qg=/-->/g,Xg=/>/g,la=RegExp(`>|${jh}(?:([^\\s"'>=/]+)(${jh}*=${jh}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jg=/'/g,Zg=/"/g,rb=/^(?:script|style|textarea|title)$/i,Yh=o=>(i,...t)=>({_$litType$:o,strings:i,values:t}),u=Yh(1),Qi=Yh(2),ib=Yh(3),vt=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),eb=new WeakMap,ca=da.createTreeWalker(da,129);function nb(o,i){if(!Kh(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Yg!==void 0?Yg.createHTML(i):i}var ob=(o,i)=>{let t=o.length-1,r=[],n,a=i===2?"<svg>":i===3?"<math>":"",s=fl;for(let l=0;l<t;l++){let p=o[l],h,m,f=-1,b=0;for(;b<p.length&&(s.lastIndex=b,m=s.exec(p),m!==null);)b=s.lastIndex,s===fl?m[1]==="!--"?s=Qg:m[1]!==void 0?s=Xg:m[2]!==void 0?(rb.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=la):m[3]!==void 0&&(s=la):s===la?m[0]===">"?(s=n??fl,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?la:m[3]==='"'?Zg:Jg):s===Zg||s===Jg?s=la:s===Qg||s===Xg?s=fl:(s=la,n=void 0);let g=s===la&&o[l+1].startsWith("/>")?" ":"";a+=s===fl?p+p3:f>=0?(r.push(h),p.slice(0,f)+Gh+p.slice(f)+Bn+g):p+Bn+(f===-2?l:g)}return[nb(o,a+(o[t]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),r]},yl=class o{constructor({strings:i,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=i.length-1,p=this.parts,[h,m]=ob(i,t);if(this.el=o.createElement(h,r),ca.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=ca.nextNode())!==null&&p.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Gh)){let b=m[s++],g=n.getAttribute(f).split(Bn),v=/([.?@])?(.*)/.exec(b);p.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?rd:v[1]==="?"?id:v[1]==="@"?nd:ha}),n.removeAttribute(f)}else f.startsWith(Bn)&&(p.push({type:6,index:a}),n.removeAttribute(f));if(rb.test(n.tagName)){let f=n.textContent.split(Bn),b=f.length-1;if(b>0){n.textContent=ed?ed.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],bl()),ca.nextNode(),p.push({type:2,index:++a});n.append(f[b],bl())}}}else if(n.nodeType===8)if(n.data===Wh)p.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Bn,f+1))!==-1;)p.push({type:7,index:a}),f+=Bn.length-1}a++}}static createElement(i,t){let r=da.createElement("template");return r.innerHTML=i,r}};function pa(o,i,t=o,r){if(i===vt)return i;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=vl(i)?void 0:i._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(i=pa(o,n._$AS(o,i.values),n,r)),i}var td=class{constructor(i,t){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){let{el:{content:t},parts:r}=this._$AD,n=(i?.creationScope??da).importNode(t,!0);ca.currentNode=n;let a=ca.nextNode(),s=0,l=0,p=r[0];for(;p!==void 0;){if(s===p.index){let h;p.type===2?h=new Qa(a,a.nextSibling,this,i):p.type===1?h=new p.ctor(a,p.name,p.strings,this,i):p.type===6&&(h=new od(a,this,i)),this._$AV.push(h),p=r[++l]}s!==p?.index&&(a=ca.nextNode(),s++)}return ca.currentNode=da,n}p(i){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(i,r,t),t+=r.strings.length-2):r._$AI(i[t])),t++}},Qa=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(i,t,r,n){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let i=this._$AA.parentNode,t=this._$AM;return t!==void 0&&i?.nodeType===11&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=pa(this,i,t),vl(i)?i===B||i==null||i===""?(this._$AH!==B&&this._$AR(),this._$AH=B):i!==this._$AH&&i!==vt&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):tb(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==B&&vl(this._$AH)?this._$AA.nextSibling.data=i:this.T(da.createTextNode(i)),this._$AH=i}$(i){let{values:t,_$litType$:r}=i,n=typeof r=="number"?this._$AC(i):(r.el===void 0&&(r.el=yl.createElement(nb(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new td(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(i){let t=eb.get(i.strings);return t===void 0&&eb.set(i.strings,t=new yl(i)),t}k(i){Kh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of i)n===t.length?t.push(r=new o(this.O(bl()),this.O(bl()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(i=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);i!==this._$AB;){let r=Kg(i).nextSibling;Kg(i).remove(),i=r}}setConnected(i){this._$AM===void 0&&(this._$Cv=i,this._$AP?.(i))}},ha=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,t,r,n,a){this.type=1,this._$AH=B,this._$AN=void 0,this.element=i,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=B}_$AI(i,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)i=pa(this,i,t,0),s=!vl(i)||i!==this._$AH&&i!==vt,s&&(this._$AH=i);else{let l=i,p,h;for(i=a[0],p=0;p<a.length-1;p++)h=pa(this,l[r+p],t,p),h===vt&&(h=this._$AH[p]),s||(s=!vl(h)||h!==this._$AH[p]),h===B?i=B:i!==B&&(i+=(h??"")+a[p+1]),this._$AH[p]=h}s&&!n&&this.j(i)}j(i){i===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i??"")}},rd=class extends ha{constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===B?void 0:i}},id=class extends ha{constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==B)}},nd=class extends ha{constructor(i,t,r,n,a){super(i,t,r,n,a),this.type=5}_$AI(i,t=this){if((i=pa(this,i,t,0)??B)===vt)return;let r=this._$AH,n=i===B&&r!==B||i.capture!==r.capture||i.once!==r.once||i.passive!==r.passive,a=i!==B&&(r===B||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,i):this._$AH.handleEvent(i)}},od=class{constructor(i,t,r){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(i){pa(this,i)}},ab={M:Gh,P:Bn,A:Wh,C:1,L:ob,R:td,D:tb,V:pa,I:Qa,H:ha,N:id,U:nd,B:rd,F:od},h3=gl.litHtmlPolyfillSupport;h3?.(yl,Qa),(gl.litHtmlVersions??(gl.litHtmlVersions=[])).push("3.3.3");var Xa=(o,i,t)=>{let r=t?.renderBefore??i,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Qa(i.insertBefore(bl(),a),a,void 0,t??{})}return n._$AI(o),n};var lr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yt=o=>(...i)=>({_$litDirective$:o,values:i}),rr=class{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,t,r){this._$Ct=i,this._$AM=t,this._$Ci=r}_$AS(i,t){return this.update(i,t)}update(i,t){return this.render(...t)}};var M=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(i=>o[i]).join(" ")+" "}update(o,[i]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in i)i[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(i)}let t=o.element.classList;for(let r of this.st)r in i||(t.remove(r),this.st.delete(r));for(let r in i){let n=!!i[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return vt}});var ad=globalThis,sd=ad.ShadowRoot&&(ad.ShadyCSS===void 0||ad.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qh=Symbol(),sb=new WeakMap,xl=class{constructor(i,t,r){if(this._$cssResult$=!0,r!==Qh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(sd&&i===void 0){let r=t!==void 0&&t.length===1;r&&(i=sb.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),r&&sb.set(t,i))}return i}toString(){return this.cssText}},z=o=>new xl(typeof o=="string"?o:o+"",void 0,Qh),_=(o,...i)=>{let t=o.length===1?o[0]:i.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[a+1],o[0]);return new xl(t,o,Qh)},lb=(o,i)=>{if(sd)o.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of i){let r=document.createElement("style"),n=ad.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},Xh=sd?o=>o:o=>o instanceof CSSStyleSheet?(i=>{let t="";for(let r of i.cssRules)t+=r.cssText;return z(t)})(o):o;var{is:u3,defineProperty:m3,getOwnPropertyDescriptor:f3,getOwnPropertyNames:g3,getOwnPropertySymbols:b3,getPrototypeOf:v3}=Object,mo=globalThis,cb=mo.trustedTypes,y3=cb?cb.emptyScript:"",x3=mo.reactiveElementPolyfillSupport,wl=(o,i)=>o,fo={toAttribute(o,i){switch(i){case Boolean:o=o?y3:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,i){let t=o;switch(i){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Ja=(o,i)=>!u3(o,i),db={attribute:!0,type:String,converter:fo,reflect:!1,useDefault:!1,hasChanged:Ja};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),mo.litPropertyMetadata??(mo.litPropertyMetadata=new WeakMap);var Vn=class extends HTMLElement{static addInitializer(i){this._$Ei(),(this.l??(this.l=[])).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=db){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(i,r,t);n!==void 0&&m3(this.prototype,i,n)}}static getPropertyDescriptor(i,t,r){let{get:n,set:a}=f3(this.prototype,i)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(i,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)??db}static _$Ei(){if(this.hasOwnProperty(wl("elementProperties")))return;let i=v3(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(wl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(wl("properties"))){let t=this.properties,r=[...g3(t),...b3(t)];for(let n of r)this.createProperty(n,t[n])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let r=new Set(i.flat(1/0).reverse());for(let n of r)t.unshift(Xh(n))}else i!==void 0&&t.push(Xh(i));return t}static _$Eu(i,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(i=>i(this))}addController(i){(this._$EO??(this._$EO=new Set)).add(i),this.renderRoot!==void 0&&this.isConnected&&i.hostConnected?.()}removeController(i){this._$EO?.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(i.set(r,this[r]),delete this[r]);i.size>0&&(this._$Ep=i)}createRenderRoot(){let i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lb(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(i=>i.hostConnected?.())}enableUpdating(i){}disconnectedCallback(){this._$EO?.forEach(i=>i.hostDisconnected?.())}attributeChangedCallback(i,t,r){this._$AK(i,r)}_$ET(i,t){let r=this.constructor.elementProperties.get(i),n=this.constructor._$Eu(i,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:fo).toAttribute(t,r.type);this._$Em=i,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(i,t){let r=this.constructor,n=r._$Eh.get(i);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:fo;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(i,t,r,n=!1,a){if(i!==void 0){let s=this.constructor;if(n===!1&&(a=this[i]),r??(r=s.getPropertyOptions(i)),!((r.hasChanged??Ja)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(i)&&!this.hasAttribute(s._$Eu(i,r))))return;this.C(i,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(i)&&(this._$Ej.set(i,s??t??this[i]),a!==!0||s!==void 0)||(this._$AL.has(i)||(this.hasUpdated||r||(t=void 0),this._$AL.set(i,t)),n===!0&&this._$Em!==i&&(this._$Eq??(this._$Eq=new Set)).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw i=!1,this._$EM(),r}i&&this._$AE(t)}willUpdate(i){}_$AE(i){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(i){}firstUpdated(i){}};Vn.elementStyles=[],Vn.shadowRootOptions={mode:"open"},Vn[wl("elementProperties")]=new Map,Vn[wl("finalized")]=new Map,x3?.({ReactiveElement:Vn}),(mo.reactiveElementVersions??(mo.reactiveElementVersions=[])).push("2.1.2");var zl=globalThis,go=class extends Vn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let i=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=i.firstChild),i}update(i){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=Xa(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};go._$litElement$=!0,go.finalized=!0,zl.litElementHydrateSupport?.({LitElement:go});var w3=zl.litElementPolyfillSupport;w3?.({LitElement:go});(zl.litElementVersions??(zl.litElementVersions=[])).push("4.2.2");var pb=new WeakMap;function hb(o){let i=pb.get(o);return i||(i=window.getComputedStyle(o,null),pb.set(o,i)),i}function z3(o){if(typeof o.checkVisibility=="function")return o.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let i=hb(o);return i.visibility!=="hidden"&&i.display!=="none"}function _3(o){let i=hb(o),{overflowY:t,overflowX:r}=i;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:o.scrollHeight>o.clientHeight&&t==="auto"||o.scrollWidth>o.clientWidth&&r==="auto"}function k3(o){let i=o.tagName.toLowerCase(),t=Number(o.getAttribute("tabindex"));return o.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||o.hasAttribute("disabled")||o.closest("[inert]")||i==="input"&&o.getAttribute("type")==="radio"&&!o.hasAttribute("checked")||!z3(o)?!1:(i==="audio"||i==="video")&&o.hasAttribute("controls")||o.hasAttribute("tabindex")||o.hasAttribute("contenteditable")&&o.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(i)?!0:_3(o)}function ub(o){let i=Jh(o),t=i[0]??null,r=i[i.length-1]??null;return{start:t,end:r}}function C3(o,i){return o.getRootNode({composed:!0})?.host!==i}function Jh(o){let i=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||i.has(n))return;i.set(n,!0),!t.includes(n)&&k3(n)&&t.push(n),n instanceof HTMLSlotElement&&C3(n,o)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(o),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var mb=new WeakMap,Zh=class{constructor(i){this.handleKeyDown=i=>{if(i.key==="Enter"){if(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.isComposing||i.defaultPrevented)return;let r=i.target;if(this.isSelectOption(r)){i.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){i.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}i.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(i.key==="ArrowDown"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusNextControl(t))}}if(i.key==="ArrowUp"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusPreviousControl(t))}}};this.form=i,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(i){let t=i.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&i.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(i){let t=i.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(i){return i.tagName.toLowerCase()==="zn-option"}findParentSelect(i){let t=i;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(i){let t=i;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(i){let t=i.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let i=ua.get(this.form);if(!i)return!0;for(let t of i){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let i=Jh(this.form),t=[],r=new Set;for(let n of i){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(i,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===i)return r;let a=i.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(i)||i.contains(n))return r}return-1}focusNextControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let i=this.form.querySelector('[type="submit"]');if(i)i.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function fb(o){let i=mb.get(o);return i||(i=new Zh(o),mb.set(o,i)),i}function cr(o){return`#${CSS.escape(o.startsWith("#")?o.slice(1):o)}`}function S3(o,i=document){let t=i.querySelector(o);if(t)return t;for(let r of i.querySelectorAll("*"))if(r.shadowRoot){let n=S3(o,r.shadowRoot);if(n)return n}return null}function E3(o,i=document,t=[]){t.push(...i.querySelectorAll(o));for(let r of i.querySelectorAll("*"))r.shadowRoot&&E3(o,r.shadowRoot,t);return t}function Ge(o,i,t){let r=[],n=(a,s)=>{if(!a||a.nodeType!==Node.ELEMENT_NODE||s&&t&&a.matches(t))return;a.matches(o)&&r.push(a);let l=a.children;if(l.length)for(let h of l)n(h,!0);let p=a.shadowRoot;if(p){let h=p.children;for(let m of h)n(m,!0)}};return n(i,!1),r}var kr=class{constructor(i,t,r=0){this.storage=i,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(i){return!i||i.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+i))}stripTtl(i){if(i===null)return null;let t=i.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(i,t,r){!i||i.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+i,r+","+t))}set(i,t){this.setWithTTL(i,t,this.ttl)}remove(i){this.storage.removeItem(this.prefix+i)}cleanup(){for(let i=0;i<this.storage.length;i++){let t=this.storage.key(i);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var ua=new WeakMap,_l=new WeakMap,kl=new WeakMap,ld=new WeakMap,eu=new WeakSet,cd=new WeakMap,xb="znform:";function tu(o=!1){try{return o?window.localStorage:window.sessionStorage}catch{return null}}function T3(o=!1,i=0){let t=tu(o);return t?new kr(t,xb,i):null}function gb(o){let i=o?.getAttribute("store-ttl");return i&&Number(i)||0}function bb(o){return!!o?.hasAttribute("local-storage")}function wb(o){return o?.getAttribute("store-key")||""}function $3(o){return o.getAttribute("store-key")||""}function A3(o){return o.getAttribute("name")||("name"in o&&typeof o.name=="string"?o.name:"")}function zb(o,i){let t=$3(o),r=wb(i);if(t)return r?`${r}:${t}`:t;let n=A3(o);return r&&n?`${r}:${n}`:""}function _b(o,i){let t=bb(o)||bb(i),r=gb(o)||gb(i);return T3(t,r)}function kb(o,i){let t=zb(o,i),n=(t?_b(o,i):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Cb(o,i,t){let r=zb(o,i),n=r?_b(o,i):null;n&&n.set(r,JSON.stringify(t))}function M3(o){return o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement}function L3(o){return o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")?{checked:o.checked,value:o.value}:{value:o.value}}function q3(o){o.querySelectorAll("input, textarea, select").forEach(t=>{let r=kb(t,o);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function vb(o,i){!M3(o)||o.form!==i||Cb(o,i,L3(o))}function I3(o,i){let t={value:i};return"checked"in o&&typeof o.checked=="boolean"&&(t.checked=o.checked),"indeterminate"in o&&typeof o.indeterminate=="boolean"&&(t.indeterminate=o.indeterminate),t}function yb(o,i){let t=[],r=xb+i;for(let n=0;n<o.length;n++){let a=o.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>o.removeItem(n))}function D3(o){let i=typeof o=="string"?o:wb(o);if(!i)return;let t=tu(!0),r=tu(!1);t&&yb(t,i),r&&r!==t&&yb(r,i)}var re=class{constructor(i,t){this.handleFormData=i=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{i.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?i.formData.append(r,m,g):i.formData.append(r,m)},p=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(p(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(p(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=i=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&ua.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(i.preventDefault(),i.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=i=>{if(i.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),cd.set(this.host,[])};this.handleInteraction=i=>{let t=cd.get(this.host);t.includes(i.type)||t.push(i.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let i=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return i?.setAttribute("disabled","disabled"),!1}return i?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let i=this.form.querySelectorAll("*");for(let t of i)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=i).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(cr(n));if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let i=this.options.form(this.host);i&&this.attachForm(i),cd.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),i&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),cd.delete(this.host),this.options.assumeInteractionOn.forEach(i=>{this.host.removeEventListener(i,this.handleInteraction)})}hostUpdated(){let i=this.options.form(this.host);i||this.detachForm(),i&&this.form!==i&&(this.detachForm(),this.attachForm(i)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(i){if(!i){this.form=void 0;return}this.form=i,ua.has(this.form)?ua.get(this.form).add(this.host):ua.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&fb(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),_l.has(this.form)||(_l.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),kl.has(this.form)||(kl.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let i=ua.get(this.form);i&&(i.delete(this.host),i.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),_l.has(this.form)&&(this.form.reportValidity=_l.get(this.form),_l.delete(this.form)),kl.has(this.form)&&(this.form.checkValidity=kl.get(this.form),kl.delete(this.form)),this.form=void 0))}attachFormPersistence(i){if(ld.has(i))return;let t=n=>vb(n.target,i),r=n=>vb(n.target,i);i.addEventListener("input",t),i.addEventListener("change",r),ld.set(i,{handleInput:t,handleChange:r}),q3(i)}detachFormPersistence(i){let t=ld.get(i);t&&(i.removeEventListener("input",t.handleInput),i.removeEventListener("change",t.handleChange),ld.delete(i))}restorePersistedValue(){let i=kb(this.host,this.form);i&&("checked"in this.host&&typeof i.checked=="boolean"?this.options.setValue(this.host,i.checked):"value"in i&&this.options.setValue(this.host,i.value),"indeterminate"in this.host&&typeof i.indeterminate=="boolean"&&(this.host.indeterminate=i.indeterminate))}persistHostValue(){Cb(this.host,this.form,I3(this.host,this.options.value(this.host)))}setUserInteracted(i,t){t?eu.add(i):eu.delete(i),i.requestUpdate()}doAction(i,t){if(this.form){let r=document.createElement("button");r.type=i,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(i){this.doAction("reset",i)}submit(i){this.doAction("submit",i)}setValidity(i){let t=this.host,r=!!eu.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!i),t.toggleAttribute("data-valid",i),t.toggleAttribute("data-user-invalid",!i&&r),t.toggleAttribute("data-user-valid",i&&r)}updateValidity(){let i=this.host;this.setValidity(i.validity?.valid)}emitInvalidEvent(i){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});i||t.preventDefault(),this.host.dispatchEvent(t)||i?.preventDefault()}},pt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),dd=Object.freeze({...pt,customError:!0,valid:!1}),pd=Object.freeze({...pt,valueMissing:!0,valid:!1});var Y=class{constructor(i,...t){this.slotNames=[];this.handleSlotChange=i=>{let t=i.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=i).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)!==null}test(i){return i==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(i)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(i){return this.host.querySelectorAll(`:scope > [slot="${i}"]`)}};function Sb(o){if(!o)return"";let i=o.assignedNodes({flatten:!0}),t="";return[...i].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Tb=Symbol.for(""),R3=o=>{if(o?.r===Tb)return o?._$litStatic$};var $i=(o,...i)=>({_$litStatic$:i.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
|
-
take care to ensure page security.`)})(r)+o[n+1],o[0]),r:Tb}),Eb=new Map,ru=o=>(i,...t)=>{let r=t.length,n,a,s=[],l=[],p,h=0,m=!1;for(;h<r;){for(p=i[h];h<r&&(a=t[h],(n=R3(a))!==void 0);)p+=n+i[++h],m=!0;h!==r&&l.push(a),s.push(p),h++}if(h===r&&s.push(i[r]),m){let f=s.join("$$lit$$");(i=Eb.get(f))===void 0&&(s.raw=s,Eb.set(f,i=s)),t=l}return o(i,...t)},ke=ru(u),VD=ru(Qi),UD=ru(ib);var P=o=>o??B;var $b=o=>(i,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,i)}):customElements.define(o,i)};var N3={attribute:!0,type:String,converter:fo,reflect:!1,hasChanged:Ja},O3=(o=N3,i,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(t.name,o),r==="accessor"){let{name:s}=t;return{set(l){let p=i.get.call(this);i.set.call(this,l),this.requestUpdate(s,p,o,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,o,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let p=this[s];i.call(this,l),this.requestUpdate(s,p,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(i,t)=>typeof t=="object"?O3(o,i,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(o,i,t)}function R(o){return d({...o,state:!0,attribute:!1})}function Ab(o){return(i,t)=>{let r=typeof i=="function"?i:i[t];Object.assign(r,o)}}var xn=(o,i,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof i!="object"&&Object.defineProperty(o,i,t),t);function F(o,i){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(o)??null;if(i){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let p=Symbol();return{get(){return this[p]},set(h){this[p]=h}}})();return xn(t,r,{get(){let p=s.call(this);return p===void 0&&(p=a(this),(p!==null||this.hasUpdated)&&l.call(this,p)),p}})}return xn(t,r,{get(){return a(this)}})}}var P3;function Za(o){return(i,t)=>xn(i,t,{get(){return(this.renderRoot??P3??(P3=document.createDocumentFragment())).querySelectorAll(o)}})}function Mb(o){return(i,t)=>xn(i,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(o)??null}})}function Lb(o){return(i,t)=>{let{slot:r}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return xn(i,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(o)??[]}})}}var qb="important",H3=" !"+qb,xt=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((i,t)=>{let r=o[t];return r==null?i:i+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[i]){let{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(i)),this.render(i);for(let r of this.ft)i[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in i){let n=i[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(H3);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?qb:""):t[r]=n}}return vt}});function K(o,i){let t={waitUntilFirstUpdate:!1,...i};return(r,n)=>{let{update:a}=r,s=Array.isArray(o)?o:[o];r.update=function(l){s.forEach(p=>{let h=p;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var F3=Object.defineProperty,B3=(o,i,t)=>i in o?F3(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,iu=(o,i,t)=>(B3(o,typeof i!="symbol"?i+"":i,t),t),V3=(o,i,t)=>{if(!i.has(o))throw TypeError("Cannot "+t)},nu=(o,i)=>{if(Object(i)!==i)throw TypeError('Cannot use the "in" operator on this value');return o.has(i)},hd=(o,i,t)=>{if(i.has(o))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(o):i.set(o,t)},Ib=(o,i,t)=>(V3(o,i,"access private method"),t);function Db(o,i){return Object.is(o,i)}var Ot=null,Cl=!1,ud=1,md=Symbol("SIGNAL");function es(o){let i=Ot;return Ot=o,i}function U3(){return Ot}function j3(){return Cl}var cu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function fd(o){if(Cl)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ot===null)return;Ot.consumerOnSignalRead(o);let i=Ot.nextProducerIndex++;if(ts(Ot),i<Ot.producerNode.length&&Ot.producerNode[i]!==o&&su(Ot)){let t=Ot.producerNode[i];gd(t,Ot.producerIndexOfThis[i])}Ot.producerNode[i]!==o&&(Ot.producerNode[i]=o,Ot.producerIndexOfThis[i]=su(Ot)?Ob(o,Ot,i):0),Ot.producerLastReadVersion[i]=o.version}function G3(){ud++}function Rb(o){if(!(!o.dirty&&o.lastCleanEpoch===ud)){if(!o.producerMustRecompute(o)&&!X3(o)){o.dirty=!1,o.lastCleanEpoch=ud;return}o.producerRecomputeValue(o),o.dirty=!1,o.lastCleanEpoch=ud}}function Nb(o){if(o.liveConsumerNode===void 0)return;let i=Cl;Cl=!0;try{for(let t of o.liveConsumerNode)t.dirty||K3(t)}finally{Cl=i}}function W3(){return Ot?.consumerAllowSignalWrites!==!1}function K3(o){var i;o.dirty=!0,Nb(o),(i=o.consumerMarkedDirty)==null||i.call(o.wrapper??o)}function Y3(o){return o&&(o.nextProducerIndex=0),es(o)}function Q3(o,i){if(es(i),!(!o||o.producerNode===void 0||o.producerIndexOfThis===void 0||o.producerLastReadVersion===void 0)){if(su(o))for(let t=o.nextProducerIndex;t<o.producerNode.length;t++)gd(o.producerNode[t],o.producerIndexOfThis[t]);for(;o.producerNode.length>o.nextProducerIndex;)o.producerNode.pop(),o.producerLastReadVersion.pop(),o.producerIndexOfThis.pop()}}function X3(o){ts(o);for(let i=0;i<o.producerNode.length;i++){let t=o.producerNode[i],r=o.producerLastReadVersion[i];if(r!==t.version||(Rb(t),r!==t.version))return!0}return!1}function Ob(o,i,t){var r;if(du(o),ts(o),o.liveConsumerNode.length===0){(r=o.watched)==null||r.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)o.producerIndexOfThis[n]=Ob(o.producerNode[n],o,n)}return o.liveConsumerIndexOfThis.push(t),o.liveConsumerNode.push(i)-1}function gd(o,i){var t;if(du(o),ts(o),typeof ngDevMode<"u"&&ngDevMode&&i>=o.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${i} is out of bounds of ${o.liveConsumerNode.length} consumers)`);if(o.liveConsumerNode.length===1){(t=o.unwatched)==null||t.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)gd(o.producerNode[n],o.producerIndexOfThis[n])}let r=o.liveConsumerNode.length-1;if(o.liveConsumerNode[i]=o.liveConsumerNode[r],o.liveConsumerIndexOfThis[i]=o.liveConsumerIndexOfThis[r],o.liveConsumerNode.length--,o.liveConsumerIndexOfThis.length--,i<o.liveConsumerNode.length){let n=o.liveConsumerIndexOfThis[i],a=o.liveConsumerNode[i];ts(a),a.producerIndexOfThis[n]=i}}function su(o){var i;return o.consumerIsAlwaysLive||(((i=o?.liveConsumerNode)==null?void 0:i.length)??0)>0}function ts(o){o.producerNode??(o.producerNode=[]),o.producerIndexOfThis??(o.producerIndexOfThis=[]),o.producerLastReadVersion??(o.producerLastReadVersion=[])}function du(o){o.liveConsumerNode??(o.liveConsumerNode=[]),o.liveConsumerIndexOfThis??(o.liveConsumerIndexOfThis=[])}function Pb(o){if(Rb(o),fd(o),o.value===lu)throw o.error;return o.value}function J3(o){let i=Object.create(Z3);i.computation=o;let t=()=>Pb(i);return t[md]=i,t}var ou=Symbol("UNSET"),au=Symbol("COMPUTING"),lu=Symbol("ERRORED"),Z3={...cu,value:ou,dirty:!0,error:null,equal:Db,producerMustRecompute(o){return o.value===ou||o.value===au},producerRecomputeValue(o){if(o.value===au)throw new Error("Detected cycle in computations.");let i=o.value;o.value=au;let t=Y3(o),r,n=!1;try{r=o.computation.call(o.wrapper),n=i!==ou&&i!==lu&&o.equal.call(o.wrapper,i,r)}catch(a){r=lu,o.error=a}finally{Q3(o,t)}if(n){o.value=i;return}o.value=r,o.version++}};function e5(){throw new Error}var t5=e5;function r5(){t5()}function i5(o){let i=Object.create(a5);i.value=o;let t=()=>(fd(i),i.value);return t[md]=i,t}function n5(){return fd(this),this.value}function o5(o,i){W3()||r5(),o.equal.call(o.wrapper,o.value,i)||(o.value=i,s5(o))}var a5={...cu,equal:Db,value:void 0};function s5(o){o.version++,G3(),Nb(o)}var dr=Symbol("node"),it;(o=>{var i,t,r,n,a,s;class l{constructor(m,f={}){hd(this,t),iu(this,i);let g=i5(m)[md];if(this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return n5.call(this[dr])}set(m){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(j3())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[dr];o5(f,m)}}i=dr,t=new WeakSet,r=function(){},o.isState=h=>typeof h=="object"&&nu(t,h),o.State=l;class p{constructor(m,f){hd(this,a),iu(this,n);let g=J3(m)[md];if(g.consumerAllowSignalWrites=!0,this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Pb(this[dr])}}n=dr,a=new WeakSet,s=function(){},o.isComputed=h=>typeof h=="object"&&nu(a,h),o.Computed=p,(h=>{var m,f,b,g,v;function y($){let L,W=null;try{W=es(null),L=$()}finally{es(W)}return L}h.untrack=y;function S($){var L;if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=$[dr].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=S;function T($){var L;if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((L=$[dr].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=T;function N($){if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let L=$[dr].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function U($){if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=$[dr].producerNode;return L?L.length>0:!1}h.hasSources=U;class I{constructor(L){hd(this,f),hd(this,g),iu(this,m);let W=Object.create(cu);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[dr]=W}watch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Ib(this,g,v).call(this,L);let W=this[dr];W.dirty=!1;let oe=es(W);for(let xe of L)fd(xe[dr]);es(oe)}unwatch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Ib(this,g,v).call(this,L);let W=this[dr];ts(W);for(let oe=W.producerNode.length-1;oe>=0;oe--)if(L.includes(W.producerNode[oe].wrapper)){gd(W.producerNode[oe],W.producerIndexOfThis[oe]);let xe=W.producerNode.length-1;if(W.producerNode[oe]=W.producerNode[xe],W.producerIndexOfThis[oe]=W.producerIndexOfThis[xe],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,oe<W.producerNode.length){let De=W.producerIndexOfThis[oe],Ne=W.producerNode[oe];du(Ne),Ne.liveConsumerIndexOfThis[De]=oe}}}getPending(){if(!(0,o.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[dr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=dr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let L of $)if(!(0,o.isComputed)(L)&&!(0,o.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},o.isWatcher=$=>nu(f,$),h.Watcher=I;function C(){var $;return($=U3())==null?void 0:$.wrapper}h.currentComputed=C,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(o.subtle||(o.subtle={}))})(it||(it={}));var pu=!1,Hb=new it.subtle.Watcher(()=>{pu||(pu=!0,queueMicrotask(()=>{pu=!1;for(let o of Hb.getPending())o.get();Hb.watch()}))}),l5=Symbol("SignalWatcherBrand"),c5=new FinalizationRegistry(o=>{o.unwatch(...it.subtle.introspectSources(o))}),Fb=new WeakMap;function bd(o){return o[l5]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),o):class extends o{constructor(){super(...arguments),this._$St=new Map,this._$So=new it.State(0),this._$Si=!1}_$Sl(){var i,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(i=this.h)===null||i===void 0?void 0:i.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new it.Computed(()=>{this._$So.get(),super.performUpdate()});let i=this.h=new it.subtle.Watcher(function(){let t=Fb.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Fb.set(i,this),c5.register(this,i),i.watch(this._$Su),i.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let i=!1;this.h.unwatch(...it.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),i||(i=!n),n})),i||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(i,t){var r;this._$S_();let n=new it.Computed(()=>{i()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?it.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>it.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:d5}=ab,Bb=o=>o;var vd=o=>o.strings===void 0,Vb=()=>document.createComment(""),rs=(o,i,t)=>{let r=o._$AA.parentNode,n=i===void 0?o._$AB:i._$AA;if(t===void 0){let a=r.insertBefore(Vb(),n),s=r.insertBefore(Vb(),n);t=new d5(a,s,o,o.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==o;if(l){let p;t._$AQ?.(o),t._$AM=o,t._$AP!==void 0&&(p=o._$AU)!==s._$AU&&t._$AP(p)}if(a!==n||l){let p=t._$AA;for(;p!==a;){let h=Bb(p).nextSibling;Bb(r).insertBefore(p,n),p=h}}}return t},bo=(o,i,t=o)=>(o._$AI(i,t),o),p5={},is=(o,i=p5)=>o._$AH=i,Ub=o=>o._$AH,yd=o=>{o._$AR(),o._$AA.remove()};var Sl=(o,i)=>{let t=o._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(i,!1),Sl(r,i);return!0},xd=o=>{let i,t;do{if((i=o._$AM)===void 0)break;t=i._$AN,t.delete(o),o=i}while(t?.size===0)},jb=o=>{for(let i;i=o._$AM;o=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(o))break;t.add(o),m5(i)}};function h5(o){this._$AN!==void 0?(xd(this),this._$AM=o,jb(this)):this._$AM=o}function u5(o,i=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(i)if(Array.isArray(r))for(let a=t;a<r.length;a++)Sl(r[a],!1),xd(r[a]);else r!=null&&(Sl(r,!1),xd(r));else Sl(this,o)}var m5=o=>{o.type==lr.CHILD&&(o._$AP??(o._$AP=u5),o._$AQ??(o._$AQ=h5))},vo=class extends rr{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,r){super._$AT(i,t,r),jb(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(Sl(this,i),xd(this))}setValue(i){if(vd(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var hu=!1,uu=new it.subtle.Watcher(async()=>{hu||(hu=!0,queueMicrotask(()=>{hu=!1;for(let o of uu.getPending())o.get();uu.watch()}))}),wd=class extends vo{_$S_(){var i,t;this._$Sm===void 0&&(this._$Sj=new it.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(i=this._$Sk)===null||i===void 0?void 0:i.h)!==null&&t!==void 0?t:uu,this._$Sm.watch(this._$Sj),it.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(i){return it.subtle.untrack(()=>i.get())}update(i,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=i.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),it.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},mu=yt(wd);var fu=o=>(i,...t)=>o(i,...t.map(r=>r instanceof it.State||r instanceof it.Computed?mu(r):r)),f5=fu(u),g5=fu(Qi);var iN=it.State,nN=it.Computed,gu=(o,i)=>new it.State(o,i);function Wb(o,i){return typeof document>"u"?i:document.documentElement.getAttribute(o)||document.body?.getAttribute(o)||i}function Kb(){return Wb("t","light")}function Yb(){return Wb("m","light")}var zd=gu(Kb()),_d=gu(Yb()),Gb=!1;function b5(){Gb||typeof window>"u"||(Gb=!0,window.addEventListener("theme-change",o=>{let i=o.detail,t,r;if(typeof i=="string")t=i;else if(i&&typeof i=="object"){let n=i;typeof n.theme=="string"&&(t=n.theme),typeof n.mode=="string"&&(r=n.mode)}t===void 0&&(t=Kb()),r===void 0&&(r=Yb()),t!==zd.get()&&zd.set(t),r!==_d.get()&&_d.set(r)}))}b5();var v5=bd(go),k=class extends v5{willUpdate(i){this.t=zd.get(),this.m=_d.get(),super.willUpdate(i)}static define(i,t=this,r={}){let n=customElements.get(i);if(!n){customElements.define(i,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${i}>${a} but it is already registered as <${i}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([i,t])=>{this.constructor.define(i,t)})}emit(i,t){let r=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};k.dependencies={},c([d()],k.prototype,"dir",2),c([d()],k.prototype,"lang",2),c([d({reflect:!0})],k.prototype,"t",2),c([d({reflect:!0})],k.prototype,"m",2);var ma=class extends rr{constructor(i){if(super(i),this.it=B,i.type!==lr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(i){if(i===B||i==null)return this._t=void 0,this.it=i;if(i===vt)return i;if(typeof i!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(i===this.it)return this._t;this.it=i;let t=[i];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ma.directiveName="unsafeHTML",ma.resultType=1;var St=yt(ma);function Ai(o,i){return new Promise(t=>{function r(n){n.target===o&&(o.removeEventListener(i,r),t())}o.addEventListener(i,r)})}var bu=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(i){this.openDropdowns.add(i)}unregisterDropdown(i){this.openDropdowns.delete(i)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(i){this.openTooltips.add(i)}unregisterTooltip(i){this.openTooltips.delete(i)}isTooltipOpen(){return this.openTooltips.size>0}},y5=new bu,Un=y5;var Qb=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var Et=class extends k{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,Ai(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,Ai(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>ub(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Un.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Un.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jg=/'/g,Zg=/"/g,rb=/^(?:script|style|textarea|title)$/i,Yh=o=>(i,...t)=>({_$litType$:o,strings:i,values:t}),u=Yh(1),Xi=Yh(2),ib=Yh(3),vt=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),eb=new WeakMap,ca=da.createTreeWalker(da,129);function nb(o,i){if(!Kh(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Yg!==void 0?Yg.createHTML(i):i}var ob=(o,i)=>{let t=o.length-1,r=[],n,a=i===2?"<svg>":i===3?"<math>":"",s=fl;for(let l=0;l<t;l++){let p=o[l],h,m,f=-1,b=0;for(;b<p.length&&(s.lastIndex=b,m=s.exec(p),m!==null);)b=s.lastIndex,s===fl?m[1]==="!--"?s=Qg:m[1]!==void 0?s=Xg:m[2]!==void 0?(rb.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=la):m[3]!==void 0&&(s=la):s===la?m[0]===">"?(s=n??fl,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?la:m[3]==='"'?Zg:Jg):s===Zg||s===Jg?s=la:s===Qg||s===Xg?s=fl:(s=la,n=void 0);let g=s===la&&o[l+1].startsWith("/>")?" ":"";a+=s===fl?p+p3:f>=0?(r.push(h),p.slice(0,f)+Gh+p.slice(f)+Bn+g):p+Bn+(f===-2?l:g)}return[nb(o,a+(o[t]||"<?>")+(i===2?"</svg>":i===3?"</math>":"")),r]},yl=class o{constructor({strings:i,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=i.length-1,p=this.parts,[h,m]=ob(i,t);if(this.el=o.createElement(h,r),ca.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=ca.nextNode())!==null&&p.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Gh)){let b=m[s++],g=n.getAttribute(f).split(Bn),v=/([.?@])?(.*)/.exec(b);p.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?rd:v[1]==="?"?id:v[1]==="@"?nd:ha}),n.removeAttribute(f)}else f.startsWith(Bn)&&(p.push({type:6,index:a}),n.removeAttribute(f));if(rb.test(n.tagName)){let f=n.textContent.split(Bn),b=f.length-1;if(b>0){n.textContent=ed?ed.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],bl()),ca.nextNode(),p.push({type:2,index:++a});n.append(f[b],bl())}}}else if(n.nodeType===8)if(n.data===Wh)p.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Bn,f+1))!==-1;)p.push({type:7,index:a}),f+=Bn.length-1}a++}}static createElement(i,t){let r=da.createElement("template");return r.innerHTML=i,r}};function pa(o,i,t=o,r){if(i===vt)return i;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=vl(i)?void 0:i._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(i=pa(o,n._$AS(o,i.values),n,r)),i}var td=class{constructor(i,t){this._$AV=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(i){let{el:{content:t},parts:r}=this._$AD,n=(i?.creationScope??da).importNode(t,!0);ca.currentNode=n;let a=ca.nextNode(),s=0,l=0,p=r[0];for(;p!==void 0;){if(s===p.index){let h;p.type===2?h=new Qa(a,a.nextSibling,this,i):p.type===1?h=new p.ctor(a,p.name,p.strings,this,i):p.type===6&&(h=new od(a,this,i)),this._$AV.push(h),p=r[++l]}s!==p?.index&&(a=ca.nextNode(),s++)}return ca.currentNode=da,n}p(i){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(i,r,t),t+=r.strings.length-2):r._$AI(i[t])),t++}},Qa=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(i,t,r,n){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let i=this._$AA.parentNode,t=this._$AM;return t!==void 0&&i?.nodeType===11&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=pa(this,i,t),vl(i)?i===B||i==null||i===""?(this._$AH!==B&&this._$AR(),this._$AH=B):i!==this._$AH&&i!==vt&&this._(i):i._$litType$!==void 0?this.$(i):i.nodeType!==void 0?this.T(i):tb(i)?this.k(i):this._(i)}O(i){return this._$AA.parentNode.insertBefore(i,this._$AB)}T(i){this._$AH!==i&&(this._$AR(),this._$AH=this.O(i))}_(i){this._$AH!==B&&vl(this._$AH)?this._$AA.nextSibling.data=i:this.T(da.createTextNode(i)),this._$AH=i}$(i){let{values:t,_$litType$:r}=i,n=typeof r=="number"?this._$AC(i):(r.el===void 0&&(r.el=yl.createElement(nb(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new td(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(i){let t=eb.get(i.strings);return t===void 0&&eb.set(i.strings,t=new yl(i)),t}k(i){Kh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of i)n===t.length?t.push(r=new o(this.O(bl()),this.O(bl()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(i=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);i!==this._$AB;){let r=Kg(i).nextSibling;Kg(i).remove(),i=r}}setConnected(i){this._$AM===void 0&&(this._$Cv=i,this._$AP?.(i))}},ha=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(i,t,r,n,a){this.type=1,this._$AH=B,this._$AN=void 0,this.element=i,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=B}_$AI(i,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)i=pa(this,i,t,0),s=!vl(i)||i!==this._$AH&&i!==vt,s&&(this._$AH=i);else{let l=i,p,h;for(i=a[0],p=0;p<a.length-1;p++)h=pa(this,l[r+p],t,p),h===vt&&(h=this._$AH[p]),s||(s=!vl(h)||h!==this._$AH[p]),h===B?i=B:i!==B&&(i+=(h??"")+a[p+1]),this._$AH[p]=h}s&&!n&&this.j(i)}j(i){i===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,i??"")}},rd=class extends ha{constructor(){super(...arguments),this.type=3}j(i){this.element[this.name]=i===B?void 0:i}},id=class extends ha{constructor(){super(...arguments),this.type=4}j(i){this.element.toggleAttribute(this.name,!!i&&i!==B)}},nd=class extends ha{constructor(i,t,r,n,a){super(i,t,r,n,a),this.type=5}_$AI(i,t=this){if((i=pa(this,i,t,0)??B)===vt)return;let r=this._$AH,n=i===B&&r!==B||i.capture!==r.capture||i.once!==r.once||i.passive!==r.passive,a=i!==B&&(r===B||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,i):this._$AH.handleEvent(i)}},od=class{constructor(i,t,r){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(i){pa(this,i)}},ab={M:Gh,P:Bn,A:Wh,C:1,L:ob,R:td,D:tb,V:pa,I:Qa,H:ha,N:id,U:nd,B:rd,F:od},h3=gl.litHtmlPolyfillSupport;h3?.(yl,Qa),(gl.litHtmlVersions??(gl.litHtmlVersions=[])).push("3.3.3");var Xa=(o,i,t)=>{let r=t?.renderBefore??i,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Qa(i.insertBefore(bl(),a),a,void 0,t??{})}return n._$AI(o),n};var lr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yt=o=>(...i)=>({_$litDirective$:o,values:i}),rr=class{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,t,r){this._$Ct=i,this._$AM=t,this._$Ci=r}_$AS(i,t){return this.update(i,t)}update(i,t){return this.render(...t)}};var M=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(i=>o[i]).join(" ")+" "}update(o,[i]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in i)i[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(i)}let t=o.element.classList;for(let r of this.st)r in i||(t.remove(r),this.st.delete(r));for(let r in i){let n=!!i[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return vt}});var ad=globalThis,sd=ad.ShadowRoot&&(ad.ShadyCSS===void 0||ad.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qh=Symbol(),sb=new WeakMap,xl=class{constructor(i,t,r){if(this._$cssResult$=!0,r!==Qh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=t}get styleSheet(){let i=this.o,t=this.t;if(sd&&i===void 0){let r=t!==void 0&&t.length===1;r&&(i=sb.get(t)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),r&&sb.set(t,i))}return i}toString(){return this.cssText}},z=o=>new xl(typeof o=="string"?o:o+"",void 0,Qh),_=(o,...i)=>{let t=o.length===1?o[0]:i.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[a+1],o[0]);return new xl(t,o,Qh)},lb=(o,i)=>{if(sd)o.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of i){let r=document.createElement("style"),n=ad.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},Xh=sd?o=>o:o=>o instanceof CSSStyleSheet?(i=>{let t="";for(let r of i.cssRules)t+=r.cssText;return z(t)})(o):o;var{is:u3,defineProperty:m3,getOwnPropertyDescriptor:f3,getOwnPropertyNames:g3,getOwnPropertySymbols:b3,getPrototypeOf:v3}=Object,mo=globalThis,cb=mo.trustedTypes,y3=cb?cb.emptyScript:"",x3=mo.reactiveElementPolyfillSupport,wl=(o,i)=>o,fo={toAttribute(o,i){switch(i){case Boolean:o=o?y3:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,i){let t=o;switch(i){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Ja=(o,i)=>!u3(o,i),db={attribute:!0,type:String,converter:fo,reflect:!1,useDefault:!1,hasChanged:Ja};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),mo.litPropertyMetadata??(mo.litPropertyMetadata=new WeakMap);var Vn=class extends HTMLElement{static addInitializer(i){this._$Ei(),(this.l??(this.l=[])).push(i)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(i,t=db){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(i)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(i,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(i,r,t);n!==void 0&&m3(this.prototype,i,n)}}static getPropertyDescriptor(i,t,r){let{get:n,set:a}=f3(this.prototype,i)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(i,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)??db}static _$Ei(){if(this.hasOwnProperty(wl("elementProperties")))return;let i=v3(this);i.finalize(),i.l!==void 0&&(this.l=[...i.l]),this.elementProperties=new Map(i.elementProperties)}static finalize(){if(this.hasOwnProperty(wl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(wl("properties"))){let t=this.properties,r=[...g3(t),...b3(t)];for(let n of r)this.createProperty(n,t[n])}let i=this[Symbol.metadata];if(i!==null){let t=litPropertyMetadata.get(i);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(i){let t=[];if(Array.isArray(i)){let r=new Set(i.flat(1/0).reverse());for(let n of r)t.unshift(Xh(n))}else i!==void 0&&t.push(Xh(i));return t}static _$Eu(i,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof i=="string"?i.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(i=>i(this))}addController(i){(this._$EO??(this._$EO=new Set)).add(i),this.renderRoot!==void 0&&this.isConnected&&i.hostConnected?.()}removeController(i){this._$EO?.delete(i)}_$E_(){let i=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(i.set(r,this[r]),delete this[r]);i.size>0&&(this._$Ep=i)}createRenderRoot(){let i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lb(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(i=>i.hostConnected?.())}enableUpdating(i){}disconnectedCallback(){this._$EO?.forEach(i=>i.hostDisconnected?.())}attributeChangedCallback(i,t,r){this._$AK(i,r)}_$ET(i,t){let r=this.constructor.elementProperties.get(i),n=this.constructor._$Eu(i,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:fo).toAttribute(t,r.type);this._$Em=i,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(i,t){let r=this.constructor,n=r._$Eh.get(i);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:fo;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(i,t,r,n=!1,a){if(i!==void 0){let s=this.constructor;if(n===!1&&(a=this[i]),r??(r=s.getPropertyOptions(i)),!((r.hasChanged??Ja)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(i)&&!this.hasAttribute(s._$Eu(i,r))))return;this.C(i,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(i,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(i)&&(this._$Ej.set(i,s??t??this[i]),a!==!0||s!==void 0)||(this._$AL.has(i)||(this.hasUpdated||r||(t=void 0),this._$AL.set(i,t)),n===!0&&this._$Em!==i&&(this._$Eq??(this._$Eq=new Set)).add(i))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let i=this.scheduleUpdate();return i!=null&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let i=!1,t=this._$AL;try{i=this.shouldUpdate(t),i?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw i=!1,this._$EM(),r}i&&this._$AE(t)}willUpdate(i){}_$AE(i){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(i){return!0}update(i){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(i){}firstUpdated(i){}};Vn.elementStyles=[],Vn.shadowRootOptions={mode:"open"},Vn[wl("elementProperties")]=new Map,Vn[wl("finalized")]=new Map,x3?.({ReactiveElement:Vn}),(mo.reactiveElementVersions??(mo.reactiveElementVersions=[])).push("2.1.2");var zl=globalThis,go=class extends Vn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let i=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=i.firstChild),i}update(i){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Do=Xa(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};go._$litElement$=!0,go.finalized=!0,zl.litElementHydrateSupport?.({LitElement:go});var w3=zl.litElementPolyfillSupport;w3?.({LitElement:go});(zl.litElementVersions??(zl.litElementVersions=[])).push("4.2.2");var pb=new WeakMap;function hb(o){let i=pb.get(o);return i||(i=window.getComputedStyle(o,null),pb.set(o,i)),i}function z3(o){if(typeof o.checkVisibility=="function")return o.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let i=hb(o);return i.visibility!=="hidden"&&i.display!=="none"}function _3(o){let i=hb(o),{overflowY:t,overflowX:r}=i;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:o.scrollHeight>o.clientHeight&&t==="auto"||o.scrollWidth>o.clientWidth&&r==="auto"}function k3(o){let i=o.tagName.toLowerCase(),t=Number(o.getAttribute("tabindex"));return o.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||o.hasAttribute("disabled")||o.closest("[inert]")||i==="input"&&o.getAttribute("type")==="radio"&&!o.hasAttribute("checked")||!z3(o)?!1:(i==="audio"||i==="video")&&o.hasAttribute("controls")||o.hasAttribute("tabindex")||o.hasAttribute("contenteditable")&&o.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(i)?!0:_3(o)}function ub(o){let i=Jh(o),t=i[0]??null,r=i[i.length-1]??null;return{start:t,end:r}}function C3(o,i){return o.getRootNode({composed:!0})?.host!==i}function Jh(o){let i=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||i.has(n))return;i.set(n,!0),!t.includes(n)&&k3(n)&&t.push(n),n instanceof HTMLSlotElement&&C3(n,o)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(o),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var mb=new WeakMap,Zh=class{constructor(i){this.handleKeyDown=i=>{if(i.key==="Enter"){if(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.isComposing||i.defaultPrevented)return;let r=i.target;if(this.isSelectOption(r)){i.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){i.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}i.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(i.key==="ArrowDown"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusNextControl(t))}}if(i.key==="ArrowUp"){let t=i.target,r=t.tagName;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented){let a=this.findParentGroup(t);if(a){i.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(i.preventDefault(),this.focusPreviousControl(t))}}};this.form=i,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(i){let t=i.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&i.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(i){let t=i.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(i){return i.tagName.toLowerCase()==="zn-option"}findParentSelect(i){let t=i;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(i){let t=i;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(i){let t=i.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(i,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===i||r[a].contains(i)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let i=ua.get(this.form);if(!i)return!0;for(let t of i){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let i=Jh(this.form),t=[],r=new Set;for(let n of i){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(i,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===i)return r;let a=i.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(i)||i.contains(n))return r}return-1}focusNextControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(i){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(i,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let i=this.form.querySelector('[type="submit"]');if(i)i.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function fb(o){let i=mb.get(o);return i||(i=new Zh(o),mb.set(o,i)),i}function cr(o){return`#${CSS.escape(o.startsWith("#")?o.slice(1):o)}`}function S3(o,i=document){let t=i.querySelector(o);if(t)return t;for(let r of i.querySelectorAll("*"))if(r.shadowRoot){let n=S3(o,r.shadowRoot);if(n)return n}return null}function E3(o,i=document,t=[]){t.push(...i.querySelectorAll(o));for(let r of i.querySelectorAll("*"))r.shadowRoot&&E3(o,r.shadowRoot,t);return t}function Ge(o,i,t){let r=[],n=(a,s)=>{if(!a||a.nodeType!==Node.ELEMENT_NODE||s&&t&&a.matches(t))return;a.matches(o)&&r.push(a);let l=a.children;if(l.length)for(let h of l)n(h,!0);let p=a.shadowRoot;if(p){let h=p.children;for(let m of h)n(m,!0)}};return n(i,!1),r}var kr=class{constructor(i,t,r=0){this.storage=i,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(i){return!i||i.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+i))}stripTtl(i){if(i===null)return null;let t=i.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(i,t,r){!i||i.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+i,r+","+t))}set(i,t){this.setWithTTL(i,t,this.ttl)}remove(i){this.storage.removeItem(this.prefix+i)}cleanup(){for(let i=0;i<this.storage.length;i++){let t=this.storage.key(i);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var ua=new WeakMap,_l=new WeakMap,kl=new WeakMap,ld=new WeakMap,eu=new WeakSet,cd=new WeakMap,xb="znform:";function tu(o=!1){try{return o?window.localStorage:window.sessionStorage}catch{return null}}function T3(o=!1,i=0){let t=tu(o);return t?new kr(t,xb,i):null}function gb(o){let i=o?.getAttribute("store-ttl");return i&&Number(i)||0}function bb(o){return!!o?.hasAttribute("local-storage")}function wb(o){return o?.getAttribute("store-key")||""}function $3(o){return o.getAttribute("store-key")||""}function A3(o){return o.getAttribute("name")||("name"in o&&typeof o.name=="string"?o.name:"")}function zb(o,i){let t=$3(o),r=wb(i);if(t)return r?`${r}:${t}`:t;let n=A3(o);return r&&n?`${r}:${n}`:""}function _b(o,i){let t=bb(o)||bb(i),r=gb(o)||gb(i);return T3(t,r)}function kb(o,i){let t=zb(o,i),n=(t?_b(o,i):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Cb(o,i,t){let r=zb(o,i),n=r?_b(o,i):null;n&&n.set(r,JSON.stringify(t))}function M3(o){return o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement}function L3(o){return o instanceof HTMLInputElement&&(o.type==="checkbox"||o.type==="radio")?{checked:o.checked,value:o.value}:{value:o.value}}function q3(o){o.querySelectorAll("input, textarea, select").forEach(t=>{let r=kb(t,o);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function vb(o,i){!M3(o)||o.form!==i||Cb(o,i,L3(o))}function I3(o,i){let t={value:i};return"checked"in o&&typeof o.checked=="boolean"&&(t.checked=o.checked),"indeterminate"in o&&typeof o.indeterminate=="boolean"&&(t.indeterminate=o.indeterminate),t}function yb(o,i){let t=[],r=xb+i;for(let n=0;n<o.length;n++){let a=o.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>o.removeItem(n))}function D3(o){let i=typeof o=="string"?o:wb(o);if(!i)return;let t=tu(!0),r=tu(!1);t&&yb(t,i),r&&r!==t&&yb(r,i)}var re=class{constructor(i,t){this.handleFormData=i=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{i.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?i.formData.append(r,m,g):i.formData.append(r,m)},p=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(p(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(p(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=i=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&ua.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(i.preventDefault(),i.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=i=>{if(i.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),cd.set(this.host,[])};this.handleInteraction=i=>{let t=cd.get(this.host);t.includes(i.type)||t.push(i.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let i=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return i?.setAttribute("disabled","disabled"),!1}return i?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let i=this.form.querySelectorAll("*");for(let t of i)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=i).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(cr(n));if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let i=this.options.form(this.host);i&&this.attachForm(i),cd.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),i&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),cd.delete(this.host),this.options.assumeInteractionOn.forEach(i=>{this.host.removeEventListener(i,this.handleInteraction)})}hostUpdated(){let i=this.options.form(this.host);i||this.detachForm(),i&&this.form!==i&&(this.detachForm(),this.attachForm(i)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(i){if(!i){this.form=void 0;return}this.form=i,ua.has(this.form)?ua.get(this.form).add(this.host):ua.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&fb(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),_l.has(this.form)||(_l.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),kl.has(this.form)||(kl.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let i=ua.get(this.form);i&&(i.delete(this.host),i.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),_l.has(this.form)&&(this.form.reportValidity=_l.get(this.form),_l.delete(this.form)),kl.has(this.form)&&(this.form.checkValidity=kl.get(this.form),kl.delete(this.form)),this.form=void 0))}attachFormPersistence(i){if(ld.has(i))return;let t=n=>vb(n.target,i),r=n=>vb(n.target,i);i.addEventListener("input",t),i.addEventListener("change",r),ld.set(i,{handleInput:t,handleChange:r}),q3(i)}detachFormPersistence(i){let t=ld.get(i);t&&(i.removeEventListener("input",t.handleInput),i.removeEventListener("change",t.handleChange),ld.delete(i))}restorePersistedValue(){let i=kb(this.host,this.form);i&&("checked"in this.host&&typeof i.checked=="boolean"?this.options.setValue(this.host,i.checked):"value"in i&&this.options.setValue(this.host,i.value),"indeterminate"in this.host&&typeof i.indeterminate=="boolean"&&(this.host.indeterminate=i.indeterminate))}persistHostValue(){Cb(this.host,this.form,I3(this.host,this.options.value(this.host)))}setUserInteracted(i,t){t?eu.add(i):eu.delete(i),i.requestUpdate()}doAction(i,t){if(this.form){let r=document.createElement("button");r.type=i,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(i){this.doAction("reset",i)}submit(i){this.doAction("submit",i)}setValidity(i){let t=this.host,r=!!eu.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!i),t.toggleAttribute("data-valid",i),t.toggleAttribute("data-user-invalid",!i&&r),t.toggleAttribute("data-user-valid",i&&r)}updateValidity(){let i=this.host;this.setValidity(i.validity?.valid)}emitInvalidEvent(i){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});i||t.preventDefault(),this.host.dispatchEvent(t)||i?.preventDefault()}},pt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),dd=Object.freeze({...pt,customError:!0,valid:!1}),pd=Object.freeze({...pt,valueMissing:!0,valid:!1});var Y=class{constructor(i,...t){this.slotNames=[];this.handleSlotChange=i=>{let t=i.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=i).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)!==null}test(i){return i==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(i)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(i){return this.host.querySelector(`:scope > [slot="${i}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent.trim()!=="")return!0;if(i.nodeType===i.ELEMENT_NODE){let t=i;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(i){return this.host.querySelectorAll(`:scope > [slot="${i}"]`)}};function Sb(o){if(!o)return"";let i=o.assignedNodes({flatten:!0}),t="";return[...i].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Tb=Symbol.for(""),R3=o=>{if(o?.r===Tb)return o?._$litStatic$};var Ai=(o,...i)=>({_$litStatic$:i.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
|
+
take care to ensure page security.`)})(r)+o[n+1],o[0]),r:Tb}),Eb=new Map,ru=o=>(i,...t)=>{let r=t.length,n,a,s=[],l=[],p,h=0,m=!1;for(;h<r;){for(p=i[h];h<r&&(a=t[h],(n=R3(a))!==void 0);)p+=n+i[++h],m=!0;h!==r&&l.push(a),s.push(p),h++}if(h===r&&s.push(i[r]),m){let f=s.join("$$lit$$");(i=Eb.get(f))===void 0&&(s.raw=s,Eb.set(f,i=s)),t=l}return o(i,...t)},ke=ru(u),VD=ru(Xi),UD=ru(ib);var P=o=>o??B;var $b=o=>(i,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,i)}):customElements.define(o,i)};var N3={attribute:!0,type:String,converter:fo,reflect:!1,hasChanged:Ja},O3=(o=N3,i,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),a.set(t.name,o),r==="accessor"){let{name:s}=t;return{set(l){let p=i.get.call(this);i.set.call(this,l),this.requestUpdate(s,p,o,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,o,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let p=this[s];i.call(this,l),this.requestUpdate(s,p,o,!0,l)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(i,t)=>typeof t=="object"?O3(o,i,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(o,i,t)}function R(o){return d({...o,state:!0,attribute:!1})}function Ab(o){return(i,t)=>{let r=typeof i=="function"?i:i[t];Object.assign(r,o)}}var xn=(o,i,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof i!="object"&&Object.defineProperty(o,i,t),t);function F(o,i){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(o)??null;if(i){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let p=Symbol();return{get(){return this[p]},set(h){this[p]=h}}})();return xn(t,r,{get(){let p=s.call(this);return p===void 0&&(p=a(this),(p!==null||this.hasUpdated)&&l.call(this,p)),p}})}return xn(t,r,{get(){return a(this)}})}}var P3;function Za(o){return(i,t)=>xn(i,t,{get(){return(this.renderRoot??P3??(P3=document.createDocumentFragment())).querySelectorAll(o)}})}function Mb(o){return(i,t)=>xn(i,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(o)??null}})}function Lb(o){return(i,t)=>{let{slot:r}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return xn(i,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(o)??[]}})}}var qb="important",H3=" !"+qb,xt=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((i,t)=>{let r=o[t];return r==null?i:i+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[i]){let{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(i)),this.render(i);for(let r of this.ft)i[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in i){let n=i[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(H3);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?qb:""):t[r]=n}}return vt}});function K(o,i){let t={waitUntilFirstUpdate:!1,...i};return(r,n)=>{let{update:a}=r,s=Array.isArray(o)?o:[o];r.update=function(l){s.forEach(p=>{let h=p;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var F3=Object.defineProperty,B3=(o,i,t)=>i in o?F3(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,iu=(o,i,t)=>(B3(o,typeof i!="symbol"?i+"":i,t),t),V3=(o,i,t)=>{if(!i.has(o))throw TypeError("Cannot "+t)},nu=(o,i)=>{if(Object(i)!==i)throw TypeError('Cannot use the "in" operator on this value');return o.has(i)},hd=(o,i,t)=>{if(i.has(o))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(o):i.set(o,t)},Ib=(o,i,t)=>(V3(o,i,"access private method"),t);function Db(o,i){return Object.is(o,i)}var Ot=null,Cl=!1,ud=1,md=Symbol("SIGNAL");function es(o){let i=Ot;return Ot=o,i}function U3(){return Ot}function j3(){return Cl}var cu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function fd(o){if(Cl)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ot===null)return;Ot.consumerOnSignalRead(o);let i=Ot.nextProducerIndex++;if(ts(Ot),i<Ot.producerNode.length&&Ot.producerNode[i]!==o&&su(Ot)){let t=Ot.producerNode[i];gd(t,Ot.producerIndexOfThis[i])}Ot.producerNode[i]!==o&&(Ot.producerNode[i]=o,Ot.producerIndexOfThis[i]=su(Ot)?Ob(o,Ot,i):0),Ot.producerLastReadVersion[i]=o.version}function G3(){ud++}function Rb(o){if(!(!o.dirty&&o.lastCleanEpoch===ud)){if(!o.producerMustRecompute(o)&&!X3(o)){o.dirty=!1,o.lastCleanEpoch=ud;return}o.producerRecomputeValue(o),o.dirty=!1,o.lastCleanEpoch=ud}}function Nb(o){if(o.liveConsumerNode===void 0)return;let i=Cl;Cl=!0;try{for(let t of o.liveConsumerNode)t.dirty||K3(t)}finally{Cl=i}}function W3(){return Ot?.consumerAllowSignalWrites!==!1}function K3(o){var i;o.dirty=!0,Nb(o),(i=o.consumerMarkedDirty)==null||i.call(o.wrapper??o)}function Y3(o){return o&&(o.nextProducerIndex=0),es(o)}function Q3(o,i){if(es(i),!(!o||o.producerNode===void 0||o.producerIndexOfThis===void 0||o.producerLastReadVersion===void 0)){if(su(o))for(let t=o.nextProducerIndex;t<o.producerNode.length;t++)gd(o.producerNode[t],o.producerIndexOfThis[t]);for(;o.producerNode.length>o.nextProducerIndex;)o.producerNode.pop(),o.producerLastReadVersion.pop(),o.producerIndexOfThis.pop()}}function X3(o){ts(o);for(let i=0;i<o.producerNode.length;i++){let t=o.producerNode[i],r=o.producerLastReadVersion[i];if(r!==t.version||(Rb(t),r!==t.version))return!0}return!1}function Ob(o,i,t){var r;if(du(o),ts(o),o.liveConsumerNode.length===0){(r=o.watched)==null||r.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)o.producerIndexOfThis[n]=Ob(o.producerNode[n],o,n)}return o.liveConsumerIndexOfThis.push(t),o.liveConsumerNode.push(i)-1}function gd(o,i){var t;if(du(o),ts(o),typeof ngDevMode<"u"&&ngDevMode&&i>=o.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${i} is out of bounds of ${o.liveConsumerNode.length} consumers)`);if(o.liveConsumerNode.length===1){(t=o.unwatched)==null||t.call(o.wrapper);for(let n=0;n<o.producerNode.length;n++)gd(o.producerNode[n],o.producerIndexOfThis[n])}let r=o.liveConsumerNode.length-1;if(o.liveConsumerNode[i]=o.liveConsumerNode[r],o.liveConsumerIndexOfThis[i]=o.liveConsumerIndexOfThis[r],o.liveConsumerNode.length--,o.liveConsumerIndexOfThis.length--,i<o.liveConsumerNode.length){let n=o.liveConsumerIndexOfThis[i],a=o.liveConsumerNode[i];ts(a),a.producerIndexOfThis[n]=i}}function su(o){var i;return o.consumerIsAlwaysLive||(((i=o?.liveConsumerNode)==null?void 0:i.length)??0)>0}function ts(o){o.producerNode??(o.producerNode=[]),o.producerIndexOfThis??(o.producerIndexOfThis=[]),o.producerLastReadVersion??(o.producerLastReadVersion=[])}function du(o){o.liveConsumerNode??(o.liveConsumerNode=[]),o.liveConsumerIndexOfThis??(o.liveConsumerIndexOfThis=[])}function Pb(o){if(Rb(o),fd(o),o.value===lu)throw o.error;return o.value}function J3(o){let i=Object.create(Z3);i.computation=o;let t=()=>Pb(i);return t[md]=i,t}var ou=Symbol("UNSET"),au=Symbol("COMPUTING"),lu=Symbol("ERRORED"),Z3={...cu,value:ou,dirty:!0,error:null,equal:Db,producerMustRecompute(o){return o.value===ou||o.value===au},producerRecomputeValue(o){if(o.value===au)throw new Error("Detected cycle in computations.");let i=o.value;o.value=au;let t=Y3(o),r,n=!1;try{r=o.computation.call(o.wrapper),n=i!==ou&&i!==lu&&o.equal.call(o.wrapper,i,r)}catch(a){r=lu,o.error=a}finally{Q3(o,t)}if(n){o.value=i;return}o.value=r,o.version++}};function e5(){throw new Error}var t5=e5;function r5(){t5()}function i5(o){let i=Object.create(a5);i.value=o;let t=()=>(fd(i),i.value);return t[md]=i,t}function n5(){return fd(this),this.value}function o5(o,i){W3()||r5(),o.equal.call(o.wrapper,o.value,i)||(o.value=i,s5(o))}var a5={...cu,equal:Db,value:void 0};function s5(o){o.version++,G3(),Nb(o)}var dr=Symbol("node"),it;(o=>{var i,t,r,n,a,s;class l{constructor(m,f={}){hd(this,t),iu(this,i);let g=i5(m)[md];if(this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return n5.call(this[dr])}set(m){if(!(0,o.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(j3())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[dr];o5(f,m)}}i=dr,t=new WeakSet,r=function(){},o.isState=h=>typeof h=="object"&&nu(t,h),o.State=l;class p{constructor(m,f){hd(this,a),iu(this,n);let g=J3(m)[md];if(g.consumerAllowSignalWrites=!0,this[dr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[o.subtle.watched],g.unwatched=f[o.subtle.unwatched]}}get(){if(!(0,o.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Pb(this[dr])}}n=dr,a=new WeakSet,s=function(){},o.isComputed=h=>typeof h=="object"&&nu(a,h),o.Computed=p,(h=>{var m,f,b,g,v;function y($){let L,W=null;try{W=es(null),L=$()}finally{es(W)}return L}h.untrack=y;function S($){var L;if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=$[dr].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=S;function T($){var L;if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((L=$[dr].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=T;function N($){if(!(0,o.isComputed)($)&&!(0,o.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let L=$[dr].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function U($){if(!(0,o.isComputed)($)&&!(0,o.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=$[dr].producerNode;return L?L.length>0:!1}h.hasSources=U;class I{constructor(L){hd(this,f),hd(this,g),iu(this,m);let W=Object.create(cu);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[dr]=W}watch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Ib(this,g,v).call(this,L);let W=this[dr];W.dirty=!1;let oe=es(W);for(let xe of L)fd(xe[dr]);es(oe)}unwatch(...L){if(!(0,o.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Ib(this,g,v).call(this,L);let W=this[dr];ts(W);for(let oe=W.producerNode.length-1;oe>=0;oe--)if(L.includes(W.producerNode[oe].wrapper)){gd(W.producerNode[oe],W.producerIndexOfThis[oe]);let xe=W.producerNode.length-1;if(W.producerNode[oe]=W.producerNode[xe],W.producerIndexOfThis[oe]=W.producerIndexOfThis[xe],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,oe<W.producerNode.length){let De=W.producerIndexOfThis[oe],Ne=W.producerNode[oe];du(Ne),Ne.liveConsumerIndexOfThis[De]=oe}}}getPending(){if(!(0,o.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[dr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=dr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let L of $)if(!(0,o.isComputed)(L)&&!(0,o.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},o.isWatcher=$=>nu(f,$),h.Watcher=I;function C(){var $;return($=U3())==null?void 0:$.wrapper}h.currentComputed=C,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(o.subtle||(o.subtle={}))})(it||(it={}));var pu=!1,Hb=new it.subtle.Watcher(()=>{pu||(pu=!0,queueMicrotask(()=>{pu=!1;for(let o of Hb.getPending())o.get();Hb.watch()}))}),l5=Symbol("SignalWatcherBrand"),c5=new FinalizationRegistry(o=>{o.unwatch(...it.subtle.introspectSources(o))}),Fb=new WeakMap;function bd(o){return o[l5]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),o):class extends o{constructor(){super(...arguments),this._$St=new Map,this._$So=new it.State(0),this._$Si=!1}_$Sl(){var i,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(i=this.h)===null||i===void 0?void 0:i.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new it.Computed(()=>{this._$So.get(),super.performUpdate()});let i=this.h=new it.subtle.Watcher(function(){let t=Fb.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Fb.set(i,this),c5.register(this,i),i.watch(this._$Su),i.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let i=!1;this.h.unwatch(...it.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),i||(i=!n),n})),i||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(i,t){var r;this._$S_();let n=new it.Computed(()=>{i()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?it.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>it.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:d5}=ab,Bb=o=>o;var vd=o=>o.strings===void 0,Vb=()=>document.createComment(""),rs=(o,i,t)=>{let r=o._$AA.parentNode,n=i===void 0?o._$AB:i._$AA;if(t===void 0){let a=r.insertBefore(Vb(),n),s=r.insertBefore(Vb(),n);t=new d5(a,s,o,o.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==o;if(l){let p;t._$AQ?.(o),t._$AM=o,t._$AP!==void 0&&(p=o._$AU)!==s._$AU&&t._$AP(p)}if(a!==n||l){let p=t._$AA;for(;p!==a;){let h=Bb(p).nextSibling;Bb(r).insertBefore(p,n),p=h}}}return t},bo=(o,i,t=o)=>(o._$AI(i,t),o),p5={},is=(o,i=p5)=>o._$AH=i,Ub=o=>o._$AH,yd=o=>{o._$AR(),o._$AA.remove()};var Sl=(o,i)=>{let t=o._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(i,!1),Sl(r,i);return!0},xd=o=>{let i,t;do{if((i=o._$AM)===void 0)break;t=i._$AN,t.delete(o),o=i}while(t?.size===0)},jb=o=>{for(let i;i=o._$AM;o=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(o))break;t.add(o),m5(i)}};function h5(o){this._$AN!==void 0?(xd(this),this._$AM=o,jb(this)):this._$AM=o}function u5(o,i=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(i)if(Array.isArray(r))for(let a=t;a<r.length;a++)Sl(r[a],!1),xd(r[a]);else r!=null&&(Sl(r,!1),xd(r));else Sl(this,o)}var m5=o=>{o.type==lr.CHILD&&(o._$AP??(o._$AP=u5),o._$AQ??(o._$AQ=h5))},vo=class extends rr{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,r){super._$AT(i,t,r),jb(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(Sl(this,i),xd(this))}setValue(i){if(vd(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var hu=!1,uu=new it.subtle.Watcher(async()=>{hu||(hu=!0,queueMicrotask(()=>{hu=!1;for(let o of uu.getPending())o.get();uu.watch()}))}),wd=class extends vo{_$S_(){var i,t;this._$Sm===void 0&&(this._$Sj=new it.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(i=this._$Sk)===null||i===void 0?void 0:i.h)!==null&&t!==void 0?t:uu,this._$Sm.watch(this._$Sj),it.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(i){return it.subtle.untrack(()=>i.get())}update(i,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=i.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),it.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},mu=yt(wd);var fu=o=>(i,...t)=>o(i,...t.map(r=>r instanceof it.State||r instanceof it.Computed?mu(r):r)),f5=fu(u),g5=fu(Xi);var iN=it.State,nN=it.Computed,gu=(o,i)=>new it.State(o,i);function Wb(o,i){return typeof document>"u"?i:document.documentElement.getAttribute(o)||document.body?.getAttribute(o)||i}function Kb(){return Wb("t","light")}function Yb(){return Wb("m","light")}var zd=gu(Kb()),_d=gu(Yb()),Gb=!1;function b5(){Gb||typeof window>"u"||(Gb=!0,window.addEventListener("theme-change",o=>{let i=o.detail,t,r;if(typeof i=="string")t=i;else if(i&&typeof i=="object"){let n=i;typeof n.theme=="string"&&(t=n.theme),typeof n.mode=="string"&&(r=n.mode)}t===void 0&&(t=Kb()),r===void 0&&(r=Yb()),t!==zd.get()&&zd.set(t),r!==_d.get()&&_d.set(r)}))}b5();var v5=bd(go),k=class extends v5{willUpdate(i){this.t=zd.get(),this.m=_d.get(),super.willUpdate(i)}static define(i,t=this,r={}){let n=customElements.get(i);if(!n){customElements.define(i,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${i}>${a} but it is already registered as <${i}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([i,t])=>{this.constructor.define(i,t)})}emit(i,t){let r=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};k.dependencies={},c([d()],k.prototype,"dir",2),c([d()],k.prototype,"lang",2),c([d({reflect:!0})],k.prototype,"t",2),c([d({reflect:!0})],k.prototype,"m",2);var ma=class extends rr{constructor(i){if(super(i),this.it=B,i.type!==lr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(i){if(i===B||i==null)return this._t=void 0,this.it=i;if(i===vt)return i;if(typeof i!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(i===this.it)return this._t;this.it=i;let t=[i];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ma.directiveName="unsafeHTML",ma.resultType=1;var St=yt(ma);function Mi(o,i){return new Promise(t=>{function r(n){n.target===o&&(o.removeEventListener(i,r),t())}o.addEventListener(i,r)})}var bu=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(i){this.openDropdowns.add(i)}unregisterDropdown(i){this.openDropdowns.delete(i)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(i){this.openTooltips.add(i)}unregisterTooltip(i){this.openTooltips.delete(i)}isTooltipOpen(){return this.openTooltips.size>0}},y5=new bu,Un=y5;var Qb=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var Et=class extends k{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,Mi(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,Mi(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>ub(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Un.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Un.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
6
6
|
<zn-popup
|
|
7
7
|
part="base"
|
|
8
8
|
exportparts="popup:base__popup"
|
|
@@ -73,7 +73,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
73
73
|
stroke-linejoin="round"
|
|
74
74
|
aria-hidden="true"
|
|
75
75
|
>${t.map(([n,a])=>`<${n}${this.getSvgAttributes(a)} />`).join("")}</svg>
|
|
76
|
-
`}getSvgAttributes(t){return Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>` ${r}="${this.escapeSvgAttribute(String(n))}"`).join("")}escapeSvgAttribute(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}getColorForAvatar(t){let r=["#00AA55","#0882a8","#ed55ed","#5eae00","#09389e","#d17300","#5e0be2","#5b7a13","#ddb100","#d400c2","#DC2A2A","#a967ff"],n=Array.from(t).reduce((a,s)=>a+s.charCodeAt(0),0);return r[n%r.length]}};hr.styles=z(ev),hr.presetColors=new Set(["default","primary","accent","info","warning","error","success","white","disabled","red","blue","green","orange","yellow","indigo","violet","pink","grey"]),c([d({reflect:!0})],hr.prototype,"src",2),c([d({reflect:!0})],hr.prototype,"alt",2),c([d({type:Number,reflect:!0})],hr.prototype,"size",2),c([d({type:Boolean,reflect:!0})],hr.prototype,"round",2),c([d({type:Boolean,reflect:!0})],hr.prototype,"tile",2),c([d({type:Boolean,reflect:!0})],hr.prototype,"depth",2),c([d({reflect:!0})],hr.prototype,"library",2),c([d({reflect:!0})],hr.prototype,"color",2),c([d({reflect:!0})],hr.prototype,"fill",2),c([d({type:Boolean})],hr.prototype,"padded",2),c([d({type:Boolean})],hr.prototype,"blink",2),c([d({type:Boolean})],hr.prototype,"squared",2);var yo=hr;var ne=yo;yo.define("zn-icon");var rv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.tooltip{--arrow-size:6px}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.tooltip__body{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:block;width:-moz-max-content;width:max-content;max-width:-moz-max-content;max-width:max-content;border-radius:var(--zn-border-radius);background-color:var(--arrow-color);text-align:start;white-space:normal;color:rgb(var(--zn-color-base,255,255,255));padding:var(--zn-spacing-x-small) var(--zn-spacing-small);pointer-events:none;-moz-user-select:none;user-select:none;-webkit-user-select:none}`;var Lt=class extends k{constructor(){super();this.content="";this.placement="top";this.disabled=!1;this.distance=4;this.open=!1;this.skidding=0;this.trigger="hover focus";this.hoist=!0;this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()};this.handleClick=()=>{this.hasTrigger("click")&&!Un.isDropdownOpen()&&(this.open&&this.hide(),this.show())};this.handleFocus=()=>{this.hasTrigger("focus")&&!Un.isDropdownOpen()&&this.show()};this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())};this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){this.closeWatcher?.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(t){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition()),super.firstUpdated(t)}hasTrigger(t){return this.trigger.split(" ").includes(t)}handleMouseOver(){this.hasTrigger("hover")&&!Un.isDropdownOpen()&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),0))}handleMouseOut(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),0))}handleOpenChange(){if(this.open){if(Un.registerTooltip(this),this.disabled)return;this.emit("zn-show"),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),this.body.hidden=!1,this.popup.active=!0,this.popup.reposition(),this.emit("zn-after-show")}else Un.unregisterTooltip(this),this.emit("zn-hide"),this.popup.active=!1,this.body.hidden=!0,this.emit("zn-after-hide")}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,
|
|
76
|
+
`}getSvgAttributes(t){return Object.entries(t).filter(([,r])=>r!==void 0).map(([r,n])=>` ${r}="${this.escapeSvgAttribute(String(n))}"`).join("")}escapeSvgAttribute(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}getColorForAvatar(t){let r=["#00AA55","#0882a8","#ed55ed","#5eae00","#09389e","#d17300","#5e0be2","#5b7a13","#ddb100","#d400c2","#DC2A2A","#a967ff"],n=Array.from(t).reduce((a,s)=>a+s.charCodeAt(0),0);return r[n%r.length]}};hr.styles=z(ev),hr.presetColors=new Set(["default","primary","accent","info","warning","error","success","white","disabled","red","blue","green","orange","yellow","indigo","violet","pink","grey"]),c([d({reflect:!0})],hr.prototype,"src",2),c([d({reflect:!0})],hr.prototype,"alt",2),c([d({type:Number,reflect:!0})],hr.prototype,"size",2),c([d({type:Boolean,reflect:!0})],hr.prototype,"round",2),c([d({type:Boolean,reflect:!0})],hr.prototype,"tile",2),c([d({type:Boolean,reflect:!0})],hr.prototype,"depth",2),c([d({reflect:!0})],hr.prototype,"library",2),c([d({reflect:!0})],hr.prototype,"color",2),c([d({reflect:!0})],hr.prototype,"fill",2),c([d({type:Boolean})],hr.prototype,"padded",2),c([d({type:Boolean})],hr.prototype,"blink",2),c([d({type:Boolean})],hr.prototype,"squared",2);var yo=hr;var ne=yo;yo.define("zn-icon");var rv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.tooltip{--arrow-size:6px}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.tooltip__body{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:block;width:-moz-max-content;width:max-content;max-width:-moz-max-content;max-width:max-content;border-radius:var(--zn-border-radius);background-color:var(--arrow-color);text-align:start;white-space:normal;color:rgb(var(--zn-color-base,255,255,255));padding:var(--zn-spacing-x-small) var(--zn-spacing-small);pointer-events:none;-moz-user-select:none;user-select:none;-webkit-user-select:none}`;var Lt=class extends k{constructor(){super();this.content="";this.placement="top";this.disabled=!1;this.distance=4;this.open=!1;this.skidding=0;this.trigger="hover focus";this.hoist=!0;this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()};this.handleClick=()=>{this.hasTrigger("click")&&!Un.isDropdownOpen()&&(this.open&&this.hide(),this.show())};this.handleFocus=()=>{this.hasTrigger("focus")&&!Un.isDropdownOpen()&&this.show()};this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())};this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){this.closeWatcher?.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(t){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition()),super.firstUpdated(t)}hasTrigger(t){return this.trigger.split(" ").includes(t)}handleMouseOver(){this.hasTrigger("hover")&&!Un.isDropdownOpen()&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),0))}handleMouseOut(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),0))}handleOpenChange(){if(this.open){if(Un.registerTooltip(this),this.disabled)return;this.emit("zn-show"),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),this.body.hidden=!1,this.popup.active=!0,this.popup.reposition(),this.emit("zn-after-show")}else Un.unregisterTooltip(this),this.emit("zn-hide"),this.popup.active=!1,this.body.hidden=!0,this.emit("zn-after-hide")}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Mi(this,"zn-after-show")}hide(){this.open&&(this.open=!1,Mi(this,"zn-after-hide"))}render(){return u`
|
|
77
77
|
<zn-popup
|
|
78
78
|
part="base"
|
|
79
79
|
exportparts="popup:base__popup,arrow:base__arrow"
|
|
@@ -93,10 +93,10 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
93
93
|
aria-label="tooltip">
|
|
94
94
|
<slot name="content">${this.content}</slot>
|
|
95
95
|
</div>
|
|
96
|
-
</zn-popup>`}};Lt.styles=z(rv),c([F("slot:not([name])")],Lt.prototype,"defaultSlot",2),c([F(".tooltip__body")],Lt.prototype,"body",2),c([F("zn-popup")],Lt.prototype,"popup",2),c([d()],Lt.prototype,"content",2),c([d()],Lt.prototype,"placement",2),c([d({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),c([d({type:Number})],Lt.prototype,"distance",2),c([d({type:Boolean,reflect:!0})],Lt.prototype,"open",2),c([d({type:Number})],Lt.prototype,"skidding",2),c([d()],Lt.prototype,"trigger",2),c([d({type:Boolean})],Lt.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],Lt.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],Lt.prototype,"handleOptionsChange",1),c([K("disabled")],Lt.prototype,"handleDisabledChange",1);var Xi=Lt;Lt.define("zn-tooltip");var kd=_`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}:root[m=dark] kbd,[t=dark] kbd,.theme-dark kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px}.zn-bt{border-top-style:solid;border-top-width:1px}.zn-bb{border-bottom-style:solid;border-bottom-width:1px}.zn-bl{border-left-style:solid;border-left-width:1px}.zn-br{border-right-style:solid;border-right-width:1px}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);letter-spacing:var(--zn-text-button-label-letter-spacing,normal);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}`;var iv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host button,:host a{width:100%}.button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.button{--btn-color:var(--zn-primary);--btn-ink:var(--zn-color-on-primary,255,255,255);--notification-color:rgb(var(--zn-color-error));border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,transparent);display:inline-flex;position:relative}.button.button--info{--btn-color:var(--zn-color-info);--btn-ink:var(--zn-color-on-info,255,255,255)}.button.button--error{--btn-color:var(--zn-color-error);--btn-ink:var(--zn-color-on-error,255,255,255)}.button.button--warning{--btn-color:var(--zn-color-warning);--btn-ink:var(--zn-color-on-warning,255,255,255)}.button.button--success{--btn-color:var(--zn-color-success);--btn-ink:var(--zn-color-on-success,255,255,255)}.button__label--hidden{visibility:hidden}.button zn-icon{--icon-color:currentColor}.button.button--muted-notification{--notification-color:rgb(var(--zn-color-info))}.button--has-notification{position:relative;overflow:visible}.button--has-notification::after{content:attr(data-notification);position:absolute;display:flex;justify-content:center;align-items:center;top:-4px;left:auto;inset-inline-end:-4px;box-sizing:border-box;min-width:13px;height:13px;padding:0 3px;border-radius:999px;font-size:var(--zn-text-notification-font-size);font-weight:var(--zn-text-notification-font-weight);line-height:var(--zn-text-notification-line-height);color:var(--zn-text-notification-color);background-color:var(--notification-color)}.button--has-notification.button--notification-dot::after{content:"";min-width:0;width:8px;height:8px;padding:0;border-radius:50%}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:2px solid rgb(var(--btn-color));outline-offset:2px}[disabled]{cursor:not-allowed;opacity:0.5}[disabled] *{pointer-events:none}.button--standard.button--secondary{background-color:var(--zn-color-neutral-50);border-color:var(--zn-button-border-color,var(--zn-color-neutral-50));color:rgb(var(--zn-primary))}.button--standard.button--secondary:hover:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard{background-color:rgba(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgba(var(--btn-ink),0.9)}.button--standard:hover:not([disabled]){background-color:rgba(var(--btn-color),0.8)}.button--standard:active:not([disabled]){background-color:rgba(var(--btn-color))}.button--outline{background:none;border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--outline:hover:not([disabled]),.button--outline:active:not([disabled]){background-color:rgb(var(--btn-color));color:rgb(var(--btn-ink))}.button--outline.button--secondary{border-color:var(--zn-button-border-color,var(--zn-color-neutral-100))}.button--outline.button--secondary:hover:not([disabled]),.button--outline.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100);color:rgb(var(--btn-color))}.button--text{background:none;color:rgb(var(--btn-color))}.button--text:hover:not([disabled]),.button--text:active:not([disabled]){background-color:rgba(var(--btn-color),0.1)}.button--text.button--secondary{font-weight:normal}.button--grow{width:100%}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-left zn-icon{margin-right:var(--zn-base-px)}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-right zn-icon{margin-left:var(--zn-base-px)}.button--square{border-radius:0}.button--transparent{background-color:transparent;border-color:var(--zn-button-border-color,transparent) !important;color:inherit}.button--transparent:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.1)}.button--transparent:active:not([disabled]){background-color:rgba(var(--zn-primary),0.2)}.button--star{--btn-color:var(--zn-orange);--btn-ink:var(--zn-color-on-warning,255,255,255);background-color:rgb(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-ink));opacity:1 !important}.button--star:hover:not([disabled]){background-color:rgb(var(--btn-color))}.button--star:active{background-color:rgb(var(--btn-color))}.button--star.button--outline{background-color:transparent;border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--star.button--outline:hover:not([disabled]),.button--star.button--outline:active:not([disabled]){background-color:rgba(var(--btn-color));color:rgb(var(--btn-ink))}.button.button--icon-button{--icon-button-color:rgb(var(--zn-text));--icon-button-hover-color:rgb(var(--zn-primary));width:40px;min-width:40px;height:36px;min-height:36px;max-height:36px;padding:6px;margin:0;background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color))) !important;border-radius:var(--zn-border-radius);color:var(--icon-button-color);font-weight:inherit;line-height:0}.button.button--icon-button zn-icon,.button.button--icon-button ::slotted(zn-icon){--icon-color:currentColor;color:inherit;line-height:0}.button.button--icon-button:hover:not([disabled]),.button.button--icon-button:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}.button.button--icon-button.button--icon-button-small{width:36px;min-width:36px}.button.button--icon-button.button--icon-button-round{width:36px;min-width:36px;padding:8px;background:rgb(var(--zn-color-tab));border-color:var(--zn-button-border-color,transparent) !important;border-radius:var(--zn-border-radius-circle)}.button.button--icon-button.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-border))}.button.button--icon-button.button--plain{background:transparent;border-color:var(--zn-button-border-color,transparent) !important}.button.button--icon-button.button--plain:hover:not([disabled]),.button.button--icon-button.button--plain:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover:hover:not([disabled]),.button.button--icon-button.button--no-hover:active:not([disabled]){background:rgb(var(--zn-panel))}.button.button--icon-button.button--no-hover.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover.button--plain:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--plain:active:not([disabled]){background:transparent}.button.button--icon-button.button--has-notification::after{--icon-inset:calc((100% - var(--notification-icon-size,20px)) / 2);top:calc(var(--icon-inset) - 4px);inset-inline-end:calc(var(--icon-inset) - 4px);transform:translate(50%,-50%)}.button--loading-bg-transparent{background-color:transparent}.button--loading-fill{pointer-events:none;position:absolute;z-index:1;background-color:rgba(var(--btn-color),0.85);border-radius:inherit;transition:width 0s;animation:loading-fill-grow var(--loading-duration,2s) linear forwards;inset:-1px}.button--loading-fill-transparent{background-color:rgba(var(--zn-primary),0.1)}.button--loading-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}.button--loading-text{z-index:5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:inherit;font-weight:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;pointer-events:none;color:inherit}.button--loading-text .loading-countdown{margin-left:3px}.button--loading-text-left{justify-content:flex-start;padding-inline-start:7px}.button--loading-text-right{justify-content:flex-end;padding-inline-end:7px}.button--relative-wrapper{position:relative;display:inline-flex;height:100%;width:100%}@keyframes loading-fill-grow{from{width:0}to{width:100%}}:host([vertical-align=center]){align-self:center}:host([vertical-align=end]){align-self:end}:host([vertical-align=start]){align-self:start}:host([grow]){width:100%}:host([grow]) button{width:100%}:host([data-zn-button-group__button--grow]){flex-grow:1;flex-basis:0}:host([data-zn-button-group__button--inner]) .button{border-radius:0 !important;border-left:0 !important;border-right:0 !important}:host([data-zn-button-group__button]:not([data-zn-button-group__button--first])) .button:after{content:"";position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px;color:rgba(var(--zn-border-color),0.85)}:host([data-zn-button-group__button--first]:not([data-zn-button-group__button--last])) .button{border-radius:5px 0 0 5px !important;border-right:0 !important}:host([data-zn-button-group__button--last]:not([data-zn-button-group__button--first])) .button{border-radius:0 5px 5px 0 !important;border-left:0 !important}.button.button--pill{border-radius:var(--zn-border-radius-pill);padding:0 var(--zn-spacing-small);height:32px;min-height:32px;font-weight:var(--zn-font-weight-normal);text-transform:none;white-space:nowrap}.button--panel-bg{background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color)));color:rgb(var(--zn-text))}.button--panel-bg:hover:not([disabled]),.button--panel-bg:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}`;var le=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"[default]");this._loadingState={countdown:null,interval:void 0};this.color="default";this.text=!1;this.outline=!1;this.disabled=!1;this.grow=!1;this.square=!1;this.iconButton=!1;this.plain=!1;this.noHover=!1;this.pill=!1;this.panelBackground=!1;this.dropdownCloser=!1;this.mutedNotifications=!1;this.content="";this.icon="";this.gaid="";this.iconPosition="left";this.rel="noreferrer noopener";this.autoClick=!1;this.autoClickDelay=2e3;this.loadingText="Loading...";this.loadingTextPosition="center";this.loading=!1;this.handleClick=()=>{if(!this.disabled){if(this.dropdownCloser){let t=null,r=this,n=0,a=30;for(;r&&n<a;){if(r instanceof pr){t=r;break}r=r.parentElement||(r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null),n++}t?.hide()}this.type==="submit"&&this.formControlController.submit(),this.type==="reset"&&this.formControlController.reset()}}}get validity(){return this._isButton()&&this.button?this.button.validity:pt}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}firstUpdated(){this._isButton()&&this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.teardownAutoClick()}async handleAutoClickChange(t,r){r?(await this.updateComplete,this.setupAutoClick()):this.teardownAutoClick()}updated(t){if(super.updated(t),this.button){let r=this.button.querySelector(".button--loading-fill");if(r&&r.remove(),this.loading){let n=`${this.autoClickDelay/1e3}s`,a=document.createElement("div");a.classList.add("button--loading-fill"),a.setAttribute("style",`--loading-duration: ${n}`),this.button.classList.contains("button--transparent")&&(a.classList.add("button--loading-fill-transparent"),this.button.classList.add("button--loading-bg-transparent")),this.button.prepend(a),this.button.classList.add("button--loading-bg")}else this.button.classList.remove("button--loading-bg"),this.button.classList.remove("button--loading-bg-transparent");this.updateCountdownText()}}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}click(){this.handleClick()}_isLink(){return this.href!==void 0}_isButton(){return!this._isLink()}getIconButtonColor(t){switch(t){case void 0:case"":case"default":return"rgb(var(--zn-text))";case"primary":return"rgb(var(--zn-primary))";case"secondary":return"rgb(var(--zn-text))";case"error":return"rgb(var(--zn-color-error))";case"info":return"rgb(var(--zn-color-info))";case"success":return"rgb(var(--zn-color-success))";case"warning":return"rgb(var(--zn-color-warning))";case"transparent":return"inherit";case"star":return"rgb(var(--zn-orange))";default:return t}}setupAutoClick(){this.button&&(this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!0,this._loadingState.countdown=Math.ceil(this.autoClickDelay/1e3),this.updateCountdownText(),this._loadingState.interval=window.setInterval(()=>{this._loadingState.countdown&&this._loadingState.countdown>0&&(this._loadingState.countdown--,this.updateCountdownText())},1e3),this._autoClickTimeout=window.setTimeout(()=>{this.loading=!1,this._loadingState.countdown=null,this.updateCountdownText(),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.button?.click()},this.autoClickDelay))}updateCountdownText(){let t=this._loadingState.countdown&&this._loadingState.countdown>0?` (${this._loadingState.countdown}s)`:"";if(this.countdownContainer)for(let r of this.countdownContainer)r.textContent=t}teardownAutoClick(){this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!1,this._loadingState.countdown=null,this.button&&(this.button.style.width="")}render(){let t=this._isLink(),r=this.loading&&this.autoClick,n=this.icon&&!this.loading?ke`
|
|
96
|
+
</zn-popup>`}};Lt.styles=z(rv),c([F("slot:not([name])")],Lt.prototype,"defaultSlot",2),c([F(".tooltip__body")],Lt.prototype,"body",2),c([F("zn-popup")],Lt.prototype,"popup",2),c([d()],Lt.prototype,"content",2),c([d()],Lt.prototype,"placement",2),c([d({type:Boolean,reflect:!0})],Lt.prototype,"disabled",2),c([d({type:Number})],Lt.prototype,"distance",2),c([d({type:Boolean,reflect:!0})],Lt.prototype,"open",2),c([d({type:Number})],Lt.prototype,"skidding",2),c([d()],Lt.prototype,"trigger",2),c([d({type:Boolean})],Lt.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],Lt.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],Lt.prototype,"handleOptionsChange",1),c([K("disabled")],Lt.prototype,"handleDisabledChange",1);var gi=Lt;Lt.define("zn-tooltip");var kd=_`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:normal;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}:root[m=dark] kbd,[t=dark] kbd,.theme-dark kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px}.zn-bt{border-top-style:solid;border-top-width:1px}.zn-bb{border-bottom-style:solid;border-bottom-width:1px}.zn-bl{border-left-style:solid;border-left-width:1px}.zn-br{border-right-style:solid;border-right-width:1px}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);letter-spacing:var(--zn-text-button-label-letter-spacing,normal);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}`;var iv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host button,:host a{width:100%}.button{border-radius:var(--zn-button-border-radius,var(--zn-border-radius));display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(var(--zn-color-on-primary,255,255,255),0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.button{--btn-color:var(--zn-primary);--btn-ink:var(--zn-color-on-primary,255,255,255);--notification-color:rgb(var(--zn-color-error));border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,transparent);display:inline-flex;position:relative}.button.button--info{--btn-color:var(--zn-color-info);--btn-ink:var(--zn-color-on-info,255,255,255)}.button.button--error{--btn-color:var(--zn-color-error);--btn-ink:var(--zn-color-on-error,255,255,255)}.button.button--warning{--btn-color:var(--zn-color-warning);--btn-ink:var(--zn-color-on-warning,255,255,255)}.button.button--success{--btn-color:var(--zn-color-success);--btn-ink:var(--zn-color-on-success,255,255,255)}.button__label--hidden{visibility:hidden}.button zn-icon{--icon-color:currentColor}.button.button--muted-notification{--notification-color:rgb(var(--zn-color-info))}.button--has-notification{position:relative;overflow:visible}.button--has-notification::after{content:attr(data-notification);position:absolute;display:flex;justify-content:center;align-items:center;top:-4px;left:auto;inset-inline-end:-4px;box-sizing:border-box;min-width:13px;height:13px;padding:0 3px;border-radius:999px;font-size:var(--zn-text-notification-font-size);font-weight:var(--zn-text-notification-font-weight);line-height:var(--zn-text-notification-line-height);color:var(--zn-text-notification-color);background-color:var(--notification-color)}.button--has-notification.button--notification-dot::after{content:"";min-width:0;width:8px;height:8px;padding:0;border-radius:50%}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:2px solid rgb(var(--btn-color));outline-offset:2px}[disabled]{cursor:not-allowed;opacity:0.5}[disabled] *{pointer-events:none}.button--standard.button--secondary{background-color:var(--zn-color-neutral-50);border-color:var(--zn-button-border-color,var(--zn-color-neutral-50));color:rgb(var(--zn-primary))}.button--standard.button--secondary:hover:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard{background-color:rgba(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgba(var(--btn-ink),0.9)}.button--standard:hover:not([disabled]){background-color:rgba(var(--btn-color),0.8)}.button--standard:active:not([disabled]){background-color:rgba(var(--btn-color))}.button--outline{background:none;border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--outline:hover:not([disabled]),.button--outline:active:not([disabled]){background-color:rgb(var(--btn-color));color:rgb(var(--btn-ink))}.button--outline.button--secondary{border-color:var(--zn-button-border-color,var(--zn-color-neutral-100))}.button--outline.button--secondary:hover:not([disabled]),.button--outline.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100);color:rgb(var(--btn-color))}.button--text{background:none;color:rgb(var(--btn-color))}.button--text:hover:not([disabled]),.button--text:active:not([disabled]){background-color:rgba(var(--btn-color),0.1)}.button--text.button--secondary{font-weight:normal}.button--grow{width:100%}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-left zn-icon{margin-right:var(--zn-base-px)}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-right zn-icon{margin-left:var(--zn-base-px)}.button--square{border-radius:0}.button--transparent{background-color:transparent;border-color:var(--zn-button-border-color,transparent) !important;color:inherit}.button--transparent:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.1)}.button--transparent:active:not([disabled]){background-color:rgba(var(--zn-primary),0.2)}.button--star{--btn-color:var(--zn-orange);--btn-ink:var(--zn-color-on-warning,255,255,255);background-color:rgb(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-ink));opacity:1 !important}.button--star:hover:not([disabled]){background-color:rgb(var(--btn-color))}.button--star:active{background-color:rgb(var(--btn-color))}.button--star.button--outline{background-color:transparent;border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--star.button--outline:hover:not([disabled]),.button--star.button--outline:active:not([disabled]){background-color:rgba(var(--btn-color));color:rgb(var(--btn-ink))}.button.button--icon-button{--icon-button-color:rgb(var(--zn-text));--icon-button-hover-color:rgb(var(--zn-primary));width:40px;min-width:40px;height:36px;min-height:36px;max-height:36px;padding:6px;margin:0;background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color))) !important;border-radius:var(--zn-border-radius);color:var(--icon-button-color);font-weight:inherit;line-height:0}.button.button--icon-button zn-icon,.button.button--icon-button ::slotted(zn-icon){--icon-color:currentColor;color:inherit;line-height:0}.button.button--icon-button:hover:not([disabled]),.button.button--icon-button:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}.button.button--icon-button.button--icon-button-small{width:36px;min-width:36px}.button.button--icon-button.button--icon-button-round{width:36px;min-width:36px;padding:8px;background:rgb(var(--zn-color-tab));border-color:var(--zn-button-border-color,transparent) !important;border-radius:var(--zn-border-radius-circle)}.button.button--icon-button.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-border))}.button.button--icon-button.button--plain{background:transparent;border-color:var(--zn-button-border-color,transparent) !important}.button.button--icon-button.button--plain:hover:not([disabled]),.button.button--icon-button.button--plain:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover:hover:not([disabled]),.button.button--icon-button.button--no-hover:active:not([disabled]){background:rgb(var(--zn-panel))}.button.button--icon-button.button--no-hover.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover.button--plain:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--plain:active:not([disabled]){background:transparent}.button.button--icon-button.button--has-notification::after{--icon-inset:calc((100% - var(--notification-icon-size,20px)) / 2);top:calc(var(--icon-inset) - 4px);inset-inline-end:calc(var(--icon-inset) - 4px);transform:translate(50%,-50%)}.button--loading-bg-transparent{background-color:transparent}.button--loading-fill{pointer-events:none;position:absolute;z-index:1;background-color:rgba(var(--btn-color),0.85);border-radius:inherit;transition:width 0s;animation:loading-fill-grow var(--loading-duration,2s) linear forwards;inset:-1px}.button--loading-fill-transparent{background-color:rgba(var(--zn-primary),0.1)}.button--loading-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}.button--loading-text{z-index:5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:inherit;font-weight:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;pointer-events:none;color:inherit}.button--loading-text .loading-countdown{margin-left:3px}.button--loading-text-left{justify-content:flex-start;padding-inline-start:7px}.button--loading-text-right{justify-content:flex-end;padding-inline-end:7px}.button--relative-wrapper{position:relative;display:inline-flex;height:100%;width:100%}@keyframes loading-fill-grow{from{width:0}to{width:100%}}:host([vertical-align=center]){align-self:center}:host([vertical-align=end]){align-self:end}:host([vertical-align=start]){align-self:start}:host([grow]){width:100%}:host([grow]) button{width:100%}:host([data-zn-button-group__button--grow]){flex-grow:1;flex-basis:0}:host([data-zn-button-group__button--inner]) .button{border-radius:0 !important;border-left:0 !important;border-right:0 !important}:host([data-zn-button-group__button]:not([data-zn-button-group__button--first])) .button:after{content:"";position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px;color:rgba(var(--zn-border-color),0.85)}:host([data-zn-button-group__button--first]:not([data-zn-button-group__button--last])) .button{border-radius:5px 0 0 5px !important;border-right:0 !important}:host([data-zn-button-group__button--last]:not([data-zn-button-group__button--first])) .button{border-radius:0 5px 5px 0 !important;border-left:0 !important}.button.button--pill{border-radius:var(--zn-border-radius-pill);padding:0 var(--zn-spacing-small);height:32px;min-height:32px;font-weight:var(--zn-font-weight-normal);text-transform:none;white-space:nowrap}.button--panel-bg{background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color)));color:rgb(var(--zn-text))}.button--panel-bg:hover:not([disabled]),.button--panel-bg:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}`;var le=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"[default]");this._loadingState={countdown:null,interval:void 0};this.color="default";this.text=!1;this.outline=!1;this.disabled=!1;this.grow=!1;this.square=!1;this.iconButton=!1;this.plain=!1;this.noHover=!1;this.pill=!1;this.panelBackground=!1;this.dropdownCloser=!1;this.mutedNotifications=!1;this.content="";this.icon="";this.gaid="";this.iconPosition="left";this.rel="noreferrer noopener";this.autoClick=!1;this.autoClickDelay=2e3;this.loadingText="Loading...";this.loadingTextPosition="center";this.loading=!1;this.handleClick=()=>{if(!this.disabled){if(this.dropdownCloser){let t=null,r=this,n=0,a=30;for(;r&&n<a;){if(r instanceof pr){t=r;break}r=r.parentElement||(r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null),n++}t?.hide()}this.type==="submit"&&this.formControlController.submit(),this.type==="reset"&&this.formControlController.reset()}}}get validity(){return this._isButton()&&this.button?this.button.validity:pt}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}firstUpdated(){this._isButton()&&this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.teardownAutoClick()}async handleAutoClickChange(t,r){r?(await this.updateComplete,this.setupAutoClick()):this.teardownAutoClick()}updated(t){if(super.updated(t),this.button){let r=this.button.querySelector(".button--loading-fill");if(r&&r.remove(),this.loading){let n=`${this.autoClickDelay/1e3}s`,a=document.createElement("div");a.classList.add("button--loading-fill"),a.setAttribute("style",`--loading-duration: ${n}`),this.button.classList.contains("button--transparent")&&(a.classList.add("button--loading-fill-transparent"),this.button.classList.add("button--loading-bg-transparent")),this.button.prepend(a),this.button.classList.add("button--loading-bg")}else this.button.classList.remove("button--loading-bg"),this.button.classList.remove("button--loading-bg-transparent");this.updateCountdownText()}}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}click(){this.handleClick()}_isLink(){return this.href!==void 0}_isButton(){return!this._isLink()}getIconButtonColor(t){switch(t){case void 0:case"":case"default":return"rgb(var(--zn-text))";case"primary":return"rgb(var(--zn-primary))";case"secondary":return"rgb(var(--zn-text))";case"error":return"rgb(var(--zn-color-error))";case"info":return"rgb(var(--zn-color-info))";case"success":return"rgb(var(--zn-color-success))";case"warning":return"rgb(var(--zn-color-warning))";case"transparent":return"inherit";case"star":return"rgb(var(--zn-orange))";default:return t}}setupAutoClick(){this.button&&(this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!0,this._loadingState.countdown=Math.ceil(this.autoClickDelay/1e3),this.updateCountdownText(),this._loadingState.interval=window.setInterval(()=>{this._loadingState.countdown&&this._loadingState.countdown>0&&(this._loadingState.countdown--,this.updateCountdownText())},1e3),this._autoClickTimeout=window.setTimeout(()=>{this.loading=!1,this._loadingState.countdown=null,this.updateCountdownText(),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.button?.click()},this.autoClickDelay))}updateCountdownText(){let t=this._loadingState.countdown&&this._loadingState.countdown>0?` (${this._loadingState.countdown}s)`:"";if(this.countdownContainer)for(let r of this.countdownContainer)r.textContent=t}teardownAutoClick(){this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!1,this._loadingState.countdown=null,this.button&&(this.button.style.width="")}render(){let t=this._isLink(),r=this.loading&&this.autoClick,n=this.icon&&!this.loading?ke`
|
|
97
97
|
<zn-icon part="icon" src="${this.icon}" id="xy2" size="${this.iconSize?this.iconSize:20}"
|
|
98
98
|
color="${P(this.iconColor)}" fill="${P(this.iconFill)}"
|
|
99
|
-
library="${P(this.iconLibrary)}"></zn-icon>`:"",a=t
|
|
99
|
+
library="${P(this.iconLibrary)}"></zn-icon>`:"",a=t?Ai`a`:Ai`button`,s=this.hasSlotController.test("[default]")||!!this.content,l=this.label||(s?void 0:this.tooltip),p=this.iconButton?{"--icon-button-color":this.getIconButtonColor(this.color),"--icon-button-hover-color":this.getIconButtonColor(this.hoverColor||"primary")}:{},h=this.notification??void 0,m=ke`
|
|
100
100
|
<${a}
|
|
101
101
|
part="base"
|
|
102
102
|
class="${M({button:!0,"button--default":this.color==="default","button--secondary":this.color==="secondary","button--panel-bg":this.panelBackground,"button--error":this.color==="error","button--info":this.color==="info","button--success":this.color==="success","button--warning":this.color==="warning","button--transparent":this.color==="transparent","button--star":this.color==="star","button--outline":this.outline,"button--text":this.text&&!this.outline,"button--icon-button":!!this.iconButton,"button--plain":!!this.iconButton&&this.plain,"button--pill":this.pill,"button--no-hover":this.noHover,"button--icon-button-small":this.iconButton==="small","button--icon-button-round":this.iconButton==="round","button--grow":this.grow,"button--standard":!this.outline&&!this.text,"button--with-icon":this.icon,"button--icon-left":this.iconPosition==="left","button--icon-right":this.iconPosition==="right","button--with-content":this.hasSlotController.test("[default]")||this.content,"button--square":this.square,"button--has-notification":h!==void 0&&h!==0,"button--muted-notification":this.mutedNotifications||h===-2,"button--notification-dot":h!==void 0&&h<0})}"
|
|
@@ -136,7 +136,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
136
136
|
${this.loadingText}<span class="loading-countdown"></span>
|
|
137
137
|
</span>
|
|
138
138
|
</div>
|
|
139
|
-
`:null}`}};le.styles=[z(kd),z(iv)],le.dependencies={"zn-tooltip":Xi,"zn-icon":ne},c([F(".button")],le.prototype,"button",2),c([Za(".loading-countdown")],le.prototype,"countdownContainer",2),c([d({})],le.prototype,"color",2),c([d({attribute:"hover-color"})],le.prototype,"hoverColor",2),c([d({type:Boolean})],le.prototype,"text",2),c([d({type:Boolean})],le.prototype,"outline",2),c([d({type:Boolean})],le.prototype,"disabled",2),c([d({type:Boolean})],le.prototype,"grow",2),c([d({type:Boolean})],le.prototype,"square",2),c([d({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],le.prototype,"iconButton",2),c([d({type:Boolean})],le.prototype,"plain",2),c([d({type:Boolean,attribute:"no-hover"})],le.prototype,"noHover",2),c([d({type:Boolean,reflect:!0})],le.prototype,"pill",2),c([d({type:Boolean,attribute:"panel-bg"})],le.prototype,"panelBackground",2),c([d({attribute:"dropdown-closer",type:Boolean})],le.prototype,"dropdownCloser",2),c([d({type:Number})],le.prototype,"notification",2),c([d({attribute:"muted-notifications",type:Boolean})],le.prototype,"mutedNotifications",2),c([d()],le.prototype,"verticalAlign",2),c([d()],le.prototype,"content",2),c([d()],le.prototype,"icon",2),c([d()],le.prototype,"gaid",2),c([d({attribute:"icon-position"})],le.prototype,"iconPosition",2),c([d({attribute:"icon-size"})],le.prototype,"iconSize",2),c([d({attribute:"icon-color"})],le.prototype,"iconColor",2),c([d({attribute:"icon-fill"})],le.prototype,"iconFill",2),c([d({attribute:"icon-library"})],le.prototype,"iconLibrary",2),c([d()],le.prototype,"type",2),c([d()],le.prototype,"name",2),c([d()],le.prototype,"value",2),c([d()],le.prototype,"form",2),c([d({attribute:"formaction"})],le.prototype,"formAction",2),c([d({attribute:"formenctype"})],le.prototype,"formEnctype",2),c([d({attribute:"formmethod"})],le.prototype,"formMethod",2),c([d({attribute:"formnovalidate",type:Boolean})],le.prototype,"formNoValidate",2),c([d({attribute:"formtarget"})],le.prototype,"formTarget",2),c([d()],le.prototype,"href",2),c([d()],le.prototype,"target",2),c([d({attribute:"data-target"})],le.prototype,"dataTarget",2),c([d()],le.prototype,"rel",2),c([d()],le.prototype,"tooltip",2),c([d()],le.prototype,"label",2),c([d({type:Boolean,attribute:"auto-click"})],le.prototype,"autoClick",2),c([d({type:Number,attribute:"auto-click-delay"})],le.prototype,"autoClickDelay",2),c([d({type:String,attribute:"loading-text"})],le.prototype,"loadingText",2),c([d({type:String,attribute:"loading-text-position"})],le.prototype,"loadingTextPosition",2),c([d({type:Boolean})],le.prototype,"loading",2),c([K("autoClick")],le.prototype,"handleAutoClickChange",1);var $e=le;le.define("zn-button");var Oe=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){let i=this.u.takeRecords();(i.length||!this.o&&this.i)&&this.handleChanges(i),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var os=class extends k{constructor(){super();this._resizeFrame=null;new Oe(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var x5=os;os.define("zn-absolute-container");var wn=Math.min,Ji=Math.max,$l=Math.round,Al=Math.floor,zn=o=>({x:o,y:o}),w5={left:"right",right:"left",bottom:"top",top:"bottom"};function xu(o,i,t){return Ji(o,wn(i,t))}function fa(o,i){return typeof o=="function"?o(i):o}function xo(o){return o.split("-")[0]}function ga(o){return o.split("-")[1]}function wu(o){return o==="x"?"y":"x"}function Sd(o){return o==="y"?"height":"width"}function _n(o){let i=o[0];return i==="t"||i==="b"?"y":"x"}function Ed(o){return wu(_n(o))}function av(o,i,t){t===void 0&&(t=!1);let r=ga(o),n=Ed(o),a=Sd(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=Tl(s)),[s,Tl(s)]}function sv(o){let i=Tl(o);return[Cd(o),i,Cd(i)]}function Cd(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var nv=["left","right"],ov=["right","left"],z5=["top","bottom"],_5=["bottom","top"];function k5(o,i,t){switch(o){case"top":case"bottom":return t?i?ov:nv:i?nv:ov;case"left":case"right":return i?z5:_5;default:return[]}}function lv(o,i,t,r){let n=ga(o),a=k5(xo(o),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),i&&(a=a.concat(a.map(Cd)))),a}function Tl(o){let i=xo(o);return w5[i]+o.slice(i.length)}function C5(o){var i,t,r,n;return{top:(i=o.top)!=null?i:0,right:(t=o.right)!=null?t:0,bottom:(r=o.bottom)!=null?r:0,left:(n=o.left)!=null?n:0}}function zu(o){return typeof o!="number"?C5(o):{top:o,right:o,bottom:o,left:o}}function ba(o){let{x:i,y:t,width:r,height:n}=o;return{width:r,height:n,top:t,left:i,right:i+r,bottom:t+n,x:i,y:t}}function cv(o,i,t){let{reference:r,floating:n}=o,a=_n(i),s=Ed(i),l=Sd(s),p=xo(i),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(p){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=ga(i);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function dv(o,i){var t;i===void 0&&(i={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:p}=o,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=fa(i,o),v=zu(g),S=l[b?f==="floating"?"reference":"floating":f],T=ba(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(S)))==null||t?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:p})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,U=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(U))&&await(a.getScale==null?void 0:a.getScale(U))||{x:1,y:1},C=ba(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:U,strategy:p}):N);return{top:(T.top-C.top+v.top)/I.y,bottom:(C.bottom-T.bottom+v.bottom)/I.y,left:(T.left-C.left+v.left)/I.x,right:(C.right-T.right+v.right)/I.x}}var S5=50,pv=async(o,i,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:dv},p=await(s.isRTL==null?void 0:s.isRTL(i)),h=await s.getElementRects({reference:o,floating:i,strategy:n}),{x:m,y:f}=cv(h,r,p),b=r,g=0,v={};for(let y=0;y<a.length;y++){let S=a[y];if(!S)continue;let{name:T,fn:N}=S,{x:U,y:I,data:C,reset:$}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:o,floating:i}});m=U??m,f=I??f,v[T]={...v[T],...C},$&&g<S5&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:o,floating:i,strategy:n}):$.rects),{x:m,y:f}=cv(h,b,p)),y=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},hv=o=>({name:"arrow",options:o,async fn(i){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:p}=i,{element:h,padding:m=0}=fa(o,i)||{};if(h==null)return{};let f=zu(m),b={x:t,y:r},g=Ed(n),v=Sd(g),y=await s.getDimensions(h),S=g==="y",T=S?"top":"left",N=S?"bottom":"right",U=S?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],C=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=$?$[U]:0;(!L||!await(s.isElement==null?void 0:s.isElement($)))&&(L=l.floating[U]||a.floating[v]);let W=I/2-C/2,oe=L/2-y[v]/2-1,xe=wn(f[T],oe),De=wn(f[N],oe),Ne=L-y[v]-De,rt=L/2-y[v]/2+W,er=xu(xe,rt,Ne),Pr=!p.arrow&&ga(n)!=null&&rt!==er&&a.reference[v]/2-(rt<xe?xe:De)-y[v]/2<0,wr=Pr?rt<xe?rt-xe:rt-Ne:0;return{[g]:b[g]+wr,data:{[g]:er,centerOffset:rt-er-wr,...Pr&&{alignmentOffset:wr}},reset:Pr}}});var uv=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(i){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:p,elements:h}=i,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...S}=fa(o,i);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let T=xo(n),N=_n(l),U=xo(l)===l,I=await(p.isRTL==null?void 0:p.isRTL(h.floating)),C=b||(U||!y?[Tl(l)]:sv(l)),$=v!=="none";!b&&$&&C.push(...lv(l,y,v,I));let L=[l,...C],W=await p.detectOverflow(i,S),oe=[],xe=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&oe.push(W[T]),f){let er=av(n,s,I);oe.push(W[er[0]],W[er[1]])}if(xe=[...xe,{placement:n,overflows:oe}],!oe.every(er=>er<=0)){var De,Ne;let er=(((De=a.flip)==null?void 0:De.index)||0)+1,Pr=L[er];if(Pr&&(!(f==="alignment"?N!==_n(Pr):!1)||xe.every(tr=>_n(tr.placement)===N?tr.overflows[0]>0:!0)))return{data:{index:er,overflows:xe},reset:{placement:Pr}};let wr=(Ne=xe.filter(Nt=>Nt.overflows[0]<=0).sort((Nt,tr)=>Nt.overflows[1]-tr.overflows[1])[0])==null?void 0:Ne.placement;if(!wr)switch(g){case"bestFit":{var rt;let Nt=(rt=xe.filter(tr=>{if($){let Mt=_n(tr.placement);return Mt===N||Mt==="y"}return!0}).map(tr=>[tr.placement,tr.overflows.filter(Mt=>Mt>0).reduce((Mt,uo)=>Mt+uo,0)]).sort((tr,Mt)=>tr[1]-Mt[1])[0])==null?void 0:rt[0];Nt&&(wr=Nt);break}case"initialPlacement":wr=l;break}if(n!==wr)return{reset:{placement:wr}}}return{}}}};var E5=new Set(["left","top"]);async function T5(o,i){let{placement:t,platform:r,elements:n}=o,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=xo(t),l=ga(t),p=_n(t)==="y",h=E5.has(s)?-1:1,m=a&&p?-1:1,f=fa(i,o),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),p?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var mv=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(i){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=i,p=await T5(i,o);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+p.x,y:a+p.y,data:{...p,placement:s}}}}},fv=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(i){let{x:t,y:r,placement:n,platform:a}=i,{mainAxis:s=!0,crossAxis:l=!1,limiter:p={fn:N=>{let{x:U,y:I}=N;return{x:U,y:I}}},...h}=fa(o,i),m={x:t,y:r},f=await a.detectOverflow(i,h),b=_n(n),g=wu(b),v=m[g],y=m[b],S=(N,U)=>xu(U+f[N==="y"?"top":"left"],U,U-f[N==="y"?"bottom":"right"]);s&&(v=S(g,v)),l&&(y=S(b,y));let T=p.fn({...i,[g]:v,[b]:y});return{...T,data:{x:T.x-t,y:T.y-r,enabled:{[g]:s,[b]:l}}}}}};var gv=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(i){let{placement:t,rects:r,platform:n,elements:a}=i,{apply:s=()=>{},...l}=fa(o,i),p=await n.detectOverflow(i,l),h=xo(t),m=ga(t),f=_n(t)==="y",{width:b,height:g}=r.floating,v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");let S=g-p.top-p.bottom,T=b-p.left-p.right,N=wn(g-p[v],S),U=wn(b-p[y],T),I=i.middlewareData.shift,C=!I,$=N,L=U;I!=null&&I.enabled.x&&(L=T),I!=null&&I.enabled.y&&($=S),C&&!m&&(f?L=b-2*Ji(p.left,p.right):$=g-2*Ji(p.top,p.bottom)),await s({...i,availableWidth:L,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Td(){return typeof window<"u"}function ya(o){return vv(o)?(o.nodeName||"").toLowerCase():"#document"}function Hr(o){var i;return(o==null||(i=o.ownerDocument)==null?void 0:i.defaultView)||window}function kn(o){var i;return(i=(vv(o)?o.ownerDocument:o.document)||window.document)==null?void 0:i.documentElement}function vv(o){return Td()?o instanceof Node||o instanceof Hr(o).Node:!1}function Zi(o){return Td()?o instanceof Element||o instanceof Hr(o).Element:!1}function jn(o){return Td()?o instanceof HTMLElement||o instanceof Hr(o).HTMLElement:!1}function bv(o){return!Td()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof Hr(o).ShadowRoot}function Ml(o){let{overflow:i,overflowX:t,overflowY:r,display:n}=en(o);return/auto|scroll|overlay|hidden|clip/.test(i+r+t)&&n!=="inline"&&n!=="contents"}function yv(o){return/^(table|td|th)$/.test(ya(o))}function Ll(o){try{if(o.matches(":popover-open"))return!0}catch{}try{return o.matches(":modal")}catch{return!1}}var $5=/transform|translate|scale|rotate|perspective|filter/,A5=/paint|layout|strict|content/,va=o=>!!o&&o!=="none",_u;function ss(o){let i=Zi(o)?en(o):o;return va(i.transform)||va(i.translate)||va(i.scale)||va(i.rotate)||va(i.perspective)||!$d()&&(va(i.backdropFilter)||va(i.filter))||$5.test(i.willChange||"")||A5.test(i.contain||"")}function xv(o){let i=wo(o);for(;jn(i)&&!ls(i);){if(ss(i))return i;if(Ll(i))return null;i=wo(i)}return null}function $d(){return _u==null&&(_u=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_u}function ls(o){return/^(html|body|#document)$/.test(ya(o))}function en(o){return Hr(o).getComputedStyle(o)}function ql(o){return Zi(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function wo(o){if(ya(o)==="html")return o;let i=o.assignedSlot||o.parentNode||bv(o)&&o.host||kn(o);return bv(i)?i.host:i}function wv(o){let i=wo(o);return ls(i)?(o.ownerDocument||o).body:jn(i)&&Ml(i)?i:wv(i)}function as(o,i,t){var r;i===void 0&&(i=[]),t===void 0&&(t=!0);let n=wv(o),a=n===((r=o.ownerDocument)==null?void 0:r.body),s=Hr(n);if(a){let l=Ad(s);return i.concat(s,s.visualViewport||[],Ml(n)?n:[],l&&t?as(l):[])}else return i.concat(n,as(n,[],t))}function Ad(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function kv(o){let i=en(o),t=parseFloat(i.width)||0,r=parseFloat(i.height)||0,n=jn(o),a=n?o.offsetWidth:t,s=n?o.offsetHeight:r,l=$l(t)!==a||$l(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Cu(o){return Zi(o)?o:o.contextElement}function cs(o){let i=Cu(o);if(!jn(i))return zn(1);let t=i.getBoundingClientRect(),{width:r,height:n,$:a}=kv(i),s=(a?$l(t.width):t.width)/r,l=(a?$l(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var M5=zn(0);function Cv(o){let i=Hr(o);return!$d()||!i.visualViewport?M5:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function L5(o,i,t){return i===void 0&&(i=!1),!!t&&i&&t===Hr(o)}function xa(o,i,t,r){i===void 0&&(i=!1),t===void 0&&(t=!1);let n=o.getBoundingClientRect(),a=Cu(o),s=zn(1);i&&(r?Zi(r)&&(s=cs(r)):s=cs(o));let l=L5(a,t,r)?Cv(a):zn(0),p=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Hr(a),g=Zi(r)?Hr(r):r,v=b,y=Ad(v);for(;y&&g!==v;){let S=cs(y),T=y.getBoundingClientRect(),N=en(y),U=T.left+(y.clientLeft+parseFloat(N.paddingLeft))*S.x,I=T.top+(y.clientTop+parseFloat(N.paddingTop))*S.y;p*=S.x,h*=S.y,m*=S.x,f*=S.y,p+=U,h+=I,v=Hr(y),y=Ad(v)}}return ba({width:m,height:f,x:p,y:h})}function Md(o,i){let t=ql(o).scrollLeft;return i?i.left+t:xa(kn(o)).left+t}function Sv(o,i){let t=o.getBoundingClientRect(),r=t.left+i.scrollLeft-Md(o,t),n=t.top+i.scrollTop;return{x:r,y:n}}function q5(o){let{elements:i,rect:t,offsetParent:r,strategy:n}=o,a=n==="fixed",s=kn(r),l=i?Ll(i.floating):!1;if(r===s||l&&a)return t;let p={scrollLeft:0,scrollTop:0},h=zn(1),m=zn(0),f=jn(r);if((f||!a)&&((ya(r)!=="body"||Ml(s))&&(p=ql(r)),f)){let g=xa(r);h=cs(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Sv(s,p):zn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-p.scrollTop*h.y+m.y+b.y}}function I5(o){return o.getClientRects?Array.from(o.getClientRects()):[]}function D5(o){let i=ql(o),t=o.ownerDocument.body,r=Ji(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),n=Ji(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight),a=-i.scrollLeft+Md(o),s=-i.scrollTop;return en(t).direction==="rtl"&&(a+=Ji(o.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var R5=25;function N5(o,i,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Hr(o),a=kn(o),s=n.visualViewport,l=a.clientWidth,p=a.clientHeight,h=0,m=0;if(s){let b=!$d()||i==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,p=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(Md(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),y=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(a.clientWidth-g.clientWidth-y),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?S/2:S;T<=R5&&(l-=T)}return{width:l,height:p,x:h,y:m}}function O5(o,i){let t=xa(o,!0,i==="fixed"),r=t.top+o.clientTop,n=t.left+o.clientLeft,a=cs(o),s=o.clientWidth*a.x,l=o.clientHeight*a.y,p=n*a.x,h=r*a.y;return{width:s,height:l,x:p,y:h}}function zv(o,i,t){let r;if(i==="viewport"||i==="layoutViewport")r=N5(o,t,i);else if(i==="document")r=D5(kn(o));else if(Zi(i))r=O5(i,t);else{let n=Cv(o);r={x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}return ba(r)}function P5(o,i){let t=i.get(o);if(t)return t;let r=as(o,[],!1).filter(l=>Zi(l)&&ya(l)!=="body"),n=null,a=en(o).position==="fixed",s=a?wo(o):o;for(;Zi(s)&&!ls(s);){let l=en(s),p=ss(s),h=n?n.position:a?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=wo(s)}return i.set(o,r),r}function H5(o){let{element:i,boundary:t,rootBoundary:r,strategy:n}=o,s=[...t==="clippingAncestors"?Ll(i)?[]:P5(i,this._c):[].concat(t),r],l=zv(i,s[0],n),p=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=zv(i,s[b],n);p=Ji(g.top,p),h=wn(g.right,h),m=wn(g.bottom,m),f=Ji(g.left,f)}return{width:h-f,height:m-p,x:f,y:p}}function F5(o){let{width:i,height:t}=kv(o);return{width:i,height:t}}function B5(o,i,t){let r=jn(i),n=kn(i),a=t==="fixed",s=xa(o,!0,a,i),l={scrollLeft:0,scrollTop:0},p=zn(0);if((r||!a)&&((ya(i)!=="body"||Ml(n))&&(l=ql(i)),r)){let b=xa(i,!0,a,i);p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}!r&&n&&(p.x=Md(n));let h=n&&!r&&!a?Sv(n,l):zn(0),m=s.left+l.scrollLeft-p.x-h.x,f=s.top+l.scrollTop-p.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function ku(o){return en(o).position==="static"}function _v(o,i){if(!jn(o)||en(o).position==="fixed")return null;if(i)return i(o);let t=o.offsetParent;return kn(o)===t&&(t=t.ownerDocument.body),t}function Ev(o,i){let t=Hr(o);if(Ll(o))return t;if(!jn(o)){let n=wo(o);for(;n&&!ls(n);){if(Zi(n)&&!ku(n))return n;n=wo(n)}return t}let r=_v(o,i);for(;r&&yv(r)&&ku(r);)r=_v(r,i);return r&&ls(r)&&ku(r)&&!ss(r)?t:r||xv(o)||t}var V5=async function(o){let i=this.getOffsetParent||Ev,t=this.getDimensions,r=await t(o.floating);return{reference:B5(o.reference,await i(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function U5(o){return en(o).direction==="rtl"}var Il={convertOffsetParentRelativeRectToViewportRelativeRect:q5,getDocumentElement:kn,getClippingRect:H5,getOffsetParent:Ev,getElementRects:V5,getClientRects:I5,getDimensions:F5,getScale:cs,isElement:Zi,isRTL:U5};function Tv(o,i){return o.x===i.x&&o.y===i.y&&o.width===i.width&&o.height===i.height}function j5(o,i,t){let r=null,n,a=kn(o);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=o.getBoundingClientRect(),{left:g,top:v,width:y,height:S}=b;if(m||i(),!y||!S)return;let T=Al(v),N=Al(a.clientWidth-(g+y)),U=Al(a.clientHeight-(v+S)),I=Al(g),$={rootMargin:-T+"px "+-N+"px "+-U+"px "+-I+"px",threshold:Ji(0,wn(1,f))||1},L=!0;function W(oe){let xe=oe[0].intersectionRatio;if(!Tv(b,o.getBoundingClientRect()))return l();if(xe!==f){if(!L)return l();xe?l(!1,xe):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(o)}let p=Hr(o),h=()=>l(t);return p.addEventListener("resize",h),l(!0),()=>{p.removeEventListener("resize",h),s()}}function Ld(o,i,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,h=Cu(o),m=n||a?[...h?as(h):[],...i?as(i):[]]:[];m.forEach(T=>{n&&T.addEventListener("scroll",t),a&&T.addEventListener("resize",t)});let f=h&&l?j5(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&g&&i&&(g.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var U;(U=g)==null||U.observe(i)})),t()}),h&&!p&&g.observe(h),i&&g.observe(i));let v,y=p?xa(o):null;p&&S();function S(){let T=xa(o);y&&!Tv(y,T)&&t(),y=T,v=requestAnimationFrame(S)}return t(),()=>{var T;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),(T=g)==null||T.disconnect(),g=null,p&&cancelAnimationFrame(v)}}var qd=mv;var Id=fv,Dd=uv,Dl=gv;var $v=hv;var Rd=(o,i,t)=>{let r=new Map,n=t??{},a={...Il,...n.platform,_c:r};return pv(o,i,{...n,platform:a})};function Av(o){return G5(o)}function Su(o){return o.assignedSlot?o.assignedSlot:o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}function G5(o){for(let i=o;i;i=Su(i))if(i instanceof Element&&getComputedStyle(i).display==="none")return null;for(let i=Su(o);i;i=Su(i)){if(!(i instanceof Element))continue;let t=getComputedStyle(i);if(t.display!=="contents"&&(t.position!=="static"||ss(t)||i.tagName==="BODY"))return i}return null}var Mv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function W5(o){return o!==null&&typeof o=="object"&&"getBoundingClientRect"in o&&("contextElement"in o?o instanceof Element:!0)}var Re=class extends k{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,p,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,p=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,p=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,p=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,p=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${p}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||W5(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup?.(),this.cleanup=Ld(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[qd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Dl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Dd({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Id({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Dl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push($v({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>Il.getOffsetParent(n,Av):Il.getOffsetParent;Rd(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...Il,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let p={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.matches(":popover-open")||this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[p]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
139
|
+
`:null}`}};le.styles=[z(kd),z(iv)],le.dependencies={"zn-tooltip":gi,"zn-icon":ne},c([F(".button")],le.prototype,"button",2),c([Za(".loading-countdown")],le.prototype,"countdownContainer",2),c([d({})],le.prototype,"color",2),c([d({attribute:"hover-color"})],le.prototype,"hoverColor",2),c([d({type:Boolean})],le.prototype,"text",2),c([d({type:Boolean})],le.prototype,"outline",2),c([d({type:Boolean})],le.prototype,"disabled",2),c([d({type:Boolean})],le.prototype,"grow",2),c([d({type:Boolean})],le.prototype,"square",2),c([d({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],le.prototype,"iconButton",2),c([d({type:Boolean})],le.prototype,"plain",2),c([d({type:Boolean,attribute:"no-hover"})],le.prototype,"noHover",2),c([d({type:Boolean,reflect:!0})],le.prototype,"pill",2),c([d({type:Boolean,attribute:"panel-bg"})],le.prototype,"panelBackground",2),c([d({attribute:"dropdown-closer",type:Boolean})],le.prototype,"dropdownCloser",2),c([d({type:Number})],le.prototype,"notification",2),c([d({attribute:"muted-notifications",type:Boolean})],le.prototype,"mutedNotifications",2),c([d()],le.prototype,"verticalAlign",2),c([d()],le.prototype,"content",2),c([d()],le.prototype,"icon",2),c([d()],le.prototype,"gaid",2),c([d({attribute:"icon-position"})],le.prototype,"iconPosition",2),c([d({attribute:"icon-size"})],le.prototype,"iconSize",2),c([d({attribute:"icon-color"})],le.prototype,"iconColor",2),c([d({attribute:"icon-fill"})],le.prototype,"iconFill",2),c([d({attribute:"icon-library"})],le.prototype,"iconLibrary",2),c([d()],le.prototype,"type",2),c([d()],le.prototype,"name",2),c([d()],le.prototype,"value",2),c([d()],le.prototype,"form",2),c([d({attribute:"formaction"})],le.prototype,"formAction",2),c([d({attribute:"formenctype"})],le.prototype,"formEnctype",2),c([d({attribute:"formmethod"})],le.prototype,"formMethod",2),c([d({attribute:"formnovalidate",type:Boolean})],le.prototype,"formNoValidate",2),c([d({attribute:"formtarget"})],le.prototype,"formTarget",2),c([d()],le.prototype,"href",2),c([d()],le.prototype,"target",2),c([d({attribute:"data-target"})],le.prototype,"dataTarget",2),c([d()],le.prototype,"rel",2),c([d()],le.prototype,"tooltip",2),c([d()],le.prototype,"label",2),c([d({type:Boolean,attribute:"auto-click"})],le.prototype,"autoClick",2),c([d({type:Number,attribute:"auto-click-delay"})],le.prototype,"autoClickDelay",2),c([d({type:String,attribute:"loading-text"})],le.prototype,"loadingText",2),c([d({type:String,attribute:"loading-text-position"})],le.prototype,"loadingTextPosition",2),c([d({type:Boolean})],le.prototype,"loading",2),c([K("autoClick")],le.prototype,"handleAutoClickChange",1);var $e=le;le.define("zn-button");var Oe=class{constructor(i,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,t!==null&&this.t.add(t??i),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),i.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(let i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){let i=this.u.takeRecords();(i.length||!this.o&&this.i)&&this.handleChanges(i),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var os=class extends k{constructor(){super();this._resizeFrame=null;new Oe(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var x5=os;os.define("zn-absolute-container");var wn=Math.min,Ji=Math.max,$l=Math.round,Al=Math.floor,zn=o=>({x:o,y:o}),w5={left:"right",right:"left",bottom:"top",top:"bottom"};function xu(o,i,t){return Ji(o,wn(i,t))}function fa(o,i){return typeof o=="function"?o(i):o}function xo(o){return o.split("-")[0]}function ga(o){return o.split("-")[1]}function wu(o){return o==="x"?"y":"x"}function Sd(o){return o==="y"?"height":"width"}function _n(o){let i=o[0];return i==="t"||i==="b"?"y":"x"}function Ed(o){return wu(_n(o))}function av(o,i,t){t===void 0&&(t=!1);let r=ga(o),n=Ed(o),a=Sd(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[a]>i.floating[a]&&(s=Tl(s)),[s,Tl(s)]}function sv(o){let i=Tl(o);return[Cd(o),i,Cd(i)]}function Cd(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var nv=["left","right"],ov=["right","left"],z5=["top","bottom"],_5=["bottom","top"];function k5(o,i,t){switch(o){case"top":case"bottom":return t?i?ov:nv:i?nv:ov;case"left":case"right":return i?z5:_5;default:return[]}}function lv(o,i,t,r){let n=ga(o),a=k5(xo(o),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),i&&(a=a.concat(a.map(Cd)))),a}function Tl(o){let i=xo(o);return w5[i]+o.slice(i.length)}function C5(o){var i,t,r,n;return{top:(i=o.top)!=null?i:0,right:(t=o.right)!=null?t:0,bottom:(r=o.bottom)!=null?r:0,left:(n=o.left)!=null?n:0}}function zu(o){return typeof o!="number"?C5(o):{top:o,right:o,bottom:o,left:o}}function ba(o){let{x:i,y:t,width:r,height:n}=o;return{width:r,height:n,top:t,left:i,right:i+r,bottom:t+n,x:i,y:t}}function cv(o,i,t){let{reference:r,floating:n}=o,a=_n(i),s=Ed(i),l=Sd(s),p=xo(i),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(p){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=ga(i);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function dv(o,i){var t;i===void 0&&(i={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:p}=o,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=fa(i,o),v=zu(g),S=l[b?f==="floating"?"reference":"floating":f],T=ba(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(S)))==null||t?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:p})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,U=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(U))&&await(a.getScale==null?void 0:a.getScale(U))||{x:1,y:1},C=ba(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:U,strategy:p}):N);return{top:(T.top-C.top+v.top)/I.y,bottom:(C.bottom-T.bottom+v.bottom)/I.y,left:(T.left-C.left+v.left)/I.x,right:(C.right-T.right+v.right)/I.x}}var S5=50,pv=async(o,i,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:dv},p=await(s.isRTL==null?void 0:s.isRTL(i)),h=await s.getElementRects({reference:o,floating:i,strategy:n}),{x:m,y:f}=cv(h,r,p),b=r,g=0,v={};for(let y=0;y<a.length;y++){let S=a[y];if(!S)continue;let{name:T,fn:N}=S,{x:U,y:I,data:C,reset:$}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:o,floating:i}});m=U??m,f=I??f,v[T]={...v[T],...C},$&&g<S5&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:o,floating:i,strategy:n}):$.rects),{x:m,y:f}=cv(h,b,p)),y=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},hv=o=>({name:"arrow",options:o,async fn(i){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:p}=i,{element:h,padding:m=0}=fa(o,i)||{};if(h==null)return{};let f=zu(m),b={x:t,y:r},g=Ed(n),v=Sd(g),y=await s.getDimensions(h),S=g==="y",T=S?"top":"left",N=S?"bottom":"right",U=S?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],C=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=$?$[U]:0;(!L||!await(s.isElement==null?void 0:s.isElement($)))&&(L=l.floating[U]||a.floating[v]);let W=I/2-C/2,oe=L/2-y[v]/2-1,xe=wn(f[T],oe),De=wn(f[N],oe),Ne=L-y[v]-De,rt=L/2-y[v]/2+W,er=xu(xe,rt,Ne),Pr=!p.arrow&&ga(n)!=null&&rt!==er&&a.reference[v]/2-(rt<xe?xe:De)-y[v]/2<0,wr=Pr?rt<xe?rt-xe:rt-Ne:0;return{[g]:b[g]+wr,data:{[g]:er,centerOffset:rt-er-wr,...Pr&&{alignmentOffset:wr}},reset:Pr}}});var uv=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(i){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:p,elements:h}=i,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...S}=fa(o,i);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let T=xo(n),N=_n(l),U=xo(l)===l,I=await(p.isRTL==null?void 0:p.isRTL(h.floating)),C=b||(U||!y?[Tl(l)]:sv(l)),$=v!=="none";!b&&$&&C.push(...lv(l,y,v,I));let L=[l,...C],W=await p.detectOverflow(i,S),oe=[],xe=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&oe.push(W[T]),f){let er=av(n,s,I);oe.push(W[er[0]],W[er[1]])}if(xe=[...xe,{placement:n,overflows:oe}],!oe.every(er=>er<=0)){var De,Ne;let er=(((De=a.flip)==null?void 0:De.index)||0)+1,Pr=L[er];if(Pr&&(!(f==="alignment"?N!==_n(Pr):!1)||xe.every(tr=>_n(tr.placement)===N?tr.overflows[0]>0:!0)))return{data:{index:er,overflows:xe},reset:{placement:Pr}};let wr=(Ne=xe.filter(Nt=>Nt.overflows[0]<=0).sort((Nt,tr)=>Nt.overflows[1]-tr.overflows[1])[0])==null?void 0:Ne.placement;if(!wr)switch(g){case"bestFit":{var rt;let Nt=(rt=xe.filter(tr=>{if($){let Mt=_n(tr.placement);return Mt===N||Mt==="y"}return!0}).map(tr=>[tr.placement,tr.overflows.filter(Mt=>Mt>0).reduce((Mt,uo)=>Mt+uo,0)]).sort((tr,Mt)=>tr[1]-Mt[1])[0])==null?void 0:rt[0];Nt&&(wr=Nt);break}case"initialPlacement":wr=l;break}if(n!==wr)return{reset:{placement:wr}}}return{}}}};var E5=new Set(["left","top"]);async function T5(o,i){let{placement:t,platform:r,elements:n}=o,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=xo(t),l=ga(t),p=_n(t)==="y",h=E5.has(s)?-1:1,m=a&&p?-1:1,f=fa(i,o),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),p?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var mv=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(i){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=i,p=await T5(i,o);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+p.x,y:a+p.y,data:{...p,placement:s}}}}},fv=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(i){let{x:t,y:r,placement:n,platform:a}=i,{mainAxis:s=!0,crossAxis:l=!1,limiter:p={fn:N=>{let{x:U,y:I}=N;return{x:U,y:I}}},...h}=fa(o,i),m={x:t,y:r},f=await a.detectOverflow(i,h),b=_n(n),g=wu(b),v=m[g],y=m[b],S=(N,U)=>xu(U+f[N==="y"?"top":"left"],U,U-f[N==="y"?"bottom":"right"]);s&&(v=S(g,v)),l&&(y=S(b,y));let T=p.fn({...i,[g]:v,[b]:y});return{...T,data:{x:T.x-t,y:T.y-r,enabled:{[g]:s,[b]:l}}}}}};var gv=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(i){let{placement:t,rects:r,platform:n,elements:a}=i,{apply:s=()=>{},...l}=fa(o,i),p=await n.detectOverflow(i,l),h=xo(t),m=ga(t),f=_n(t)==="y",{width:b,height:g}=r.floating,v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");let S=g-p.top-p.bottom,T=b-p.left-p.right,N=wn(g-p[v],S),U=wn(b-p[y],T),I=i.middlewareData.shift,C=!I,$=N,L=U;I!=null&&I.enabled.x&&(L=T),I!=null&&I.enabled.y&&($=S),C&&!m&&(f?L=b-2*Ji(p.left,p.right):$=g-2*Ji(p.top,p.bottom)),await s({...i,availableWidth:L,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Td(){return typeof window<"u"}function ya(o){return vv(o)?(o.nodeName||"").toLowerCase():"#document"}function Hr(o){var i;return(o==null||(i=o.ownerDocument)==null?void 0:i.defaultView)||window}function kn(o){var i;return(i=(vv(o)?o.ownerDocument:o.document)||window.document)==null?void 0:i.documentElement}function vv(o){return Td()?o instanceof Node||o instanceof Hr(o).Node:!1}function Zi(o){return Td()?o instanceof Element||o instanceof Hr(o).Element:!1}function jn(o){return Td()?o instanceof HTMLElement||o instanceof Hr(o).HTMLElement:!1}function bv(o){return!Td()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof Hr(o).ShadowRoot}function Ml(o){let{overflow:i,overflowX:t,overflowY:r,display:n}=en(o);return/auto|scroll|overlay|hidden|clip/.test(i+r+t)&&n!=="inline"&&n!=="contents"}function yv(o){return/^(table|td|th)$/.test(ya(o))}function Ll(o){try{if(o.matches(":popover-open"))return!0}catch{}try{return o.matches(":modal")}catch{return!1}}var $5=/transform|translate|scale|rotate|perspective|filter/,A5=/paint|layout|strict|content/,va=o=>!!o&&o!=="none",_u;function ss(o){let i=Zi(o)?en(o):o;return va(i.transform)||va(i.translate)||va(i.scale)||va(i.rotate)||va(i.perspective)||!$d()&&(va(i.backdropFilter)||va(i.filter))||$5.test(i.willChange||"")||A5.test(i.contain||"")}function xv(o){let i=wo(o);for(;jn(i)&&!ls(i);){if(ss(i))return i;if(Ll(i))return null;i=wo(i)}return null}function $d(){return _u==null&&(_u=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_u}function ls(o){return/^(html|body|#document)$/.test(ya(o))}function en(o){return Hr(o).getComputedStyle(o)}function ql(o){return Zi(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function wo(o){if(ya(o)==="html")return o;let i=o.assignedSlot||o.parentNode||bv(o)&&o.host||kn(o);return bv(i)?i.host:i}function wv(o){let i=wo(o);return ls(i)?(o.ownerDocument||o).body:jn(i)&&Ml(i)?i:wv(i)}function as(o,i,t){var r;i===void 0&&(i=[]),t===void 0&&(t=!0);let n=wv(o),a=n===((r=o.ownerDocument)==null?void 0:r.body),s=Hr(n);if(a){let l=Ad(s);return i.concat(s,s.visualViewport||[],Ml(n)?n:[],l&&t?as(l):[])}else return i.concat(n,as(n,[],t))}function Ad(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function kv(o){let i=en(o),t=parseFloat(i.width)||0,r=parseFloat(i.height)||0,n=jn(o),a=n?o.offsetWidth:t,s=n?o.offsetHeight:r,l=$l(t)!==a||$l(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function Cu(o){return Zi(o)?o:o.contextElement}function cs(o){let i=Cu(o);if(!jn(i))return zn(1);let t=i.getBoundingClientRect(),{width:r,height:n,$:a}=kv(i),s=(a?$l(t.width):t.width)/r,l=(a?$l(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var M5=zn(0);function Cv(o){let i=Hr(o);return!$d()||!i.visualViewport?M5:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function L5(o,i,t){return i===void 0&&(i=!1),!!t&&i&&t===Hr(o)}function xa(o,i,t,r){i===void 0&&(i=!1),t===void 0&&(t=!1);let n=o.getBoundingClientRect(),a=Cu(o),s=zn(1);i&&(r?Zi(r)&&(s=cs(r)):s=cs(o));let l=L5(a,t,r)?Cv(a):zn(0),p=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Hr(a),g=Zi(r)?Hr(r):r,v=b,y=Ad(v);for(;y&&g!==v;){let S=cs(y),T=y.getBoundingClientRect(),N=en(y),U=T.left+(y.clientLeft+parseFloat(N.paddingLeft))*S.x,I=T.top+(y.clientTop+parseFloat(N.paddingTop))*S.y;p*=S.x,h*=S.y,m*=S.x,f*=S.y,p+=U,h+=I,v=Hr(y),y=Ad(v)}}return ba({width:m,height:f,x:p,y:h})}function Md(o,i){let t=ql(o).scrollLeft;return i?i.left+t:xa(kn(o)).left+t}function Sv(o,i){let t=o.getBoundingClientRect(),r=t.left+i.scrollLeft-Md(o,t),n=t.top+i.scrollTop;return{x:r,y:n}}function q5(o){let{elements:i,rect:t,offsetParent:r,strategy:n}=o,a=n==="fixed",s=kn(r),l=i?Ll(i.floating):!1;if(r===s||l&&a)return t;let p={scrollLeft:0,scrollTop:0},h=zn(1),m=zn(0),f=jn(r);if((f||!a)&&((ya(r)!=="body"||Ml(s))&&(p=ql(r)),f)){let g=xa(r);h=cs(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Sv(s,p):zn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-p.scrollTop*h.y+m.y+b.y}}function I5(o){return o.getClientRects?Array.from(o.getClientRects()):[]}function D5(o){let i=ql(o),t=o.ownerDocument.body,r=Ji(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),n=Ji(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight),a=-i.scrollLeft+Md(o),s=-i.scrollTop;return en(t).direction==="rtl"&&(a+=Ji(o.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var R5=25;function N5(o,i,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Hr(o),a=kn(o),s=n.visualViewport,l=a.clientWidth,p=a.clientHeight,h=0,m=0;if(s){let b=!$d()||i==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,p=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(Md(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),y=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(a.clientWidth-g.clientWidth-y),T=getComputedStyle(a).scrollbarGutter==="stable both-edges"?S/2:S;T<=R5&&(l-=T)}return{width:l,height:p,x:h,y:m}}function O5(o,i){let t=xa(o,!0,i==="fixed"),r=t.top+o.clientTop,n=t.left+o.clientLeft,a=cs(o),s=o.clientWidth*a.x,l=o.clientHeight*a.y,p=n*a.x,h=r*a.y;return{width:s,height:l,x:p,y:h}}function zv(o,i,t){let r;if(i==="viewport"||i==="layoutViewport")r=N5(o,t,i);else if(i==="document")r=D5(kn(o));else if(Zi(i))r=O5(i,t);else{let n=Cv(o);r={x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}return ba(r)}function P5(o,i){let t=i.get(o);if(t)return t;let r=as(o,[],!1).filter(l=>Zi(l)&&ya(l)!=="body"),n=null,a=en(o).position==="fixed",s=a?wo(o):o;for(;Zi(s)&&!ls(s);){let l=en(s),p=ss(s),h=n?n.position:a?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=wo(s)}return i.set(o,r),r}function H5(o){let{element:i,boundary:t,rootBoundary:r,strategy:n}=o,s=[...t==="clippingAncestors"?Ll(i)?[]:P5(i,this._c):[].concat(t),r],l=zv(i,s[0],n),p=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=zv(i,s[b],n);p=Ji(g.top,p),h=wn(g.right,h),m=wn(g.bottom,m),f=Ji(g.left,f)}return{width:h-f,height:m-p,x:f,y:p}}function F5(o){let{width:i,height:t}=kv(o);return{width:i,height:t}}function B5(o,i,t){let r=jn(i),n=kn(i),a=t==="fixed",s=xa(o,!0,a,i),l={scrollLeft:0,scrollTop:0},p=zn(0);if((r||!a)&&((ya(i)!=="body"||Ml(n))&&(l=ql(i)),r)){let b=xa(i,!0,a,i);p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}!r&&n&&(p.x=Md(n));let h=n&&!r&&!a?Sv(n,l):zn(0),m=s.left+l.scrollLeft-p.x-h.x,f=s.top+l.scrollTop-p.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function ku(o){return en(o).position==="static"}function _v(o,i){if(!jn(o)||en(o).position==="fixed")return null;if(i)return i(o);let t=o.offsetParent;return kn(o)===t&&(t=t.ownerDocument.body),t}function Ev(o,i){let t=Hr(o);if(Ll(o))return t;if(!jn(o)){let n=wo(o);for(;n&&!ls(n);){if(Zi(n)&&!ku(n))return n;n=wo(n)}return t}let r=_v(o,i);for(;r&&yv(r)&&ku(r);)r=_v(r,i);return r&&ls(r)&&ku(r)&&!ss(r)?t:r||xv(o)||t}var V5=async function(o){let i=this.getOffsetParent||Ev,t=this.getDimensions,r=await t(o.floating);return{reference:B5(o.reference,await i(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function U5(o){return en(o).direction==="rtl"}var Il={convertOffsetParentRelativeRectToViewportRelativeRect:q5,getDocumentElement:kn,getClippingRect:H5,getOffsetParent:Ev,getElementRects:V5,getClientRects:I5,getDimensions:F5,getScale:cs,isElement:Zi,isRTL:U5};function Tv(o,i){return o.x===i.x&&o.y===i.y&&o.width===i.width&&o.height===i.height}function j5(o,i,t){let r=null,n,a=kn(o);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=o.getBoundingClientRect(),{left:g,top:v,width:y,height:S}=b;if(m||i(),!y||!S)return;let T=Al(v),N=Al(a.clientWidth-(g+y)),U=Al(a.clientHeight-(v+S)),I=Al(g),$={rootMargin:-T+"px "+-N+"px "+-U+"px "+-I+"px",threshold:Ji(0,wn(1,f))||1},L=!0;function W(oe){let xe=oe[0].intersectionRatio;if(!Tv(b,o.getBoundingClientRect()))return l();if(xe!==f){if(!L)return l();xe?l(!1,xe):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(o)}let p=Hr(o),h=()=>l(t);return p.addEventListener("resize",h),l(!0),()=>{p.removeEventListener("resize",h),s()}}function Ld(o,i,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,h=Cu(o),m=n||a?[...h?as(h):[],...i?as(i):[]]:[];m.forEach(T=>{n&&T.addEventListener("scroll",t),a&&T.addEventListener("resize",t)});let f=h&&l?j5(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&g&&i&&(g.unobserve(i),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var U;(U=g)==null||U.observe(i)})),t()}),h&&!p&&g.observe(h),i&&g.observe(i));let v,y=p?xa(o):null;p&&S();function S(){let T=xa(o);y&&!Tv(y,T)&&t(),y=T,v=requestAnimationFrame(S)}return t(),()=>{var T;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),(T=g)==null||T.disconnect(),g=null,p&&cancelAnimationFrame(v)}}var qd=mv;var Id=fv,Dd=uv,Dl=gv;var $v=hv;var Rd=(o,i,t)=>{let r=new Map,n=t??{},a={...Il,...n.platform,_c:r};return pv(o,i,{...n,platform:a})};function Av(o){return G5(o)}function Su(o){return o.assignedSlot?o.assignedSlot:o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}function G5(o){for(let i=o;i;i=Su(i))if(i instanceof Element&&getComputedStyle(i).display==="none")return null;for(let i=Su(o);i;i=Su(i)){if(!(i instanceof Element))continue;let t=getComputedStyle(i);if(t.display!=="contents"&&(t.position!=="static"||ss(t)||i.tagName==="BODY"))return i}return null}var Mv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function W5(o){return o!==null&&typeof o=="object"&&"getBoundingClientRect"in o&&("contextElement"in o?o instanceof Element:!0)}var Re=class extends k{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,p,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,p=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,p=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,p=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,p=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${p}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||W5(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup?.(),this.cleanup=Ld(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[qd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Dl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Dd({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Id({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Dl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push($v({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>Il.getOffsetParent(n,Av):Il.getOffsetParent;Rd(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...Il,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let p={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.matches(":popover-open")||this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[p]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
140
140
|
<slot class="anchor" name="anchor" @slotchange="${this.handleAnchorChange}"></slot>
|
|
141
141
|
|
|
142
142
|
<span
|
|
@@ -192,12 +192,12 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
192
192
|
<div class="actions">
|
|
193
193
|
<slot name="actions"></slot>
|
|
194
194
|
</div>
|
|
195
|
-
</div>`}hideAlert(){this.style.display="none"}};Qr.styles=z(qv),c([d({type:String})],Qr.prototype,"icon",2),c([d({type:String})],Qr.prototype,"caption",2),c([d({type:Boolean})],Qr.prototype,"collapse",2),c([d({type:String,reflect:!0})],Qr.prototype,"appearance",2),c([d({type:String})],Qr.prototype,"level",2),c([d({type:Boolean,reflect:!0})],Qr.prototype,"center",2),c([d({type:String})],Qr.prototype,"size",2);var Eu=Qr;Qr.define("zn-alert");var Iv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.button-group{display:flex;justify-content:flex-end;flex-wrap:wrap}.button-group--start{justify-content:flex-start}.button-group--grow{width:100%;gap:0}.button-group--gap{gap:var(--zn-spacing-x-small)}::slotted([data-zn-button-group__dropdown]){display:inline-flex !important}:host([direction=vertical]),zn-button-group[direction=vertical]{width:100%}:host([direction=vertical]) .button-group,zn-button-group[direction=vertical] .button-group{flex-direction:column;justify-content:flex-start;gap:10px}:host([direction=vertical]) ::slotted(*),zn-button-group[direction=vertical] ::slotted(*){width:100%}`;var
|
|
195
|
+
</div>`}hideAlert(){this.style.display="none"}};Qr.styles=z(qv),c([d({type:String})],Qr.prototype,"icon",2),c([d({type:String})],Qr.prototype,"caption",2),c([d({type:Boolean})],Qr.prototype,"collapse",2),c([d({type:String,reflect:!0})],Qr.prototype,"appearance",2),c([d({type:String})],Qr.prototype,"level",2),c([d({type:Boolean,reflect:!0})],Qr.prototype,"center",2),c([d({type:String})],Qr.prototype,"size",2);var Eu=Qr;Qr.define("zn-alert");var Iv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.button-group{display:flex;justify-content:flex-end;flex-wrap:wrap}.button-group--start{justify-content:flex-start}.button-group--grow{width:100%;gap:0}.button-group--gap{gap:var(--zn-spacing-x-small)}::slotted([data-zn-button-group__dropdown]){display:inline-flex !important}:host([direction=vertical]),zn-button-group[direction=vertical]{width:100%}:host([direction=vertical]) .button-group,zn-button-group[direction=vertical] .button-group{flex-direction:column;justify-content:flex-start;gap:10px}:host([direction=vertical]) ::slotted(*),zn-button-group[direction=vertical] ::slotted(*){width:100%}`;var bi=class extends k{constructor(){super(...arguments);this.direction="horizontal";this.grow=!1;this.wrap=!1;this.start=!1;this.gap=!1}handleSlotChange(){if(this.direction==="vertical")return;let t=[...this.defaultSlot.assignedElements({flatten:!0})],r=[];for(let n of t)if(n.tagName==="ZN-BUTTON")r.push({button:n});else if(n.tagName==="ZN-DROPDOWN"){let a=n.querySelector("zn-button");a&&r.push({button:a,wrapper:n})}r.forEach(({button:n,wrapper:a},s)=>{n.toggleAttribute("data-zn-button-group__button--grow",this.grow),this.gap||(n.toggleAttribute("data-zn-button-group__button",!0),n.toggleAttribute("data-zn-button-group__button--first",s===0),n.toggleAttribute("data-zn-button-group__button--inner",s>0&&s<r.length-1),n.toggleAttribute("data-zn-button-group__button--last",s===r.length-1)),a&&a.toggleAttribute("data-zn-button-group__dropdown",!0)})}render(){return u`
|
|
196
196
|
<div part="base"
|
|
197
197
|
class="${M({"button-group":!0,"button-group--grow":this.grow,"button-group--start":this.start,"button-group--gap":this.gap})}"
|
|
198
198
|
role="group">
|
|
199
199
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
200
|
-
</div>`}};
|
|
200
|
+
</div>`}};bi.styles=z(Iv),c([d({})],bi.prototype,"direction",2),c([d({type:Boolean})],bi.prototype,"grow",2),c([d({type:Boolean})],bi.prototype,"wrap",2),c([d({type:Boolean})],bi.prototype,"start",2),c([d({type:Boolean})],bi.prototype,"gap",2),c([F("slot")],bi.prototype,"defaultSlot",2);var Nl=bi;bi.define("zn-button-group");function K5(o){return new DOMParser().parseFromString(o,"text/html").body}function Y5(o){o.querySelectorAll("script").forEach(i=>{i.remove()})}function Q5(o,i){return["src","href","xlink:href"].includes(o)&&(i.includes("javascript:")||i.includes("data:text/html"))?!0:o.startsWith("on")}function X5(o){let i=o.attributes;for(let t=i.length-1;t>=0;t--)Q5(i[t].name,i[t].value)&&o.removeAttributeNode(i[t])}function Dv(o){let i=o.children;for(let t=i.length-1;t>=0;t--){let r=i[t];X5(r),Dv(r)}}function Rv(o){let i=K5(o);return Y5(i),Dv(i),i.innerHTML}var Nv=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0));--message-bubble-agent:rgba(4,114,225,0.1);--message-bubble-customer:rgba(48,170,61,0.1);--message-bubble-internal:rgba(255,203,0,0.1)}.message{display:flex;gap:var(--zn-spacing-small);align-items:flex-start}.message__avatar{flex:0 0 36px;display:flex;justify-content:center}.message__body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--zn-spacing-x-small)}.message__header{display:flex;align-items:center;gap:var(--zn-spacing-x-small);min-height:36px}.message__sender{font-family:var(--zn-font-sans);font-size:var(--zn-text-h1-font-size);font-weight:var(--zn-text-h1-font-weight);line-height:var(--zn-text-h1-line-height);color:var(--zn-text-h1-color);text-transform:var(--zn-text-h1-transform);letter-spacing:var(--zn-text-h1-letter-spacing,normal)}.message__time{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform);letter-spacing:var(--zn-text-subheading-small-letter-spacing,normal)}.message__bubble{box-sizing:border-box;display:flex;align-items:flex-start;gap:var(--zn-spacing-small);padding:11px var(--zn-spacing-small);border-radius:var(--zn-border-radius);background:var(--message-bubble-agent);min-height:46px}.message__bubble--sending{border:1px dashed rgb(var(--zn-border-color));opacity:0.7;flex-direction:column}.message__main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--zn-spacing-small)}.message__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small)}.message__attachments--visible{display:flex}.message__attachments ::slotted(zn-chat-message-attachment){min-width:0}.message__content{font-family:var(--zn-font-sans);font-size:var(--zn-text-chat-font-size);font-weight:var(--zn-text-chat-font-weight);line-height:var(--zn-text-chat-line-height);color:var(--zn-text-chat-color);text-transform:var(--zn-text-chat-transform);letter-spacing:var(--zn-text-chat-letter-spacing,normal);flex:1 1 auto;min-width:0;overflow-wrap:anywhere}.message__content ::slotted(*){font-family:var(--zn-font-sans);font-size:var(--zn-text-chat-font-size);font-weight:var(--zn-text-chat-font-weight);line-height:var(--zn-text-chat-line-height);color:var(--zn-text-chat-color);text-transform:var(--zn-text-chat-transform);letter-spacing:var(--zn-text-chat-letter-spacing,normal)}.message__content p{margin:0;padding:0}.message__content pre{background-color:#23241f;border-radius:3px;margin-block:5px;padding:5px 10px;color:#f8f8f2;overflow:auto}.message__content blockquote{border-left:4px solid rgb(var(--zn-border-color));margin:5px 0;padding-left:16px}.message__content ol,.message__content ul{padding:0;margin:0}.message__content li{list-style-type:none;padding-left:1em;position:relative}.message__content ol{counter-reset:list-0 0}.message__content ol>li{counter-increment:list-0 1}.message__content ul>li::before{content:"•"}.message__content ol>li::before{content:counter(list-0) ". "}.message__content ol li::before,.message__content ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}.message__content img{max-width:100%}.message__content a{color:rgb(var(--zn-color-info))}.message__meta{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform);letter-spacing:var(--zn-text-subheading-small-letter-spacing,normal)}.message__actions{flex-shrink:0;display:flex;align-items:center;height:24px}:host([agent-initiated]) .message__bubble{background:var(--message-background,var(--message-bubble-agent))}:host([customer-initiated]) .message__bubble{background:var(--message-background,var(--message-bubble-customer))}:host([action-type=internal]) .message__bubble{background:var(--message-background,var(--message-bubble-internal))}:host([action-type=error]) .message__bubble{background:var(--message-background,rgba(var(--zn-color-error),0.12))}:host(.message-continued) .message{margin-top:3px}:host(.message-continued) .message__avatar{visibility:hidden}:host(.message-continued) .message__header{display:none}.message--system{margin-top:var(--zn-spacing-x-small)}.system-card{box-sizing:border-box;display:flex;align-items:center;gap:var(--zn-spacing-x-small);padding:6px 12px;border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color));font-size:12px;color:rgb(var(--zn-text-color));min-height:46px}.system-card__text{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal)}.system-card__time{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-small-font-size);font-weight:var(--zn-text-subheading-small-font-weight);line-height:var(--zn-text-subheading-small-line-height);color:var(--zn-text-subheading-small-color);text-transform:var(--zn-text-subheading-small-transform);letter-spacing:var(--zn-text-subheading-small-letter-spacing,normal);white-space:nowrap}`;var ir=class ir extends k{constructor(){super(...arguments);this.sender="";this.message="";this.time="";this.avatar="";this.actionType="";this.customerInitiated=!1;this.agentInitiated=!1;this.hideSender=!1;this.hasAttachments=!1}connectedCallback(){let t=!this.actionType||this.actionType==="internal",r=t&&this.agentInitiated,n=t&&this.customerInitiated,a=this.previousElementSibling,s=parseInt(this.time)-parseInt(a?.time),l=a?.getAttribute("action-type")??"",p=ir.SYSTEM_ACTION_TYPES.includes(l),h=l==="internal",m=this.actionType==="internal";a&&!p&&s<60&&h===m&&(a?.hasAttribute("agent-initiated")&&r||a?.hasAttribute("customer-initiated")&&n)&&this.classList.add("message-continued"),super.connectedCallback()}render(){if(!ir.DISPLAYED_ACTION_TYPES.includes(this.actionType))return B;if(this.isSystemMessage())return this.renderSystemCard();let t=this.actionType==="message-sending";return u`
|
|
201
201
|
<div part="base" class="message">
|
|
202
202
|
<div part="avatar" class="message__avatar">
|
|
203
203
|
<zn-icon library="avatar" src="${this.avatar||this.sender}" size="36" round></zn-icon>
|
|
@@ -241,7 +241,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
241
241
|
<zn-chip type="info">Internal Note</zn-chip>`:B}
|
|
242
242
|
<slot name="badge"></slot>
|
|
243
243
|
</div>`}renderContent(){if(!this.message)return u`
|
|
244
|
-
<slot></slot>`;let t=Rv(this.message);return t=t.replace(/\r\n|\r|\n/g,"<br>"),t=t.replace(/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/g,'<a href="$1" target="_blank">$1</a>'),St(t)}getTime(){return new Date(parseInt(this.time,10)*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}getSentTime(){let t=new Date(parseInt(this.time,10)*1e3),r=t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return t.getDate()!==new Date().getDate()?`${t.toLocaleDateString()} ${r}`:r}};ir.styles=z(Nv),ir.dependencies={"zn-icon":ne},ir.SYSTEM_ACTION_TYPES=["connected.agent","attachment.added","transfer","ended","customer.ended","customer.connected","customer.disconnected"],ir.DISPLAYED_ACTION_TYPES=["","connected.agent","attachment.added","multi.answer","transfer","ended","error","customer.ended","message-sending","customer.connected","customer.disconnected","internal"],c([d()],ir.prototype,"sender",2),c([d()],ir.prototype,"message",2),c([d()],ir.prototype,"time",2),c([d()],ir.prototype,"avatar",2),c([d({attribute:"action-type",reflect:!0})],ir.prototype,"actionType",2),c([d({type:Boolean,reflect:!0,attribute:"customer-initiated"})],ir.prototype,"customerInitiated",2),c([d({type:Boolean,reflect:!0,attribute:"agent-initiated"})],ir.prototype,"agentInitiated",2),c([d({type:Boolean,reflect:!0,attribute:"hide-sender"})],ir.prototype,"hideSender",2),c([R()],ir.prototype,"hasAttachments",2);var ds=ir;var J5=ds;ds.define("zn-chat-message");var Ov=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-flex;min-width:0}.attachment{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:rgb(var(--zn-text));text-decoration:none;min-width:0}.attachment__icon{flex:0 0 auto}.attachment__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment:hover .attachment__label{text-decoration:underline}`;var
|
|
244
|
+
<slot></slot>`;let t=Rv(this.message);return t=t.replace(/\r\n|\r|\n/g,"<br>"),t=t.replace(/\b(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+)(?=\s|$)(?!["<>])/g,'<a href="$1" target="_blank">$1</a>'),St(t)}getTime(){return new Date(parseInt(this.time,10)*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}getSentTime(){let t=new Date(parseInt(this.time,10)*1e3),r=t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return t.getDate()!==new Date().getDate()?`${t.toLocaleDateString()} ${r}`:r}};ir.styles=z(Nv),ir.dependencies={"zn-icon":ne},ir.SYSTEM_ACTION_TYPES=["connected.agent","attachment.added","transfer","ended","customer.ended","customer.connected","customer.disconnected"],ir.DISPLAYED_ACTION_TYPES=["","connected.agent","attachment.added","multi.answer","transfer","ended","error","customer.ended","message-sending","customer.connected","customer.disconnected","internal"],c([d()],ir.prototype,"sender",2),c([d()],ir.prototype,"message",2),c([d()],ir.prototype,"time",2),c([d()],ir.prototype,"avatar",2),c([d({attribute:"action-type",reflect:!0})],ir.prototype,"actionType",2),c([d({type:Boolean,reflect:!0,attribute:"customer-initiated"})],ir.prototype,"customerInitiated",2),c([d({type:Boolean,reflect:!0,attribute:"agent-initiated"})],ir.prototype,"agentInitiated",2),c([d({type:Boolean,reflect:!0,attribute:"hide-sender"})],ir.prototype,"hideSender",2),c([R()],ir.prototype,"hasAttachments",2);var ds=ir;var J5=ds;ds.define("zn-chat-message");var Ov=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-flex;min-width:0}.attachment{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:rgb(var(--zn-text));text-decoration:none;min-width:0}.attachment__icon{flex:0 0 auto}.attachment__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment:hover .attachment__label{text-decoration:underline}`;var vi=class extends k{constructor(){super(...arguments);this.href="";this.name="";this.icon="paperclip@lu";this.target="_blank";this.download=!1}connectedCallback(){super.connectedCallback(),this.closest("zn-chat-message, zn-content-block")?this.slot||(this.slot="attachments"):console.warn("<zn-chat-message-attachment> can only be used inside a <zn-chat-message> or <zn-content-block>.",this)}render(){let t=this.target==="_blank";return u`
|
|
245
245
|
<a
|
|
246
246
|
part="base"
|
|
247
247
|
class="attachment"
|
|
@@ -254,7 +254,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
254
254
|
<zn-icon part="icon" class="paperclip@lu" src=${this.icon} size="20"></zn-icon>`:B}
|
|
255
255
|
<span part="label" class="attachment__label"><slot>${this.name}</slot></span>
|
|
256
256
|
</a>
|
|
257
|
-
`}};
|
|
257
|
+
`}};vi.styles=z(Ov),vi.dependencies={"zn-icon":ne},c([d()],vi.prototype,"href",2),c([d()],vi.prototype,"name",2),c([d()],vi.prototype,"icon",2),c([d({reflect:!0})],vi.prototype,"target",2),c([d({type:Boolean})],vi.prototype,"download",2);var Z5=vi;vi.define("zn-chat-message-attachment");var Pv=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;vertical-align:middle}.chip{display:inline-flex;font-size:var(--zn-text-chip-font-size);font-family:var(--zn-font-family-sans);font-weight:var(--zn-text-chip-font-weight);border-radius:var(--zn-border-radius-x-large);padding-inline:var(--zn-spacing-x-small);padding-block:0;height:var(--zn-spacing-medium);text-align:center;gap:var(--zn-spacing-x-small);width:-moz-fit-content;width:fit-content;justify-content:center;align-items:center;line-height:var(--zn-text-chip-line-height);letter-spacing:var(--zn-letter-spacing-loose);white-space:nowrap}.chip--flush{padding:0;height:auto}.chip--flush-x{padding-inline:0}.chip--flush-y{padding-block:0;height:auto}.chip--primary{color:rgba(var(--zn-primary),0.9);background:rgba(var(--zn-primary),0.1)}.chip--error{color:rgb(var(--zn-color-error));background:rgba(var(--zn-color-error),0.1)}.chip--info{color:rgb(var(--zn-color-info));background:rgba(var(--zn-color-info),0.1)}.chip--warning{color:rgb(var(--zn-color-warning));background:rgba(var(--zn-color-warning),0.1)}.chip--success{color:rgb(var(--zn-color-success));background:rgba(var(--zn-color-success),0.1)}.chip--neutral{color:rgb(var(--zn-text));background:rgba(var(--zn-border-color),0.1)}.chip--transparent{color:rgb(var(--zn-text));background:transparent}.chip--custom{color:rgb(var(--zn-text));background-color:hsl(from var(--chip-color-override,inherit) h s l/0.1)}.chip__value{overflow:hidden;text-overflow:ellipsis;text-transform:var(--zn-text-chip-transform)}.chip__caption{opacity:0.7;font-weight:var(--zn-text-chip-font-weight);text-transform:var(--zn-text-chip-transform)}.chip__caption::after{content:":"}.chip--no-content{padding:var(--zn-spacing-3x-small) var(--zn-spacing-2x-small)}.chip--with-icon{padding-left:var(--zn-spacing-2x-small)}`;var Xr=class extends k{constructor(){super(...arguments);this.icon="";this.caption="";this.iconSize=18;this.type="neutral";this.flush=!1;this.flushX=!1;this.flushY=!1;this.hasSlotController=new Y(this,"[default]","action")}render(){let t=this.hasSlotController.test("[default]");return u`
|
|
258
258
|
<div class="${M({chip:!0,"chip--with-content":t,"chip--no-content":!t,"chip--with-icon":this.icon,"chip--flush":this.flush,"chip--flush-x":this.flushX,"chip--flush-y":this.flushY,"chip--info":this.type==="info","chip--success":this.type==="success","chip--warning":this.type==="warning","chip--error":this.type==="error","chip--primary":this.type==="primary","chip--transparent":this.type==="transparent","chip--custom":this.type==="custom","chip--neutral":this.type==="neutral"})}">
|
|
259
259
|
${this.icon?u`
|
|
260
260
|
<zn-icon src="${this.icon}" size="${this.iconSize}"></zn-icon>`:""}
|
|
@@ -501,7 +501,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
501
501
|
@click=${this.handleClearClick}
|
|
502
502
|
tabindex="-1">
|
|
503
503
|
<slot name="clear-icon">
|
|
504
|
-
<zn-icon src="
|
|
504
|
+
<zn-icon src="circle-x@lu" size="20"></zn-icon>
|
|
505
505
|
</slot>
|
|
506
506
|
</button>`:""}
|
|
507
507
|
|
|
@@ -561,7 +561,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
561
561
|
<slot name="help-text">${this.helpText}</slot>
|
|
562
562
|
</div>
|
|
563
563
|
|
|
564
|
-
</div>`}};ee.styles=[z(Se),z(a0)],ee.dependencies={"zn-icon":ne,"zn-slash-item":Bl,"zn-slash-menu":ka,"zn-tooltip":
|
|
564
|
+
</div>`}};ee.styles=[z(Se),z(a0)],ee.dependencies={"zn-icon":ne,"zn-slash-item":Bl,"zn-slash-menu":ka,"zn-tooltip":gi},c([F(".input__control")],ee.prototype,"input",2),c([F(".input__color-picker")],ee.prototype,"colorPicker",2),c([F("zn-slash-menu")],ee.prototype,"slashMenuElement",2),c([R()],ee.prototype,"hasFocus",2),c([R()],ee.prototype,"hasSlashMenu",2),c([R()],ee.prototype,"isUserTyping",2),c([d()],ee.prototype,"title",2),c([d({reflect:!0})],ee.prototype,"type",2),c([d()],ee.prototype,"name",2),c([d()],ee.prototype,"value",2),c([Ce()],ee.prototype,"defaultValue",2),c([d({reflect:!0})],ee.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"pill",2),c([d()],ee.prototype,"label",2),c([d({attribute:"label-tooltip"})],ee.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],ee.prototype,"contextNote",2),c([d({attribute:"help-text"})],ee.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"clearable",2),c([d({attribute:"optional-icon",type:Boolean})],ee.prototype,"optionalIcon",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"filled",2),c([d()],ee.prototype,"placeholder",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"readonly",2),c([d({attribute:"password-toggle",type:Boolean})],ee.prototype,"passwordToggle",2),c([d({attribute:"password-visible",type:Boolean})],ee.prototype,"passwordVisible",2),c([d({attribute:"no-spin-buttons",type:Boolean})],ee.prototype,"noSpinButtons",2),c([d({attribute:"color-format"})],ee.prototype,"colorFormat",2),c([d({attribute:"value-suffix"})],ee.prototype,"valueSuffix",2),c([d({reflect:!0})],ee.prototype,"form",2),c([d({type:Boolean,reflect:!0})],ee.prototype,"required",2),c([d()],ee.prototype,"pattern",2),c([d({type:Number})],ee.prototype,"minlength",2),c([d({type:Number})],ee.prototype,"maxlength",2),c([d()],ee.prototype,"min",2),c([d()],ee.prototype,"max",2),c([d()],ee.prototype,"step",2),c([d()],ee.prototype,"autocapitalize",2),c([d()],ee.prototype,"autocorrect",2),c([d()],ee.prototype,"autocomplete",2),c([d({type:Boolean})],ee.prototype,"autofocus",2),c([d()],ee.prototype,"enterkeyhint",2),c([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],ee.prototype,"spellcheck",2),c([d()],ee.prototype,"inputmode",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],ee.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],ee.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],ee.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],ee.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],ee.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],ee.prototype,"slashRecentKey",2),c([d({attribute:!1})],ee.prototype,"slashItemsProvider",2),c([d({type:Boolean,attribute:"trigger-submit"})],ee.prototype,"triggerSubmit",2),c([K("disabled",{waitUntilFirstUpdate:!0})],ee.prototype,"handleDisabledChange",1),c([K("step",{waitUntilFirstUpdate:!0})],ee.prototype,"handleStepChange",1),c([K("value",{waitUntilFirstUpdate:!0})],ee.prototype,"handleValueChange",1),c([K("colorFormat",{waitUntilFirstUpdate:!0})],ee.prototype,"handleColorFormatChange",1);var nt=ee;ee.define("zn-input");var s0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;-moz-user-select:none;user-select:none;-webkit-user-select:none}:host([hidden]){display:none !important}:host(:focus){outline:none}.option{position:relative;display:flex;align-items:center;font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);line-height:var(--zn-line-height-normal);letter-spacing:var(--zn-letter-spacing-normal);color:var(--zn-input-color);padding:var(--zn-spacing-x-small) var(--zn-spacing-small);transition:var(--zn-transition-fast) fill;cursor:pointer}.option--selected{background-color:var(--zn-color-primary-200)}.option--hover:not(.option--disabled),.option--current,.option--current.option--disabled{background-color:var(--zn-color-primary-100);color:var(--zn-input-color);opacity:1}.option--disabled{outline:none;opacity:0.5;cursor:not-allowed}.option__label{flex:1 1 auto;display:inline-block;font-size:var(--zn-font-size-small);line-height:var(--ts-leading-5)}.option .option__check{flex:0 0 auto;display:flex;align-items:center;justify-content:center;visibility:hidden;padding-inline-start:0.375rem;padding-inline-end:0.375rem}.option--selected .option__check{visibility:visible}.option__prefix,.option__suffix{flex:0 0 auto;display:flex;align-items:center}.option__prefix::slotted(*){margin-inline-end:var(--zn-spacing-small);font-size:var(--zn-font-size-large)}.option__suffix::slotted(*){margin-inline-start:var(--zn-spacing-small)}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .option{outline:dashed 1px SelectedItem;outline-offset:-1px}}`;var Cr=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.multiple=!1;this.current=!1;this.hasHover=!1;this.value="";this.disabled=!1;this.selected=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}getTextLabel(){let t=this.childNodes,r="";return[...t].forEach(n=>{n.nodeType===Node.ELEMENT_NODE&&(n.hasAttribute("slot")||(r+=n.textContent)),n.nodeType===Node.TEXT_NODE&&(r+=n.textContent)}),r.trim()}render(){return u`
|
|
565
565
|
<div
|
|
566
566
|
part="base"
|
|
567
567
|
class=${M({option:!0,"option--current":this.current,"option--disabled":this.disabled,"option--selected":this.selected,"option--hover":this.hasHover,"option--singular":!this.multiple})}
|
|
@@ -577,7 +577,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
577
577
|
aria-hidden="true"
|
|
578
578
|
></zn-icon>
|
|
579
579
|
</div>
|
|
580
|
-
`}};Cr.styles=z(s0),Cr.dependencies={"zn-icon":ne},c([F(".option__label")],Cr.prototype,"defaultSlot",2),c([R()],Cr.prototype,"current",2),c([R()],Cr.prototype,"hasHover",2),c([d({reflect:!0})],Cr.prototype,"value",2),c([d({type:Boolean,reflect:!0})],Cr.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],Cr.prototype,"selected",2),c([K("disabled")],Cr.prototype,"handleDisabledChange",1),c([K("selected")],Cr.prototype,"handleSelectedChange",1);var ot=Cr;Cr.define("zn-option");function
|
|
580
|
+
`}};Cr.styles=z(s0),Cr.dependencies={"zn-icon":ne},c([F(".option__label")],Cr.prototype,"defaultSlot",2),c([R()],Cr.prototype,"current",2),c([R()],Cr.prototype,"hasHover",2),c([d({reflect:!0})],Cr.prototype,"value",2),c([d({type:Boolean,reflect:!0})],Cr.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],Cr.prototype,"selected",2),c([K("disabled")],Cr.prototype,"handleDisabledChange",1),c([K("selected")],Cr.prototype,"handleSelectedChange",1);var ot=Cr;Cr.define("zn-option");function yi(o,i,t){return new Promise(r=>{if(t?.duration===1/0)throw new Error("Promise-based animations must be finite.");let n=o.animate(i,{...t,duration:Hu()?0:t.duration});n.addEventListener("cancel",r,{once:!0}),n.addEventListener("finish",r,{once:!0})})}function Hu(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Fu(o){return Promise.all(o.getAnimations().map(i=>new Promise(t=>{i.cancel(),requestAnimationFrame(t)})))}var us=class{constructor(i){this.conditionals=[];this.initiallyDisabled=!1;this.handleChange=()=>this.checkConditionals();(this.host=i).addController(this)}setup(){if(this.host.conditional==="")return;let i=this.host.conditional.split(",").map(t=>t.trim());i.forEach(t=>{let r=Ge(cr(t),document.documentElement,""),n=Ge(`[name="${t}"]`,document.documentElement,""),a=new Set;[...r,...n].forEach(s=>{a.has(s)||(a.add(s),this.conditionals.push(s))})}),this.initiallyDisabled=this.host.disabled,i.length!==0&&(this.conditionals.forEach(t=>{t.addEventListener("zn-change",this.handleChange),t.addEventListener("zn-input",this.handleChange)}),this.checkConditionals())}hostConnected(){}hostDisconnected(){this.conditionals.forEach(i=>{i.removeEventListener("zn-change",this.handleChange)}),this.conditionals=[]}check(){this.checkConditionals()}checkConditionals(){let i=this.conditionals.some(t=>{let r=Array.isArray(t.value)?t.value:[t.value];return r=r.filter(n=>n!==""&&n!=="0"),r.length>0});this.host.disabled=this.initiallyDisabled||i}};var c0=new Map,h4=new WeakMap;function u4(o){return o??{keyframes:[],options:{duration:0}}}function l0(o,i){return i.toLowerCase()==="rtl"?{keyframes:o.rtlKeyframes||o.keyframes,options:o.options}:o}function Cn(o,i){c0.set(o,u4(i))}function Sn(o,i,t){let r=h4.get(o);if(r?.[i])return l0(r[i],t.dir);let n=c0.get(i);return n?l0(n,t.dir):{keyframes:[],options:{duration:0}}}var d0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}:host([hidden]){display:none !important}:host(:not(:first-child)){border-block-start:solid var(--zn-panel-border-width) var(--zn-panel-border-color);margin-block-start:var(--zn-spacing-2x-small)}.opt-group__label{font-family:var(--zn-font-sans);font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold);line-height:var(--zn-line-height-normal);letter-spacing:var(--zn-letter-spacing-loose);text-transform:uppercase;color:var(--zn-color-neutral-600);padding-block:var(--zn-spacing-x-small) var(--zn-spacing-2x-small);padding-inline:var(--zn-spacing-small);-moz-user-select:none;user-select:none;-webkit-user-select:none}.opt-group__options{display:block}:host([disabled]) .opt-group__label{opacity:0.5}`;var rn=class extends k{constructor(){super(...arguments);this.label="";this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this.setAttribute("aria-label",this.label)}handleLabelChange(){this.setAttribute("aria-label",this.label)}handleDisabledChange(){this.propagateDisabled()}updateVisibility(){let t=[...this.querySelectorAll("zn-option")];this.hidden=t.length>0&&t.every(r=>r.hidden)}render(){return u`
|
|
581
581
|
<div part="base" class="opt-group">
|
|
582
582
|
${this.label?u`<div part="label" class="opt-group__label" aria-hidden="true">${this.label}</div>`:B}
|
|
583
583
|
<div class="opt-group__options" role="none">
|
|
@@ -606,7 +606,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
606
606
|
${typeof n=="string"?St(n):n}
|
|
607
607
|
</div>`}else if(r===this.maxOptionsVisible)return u`
|
|
608
608
|
<zn-chip>+${this.selectedOptions.length-r}</zn-chip>`;return u``})}_renderSelectedRemoteItems(){if(!this._isRemoteSearch||!this.multiple||this._selectedRemoteItems.length===0)return B;let t=new Set;for(let r of this._fetchedOptions)if(r.group!==void 0)for(let n of r.options)t.add(n.key);else t.add(r.key);return this._selectedRemoteItems.filter(r=>!t.has(r.key)).map(r=>u`
|
|
609
|
-
<zn-option value=${r.key} hidden>${r.value}</zn-option>`)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}firstUpdated(t){if(super.firstUpdated(t),this.distinct!==""){let r=document.querySelector(`zn-select[id="${this.distinct}"]`);r&&(r.addEventListener("zn-change",()=>{let n=Array.isArray(r.value)?r.value:[r.value];this.getAllOptions().map(s=>s).forEach(s=>{n.includes(s.value)?s.style.display="none":s.style.display=""})}),r.dispatchEvent(new Event("zn-input")))}this.conditionalController.setup(),this.dataUri&&!this.searchOnly&&this.fetchOptions().then(),this.updateHasInputPrefix(),this.updateDependencies()}handleDisabledChange(){this.disabled?(this.open=!1,this.handleOpenChange().then(),this._fetchAbortController?.abort(),this._fetchAbortController=null,this._fetchLoading=!1,this._fetchError=""):this.dataUri&&!this.searchOnly&&this.fetchOptions().then()}handleSrcChange(){this.dataUri&&!this.searchOnly?this.fetchOptions().then():(this._fetchedOptions=[],this._fetchLoading=!1,this._fetchError="",this.handleDefaultSlotChange())}_handleFetchError(t){this._fetchError=t,this._fetchLoading=!1,this._fetchAbortController=null,this.emit("zn-error",{detail:{status:400}})}_buildCacheKey(t){let r=this.cacheKey||this.dataUri;return t?`zn-select-search:${r}:${t}`:`zn-select-search:${r}`}_readCache(t){if(!this.cacheKey)return null;try{let r=localStorage.getItem(this._buildCacheKey(t));if(r)return JSON.parse(r)}catch{}return null}_writeCache(t,r){if(this.cacheKey)try{localStorage.setItem(this._buildCacheKey(t),JSON.stringify(r))}catch{}}_parseOptions(t){let r;if(Array.isArray(t))t.length>0&&t.some(a=>a&&typeof a=="object"&&"group"in a)?r=t.map(a=>"group"in a&&Array.isArray(a.options)?{group:String(a.group),options:a.options}:a):r=t;else if(t&&typeof t=="object")r=Object.entries(t).map(([n,a])=>({key:n,value:String(a)}));else return null;if(this.maxResults>0){let n=0,a=[];for(let s of r){if(n>=this.maxResults)break;if(s.group!==void 0){let l=this.maxResults-n,p=s.options.slice(0,l);p.length>0&&(a.push({group:s.group,options:p}),n+=p.length)}else a.push(s),n++}r=a}return r}async fetchOptions(t){if(!this.dataUri||this.disabled)return;let r=!!t;if(this.cacheKey){let n=this._readCache(t);if(n){this._fetchedOptions=n,this._searchLoading=!1,this._fetchLoading=!1,this._totalResultCount=0,this._noResultsVisible=n.length===0&&r,this.emit("zn-load"),this.updateComplete.then(()=>this.handleDefaultSlotChange());return}}this._fetchAbortController?.abort(),this._fetchAbortController=new AbortController,r?this._searchLoading=!0:this._fetchLoading=!0,this._fetchError="";try{let n=this.dataUri;if(t){let h=n.includes("?")?"&":"?";n=`${n}${h}${encodeURIComponent(this.searchParam)}=${encodeURIComponent(t)}`}let a=await fetch(n,{signal:this._fetchAbortController.signal,credentials:"same-origin",headers:{"x-kx-fetch-style":"zn-select-options","x-kx-context-data":this.contextData||""}});if(!a.ok){this._searchLoading=!1,this._handleFetchError(a.statusText||`HTTP ${a.status}`);return}let s=await a.json(),l=Array.isArray(s)?s.reduce((h,m)=>{if(m&&typeof m=="object"&&"group"in m){let f=m;return h+(Array.isArray(f.options)?f.options.length:0)}return h+1},0):s&&typeof s=="object"?Object.keys(s).length:0,p=this._parseOptions(s);if(!p){this._searchLoading=!1,this._handleFetchError("Expected JSON array or object of options");return}this._fetchedOptions=p,this._fetchLoading=!1,this._searchLoading=!1,this._fetchAbortController=null,this._noResultsVisible=p.length===0&&r,this._totalResultCount=this.maxResults>0&&l>this.maxResults?l:0,this._lastRemoteQuery=t??"",this._lastRemoteExhaustive=this.maxResults>0?l<this.maxResults:!0,this._writeCache(t,p),this.emit("zn-load"),this.updateComplete.then(()=>{this.handleDefaultSlotChange()})}catch(n){if(n instanceof DOMException&&n.name==="AbortError")return;this._searchLoading=!1,this._handleFetchError(n instanceof Error?n.message:"Failed to load options")}}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),t==="value"){let a=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=a}}handleValueChange(){if(!this.valueHasChanged){let n=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=n}let t=this.getAllOptions(),r=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(n=>r.includes(n.value))),this.updateDependencies()}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(null),this._isTypeable&&(this.clearSearch(),this.displayInput.value="",this.displayInput.readOnly=!1),this.emit("zn-show"),this.addOpenListeners(),await Fu(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)}),this._isTypeable&&requestAnimationFrame(()=>{this.displayInput.focus({preventScroll:!0})});let{keyframes:t,options:r}=Sn(this,"select.show",{dir:this.localize.dir()});await
|
|
609
|
+
<zn-option value=${r.key} hidden>${r.value}</zn-option>`)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}firstUpdated(t){if(super.firstUpdated(t),this.distinct!==""){let r=document.querySelector(`zn-select[id="${this.distinct}"]`);r&&(r.addEventListener("zn-change",()=>{let n=Array.isArray(r.value)?r.value:[r.value];this.getAllOptions().map(s=>s).forEach(s=>{n.includes(s.value)?s.style.display="none":s.style.display=""})}),r.dispatchEvent(new Event("zn-input")))}this.conditionalController.setup(),this.dataUri&&!this.searchOnly&&this.fetchOptions().then(),this.updateHasInputPrefix(),this.updateDependencies()}handleDisabledChange(){this.disabled?(this.open=!1,this.handleOpenChange().then(),this._fetchAbortController?.abort(),this._fetchAbortController=null,this._fetchLoading=!1,this._fetchError=""):this.dataUri&&!this.searchOnly&&this.fetchOptions().then()}handleSrcChange(){this.dataUri&&!this.searchOnly?this.fetchOptions().then():(this._fetchedOptions=[],this._fetchLoading=!1,this._fetchError="",this.handleDefaultSlotChange())}_handleFetchError(t){this._fetchError=t,this._fetchLoading=!1,this._fetchAbortController=null,this.emit("zn-error",{detail:{status:400}})}_buildCacheKey(t){let r=this.cacheKey||this.dataUri;return t?`zn-select-search:${r}:${t}`:`zn-select-search:${r}`}_readCache(t){if(!this.cacheKey)return null;try{let r=localStorage.getItem(this._buildCacheKey(t));if(r)return JSON.parse(r)}catch{}return null}_writeCache(t,r){if(this.cacheKey)try{localStorage.setItem(this._buildCacheKey(t),JSON.stringify(r))}catch{}}_parseOptions(t){let r;if(Array.isArray(t))t.length>0&&t.some(a=>a&&typeof a=="object"&&"group"in a)?r=t.map(a=>"group"in a&&Array.isArray(a.options)?{group:String(a.group),options:a.options}:a):r=t;else if(t&&typeof t=="object")r=Object.entries(t).map(([n,a])=>({key:n,value:String(a)}));else return null;if(this.maxResults>0){let n=0,a=[];for(let s of r){if(n>=this.maxResults)break;if(s.group!==void 0){let l=this.maxResults-n,p=s.options.slice(0,l);p.length>0&&(a.push({group:s.group,options:p}),n+=p.length)}else a.push(s),n++}r=a}return r}async fetchOptions(t){if(!this.dataUri||this.disabled)return;let r=!!t;if(this.cacheKey){let n=this._readCache(t);if(n){this._fetchedOptions=n,this._searchLoading=!1,this._fetchLoading=!1,this._totalResultCount=0,this._noResultsVisible=n.length===0&&r,this.emit("zn-load"),this.updateComplete.then(()=>this.handleDefaultSlotChange());return}}this._fetchAbortController?.abort(),this._fetchAbortController=new AbortController,r?this._searchLoading=!0:this._fetchLoading=!0,this._fetchError="";try{let n=this.dataUri;if(t){let h=n.includes("?")?"&":"?";n=`${n}${h}${encodeURIComponent(this.searchParam)}=${encodeURIComponent(t)}`}let a=await fetch(n,{signal:this._fetchAbortController.signal,credentials:"same-origin",headers:{"x-kx-fetch-style":"zn-select-options","x-kx-context-data":this.contextData||""}});if(!a.ok){this._searchLoading=!1,this._handleFetchError(a.statusText||`HTTP ${a.status}`);return}let s=await a.json(),l=Array.isArray(s)?s.reduce((h,m)=>{if(m&&typeof m=="object"&&"group"in m){let f=m;return h+(Array.isArray(f.options)?f.options.length:0)}return h+1},0):s&&typeof s=="object"?Object.keys(s).length:0,p=this._parseOptions(s);if(!p){this._searchLoading=!1,this._handleFetchError("Expected JSON array or object of options");return}this._fetchedOptions=p,this._fetchLoading=!1,this._searchLoading=!1,this._fetchAbortController=null,this._noResultsVisible=p.length===0&&r,this._totalResultCount=this.maxResults>0&&l>this.maxResults?l:0,this._lastRemoteQuery=t??"",this._lastRemoteExhaustive=this.maxResults>0?l<this.maxResults:!0,this._writeCache(t,p),this.emit("zn-load"),this.updateComplete.then(()=>{this.handleDefaultSlotChange()})}catch(n){if(n instanceof DOMException&&n.name==="AbortError")return;this._searchLoading=!1,this._handleFetchError(n instanceof Error?n.message:"Failed to load options")}}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),t==="value"){let a=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=a}}handleValueChange(){if(!this.valueHasChanged){let n=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=n}let t=this.getAllOptions(),r=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(n=>r.includes(n.value))),this.updateDependencies()}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(null),this._isTypeable&&(this.clearSearch(),this.displayInput.value="",this.displayInput.readOnly=!1),this.emit("zn-show"),this.addOpenListeners(),await Fu(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)}),this._isTypeable&&requestAnimationFrame(()=>{this.displayInput.focus({preventScroll:!0})});let{keyframes:t,options:r}=Sn(this,"select.show",{dir:this.localize.dir()});await yi(this.popup.popup,t,r),this.currentOption&&Wv(this.currentOption,this.listbox,"vertical","auto"),this.emit("zn-after-show")}else{this.emit("zn-hide"),this.removeOpenListeners(),this._isTypeable&&(this.freeText&&this._searchDisplayValue.trim()&&this.commitFreeText(!1),this.clearSearch(),this.displayInput.readOnly=!0,this.displayInput.value=this.multiple?"":this.displayLabel),await Fu(this);let{keyframes:t,options:r}=Sn(this,"select.hide",{dir:this.localize.dir()});await yi(this.popup.popup,t,r),this.listbox.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,Mi(this,"zn-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,Mi(this,"zn-after-hide")}checkValidity(){return this.valueInput?this.valueInput.checkValidity():!1}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput?this.valueInput.reportValidity():!1}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}updateDependencies(){let t=this.getRootNode();if(!t?.querySelectorAll)return;t.querySelectorAll("[data-disable-on]").forEach(n=>{let a=n.getAttribute("data-disable-on");if(!a)return;let s=null;try{s=t.querySelector(a)}catch{}if(!s){let l=a.startsWith("#")?a:`#${a}`;try{s=t.querySelector(l)}catch{}}s===this&&this.updateDependencyState(n)})}updateDependencyState(t){let r=t.getAttribute("data-disable-value");if(r!==null){let n=r.split(",").map(s=>s.trim()),a;Array.isArray(this.value)?a=this.value.some(s=>n.includes(s)):a=n.includes(String(this.value)),this.toggleDisabled(t,a)}}toggleDisabled(t,r){let n=()=>{"defaultValue"in t&&typeof t.defaultValue<"u"&&(t.value=t.defaultValue)};t.disabled=r,r&&n()}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("context-note"),a=this.hasSlotController.test("help-text"),s=this.label?!0:t,l=this.labelTooltip?!0:r,p=this.contextNote?!0:n,h=this.helpText?!0:a,m=this.clearable&&!this.disabled&&this.value.length>0,f=this.placeholder&&this.value.length===0,b=this._fetchLoading||!!this._fetchError,g=this.disabled||b;return u`
|
|
610
610
|
<div
|
|
611
611
|
part="form-control"
|
|
612
612
|
class=${M({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":s,"form-control--has-label-tooltip":l,"form-control--has-context-note":p,"form-control--has-help-text":h})}>
|
|
@@ -701,7 +701,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
701
701
|
@click=${this.handleClearClick}
|
|
702
702
|
tabindex="-1">
|
|
703
703
|
<slot name="clear-icon">
|
|
704
|
-
<zn-icon src="
|
|
704
|
+
<zn-icon src="circle-x@lu" size="20"></zn-icon>
|
|
705
705
|
</slot>
|
|
706
706
|
</button>`:""}
|
|
707
707
|
|
|
@@ -916,7 +916,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
916
916
|
aria-hidden=${h?"false":"true"}>
|
|
917
917
|
<slot name="help-text">${this.helpText}</slot>
|
|
918
918
|
</div>
|
|
919
|
-
</div>`}};ye.styles=[z(Se),z(m0)],ye.dependencies={"zn-icon":ne,"zn-tooltip":
|
|
919
|
+
</div>`}};ye.styles=[z(Se),z(m0)],ye.dependencies={"zn-icon":ne,"zn-tooltip":gi},c([F(".input__control")],ye.prototype,"input",2),c([R()],ye.prototype,"hasFocus",2),c([d()],ye.prototype,"title",2),c([d()],ye.prototype,"name",2),c([d()],ye.prototype,"value",2),c([Ce()],ye.prototype,"defaultValue",2),c([d({reflect:!0})],ye.prototype,"size",2),c([d()],ye.prototype,"label",2),c([d({attribute:"label-tooltip"})],ye.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],ye.prototype,"contextNote",2),c([d({attribute:"help-text"})],ye.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],ye.prototype,"disabled",2),c([d()],ye.prototype,"placeholder",2),c([d({type:Boolean,reflect:!0})],ye.prototype,"readonly",2),c([d({reflect:!0})],ye.prototype,"form",2),c([d({type:Boolean,reflect:!0})],ye.prototype,"flush",2),c([d({type:Boolean,reflect:!0})],ye.prototype,"inline",2),c([d({type:Boolean,reflect:!0})],ye.prototype,"required",2),c([d({type:Boolean})],ye.prototype,"clearable",2),c([d({type:Boolean})],ye.prototype,"range",2),c([d({type:Boolean,attribute:"disable-past-dates"})],ye.prototype,"disablePastDates",2),c([d({attribute:"min-date"})],ye.prototype,"minDate",2),c([d({attribute:"max-date"})],ye.prototype,"maxDate",2),c([d()],ye.prototype,"format",2),c([d({attribute:"time-picker",type:Boolean,reflect:!0})],ye.prototype,"timePicker",2),c([d({attribute:"only-time"})],ye.prototype,"onlyTimepicker",2),c([d({attribute:"format-time"})],ye.prototype,"timeFormat",2),c([d({attribute:"container"})],ye.prototype,"container",2),c([K("disabled",{waitUntilFirstUpdate:!0})],ye.prototype,"handleDisabledChange",1),c([K("value",{waitUntilFirstUpdate:!0})],ye.prototype,"handleValueChange",1),c([K("clearable",{waitUntilFirstUpdate:!0}),K("format",{waitUntilFirstUpdate:!0}),K("range",{waitUntilFirstUpdate:!0}),K("minDate",{waitUntilFirstUpdate:!0}),K("maxDate",{waitUntilFirstUpdate:!0}),K("disablePastDates",{waitUntilFirstUpdate:!0}),K("timePicker",{waitUntilFirstUpdate:!0}),K("timeFormat",{waitUntilFirstUpdate:!0}),K("inline",{waitUntilFirstUpdate:!0})],ye.prototype,"handleDatepickerOptionsChange",1);var Hd;function f4(){return Hd||(Hd=new CSSStyleSheet,Hd.replaceSync(String(u0))),Hd}var g4={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:ii aa",firstDay:0};var Gu=ye;ye.define("zn-datepicker");var Fd=class{constructor(i,t,r){this.popupRef=Bv();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=i=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${i.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${i.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=i=>{switch(i.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":i.target!==this.host&&(i.preventDefault(),i.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(i);break;default:break}};this.handleClick=i=>{i.target===this.host?(i.preventDefault(),i.stopPropagation()):i.target instanceof Element&&(i.target.tagName==="zn-menu-item"||i.target.role?.startsWith("menuitem"))&&this.disableSubmenu()};this.handleFocusOut=i=>{i.relatedTarget&&i.relatedTarget instanceof Element&&this.host.contains(i.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=i=>{i.stopPropagation()};this.handlePopupReposition=()=>{let t=this.host.renderRoot.querySelector("slot[name='submenu']")?.assignedElements({flatten:!0}).filter(p=>p.localName==="zn-menu")[0],r=this.localize.dir()==="rtl";if(!t)return;let{left:n,top:a,width:s,height:l}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${r?n+s:n}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${a}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${r?n+s:n}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${a+l}px`)};(this.host=i).addController(this),this.hasSlotController=t,this.localize=r}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("zn-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("zn-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(i){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let r=null;for(let n of t.assignedElements())if(r=n.querySelectorAll("zn-menu-item, [role^='menuitem']"),r.length!==0)break;if(!(!r||r.length===0)){r[0].setAttribute("tabindex","0");for(let n=1;n!==r.length;++n)r[n].setAttribute("tabindex","-1");this.popupRef.value&&(i.preventDefault(),i.stopPropagation(),this.popupRef.value.active?r[0]instanceof HTMLElement&&r[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{r[0]instanceof HTMLElement&&r[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(i){this.popupRef.value&&this.popupRef.value.active!==i&&(this.popupRef.value.active=i,this.host.requestUpdate())}enableSubmenu(i=!0){i?this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay):this.setSubmenuState(!0)}disableSubmenu(){clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){if(!this.host.parentElement?.computedStyleMap)return;let i=this.host.parentElement.computedStyleMap(),r=["padding-top","border-top-width","margin-top"].reduce((n,a)=>{let s=i.get(a)??new CSSUnitValue(0,"px"),p=(s instanceof CSSUnitValue?s:new CSSUnitValue(0,"px")).to("px");return n-p.value},0);this.skidding=r}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let i=this.localize.dir()==="ltr";return this.isConnected?u`
|
|
920
920
|
<zn-popup
|
|
921
921
|
${Ol(this.popupRef)}
|
|
922
922
|
placement=${i?"right-start":"left-start"}
|
|
@@ -929,7 +929,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
929
929
|
<slot name="submenu"></slot>
|
|
930
930
|
</zn-popup>
|
|
931
931
|
`:u`
|
|
932
|
-
<slot name="submenu" hidden></slot> `}};var g0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--submenu-offset:-2px;--color:var(--zn-text-menu-link-color);--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-color-navigation-highlight),var(--zn-panel-highlight-opacity));--active-color:rgb(var(--zn-primary));display:block}:host([variant=dropdown]){--hover-color:var(--color);--hover-bg:rgba(0,0,0,0.06)}:host([variant=shell]){--color:rgb(var(--zn-text));--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-primary),0.05)}:host([inert]){display:none}.menu-item{position:relative;display:flex;align-items:stretch;padding:var(--zn-spacing-small) var(--zn-spacing-medium);transition:0.4s fill;-moz-user-select:none;user-select:none;-webkit-user-select:none;white-space:nowrap;cursor:pointer;border-bottom-width:1px;width:100%;text-decoration:none;font-size:var(--zn-text-menu-link-font-size);line-height:var(--zn-text-menu-link-line-height);font-weight:var(--zn-text-menu-link-font-weight);color:var(--color)}:host([variant=dropdown]) .menu-item{align-items:center;padding:var(--zn-spacing-small) var(--zn-spacing-large);border-bottom-width:0}:host([variant=shell]) .menu-item{align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small);border-bottom-width:0;border-radius:var(--zn-border-radius);line-height:25px}.menu-item__label::slotted(*){text-decoration:none;color:inherit}.menu-item.menu-item--disabled{outline:none;opacity:0.5;cursor:not-allowed}.menu-item.menu-item--loading{outline:none;cursor:wait}.menu-item--flush{padding:0}.menu-item--flush-x{padding-left:0;padding-right:0}.menu-item--flush-y{padding-top:0;padding-bottom:0}.menu-item--no-border{border-bottom-width:0}.menu-item--active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--active-color)}.menu-item.menu-item--active .menu-item__label{font-weight:700;color:var(--active-color)}.menu-item--rtl.menu-item--active::before{left:auto;right:0}.menu-item--active.menu-item--primary::before{background-color:rgb(var(--zn-primary))}.menu-item--active.menu-item--error::before{background-color:rgb(var(--zn-color-error))}.menu-item--active.menu-item--info::before{background-color:rgb(var(--zn-color-info))}.menu-item--active.menu-item--warning::before{background-color:rgb(var(--zn-color-warning))}.menu-item--active.menu-item--success::before{background-color:rgb(var(--zn-color-success))}.menu-item--active.menu-item--secondary::before{background-color:rgb(var(--zn-accent))}.menu-item .menu-item__label{display:flex;flex:1 1 auto;text-overflow:ellipsis;align-items:center;overflow:hidden;color:var(--color)}.menu-item:hover:not(.menu-item--disabled) .menu-item__label{color:var(--hover-color)}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix::slotted(*){--icon-size:var(--zn-font-size-small);margin-inline-end:var(--zn-spacing-small)}:host([variant=shell]) .menu-item .menu-item__prefix::slotted(*){margin-inline-end:0}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix::slotted(*){margin-inline-start:var(--zn-spacing-x-small)}.menu-item--submenu-expanded::after{content:"";position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:focus-visible){outline:none}:host(:hover:not([aria-disabled=true],:focus-visible)) .menu-item,.menu-item--submenu-expanded{background-color:var(--hover-bg);color:var(--hover-color)}.menu-item--active{background-color:var(--hover-bg);color:var(--active-color)}:host(:focus-visible) .menu-item{outline:none;background-color:var(--hover-bg);color:var(--hover-color);opacity:1}.menu-item .menu-item__check,.menu-item .menu-item__chevron{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:1.5em;height:1.5em;visibility:hidden}.menu-item .menu-item__chevron{display:none}.menu-item--has-submenu .menu-item__chevron{display:flex}:host(:not([role=menuitemcheckbox])) .menu-item .menu-item__check{display:none}.menu-item--checked .menu-item__check,.menu-item--has-submenu .menu-item__chevron{visibility:visible;display:flex}zn-popup::part(popup){box-shadow:var(--zn-shadow-large);z-index:100;margin-left:var(--submenu-offset)}.menu-item--rtl zn-popup::part(popup){margin-left:calc(-1 * var(--submenu-offset))}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .menu-item,:host(:focus-visible) .menu-item{outline:dashed 1px SelectedItem;outline-offset:-1px}}::slotted(zn-menu){max-width:var(--auto-size-available-width) !important;max-height:var(--auto-size-available-height) !important}.menu-item--primary{--color:rgba(var(--zn-primary),0.9);--hover-color:rgb(var(--zn-color-on-primary,255,255,255));--hover-bg:rgba(var(--zn-primary),0.9)}.menu-item--error{--color:rgb(var(--zn-color-error));--hover-color:rgb(var(--zn-color-on-error,255,255,255));--hover-bg:rgba(var(--zn-color-error),0.9)}.menu-item--info{--color:rgb(var(--zn-color-info));--hover-color:rgb(var(--zn-color-on-info,255,255,255));--hover-bg:rgba(var(--zn-color-info),0.9)}.menu-item--warning{--color:rgb(var(--zn-color-warning));--hover-color:rgb(var(--zn-color-on-warning,255,255,255));--hover-bg:rgba(var(--zn-color-warning),0.9)}.menu-item--success{--color:rgb(var(--zn-color-success));--hover-color:rgb(var(--zn-color-on-success,255,255,255));--hover-bg:rgba(var(--zn-color-success),0.9)}.menu-item--secondary{--color:rgb(var(--zn-accent))}.menu-item--transparent{--color:rgb(var(--zn-text))}`;var Ee=class extends k{constructor(){super(...arguments);this.type="normal";this.variant="default";this.checked=!1;this.checkedPosition="left";this.value="";this.loading=!1;this.disabled=!1;this.rel="noreferrer noopener";this.confirm=!1;this.keepOpen=!1;this.flush=!1;this.flushX=!1;this.flushY=!1;this.noBorder=!1;this.active=!1;this.localize=new Ht(this);this.hasSlotController=new Y(this,"submenu");this.submenuController=new Fd(this,this.hasSlotController,this.localize);this.handleHostClick=t=>{if(this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),!this.isSubmenu()){let n=t.composedPath().find(s=>s?.getAttribute?.("role")==="menu");if(this.confirm)return;let a=n?.closest("zn-dropdown");!a?.stayOpenOnSelect&&!this.keepOpen&&a?.hide(),this.emit("zn-menu-select",{detail:{value:this.value,element:this}})}};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Sb(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}_isLink(){return this.href!==void 0||this.dataPath!==void 0}render(){let t=this.localize.dir()==="rtl",r=this.submenuController.isExpanded(),n=this._isLink(),a=n
|
|
932
|
+
<slot name="submenu" hidden></slot> `}};var g0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--submenu-offset:-2px;--color:var(--zn-text-menu-link-color);--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-color-navigation-highlight),var(--zn-panel-highlight-opacity));--active-color:rgb(var(--zn-primary));display:block}:host([variant=dropdown]){--hover-color:var(--color);--hover-bg:rgba(0,0,0,0.06)}:host([variant=shell]){--color:rgb(var(--zn-text));--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-primary),0.05)}:host([inert]){display:none}.menu-item{position:relative;display:flex;align-items:stretch;padding:var(--zn-spacing-small) var(--zn-spacing-medium);transition:0.4s fill;-moz-user-select:none;user-select:none;-webkit-user-select:none;white-space:nowrap;cursor:pointer;border-bottom-width:1px;width:100%;text-decoration:none;font-size:var(--zn-text-menu-link-font-size);line-height:var(--zn-text-menu-link-line-height);font-weight:var(--zn-text-menu-link-font-weight);color:var(--color)}:host([variant=dropdown]) .menu-item{align-items:center;padding:var(--zn-spacing-small) var(--zn-spacing-large);border-bottom-width:0}:host([variant=shell]) .menu-item{align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small);border-bottom-width:0;border-radius:var(--zn-border-radius);line-height:25px}.menu-item__label::slotted(*){text-decoration:none;color:inherit}.menu-item.menu-item--disabled{outline:none;opacity:0.5;cursor:not-allowed}.menu-item.menu-item--loading{outline:none;cursor:wait}.menu-item--flush{padding:0}.menu-item--flush-x{padding-left:0;padding-right:0}.menu-item--flush-y{padding-top:0;padding-bottom:0}.menu-item--no-border{border-bottom-width:0}.menu-item--active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--active-color)}.menu-item.menu-item--active .menu-item__label{font-weight:700;color:var(--active-color)}.menu-item--rtl.menu-item--active::before{left:auto;right:0}.menu-item--active.menu-item--primary::before{background-color:rgb(var(--zn-primary))}.menu-item--active.menu-item--error::before{background-color:rgb(var(--zn-color-error))}.menu-item--active.menu-item--info::before{background-color:rgb(var(--zn-color-info))}.menu-item--active.menu-item--warning::before{background-color:rgb(var(--zn-color-warning))}.menu-item--active.menu-item--success::before{background-color:rgb(var(--zn-color-success))}.menu-item--active.menu-item--secondary::before{background-color:rgb(var(--zn-accent))}.menu-item .menu-item__label{display:flex;flex:1 1 auto;text-overflow:ellipsis;align-items:center;overflow:hidden;color:var(--color)}.menu-item:hover:not(.menu-item--disabled) .menu-item__label{color:var(--hover-color)}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix::slotted(*){--icon-size:var(--zn-font-size-small);margin-inline-end:var(--zn-spacing-small)}:host([variant=shell]) .menu-item .menu-item__prefix::slotted(*){margin-inline-end:0}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix::slotted(*){margin-inline-start:var(--zn-spacing-x-small)}.menu-item--submenu-expanded::after{content:"";position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:focus-visible){outline:none}:host(:hover:not([aria-disabled=true],:focus-visible)) .menu-item,.menu-item--submenu-expanded{background-color:var(--hover-bg);color:var(--hover-color)}.menu-item--active{background-color:var(--hover-bg);color:var(--active-color)}:host(:focus-visible) .menu-item{outline:none;background-color:var(--hover-bg);color:var(--hover-color);opacity:1}.menu-item .menu-item__check,.menu-item .menu-item__chevron{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:1.5em;height:1.5em;visibility:hidden}.menu-item .menu-item__chevron{display:none}.menu-item--has-submenu .menu-item__chevron{display:flex}:host(:not([role=menuitemcheckbox])) .menu-item .menu-item__check{display:none}.menu-item--checked .menu-item__check,.menu-item--has-submenu .menu-item__chevron{visibility:visible;display:flex}zn-popup::part(popup){box-shadow:var(--zn-shadow-large);z-index:100;margin-left:var(--submenu-offset)}.menu-item--rtl zn-popup::part(popup){margin-left:calc(-1 * var(--submenu-offset))}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .menu-item,:host(:focus-visible) .menu-item{outline:dashed 1px SelectedItem;outline-offset:-1px}}::slotted(zn-menu){max-width:var(--auto-size-available-width) !important;max-height:var(--auto-size-available-height) !important}.menu-item--primary{--color:rgba(var(--zn-primary),0.9);--hover-color:rgb(var(--zn-color-on-primary,255,255,255));--hover-bg:rgba(var(--zn-primary),0.9)}.menu-item--error{--color:rgb(var(--zn-color-error));--hover-color:rgb(var(--zn-color-on-error,255,255,255));--hover-bg:rgba(var(--zn-color-error),0.9)}.menu-item--info{--color:rgb(var(--zn-color-info));--hover-color:rgb(var(--zn-color-on-info,255,255,255));--hover-bg:rgba(var(--zn-color-info),0.9)}.menu-item--warning{--color:rgb(var(--zn-color-warning));--hover-color:rgb(var(--zn-color-on-warning,255,255,255));--hover-bg:rgba(var(--zn-color-warning),0.9)}.menu-item--success{--color:rgb(var(--zn-color-success));--hover-color:rgb(var(--zn-color-on-success,255,255,255));--hover-bg:rgba(var(--zn-color-success),0.9)}.menu-item--secondary{--color:rgb(var(--zn-accent))}.menu-item--transparent{--color:rgb(var(--zn-text))}`;var Ee=class extends k{constructor(){super(...arguments);this.type="normal";this.variant="default";this.checked=!1;this.checkedPosition="left";this.value="";this.loading=!1;this.disabled=!1;this.rel="noreferrer noopener";this.confirm=!1;this.keepOpen=!1;this.flush=!1;this.flushX=!1;this.flushY=!1;this.noBorder=!1;this.active=!1;this.localize=new Ht(this);this.hasSlotController=new Y(this,"submenu");this.submenuController=new Fd(this,this.hasSlotController,this.localize);this.handleHostClick=t=>{if(this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),!this.isSubmenu()){let n=t.composedPath().find(s=>s?.getAttribute?.("role")==="menu");if(this.confirm)return;let a=n?.closest("zn-dropdown");!a?.stayOpenOnSelect&&!this.keepOpen&&a?.hide(),this.emit("zn-menu-select",{detail:{value:this.value,element:this}})}};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Sb(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}_isLink(){return this.href!==void 0||this.dataPath!==void 0}render(){let t=this.localize.dir()==="rtl",r=this.submenuController.isExpanded(),n=this._isLink(),a=n?Ai`a`:Ai`div`;return ke`
|
|
933
933
|
<${a}
|
|
934
934
|
id="anchor"
|
|
935
935
|
part="base"
|
|
@@ -966,7 +966,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
966
966
|
${this.loading?ke`
|
|
967
967
|
<zn-spinner part="spinner" exportparts="base:spinner__base"></zn-spinner> `:""}
|
|
968
968
|
</div>
|
|
969
|
-
`}};Ee.styles=z(g0),Ee.dependencies={"zn-icon":ne,"zn-popup":Rl},c([F("slot:not([name])")],Ee.prototype,"defaultSlot",2),c([F(".menu-item")],Ee.prototype,"menuItem",2),c([d()],Ee.prototype,"type",2),c([d({reflect:!0})],Ee.prototype,"variant",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"checked",2),c([d({attribute:"checked-position",reflect:!0})],Ee.prototype,"checkedPosition",2),c([d()],Ee.prototype,"value",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"loading",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"disabled",2),c([d()],Ee.prototype,"color",2),c([d()],Ee.prototype,"href",2),c([d({attribute:"data-path"})],Ee.prototype,"dataPath",2),c([d()],Ee.prototype,"target",2),c([d({attribute:"data-target"})],Ee.prototype,"dataTarget",2),c([d()],Ee.prototype,"rel",2),c([d({attribute:"gaid"})],Ee.prototype,"gaid",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"confirm",2),c([d({type:Boolean,reflect:!0,attribute:"keep-open"})],Ee.prototype,"keepOpen",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"flush",2),c([d({type:Boolean,reflect:!0,attribute:"flush-x"})],Ee.prototype,"flushX",2),c([d({type:Boolean,reflect:!0,attribute:"flush-y"})],Ee.prototype,"flushY",2),c([d({type:Boolean,reflect:!0,attribute:"no-border"})],Ee.prototype,"noBorder",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"active",2),c([K("checked")],Ee.prototype,"handleCheckedChange",1),c([K("disabled")],Ee.prototype,"handleDisabledChange",1),c([K("type")],Ee.prototype,"handleTypeChange",1);var
|
|
969
|
+
`}};Ee.styles=z(g0),Ee.dependencies={"zn-icon":ne,"zn-popup":Rl},c([F("slot:not([name])")],Ee.prototype,"defaultSlot",2),c([F(".menu-item")],Ee.prototype,"menuItem",2),c([d()],Ee.prototype,"type",2),c([d({reflect:!0})],Ee.prototype,"variant",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"checked",2),c([d({attribute:"checked-position",reflect:!0})],Ee.prototype,"checkedPosition",2),c([d()],Ee.prototype,"value",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"loading",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"disabled",2),c([d()],Ee.prototype,"color",2),c([d()],Ee.prototype,"href",2),c([d({attribute:"data-path"})],Ee.prototype,"dataPath",2),c([d()],Ee.prototype,"target",2),c([d({attribute:"data-target"})],Ee.prototype,"dataTarget",2),c([d()],Ee.prototype,"rel",2),c([d({attribute:"gaid"})],Ee.prototype,"gaid",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"confirm",2),c([d({type:Boolean,reflect:!0,attribute:"keep-open"})],Ee.prototype,"keepOpen",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"flush",2),c([d({type:Boolean,reflect:!0,attribute:"flush-x"})],Ee.prototype,"flushX",2),c([d({type:Boolean,reflect:!0,attribute:"flush-y"})],Ee.prototype,"flushY",2),c([d({type:Boolean,reflect:!0,attribute:"no-border"})],Ee.prototype,"noBorder",2),c([d({type:Boolean,reflect:!0})],Ee.prototype,"active",2),c([K("checked")],Ee.prototype,"handleCheckedChange",1),c([K("disabled")],Ee.prototype,"handleDisabledChange",1),c([K("type")],Ee.prototype,"handleTypeChange",1);var xi=Ee;Ee.define("zn-menu-item");var b0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.menu{display:block;position:relative;padding:1px;border:1px solid rgb(var(--zn-border-color)) !important;border-radius:var(--zn-border-radius);width:-moz-fit-content;width:fit-content;min-width:var(--zn-menu-min-width,var(--zn-size-spanel));max-height:var(--zn-menu-max-height,none);overflow:auto;overscroll-behavior:none;box-shadow:0 4px 8px -4px rgba(33,33,33,0.1);background-color:rgba(var(--zn-color-navigation,255,255,255),0.95)}.menu::-webkit-scrollbar{width:10px}.menu::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:5px;background:rgba(var(--inverse-base),0.3);background-clip:content-box}.menu::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.5);background-clip:content-box}.menu--shell{display:flex;flex-direction:column;gap:var(--zn-spacing-2x-small);padding:var(--zn-spacing-2x-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);min-width:var(--zn-menu-min-width,245px);max-width:min(320px,100vw - 16px);max-height:var(--zn-menu-max-height,none);overflow-x:hidden;overflow-y:auto;box-shadow:none;filter:drop-shadow(0 10px 8px rgba(0,0,0,0.04)) drop-shadow(0 4px 3px rgba(0,0,0,0.1));background-color:rgba(var(--zn-color-navigation,255,255,255),0.95);backdrop-filter:blur(3px)}::slotted(zn-menu-item+zn-menu-item){border-top:1px solid rgb(var(--zn-border-color))}`;var nn=class extends k{constructor(){super(...arguments);this.actions=[];this.variant="default"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!(t.inert||!this.isMenuItem(t)))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return u`
|
|
970
970
|
<div
|
|
971
971
|
part="base"
|
|
972
972
|
class="${M({menu:!0,"menu--shell":this.variant==="shell"})}"
|
|
@@ -1007,7 +1007,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1007
1007
|
@keydown=${this.handleKeyDown}
|
|
1008
1008
|
@mousedown=${this.handleMouseDown}>${t.title}</span>
|
|
1009
1009
|
</zn-menu-item>`)}
|
|
1010
|
-
</div>`}handleClick(t){let r=["menuitem","menuitemcheckbox"],n=t.composedPath(),a=n.find(h=>r.includes(h?.getAttribute?.("role")||""));if(!a)return;let s=n.find(h=>h?.getAttribute?.("role")==="menu");if(s!==this)return;let p=a;p.type==="checkbox"&&(p.checked=!p.checked),s?.closest("zn-dropdown")?.hide(),this.emit("zn-select",{detail:{item:p}})}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){let r=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),r?.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let r=this.getAllItems(),n=this.getCurrentItem(),a=n?r.indexOf(n):0;r.length>0&&(t.preventDefault(),t.stopPropagation(),t.key==="ArrowDown"?a++:t.key==="ArrowUp"?a--:t.key==="Home"?a=0:t.key==="End"&&(a=r.length-1),a<0&&(a=r.length-1),a>r.length-1&&(a=0),this.setCurrentItem(r[a]),r[a].focus())}}handleMouseDown(t){let r=t.target;this.isMenuItem(r)&&this.setCurrentItem(r)}handleSlotChange(){let t=this.getAllItems();t.length>0&&(this.setCurrentItem(t[0]),this.emit("zn-menu-ready")),this.propagateVariant()}updated(t){super.updated(t),t.has("variant")&&this.propagateVariant()}get itemVariant(){return this.variant==="shell"?"shell":"dropdown"}propagateVariant(){this.getAllItems().forEach(t=>t.setAttribute("variant",this.itemVariant))}isMenuItem(t){return t.tagName.toLowerCase()==="zn-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes(t.getAttribute("role")??"")}};nn.styles=z(b0),nn.dependencies={"zn-confirm":Hl,"zn-dropdown":pr,"zn-icon":ne,"zn-menu-item":yi,"zn-tooltip":Xi},c([F("slot")],nn.prototype,"defaultSlot",2),c([d({attribute:"actions",type:Array})],nn.prototype,"actions",2),c([d({reflect:!0})],nn.prototype,"variant",2);var on=nn;nn.define("zn-menu");var v0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.filter-bar{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}.filter-bar__clear::part(base){height:32px;min-height:32px;padding:0 var(--zn-spacing-x-small);font-weight:var(--zn-font-weight-normal);text-transform:none;white-space:nowrap}.filter-bar__clear::part(base){color:rgb(var(--zn-primary))}.filter-bar__chip{display:inline-flex;align-items:center;height:32px;padding-right:var(--zn-spacing-x-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius-pill);background-color:rgb(var(--zn-panel))}.filter-bar__chip:hover{background-color:rgba(var(--zn-color-tab),0.5)}.filter-bar__pill::part(base),.filter-bar__pill::part(base):hover{border-color:transparent;background:transparent;padding-right:0}.filter-bar__remove::part(base){width:24px;min-width:24px;height:32px;min-height:32px;max-height:32px;padding:4px 0;background:transparent;background-clip:content-box;border-radius:var(--zn-border-radius-circle);color:var(--zn-text-color)}.filter-bar__remove::part(base):hover{background:rgb(var(--zn-color-border));background-clip:content-box}.filter-bar__editor{display:flex;flex-direction:column;align-items:stretch;overflow:hidden;border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background-color:rgb(var(--zn-panel));filter:drop-shadow(0 10px 8px rgba(0,0,0,0.04)) drop-shadow(0 4px 3px rgba(0,0,0,0.1))}.filter-bar__editor zn-datepicker{--zn-datepicker-inline-border-color:transparent}.filter-bar__editor zn-input{--zn-input-box-shadow:none;--zn-input-background-color:transparent;--zn-input-background-color-hover:transparent;--zn-input-background-color-focus:transparent;--zn-input-border-color:transparent;--zn-input-border-color-hover:transparent;--zn-input-border-color-focus:transparent;--zn-input-focus-ring-color:transparent;min-width:200px}.filter-bar zn-menu{--zn-menu-max-height:320px}.filter-bar__option-search{--zn-input-box-shadow:none;--zn-input-background-color:transparent;--zn-input-background-color-hover:transparent;--zn-input-background-color-focus:transparent;--zn-input-border-color:transparent;--zn-input-border-color-hover:transparent;--zn-input-border-color-focus:transparent;--zn-input-focus-ring-color:transparent;position:sticky;top:calc(-1 * var(--zn-spacing-2x-small));z-index:1;margin:calc(-1 * var(--zn-spacing-2x-small)) calc(-1 * var(--zn-spacing-2x-small)) 0;background-color:rgb(var(--zn-panel));border-bottom:1px solid rgb(var(--zn-border-color))}.filter-bar__suggestions{display:flex;flex-direction:column;align-items:stretch;max-height:220px;overflow-y:auto;border-top:1px solid rgb(var(--zn-border-color))}.filter-bar__suggestions ::-webkit-scrollbar{width:5px;height:5px}.filter-bar__suggestions{}.filter-bar__suggestions ::-webkit-scrollbar-track{background:transparent}.filter-bar__suggestions{}.filter-bar__suggestions ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.filter-bar__suggestions{}.filter-bar__suggestions ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.filter-bar__suggestion::part(base){justify-content:flex-start;padding:var(--zn-spacing-x-small) var(--zn-spacing-small);font-weight:var(--zn-font-weight-normal);text-transform:none;color:rgb(var(--zn-text));text-align:left}.filter-bar__operators{display:flex;flex-wrap:wrap;gap:var(--zn-spacing-2x-small);padding:var(--zn-spacing-x-small);border-bottom:1px solid rgb(var(--zn-border-color))}.filter-bar__operator::part(base){height:26px;min-height:26px;min-width:30px;padding:0 var(--zn-spacing-x-small);font-size:var(--zn-font-size-small);font-weight:var(--zn-font-weight-normal);text-transform:none;color:rgb(var(--zn-text));background-color:transparent;border-color:rgb(var(--zn-border-color))}.filter-bar__operator--selected::part(base){color:rgb(var(--zn-primary));border-color:rgb(var(--zn-primary));background-color:rgba(var(--zn-primary),0.05)}.filter-bar__separator{flex:none;height:1px;margin:var(--zn-spacing-2x-small) 0;background-color:rgb(var(--zn-border-color))}`;var b4={1:"True",0:"False"},v4=350,y4=8,x4=8,w4={eq:"is",neq:"is not",gt:">",gte:"\u2265",lt:"<",lte:"\u2264",in:"is any of",nin:"is none of",before:"before",after:"after"},Er=class extends k{constructor(){super(...arguments);this._formController=new re(this,{});this.filters=[];this.name="data-table-filter";this.value="";this.defaultFilters="";this.suggestions={};this._active=[];this._typing={};this._optionQuery={}}get validationMessage(){return""}get validity(){return pt}checkValidity(){return!0}getForm(){return this._formController.getForm()}reportValidity(){return!0}setCustomValidity(){this._formController.updateValidity()}firstUpdated(t){super.firstUpdated(t),this._formController.updateValidity()}updated(t){super.updated(t);let r=this._pendingOpen;r&&(this._pendingOpen=void 0,requestAnimationFrame(()=>{let n=[...this.shadowRoot.querySelectorAll("zn-dropdown")].find(a=>a.dataset.key===r);n?.show().then(()=>requestAnimationFrame(()=>n.querySelector("zn-input")?.focus()))}))}willUpdate(t){super.willUpdate(t),t.has("filters")&&this._active.length===0&&this.defaultFilters.split(",").map(r=>r.trim()).filter(r=>r.length>0).forEach(r=>this.addFilter(r,!1))}disconnectedCallback(){super.disconnectedCallback(),this._textTimeout&&window.clearTimeout(this._textTimeout)}get activeCount(){return this._active.filter(t=>t.value.length>0).length}clear(){this._active=[],this.emitChange(),this.emit("zn-clear")}definition(t){return this.filters.find(r=>r.id===t)}operatorsFor(t){return t.operators?.length>0?t.operators:["eq"]}comparatorFor(t){return this.operatorsFor(t)[0]}operatorLabel(t){return w4[t]??Vu[t].toLowerCase()}isMultiple(t){return t==="in"||t==="nin"}optionsFor(t){if(t.options)return t.options;if(t.type==="bool"||t.type==="boolean")return b4}addFilter(t,r=!0){if(this._active.some(a=>a.key===t))return;let n=this.definition(t);n&&(this._active=[...this._active,{key:t,comparator:this.comparatorFor(n),value:""}],r&&(this._pendingOpen=t,this.emitChange()))}removeFilter(t){this._active=this._active.filter(r=>r.key!==t),this.emitChange()}setValue(t,r,n,a){this._active=this._active.map(s=>s.key===t?{...s,value:r,label:n,timestamp:a}:s),this.emitChange()}setComparator(t,r,n){let a=this.isMultiple(r.comparator)&&!this.isMultiple(n)?this.selectedValues(t,r)[0]??"":r.value;this._active=this._active.map(s=>s.key===r.key?{...s,comparator:n,value:s.timestamp?this.serializeDate(s.timestamp,n,t.dateSubmitFormat):a}:s),this.emitChange()}toggleOption(t,r,n){if(!this.isMultiple(r.comparator)){this.setValue(r.key,r.value===n?"":n);return}let a=this.selectedValues(t,r),s=a.includes(n)?a.filter(l=>l!==n):[...a,n];this.setValue(r.key,s.join(" "))}selectedValues(t,r){return r.value.split(this.optionsFor(t)?" ":",").map(n=>n.trim()).filter(n=>n.length>0)}emitChange(){let t=this._active.filter(r=>r.value.length>0).map(r=>({key:r.key,comparator:r.comparator,value:r.value}));this.value=t.length>0?btoa(JSON.stringify(t)):"",this._formController.updateValidity(),this.emit("zn-filter-change")}handleDateInput(t,r,n){let a=n.target,s=a.timestamp;if(!s){this.setValue(r.key,"");return}this.setValue(r.key,this.serializeDate(s,r.comparator,t.dateSubmitFormat),a.value,s),t.type!=="dateTime"&&a.closest("zn-dropdown")?.hide()}serializeDate(t,r,n="legacy"){if(n==="timestamp")return t.toString();if(n==="iso"){let s=new Date(t);return new Date(s.getTime()-s.getTimezoneOffset()*6e4).toISOString()}if(r==="eq"||r==="neq")return(t/1e3).toString();let a=r==="before"?-1:1;return(Math.floor((Date.now()-t)/1e3/60)*a).toString()}handleTextInput(t,r){let a=r.target.value;this._typing={...this._typing,[t]:a},this._textTimeout&&window.clearTimeout(this._textTimeout),this._textTimeout=window.setTimeout(()=>this.setValue(t,a),v4)}suggestionsFor(t,r){let n=this.suggestions[r.key]??[];if(n.length===0)return[];let a=(this._typing[r.key]??r.value).split(",").pop().trim().toLowerCase(),s=this.selectedValues(t,r).map(l=>l.toLowerCase());return n.filter(l=>l.toLowerCase().includes(a)&&!s.includes(l.toLowerCase())).slice(0,y4)}applySuggestion(t,r,n,a){this._textTimeout&&window.clearTimeout(this._textTimeout);let s=this.isMultiple(r.comparator)?[...this.selectedValues(t,r),n].join(","):n;this._typing={...this._typing,[r.key]:s},this.setValue(r.key,s),this.isMultiple(r.comparator)||a.currentTarget.closest("zn-dropdown")?.hide()}humanize(t){return t.charAt(0).toUpperCase()+t.slice(1)}pillLabel(t,r){let n=this.humanize(t.name),a=this.selectedValues(t,r);if(a.length===0)return n;let s=this.operatorsFor(t).length>1?` ${this.operatorLabel(r.comparator)}`:"";if(a.length>1)return`${n}${s} (${a.length})`;let l=this.optionsFor(t),p=r.label??(l?l[a[0]]??a[0]:a[0]);return s?`${n}${s} ${p}`:`${n}: ${p}`}renderOperators(t,r){let n=this.operatorsFor(t);return n.length<2?B:u`
|
|
1010
|
+
</div>`}handleClick(t){let r=["menuitem","menuitemcheckbox"],n=t.composedPath(),a=n.find(h=>r.includes(h?.getAttribute?.("role")||""));if(!a)return;let s=n.find(h=>h?.getAttribute?.("role")==="menu");if(s!==this)return;let p=a;p.type==="checkbox"&&(p.checked=!p.checked),s?.closest("zn-dropdown")?.hide(),this.emit("zn-select",{detail:{item:p}})}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){let r=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),r?.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let r=this.getAllItems(),n=this.getCurrentItem(),a=n?r.indexOf(n):0;r.length>0&&(t.preventDefault(),t.stopPropagation(),t.key==="ArrowDown"?a++:t.key==="ArrowUp"?a--:t.key==="Home"?a=0:t.key==="End"&&(a=r.length-1),a<0&&(a=r.length-1),a>r.length-1&&(a=0),this.setCurrentItem(r[a]),r[a].focus())}}handleMouseDown(t){let r=t.target;this.isMenuItem(r)&&this.setCurrentItem(r)}handleSlotChange(){let t=this.getAllItems();t.length>0&&(this.setCurrentItem(t[0]),this.emit("zn-menu-ready")),this.propagateVariant()}updated(t){super.updated(t),t.has("variant")&&this.propagateVariant()}get itemVariant(){return this.variant==="shell"?"shell":"dropdown"}propagateVariant(){this.getAllItems().forEach(t=>t.setAttribute("variant",this.itemVariant))}isMenuItem(t){return t.tagName.toLowerCase()==="zn-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes(t.getAttribute("role")??"")}};nn.styles=z(b0),nn.dependencies={"zn-confirm":Hl,"zn-dropdown":pr,"zn-icon":ne,"zn-menu-item":xi,"zn-tooltip":gi},c([F("slot")],nn.prototype,"defaultSlot",2),c([d({attribute:"actions",type:Array})],nn.prototype,"actions",2),c([d({reflect:!0})],nn.prototype,"variant",2);var on=nn;nn.define("zn-menu");var v0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.filter-bar{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}.filter-bar__clear::part(base){height:32px;min-height:32px;padding:0 var(--zn-spacing-x-small);font-weight:var(--zn-font-weight-normal);text-transform:none;white-space:nowrap}.filter-bar__clear::part(base){color:rgb(var(--zn-primary))}.filter-bar__chip{display:inline-flex;align-items:center;height:32px;padding-right:var(--zn-spacing-x-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius-pill);background-color:rgb(var(--zn-panel))}.filter-bar__chip:hover{background-color:rgba(var(--zn-color-tab),0.5)}.filter-bar__pill::part(base),.filter-bar__pill::part(base):hover{border-color:transparent;background:transparent;padding-right:0}.filter-bar__remove::part(base){width:24px;min-width:24px;height:32px;min-height:32px;max-height:32px;padding:4px 0;background:transparent;background-clip:content-box;border-radius:var(--zn-border-radius-circle);color:var(--zn-text-color)}.filter-bar__remove::part(base):hover{background:rgb(var(--zn-color-border));background-clip:content-box}.filter-bar__editor{display:flex;flex-direction:column;align-items:stretch;overflow:hidden;border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);background-color:rgb(var(--zn-panel));filter:drop-shadow(0 10px 8px rgba(0,0,0,0.04)) drop-shadow(0 4px 3px rgba(0,0,0,0.1))}.filter-bar__editor zn-datepicker{--zn-datepicker-inline-border-color:transparent}.filter-bar__editor zn-input{--zn-input-box-shadow:none;--zn-input-background-color:transparent;--zn-input-background-color-hover:transparent;--zn-input-background-color-focus:transparent;--zn-input-border-color:transparent;--zn-input-border-color-hover:transparent;--zn-input-border-color-focus:transparent;--zn-input-focus-ring-color:transparent;min-width:200px}.filter-bar zn-menu{--zn-menu-max-height:320px}.filter-bar__option-search{--zn-input-box-shadow:none;--zn-input-background-color:transparent;--zn-input-background-color-hover:transparent;--zn-input-background-color-focus:transparent;--zn-input-border-color:transparent;--zn-input-border-color-hover:transparent;--zn-input-border-color-focus:transparent;--zn-input-focus-ring-color:transparent;position:sticky;top:calc(-1 * var(--zn-spacing-2x-small));z-index:1;margin:calc(-1 * var(--zn-spacing-2x-small)) calc(-1 * var(--zn-spacing-2x-small)) 0;background-color:rgb(var(--zn-panel));border-bottom:1px solid rgb(var(--zn-border-color))}.filter-bar__suggestions{display:flex;flex-direction:column;align-items:stretch;max-height:220px;overflow-y:auto;border-top:1px solid rgb(var(--zn-border-color))}.filter-bar__suggestions ::-webkit-scrollbar{width:5px;height:5px}.filter-bar__suggestions{}.filter-bar__suggestions ::-webkit-scrollbar-track{background:transparent}.filter-bar__suggestions{}.filter-bar__suggestions ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.filter-bar__suggestions{}.filter-bar__suggestions ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.filter-bar__suggestion::part(base){justify-content:flex-start;padding:var(--zn-spacing-x-small) var(--zn-spacing-small);font-weight:var(--zn-font-weight-normal);text-transform:none;color:rgb(var(--zn-text));text-align:left}.filter-bar__operators{display:flex;flex-wrap:wrap;gap:var(--zn-spacing-2x-small);padding:var(--zn-spacing-x-small);border-bottom:1px solid rgb(var(--zn-border-color))}.filter-bar__operator::part(base){height:26px;min-height:26px;min-width:30px;padding:0 var(--zn-spacing-x-small);font-size:var(--zn-font-size-small);font-weight:var(--zn-font-weight-normal);text-transform:none;color:rgb(var(--zn-text));background-color:transparent;border-color:rgb(var(--zn-border-color))}.filter-bar__operator--selected::part(base){color:rgb(var(--zn-primary));border-color:rgb(var(--zn-primary));background-color:rgba(var(--zn-primary),0.05)}.filter-bar__separator{flex:none;height:1px;margin:var(--zn-spacing-2x-small) 0;background-color:rgb(var(--zn-border-color))}`;var b4={1:"True",0:"False"},v4=350,y4=8,x4=8,w4={eq:"is",neq:"is not",gt:">",gte:"\u2265",lt:"<",lte:"\u2264",in:"is any of",nin:"is none of",before:"before",after:"after"},Er=class extends k{constructor(){super(...arguments);this._formController=new re(this,{});this.filters=[];this.name="data-table-filter";this.value="";this.defaultFilters="";this.suggestions={};this._active=[];this._typing={};this._optionQuery={}}get validationMessage(){return""}get validity(){return pt}checkValidity(){return!0}getForm(){return this._formController.getForm()}reportValidity(){return!0}setCustomValidity(){this._formController.updateValidity()}firstUpdated(t){super.firstUpdated(t),this._formController.updateValidity()}updated(t){super.updated(t);let r=this._pendingOpen;r&&(this._pendingOpen=void 0,requestAnimationFrame(()=>{let n=[...this.shadowRoot.querySelectorAll("zn-dropdown")].find(a=>a.dataset.key===r);n?.show().then(()=>requestAnimationFrame(()=>n.querySelector("zn-input")?.focus()))}))}willUpdate(t){super.willUpdate(t),t.has("filters")&&this._active.length===0&&this.defaultFilters.split(",").map(r=>r.trim()).filter(r=>r.length>0).forEach(r=>this.addFilter(r,!1))}disconnectedCallback(){super.disconnectedCallback(),this._textTimeout&&window.clearTimeout(this._textTimeout)}get activeCount(){return this._active.filter(t=>t.value.length>0).length}clear(){this._active=[],this.emitChange(),this.emit("zn-clear")}definition(t){return this.filters.find(r=>r.id===t)}operatorsFor(t){return t.operators?.length>0?t.operators:["eq"]}comparatorFor(t){return this.operatorsFor(t)[0]}operatorLabel(t){return w4[t]??Vu[t].toLowerCase()}isMultiple(t){return t==="in"||t==="nin"}optionsFor(t){if(t.options)return t.options;if(t.type==="bool"||t.type==="boolean")return b4}addFilter(t,r=!0){if(this._active.some(a=>a.key===t))return;let n=this.definition(t);n&&(this._active=[...this._active,{key:t,comparator:this.comparatorFor(n),value:""}],r&&(this._pendingOpen=t,this.emitChange()))}removeFilter(t){this._active=this._active.filter(r=>r.key!==t),this.emitChange()}setValue(t,r,n,a){this._active=this._active.map(s=>s.key===t?{...s,value:r,label:n,timestamp:a}:s),this.emitChange()}setComparator(t,r,n){let a=this.isMultiple(r.comparator)&&!this.isMultiple(n)?this.selectedValues(t,r)[0]??"":r.value;this._active=this._active.map(s=>s.key===r.key?{...s,comparator:n,value:s.timestamp?this.serializeDate(s.timestamp,n,t.dateSubmitFormat):a}:s),this.emitChange()}toggleOption(t,r,n){if(!this.isMultiple(r.comparator)){this.setValue(r.key,r.value===n?"":n);return}let a=this.selectedValues(t,r),s=a.includes(n)?a.filter(l=>l!==n):[...a,n];this.setValue(r.key,s.join(" "))}selectedValues(t,r){return r.value.split(this.optionsFor(t)?" ":",").map(n=>n.trim()).filter(n=>n.length>0)}emitChange(){let t=this._active.filter(r=>r.value.length>0).map(r=>({key:r.key,comparator:r.comparator,value:r.value}));this.value=t.length>0?btoa(JSON.stringify(t)):"",this._formController.updateValidity(),this.emit("zn-filter-change")}handleDateInput(t,r,n){let a=n.target,s=a.timestamp;if(!s){this.setValue(r.key,"");return}this.setValue(r.key,this.serializeDate(s,r.comparator,t.dateSubmitFormat),a.value,s),t.type!=="dateTime"&&a.closest("zn-dropdown")?.hide()}serializeDate(t,r,n="legacy"){if(n==="timestamp")return t.toString();if(n==="iso"){let s=new Date(t);return new Date(s.getTime()-s.getTimezoneOffset()*6e4).toISOString()}if(r==="eq"||r==="neq")return(t/1e3).toString();let a=r==="before"?-1:1;return(Math.floor((Date.now()-t)/1e3/60)*a).toString()}handleTextInput(t,r){let a=r.target.value;this._typing={...this._typing,[t]:a},this._textTimeout&&window.clearTimeout(this._textTimeout),this._textTimeout=window.setTimeout(()=>this.setValue(t,a),v4)}suggestionsFor(t,r){let n=this.suggestions[r.key]??[];if(n.length===0)return[];let a=(this._typing[r.key]??r.value).split(",").pop().trim().toLowerCase(),s=this.selectedValues(t,r).map(l=>l.toLowerCase());return n.filter(l=>l.toLowerCase().includes(a)&&!s.includes(l.toLowerCase())).slice(0,y4)}applySuggestion(t,r,n,a){this._textTimeout&&window.clearTimeout(this._textTimeout);let s=this.isMultiple(r.comparator)?[...this.selectedValues(t,r),n].join(","):n;this._typing={...this._typing,[r.key]:s},this.setValue(r.key,s),this.isMultiple(r.comparator)||a.currentTarget.closest("zn-dropdown")?.hide()}humanize(t){return t.charAt(0).toUpperCase()+t.slice(1)}pillLabel(t,r){let n=this.humanize(t.name),a=this.selectedValues(t,r);if(a.length===0)return n;let s=this.operatorsFor(t).length>1?` ${this.operatorLabel(r.comparator)}`:"";if(a.length>1)return`${n}${s} (${a.length})`;let l=this.optionsFor(t),p=r.label??(l?l[a[0]]??a[0]:a[0]);return s?`${n}${s} ${p}`:`${n}: ${p}`}renderOperators(t,r){let n=this.operatorsFor(t);return n.length<2?B:u`
|
|
1011
1011
|
<div class="filter-bar__operators">
|
|
1012
1012
|
${n.map(a=>u`
|
|
1013
1013
|
<zn-button class="${M({"filter-bar__operator":!0,"filter-bar__operator--selected":a===r.comparator})}"
|
|
@@ -1110,7 +1110,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1110
1110
|
${this._active.length>0?u`
|
|
1111
1111
|
<zn-button class="filter-bar__clear" text @click="${this.clear}">Clear</zn-button>`:B}
|
|
1112
1112
|
</div>
|
|
1113
|
-
`}};Er.styles=z(v0),Er.dependencies={"zn-button":$e,"zn-datepicker":Gu,"zn-dropdown":pr,"zn-input":nt,"zn-menu":on,"zn-menu-item":
|
|
1113
|
+
`}};Er.styles=z(v0),Er.dependencies={"zn-button":$e,"zn-datepicker":Gu,"zn-dropdown":pr,"zn-input":nt,"zn-menu":on,"zn-menu-item":xi},c([d({type:Array})],Er.prototype,"filters",2),c([d()],Er.prototype,"name",2),c([d()],Er.prototype,"value",2),c([d({attribute:"default-filters"})],Er.prototype,"defaultFilters",2),c([d({attribute:!1})],Er.prototype,"suggestions",2),c([R()],Er.prototype,"_active",2),c([R()],Er.prototype,"_typing",2),c([R()],Er.prototype,"_optionQuery",2);var Bd=Er;Er.define("zn-data-table-filter");var y0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.data-table-search{display:flex;align-items:center;gap:var(--zn-spacing-small);min-width:200px}zn-input::part(form-control-input){margin:var(--zn-focus-ring-width)}zn-input::part(form-control-help-text){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}zn-input::part(clear-button){width:auto;margin-inline-end:var(--zn-spacing-small)}.data-table-search__tooltip{display:flex;align-items:center}.data-table-search__tooltip zn-icon{color:var(--zn-input-icon-color);cursor:help}`;var Jr=class extends k{constructor(){super(...arguments);this._formController=new re(this,{});this.name="search";this.value="";this.placeholder="Search...";this.helpText="";this.debounceDelay=350;this.handleInput=t=>{let r=t.target;this.value=r.value,this._formController.updateValidity(),this._searchTimeout&&window.clearTimeout(this._searchTimeout),this._searchTimeout=window.setTimeout(()=>{this.emitSearchChange()},this.debounceDelay)};this.handleClear=()=>{this._searchTimeout&&window.clearTimeout(this._searchTimeout),this.value="";let t=this.shadowRoot?.querySelector("zn-input");t&&(t.value=""),this._formController.updateValidity(),this.emitSearchChange()}}get validationMessage(){return""}get validity(){return pt}checkValidity(){return!0}getForm(){return this._formController.getForm()}reportValidity(){return!0}setCustomValidity(){this._formController.updateValidity()}firstUpdated(t){super.firstUpdated(t),this._formController.updateValidity()}getFormData(){let t={},r=this.shadowRoot?.querySelector("slot");if(!r)return t;let n=r.assignedElements({flatten:!0}),a=["zn-input","zn-select","zn-query-builder","zn-multiselect","zn-params-select","zn-datepicker","input","select","textarea","zn-cols","zn-input-group"];return n.forEach(s=>{if(a.includes(s.tagName.toLowerCase())){let l=s,p=l.value||s.getAttribute("value"),h=l.name||s.getAttribute("name");h&&(t[h]=p)}}),t}disconnectedCallback(){super.disconnectedCallback(),this._searchTimeout&&window.clearTimeout(this._searchTimeout)}emitSearchChange(){let t=this.getFormData();this.emit("zn-search-change",{detail:{value:this.value,formData:t,searchUri:this.searchUri}})}render(){return u`
|
|
1114
1114
|
<div class="data-table-search">
|
|
1115
1115
|
<zn-input
|
|
1116
1116
|
type="search"
|
|
@@ -1121,11 +1121,15 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1121
1121
|
clearable
|
|
1122
1122
|
@zn-input="${this.handleInput}"
|
|
1123
1123
|
@zn-clear="${this.handleClear}">
|
|
1124
|
+
${this.helpText?u`
|
|
1125
|
+
<zn-tooltip slot="suffix" class="data-table-search__tooltip" content="${this.helpText}">
|
|
1126
|
+
<zn-icon src="info@lu" size="20"></zn-icon>
|
|
1127
|
+
</zn-tooltip>`:B}
|
|
1124
1128
|
<zn-icon slot="suffix" src="search@lu" size="20"></zn-icon>
|
|
1125
1129
|
</zn-input>
|
|
1126
1130
|
<slot style="display: none"></slot>
|
|
1127
1131
|
</div>
|
|
1128
|
-
`}};Jr.styles=z(y0),Jr.dependencies={"zn-input":nt},c([d()],Jr.prototype,"name",2),c([d()],Jr.prototype,"value",2),c([d()],Jr.prototype,"placeholder",2),c([d({attribute:"help-text"})],Jr.prototype,"helpText",2),c([d({attribute:"search-uri"})],Jr.prototype,"searchUri",2),c([d({type:Number,attribute:"debounce-delay"})],Jr.prototype,"debounceDelay",2);var Wu=Jr;Jr.define("zn-data-table-search");var x0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;width:100%}.empty-state{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--zn-spacing-x-small)}.empty-state ::slotted(*){display:flex;margin-top:var(--zn-spacing-small)}.empty-state .caption{font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-large);line-height:var(--zn-line-height-dense);color:rgb(var(--zn-text-heading));text-align:center}.empty-state .description{font-size:var(--zn-font-size-small);line-height:var(--zn-line-height-normal);color:rgb(var(--zn-text));text-align:center}.empty-state__wrapper{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large);flex-grow:1}.empty-state--error{background-color:rgba(var(--zn-color-error),0.05);min-height:100px}.empty-state--error .empty-state__wrapper{border:dashed 1px rgb(var(--zn-color-error)) !important}.empty-state--error ::slotted(*),.empty-state--error .caption,.empty-state--error .description{color:rgb(var(--zn-color-error))}.empty-state--info{background-color:rgba(var(--zn-color-info),0.05);min-height:100px}.empty-state--info .empty-state__wrapper{border:dashed 1px rgb(var(--zn-color-info)) !important}.empty-state--info ::slotted(*),.empty-state--info .caption,.empty-state--info .description{color:rgb(var(--zn-color-info))}.empty-state--primary{background-color:rgba(var(--zn-primary),0.05);min-height:100px}.empty-state--primary .empty-state__wrapper{border:dashed 1px rgb(var(--zn-primary)) !important}.empty-state--primary ::slotted(*),.empty-state--primary .caption,.empty-state--primary .description{color:rgb(var(--zn-primary))}.empty-state--padded{padding:var(--zn-spacing-medium)}`;var
|
|
1132
|
+
`}};Jr.styles=z(y0),Jr.dependencies={"zn-input":nt,"zn-tooltip":gi},c([d()],Jr.prototype,"name",2),c([d()],Jr.prototype,"value",2),c([d()],Jr.prototype,"placeholder",2),c([d({attribute:"help-text"})],Jr.prototype,"helpText",2),c([d({attribute:"search-uri"})],Jr.prototype,"searchUri",2),c([d({type:Number,attribute:"debounce-delay"})],Jr.prototype,"debounceDelay",2);var Wu=Jr;Jr.define("zn-data-table-search");var x0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;container-type:inline-size;width:100%}.empty-state{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--zn-spacing-x-small)}.empty-state ::slotted(*){display:flex;margin-top:var(--zn-spacing-small)}.empty-state .caption{font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-large);line-height:var(--zn-line-height-dense);color:rgb(var(--zn-text-heading));text-align:center}.empty-state .description{font-size:var(--zn-font-size-small);line-height:var(--zn-line-height-normal);color:rgb(var(--zn-text));text-align:center}.empty-state__wrapper{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large);flex-grow:1}.empty-state--error{background-color:rgba(var(--zn-color-error),0.05);min-height:100px}.empty-state--error .empty-state__wrapper{border:dashed 1px rgb(var(--zn-color-error)) !important}.empty-state--error ::slotted(*),.empty-state--error .caption,.empty-state--error .description{color:rgb(var(--zn-color-error))}.empty-state--info{background-color:rgba(var(--zn-color-info),0.05);min-height:100px}.empty-state--info .empty-state__wrapper{border:dashed 1px rgb(var(--zn-color-info)) !important}.empty-state--info ::slotted(*),.empty-state--info .caption,.empty-state--info .description{color:rgb(var(--zn-color-info))}.empty-state--primary{background-color:rgba(var(--zn-primary),0.05);min-height:100px}.empty-state--primary .empty-state__wrapper{border:dashed 1px rgb(var(--zn-primary)) !important}.empty-state--primary ::slotted(*),.empty-state--primary .caption,.empty-state--primary .description{color:rgb(var(--zn-primary))}.empty-state--padded{padding:var(--zn-spacing-medium)}`;var Li=class extends k{constructor(){super(...arguments);this.icon="";this.caption="";this.description="";this.type="";this.padded=!1;this.hasSlotController=new Y(this,"[default]","caption","description")}render(){return u`
|
|
1129
1133
|
<div class="${M({"empty-state":!0,"empty-state--error":this.type==="error","empty-state--info":this.type==="info","empty-state--primary":this.type==="primary","empty-state--padded":this.padded})}">
|
|
1130
1134
|
<div class="empty-state__wrapper">
|
|
1131
1135
|
${this.icon||this.hasSlotController.test("icon")?u`
|
|
@@ -1140,7 +1144,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1140
1144
|
</div>`:""}
|
|
1141
1145
|
<slot></slot>
|
|
1142
1146
|
</div>
|
|
1143
|
-
</div>`}};
|
|
1147
|
+
</div>`}};Li.styles=z(x0),c([d({type:String})],Li.prototype,"icon",2),c([d({type:String})],Li.prototype,"caption",2),c([d({type:String})],Li.prototype,"description",2),c([d({type:String})],Li.prototype,"type",2),c([d({type:Boolean})],Li.prototype,"padded",2);var Ku=Li;Li.define("zn-empty-state");var w0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:20rem;--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-x-small) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.hover-container{position:relative}.hover-container--top::part(popup){transform-origin:bottom}.hover-container--bottom::part(popup){transform-origin:top}.hover-container--left::part(popup){transform-origin:right}.hover-container--right::part(popup){transform-origin:left}.hover-container__body{flex-direction:column;z-index:2;background-color:var(--zn-panel-background-color);border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color));box-shadow:var(--zn-shadow-x-large);width:var(--width);max-width:calc(100% - var(--zn-spacing-2x-large));max-height:calc(100% - var(--zn-spacing-2x-large))}.hover-container__body ::slotted(*){flex:1 1 auto;display:block;overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}slot[slot=anchor]{cursor:pointer}`;var It=class extends k{constructor(){super();this.content="";this.placement="top";this.disabled=!1;this.distance=4;this.open=!1;this.skidding=0;this.trigger="hover focus";this.hoist=!0;this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()};this.handleClick=()=>{this.hasTrigger("click")&&(this.open&&this.hide(),this.show())};this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()};this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())};this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){this.closeWatcher?.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(t){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition()),super.firstUpdated(t)}hasTrigger(t){return this.trigger.split(" ").includes(t)}handleMouseOver(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),0))}handleMouseOut(){this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),0))}handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("zn-show"),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),this.body.hidden=!1,this.popup.active=!0,this.popup.reposition(),this.emit("zn-after-show")}else this.emit("zn-hide"),this.popup.active=!1,this.body.hidden=!0,this.emit("zn-after-hide")}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Mi(this,"zn-after-show")}hide(){this.open&&(this.open=!1,Mi(this,"zn-after-hide"))}render(){return u`
|
|
1144
1148
|
<zn-popup
|
|
1145
1149
|
part="base"
|
|
1146
1150
|
exportparts="popup:base__popup,arrow:base__arrow"
|
|
@@ -1591,7 +1595,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1591
1595
|
</zn-menu-item>`})}
|
|
1592
1596
|
</zn-menu>
|
|
1593
1597
|
</zn-dropdown>
|
|
1594
|
-
</td>`}};ge.styles=[z(fs),z(C0)],ge.dependencies={"zn-alert":Eu,"zn-button":$e,"zn-empty-state":Ku,"zn-chip":Gn,"zn-hover-container":Yu,"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":yi,"zn-panel":Qu,"zn-button-group":Nl,"zn-confirm":Hl,"zn-skeleton":Xu,"zn-style":Ju,"zn-data-table-search":Wu},c([d({attribute:"data-uri"})],ge.prototype,"dataUri",2),c([d({attribute:"data",type:Object})],ge.prototype,"data",2),c([d({attribute:"sort-column"})],ge.prototype,"sortColumn",2),c([d({attribute:"sort-direction"})],ge.prototype,"sortDirection",2),c([d({attribute:"local-sort",type:Boolean})],ge.prototype,"localSort",2),c([d({attribute:"filter"})],ge.prototype,"filter",2),c([d({attribute:"search"})],ge.prototype,"search",2),c([d({attribute:"wide-column"})],ge.prototype,"wideColumn",2),c([d({attribute:"key"})],ge.prototype,"key",2),c([d({attribute:"headers",type:Object})],ge.prototype,"headers",2),c([d({attribute:!1})],ge.prototype,"displayTemplates",2),c([d({attribute:"hide-headers",type:Object})],ge.prototype,"hiddenHeaders",2),c([d({attribute:"hide-columns",type:Object})],ge.prototype,"hiddenColumns",2),c([d({attribute:"unsortable-headers",type:Object})],ge.prototype,"unsortableHeaders",2),c([d({attribute:"unsortable",type:Boolean})],ge.prototype,"unsortable",2),c([d({attribute:"hide-pagination",type:Boolean})],ge.prototype,"hidePagination",2),c([d({attribute:"hide-column-select",type:Boolean})],ge.prototype,"hideColumnSelect",2),c([d({attribute:"hide-refresh",type:Boolean})],ge.prototype,"hideRefresh",2),c([d({type:Boolean})],ge.prototype,"standalone",2),c([d()],ge.prototype,"caption",2),c([d({attribute:"empty-state-caption"})],ge.prototype,"emptyStateCaption",2),c([d({attribute:"empty-state-icon"})],ge.prototype,"emptyStateIcon",2),c([d({attribute:"hide-checkboxes",type:Boolean})],ge.prototype,"hideCheckboxes",2),c([d()],ge.prototype,"filters",2),c([d()],ge.prototype,"method",2),c([d({attribute:"no-initial-load",type:Boolean})],ge.prototype,"noInitialLoad",2),c([d({attribute:"group-by"})],ge.prototype,"groupBy",2),c([d()],ge.prototype,"groups",2),c([d({attribute:"per-page-size",type:Number})],ge.prototype,"itemsPerPage",2),c([F("#select-all-rows")],ge.prototype,"selectAllButton",2),c([R()],ge.prototype,"_deselectedColumns",2),c([R()],ge.prototype,"_filtersOpen",2);var C4=ge;ge.define("zn-data-table");var E0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;--zn-col-basis:250px;--col-width:23%}:host([contents]){display:contents}.cols{display:flex;flex-wrap:wrap;flex-grow:1;flex-shrink:1;width:100%;container-type:inline-size;gap:var(--zn-gap);max-width:100%}.cols ::slotted(.zn-col-1){flex-basis:calc(var(--zn-col-basis) * 1);min-width:calc(var(--col-width) * 1);flex-grow:1}.cols ::slotted(.zn-col-2){flex-basis:calc(var(--zn-col-basis) * 2);min-width:calc(var(--col-width) * 2);flex-grow:2}.cols ::slotted(.zn-col-3){flex-basis:calc(var(--zn-col-basis) * 3);min-width:calc(var(--col-width) * 3);flex-grow:3}.cols ::slotted(.zn-col-4){flex-basis:calc(var(--zn-col-basis) * 4);min-width:calc(var(--col-width) * 4);flex-grow:4}.cols ::slotted(.zn-col-5){flex-basis:calc(var(--zn-col-basis) * 5);min-width:calc(var(--col-width) * 5);flex-grow:5}.cols ::slotted(.zn-col-6){flex-basis:calc(var(--zn-col-basis) * 6);min-width:calc(var(--col-width) * 6);flex-grow:6}.cols ::slotted(.zn-col-7){flex-basis:calc(var(--zn-col-basis) * 7);min-width:calc(var(--col-width) * 7);flex-grow:7}.cols ::slotted(.zn-col-8){flex-basis:calc(var(--zn-col-basis) * 8);min-width:calc(var(--col-width) * 8);flex-grow:8}.cols ::slotted(.zn-col-9){flex-basis:calc(var(--zn-col-basis) * 9);min-width:calc(var(--col-width) * 9);flex-grow:9}.cols ::slotted(.zn-col-10){flex-basis:calc(var(--zn-col-basis) * 10);min-width:calc(var(--col-width) * 10);flex-grow:10}.cols ::slotted(.zn-col-11){flex-basis:calc(var(--zn-col-basis) * 11);min-width:calc(var(--col-width) * 11);flex-grow:11}.cols ::slotted(.zn-col-12){flex-basis:calc(var(--zn-col-basis) * 12);min-width:calc(var(--col-width) * 12);flex-grow:12}.cols--mc-1{--col-width:calc(100% / 2)}.cols--mc-2{--col-width:calc(100% / 3)}.cols--mc-3{--col-width:calc(100% / 4)}.cols--mc-4{--col-width:calc(100% / 5)}.cols--mc-5{--col-width:calc(100% / 6)}.cols--mc-6{--col-width:calc(100% / 7)}.cols--mc-7{--col-width:calc(100% / 8)}.cols--mc-8{--col-width:calc(100% / 9)}.cols--mc-9{--col-width:calc(100% / 10)}.cols--mc-10{--col-width:calc(100% / 11)}.cols--mc-11{--col-width:calc(100% / 12)}.cols--mc-12{--col-width:calc(100% / 13)}.cols--layout-121 ::slotted(.zn-col-2){order:-1;min-width:100%}@container (min-width:1440px){.cols--layout-121 ::slotted(.zn-col-2){order:initial;min-width:46%}}.cols--divide ::slotted(*:not(:last-child)){position:relative}.cols--divide ::slotted(*:not(:last-child)):after{content:"";position:absolute;display:block;width:1px;top:0;height:100%;max-height:100%;right:calc(var(--zn-spacing-small) / 2 * -1);background-color:rgb(var(--zn-border-color))}.cols--no-gap{gap:0}.cols--border{overflow:hidden}.cols--border ::slotted(*){position:relative;padding-bottom:var(--zn-spacing-small)}.cols--border ::slotted(*):before{content:"";position:absolute;bottom:-1px;left:-100vw;right:-5px;z-index:1111;border-bottom:1px solid rgb(var(--zn-border-color)) !important}.cols ::slotted([stack-split]){display:flex;flex-direction:column;gap:var(--zn-gap)}.cols--pad{padding:var(--zn-spacing-2x-small)}.cols--pad-x{padding-inline:var(--zn-spacing-2x-small)}.cols--pad-y{padding-block:var(--zn-spacing-2x-small)}@container (max-width:359px){:host([stack-at=sm]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=sm]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=sm]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:479px){:host([stack-at=smp]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=smp]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=smp]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:599px){:host([stack-at=ph]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=ph]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=ph]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:767px){:host([stack-at=md]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=md]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=md]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:1099px){:host([stack-at=lg]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=lg]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=lg]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:1439px){:host([stack-at=hd]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=hd]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=hd]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:1959px){:host([stack-at="3k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="3k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="3k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:2559px){:host([stack-at="4k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="4k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="4k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}`;var T0={first:-1,high:-1,last:1,low:1},S4="lg",Tr=class extends k{constructor(){super(...arguments);this.layout="";this.stackAt="";this.maxColumns=0;this.noGap=!1;this.border=!1;this.divide=!1;this.childObserver=new MutationObserver(()=>this.requestUpdate())}connectedCallback(){super.connectedCallback(),this.childObserver.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this.childObserver.disconnect()}stackOrder(t){let r=t.getAttribute("stack-order");if(r===null)return null;let n=r.trim().toLowerCase();if(n in T0)return T0[n];let a=parseInt(n,10);return isNaN(a)?null:a}applyStackOrder(t,r){let n=this.stackOrder(t);return t.style.order=n===null?"":`calc(var(--zn-stacked, 0) * ${n})`,r&&(t.style.flexBasis="var(--zn-stack-basis, auto)"),n}render(){let t=this.layout.split(/[\s,]+/).map(p=>parseInt(p)).filter(p=>!!p);t.length===0&&t.push(1,1,1,1),this.layout=t.join(","),this.maxColumns=t.reduce((p,h)=>p+h,0);let r="zn-col-",n=Array.from(this.querySelectorAll(":scope > *:not([slot])")),a=t.length,s=n.length-(n.length%a||a),l=!1;return n.forEach((p,h)=>{let m=p.className.split(" ").filter(b=>!b.startsWith(r));p.className=m.join(" ");let f=h%a;p.classList.add(r+t[f]),this.border&&h>=s?p.style.overflow="hidden":p.style.overflow="",l=this.applyStackOrder(p,!1)!==null||l,p.hasAttribute("stack-split")&&(l=!0,this.childObserver.observe(p,{childList:!0}),Array.from(p.children).forEach(b=>this.applyStackOrder(b,!0)))}),l&&!this.stackAt&&(this.stackAt=S4),u`
|
|
1598
|
+
</td>`}};ge.styles=[z(fs),z(C0)],ge.dependencies={"zn-alert":Eu,"zn-button":$e,"zn-empty-state":Ku,"zn-chip":Gn,"zn-hover-container":Yu,"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":xi,"zn-panel":Qu,"zn-button-group":Nl,"zn-confirm":Hl,"zn-skeleton":Xu,"zn-style":Ju,"zn-data-table-search":Wu},c([d({attribute:"data-uri"})],ge.prototype,"dataUri",2),c([d({attribute:"data",type:Object})],ge.prototype,"data",2),c([d({attribute:"sort-column"})],ge.prototype,"sortColumn",2),c([d({attribute:"sort-direction"})],ge.prototype,"sortDirection",2),c([d({attribute:"local-sort",type:Boolean})],ge.prototype,"localSort",2),c([d({attribute:"filter"})],ge.prototype,"filter",2),c([d({attribute:"search"})],ge.prototype,"search",2),c([d({attribute:"wide-column"})],ge.prototype,"wideColumn",2),c([d({attribute:"key"})],ge.prototype,"key",2),c([d({attribute:"headers",type:Object})],ge.prototype,"headers",2),c([d({attribute:!1})],ge.prototype,"displayTemplates",2),c([d({attribute:"hide-headers",type:Object})],ge.prototype,"hiddenHeaders",2),c([d({attribute:"hide-columns",type:Object})],ge.prototype,"hiddenColumns",2),c([d({attribute:"unsortable-headers",type:Object})],ge.prototype,"unsortableHeaders",2),c([d({attribute:"unsortable",type:Boolean})],ge.prototype,"unsortable",2),c([d({attribute:"hide-pagination",type:Boolean})],ge.prototype,"hidePagination",2),c([d({attribute:"hide-column-select",type:Boolean})],ge.prototype,"hideColumnSelect",2),c([d({attribute:"hide-refresh",type:Boolean})],ge.prototype,"hideRefresh",2),c([d({type:Boolean})],ge.prototype,"standalone",2),c([d()],ge.prototype,"caption",2),c([d({attribute:"empty-state-caption"})],ge.prototype,"emptyStateCaption",2),c([d({attribute:"empty-state-icon"})],ge.prototype,"emptyStateIcon",2),c([d({attribute:"hide-checkboxes",type:Boolean})],ge.prototype,"hideCheckboxes",2),c([d()],ge.prototype,"filters",2),c([d()],ge.prototype,"method",2),c([d({attribute:"no-initial-load",type:Boolean})],ge.prototype,"noInitialLoad",2),c([d({attribute:"group-by"})],ge.prototype,"groupBy",2),c([d()],ge.prototype,"groups",2),c([d({attribute:"per-page-size",type:Number})],ge.prototype,"itemsPerPage",2),c([F("#select-all-rows")],ge.prototype,"selectAllButton",2),c([R()],ge.prototype,"_deselectedColumns",2),c([R()],ge.prototype,"_filtersOpen",2);var C4=ge;ge.define("zn-data-table");var E0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;--zn-col-basis:250px;--col-width:23%}:host([contents]){display:contents}.cols{display:flex;flex-wrap:wrap;flex-grow:1;flex-shrink:1;width:100%;container-type:inline-size;gap:var(--zn-gap);max-width:100%}.cols ::slotted(.zn-col-1){flex-basis:calc(var(--zn-col-basis) * 1);min-width:calc(var(--col-width) * 1);flex-grow:1}.cols ::slotted(.zn-col-2){flex-basis:calc(var(--zn-col-basis) * 2);min-width:calc(var(--col-width) * 2);flex-grow:2}.cols ::slotted(.zn-col-3){flex-basis:calc(var(--zn-col-basis) * 3);min-width:calc(var(--col-width) * 3);flex-grow:3}.cols ::slotted(.zn-col-4){flex-basis:calc(var(--zn-col-basis) * 4);min-width:calc(var(--col-width) * 4);flex-grow:4}.cols ::slotted(.zn-col-5){flex-basis:calc(var(--zn-col-basis) * 5);min-width:calc(var(--col-width) * 5);flex-grow:5}.cols ::slotted(.zn-col-6){flex-basis:calc(var(--zn-col-basis) * 6);min-width:calc(var(--col-width) * 6);flex-grow:6}.cols ::slotted(.zn-col-7){flex-basis:calc(var(--zn-col-basis) * 7);min-width:calc(var(--col-width) * 7);flex-grow:7}.cols ::slotted(.zn-col-8){flex-basis:calc(var(--zn-col-basis) * 8);min-width:calc(var(--col-width) * 8);flex-grow:8}.cols ::slotted(.zn-col-9){flex-basis:calc(var(--zn-col-basis) * 9);min-width:calc(var(--col-width) * 9);flex-grow:9}.cols ::slotted(.zn-col-10){flex-basis:calc(var(--zn-col-basis) * 10);min-width:calc(var(--col-width) * 10);flex-grow:10}.cols ::slotted(.zn-col-11){flex-basis:calc(var(--zn-col-basis) * 11);min-width:calc(var(--col-width) * 11);flex-grow:11}.cols ::slotted(.zn-col-12){flex-basis:calc(var(--zn-col-basis) * 12);min-width:calc(var(--col-width) * 12);flex-grow:12}.cols--mc-1{--col-width:calc(100% / 2)}.cols--mc-2{--col-width:calc(100% / 3)}.cols--mc-3{--col-width:calc(100% / 4)}.cols--mc-4{--col-width:calc(100% / 5)}.cols--mc-5{--col-width:calc(100% / 6)}.cols--mc-6{--col-width:calc(100% / 7)}.cols--mc-7{--col-width:calc(100% / 8)}.cols--mc-8{--col-width:calc(100% / 9)}.cols--mc-9{--col-width:calc(100% / 10)}.cols--mc-10{--col-width:calc(100% / 11)}.cols--mc-11{--col-width:calc(100% / 12)}.cols--mc-12{--col-width:calc(100% / 13)}.cols--layout-121 ::slotted(.zn-col-2){order:-1;min-width:100%}@container (min-width:1440px){.cols--layout-121 ::slotted(.zn-col-2){order:initial;min-width:46%}}.cols--divide ::slotted(*:not(:last-child)){position:relative}.cols--divide ::slotted(*:not(:last-child)):after{content:"";position:absolute;display:block;width:1px;top:0;height:100%;max-height:100%;right:calc(var(--zn-spacing-small) / 2 * -1);background-color:rgb(var(--zn-border-color))}.cols--no-gap{gap:0}.cols--border{overflow:hidden}.cols--border ::slotted(*){position:relative;padding-bottom:var(--zn-spacing-small)}.cols--border ::slotted(*):before{content:"";position:absolute;bottom:-1px;left:-100vw;right:-5px;z-index:1111;border-bottom:1px solid rgb(var(--zn-border-color)) !important}.cols ::slotted([stack-split]){display:flex;flex-direction:column;gap:var(--zn-gap)}.cols--pad{padding:var(--zn-spacing-2x-small)}.cols--pad-x{padding-inline:var(--zn-spacing-2x-small)}.cols--pad-y{padding-block:var(--zn-spacing-2x-small)}@container (max-width:359px){:host([stack-at=sm]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=sm]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=sm]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:479px){:host([stack-at=smp]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=smp]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=smp]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:599px){:host([stack-at=ph]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=ph]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=ph]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:767px){:host([stack-at=md]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=md]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=md]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:1099px){:host([stack-at=lg]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=lg]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=lg]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:1439px){:host([stack-at=hd]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at=hd]) .cols ::slotted([stack-split]){display:contents}:host([stack-at=hd]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:1959px){:host([stack-at="3k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="3k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="3k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}@container (max-width:2559px){:host([stack-at="4k"]) .cols ::slotted(*){--zn-stacked:1;--zn-stack-basis:100%;flex-basis:100%;min-width:100%;max-width:100%}:host([stack-at="4k"]) .cols ::slotted([stack-split]){display:contents}:host([stack-at="4k"]) .cols--divide ::slotted(*:not(:last-child)):after{display:none}}`;var T0={first:-1,high:-1,last:1,low:1},S4="lg",Tr=class extends k{constructor(){super(...arguments);this.layout="";this.stackAt="";this.maxColumns=0;this.noGap=!1;this.border=!1;this.divide=!1;this.childObserver=new MutationObserver(()=>this.requestUpdate())}connectedCallback(){super.connectedCallback(),this.childObserver.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this.childObserver.disconnect()}stackOrder(t){let r=t.getAttribute("stack-order");if(r===null)return null;let n=r.trim().toLowerCase();if(n in T0)return T0[n];let a=parseInt(n,10);return isNaN(a)?null:a}applyStackOrder(t,r){let n=this.stackOrder(t);return t.style.order=n===null?"":`calc(var(--zn-stacked, 0) * ${n})`,r&&(t.style.flexBasis="var(--zn-stack-basis, auto)"),n}render(){let t=this.layout.split(/[\s,]+/).map(p=>parseInt(p)).filter(p=>!!p);t.length===0&&t.push(1,1,1,1),this.layout=t.join(","),this.maxColumns=t.reduce((p,h)=>p+h,0);let r="zn-col-",n=Array.from(this.querySelectorAll(":scope > *:not([slot])")),a=t.length,s=n.length-(n.length%a||a),l=!1;return n.forEach((p,h)=>{let m=p.className.split(" ").filter(b=>!b.startsWith(r));p.className=m.join(" ");let f=h%a;p.classList.add(r+t[f]),this.border&&h>=s?p.style.overflow="hidden":p.style.overflow="",l=this.applyStackOrder(p,!1)!==null||l,p.hasAttribute("stack-split")&&(l=!0,this.childObserver.observe(p,{childList:!0}),Array.from(p.children).forEach(b=>this.applyStackOrder(b,!0)))}),l&&!this.stackAt&&(this.stackAt=S4),u`
|
|
1595
1599
|
<div part="base" class="${M({cols:!0,"cols--no-gap":this.noGap,"cols--border":this.border,"cols--pad":this.pad,"cols--pad-x":this.padX,"cols--pad-y":this.padY,"cols--divide":this.divide,[`cols--layout-${this.layout.replaceAll(",","")}`]:!!this.layout,[`cols--mc-${this.maxColumns}`]:!!this.maxColumns})}">
|
|
1596
1600
|
<slot></slot>
|
|
1597
1601
|
</div>
|
|
@@ -1660,7 +1664,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1660
1664
|
@zn-input="${this.handleInputValueChange}"></zn-input>`):B}
|
|
1661
1665
|
</div>
|
|
1662
1666
|
</zn-dropdown>
|
|
1663
|
-
`}};jt.styles=z($0),jt.dependencies={"zn-button":$e,"zn-dropdown":pr,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".defined-label__input")],jt.prototype,"input",2),c([F(".defined-label__dropdown")],jt.prototype,"dropdown",2),c([d()],jt.prototype,"value",2),c([d()],jt.prototype,"inputValue",2),c([d({attribute:"input-size",reflect:!0})],jt.prototype,"inputSize",2),c([d()],jt.prototype,"name",2),c([d()],jt.prototype,"title",2),c([d({type:Boolean})],jt.prototype,"disabled",2),c([d({attribute:"allow-custom",type:Boolean})],jt.prototype,"allowCustom",2),c([d({type:Array,attribute:"predefined-labels"})],jt.prototype,"predefinedLabels",2),c([K("value",{waitUntilFirstUpdate:!0})],jt.prototype,"handleValueChange",1);var T4=jt;jt.define("zn-defined-label");var A0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.note{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;flex-wrap:nowrap;padding:var(--zn-spacing-x-small) var(--zn-spacing-small);gap:var(--zn-spacing-3x-small);border-left:3px solid transparent}.note__header{display:flex;justify-content:space-between}.note__header__caption{font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-heading))}.note__header__date{font-size:var(--zn-font-size-small)}.note__header__end{display:flex;gap:var(--zn-spacing-small)}.note__body-container{position:relative;max-width:var(--zn-container-md)}.note__body{display:block}.note__toggle{margin-top:var(--zn-spacing-2x-small)}.note__toggle__btn{background:none;border:none;color:var(--zn-color-primary-500,currentColor);font:inherit;cursor:pointer;padding:0}.note__body--clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--note-collapse-lines,0);overflow:hidden;text-overflow:ellipsis}.note--red .note__header__caption{color:hsl(from var(--zn-color-red-600) h s 40%)}.note--red{border-left:3px solid var(--zn-color-red-600);background-color:hsla(from var(--zn-color-red-600) h s l/0.02)}.note--blue .note__header__caption{color:hsl(from var(--zn-color-blue-500) h s 40%)}.note--blue{border-left:3px solid var(--zn-color-blue-500);background-color:hsla(from var(--zn-color-blue-500) h s l/0.02)}.note--orange .note__header__caption{color:hsl(from var(--zn-color-orange-500) h s 40%)}.note--orange{border-left:3px solid var(--zn-color-orange-500);background-color:hsla(from var(--zn-color-orange-500) h s l/0.02)}.note--yellow .note__header__caption{color:hsl(from var(--zn-color-yellow-400) h s 40%)}.note--yellow{border-left:3px solid var(--zn-color-yellow-400);background-color:hsla(from var(--zn-color-yellow-400) h s l/0.02)}.note--indigo .note__header__caption{color:hsl(from var(--zn-color-indigo-400) h s 40%)}.note--indigo{border-left:3px solid var(--zn-color-indigo-400);background-color:hsla(from var(--zn-color-indigo-400) h s l/0.02)}.note--violet .note__header__caption{color:hsl(from var(--zn-color-violet-600) h s 40%)}.note--violet{border-left:3px solid var(--zn-color-violet-600);background-color:hsla(from var(--zn-color-violet-600) h s l/0.02)}.note--green .note__header__caption{color:hsl(from var(--zn-color-green-500) h s 40%)}.note--green{border-left:3px solid var(--zn-color-green-500);background-color:hsla(from var(--zn-color-green-500) h s l/0.02)}.note--pink .note__header__caption{color:hsl(from var(--zn-color-pink-400) h s 40%)}.note--pink{border-left:3px solid var(--zn-color-pink-400);background-color:hsla(from var(--zn-color-pink-400) h s l/0.02)}.note--gray .note__header__caption{color:hsl(from var(--zn-color-gray-500) h s 40%)}.note--gray{border-left:3px solid var(--zn-color-gray-500);background-color:hsla(from var(--zn-color-gray-500) h s l/0.02)}.note__footer{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}`;var
|
|
1667
|
+
`}};jt.styles=z($0),jt.dependencies={"zn-button":$e,"zn-dropdown":pr,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".defined-label__input")],jt.prototype,"input",2),c([F(".defined-label__dropdown")],jt.prototype,"dropdown",2),c([d()],jt.prototype,"value",2),c([d()],jt.prototype,"inputValue",2),c([d({attribute:"input-size",reflect:!0})],jt.prototype,"inputSize",2),c([d()],jt.prototype,"name",2),c([d()],jt.prototype,"title",2),c([d({type:Boolean})],jt.prototype,"disabled",2),c([d({attribute:"allow-custom",type:Boolean})],jt.prototype,"allowCustom",2),c([d({type:Array,attribute:"predefined-labels"})],jt.prototype,"predefinedLabels",2),c([K("value",{waitUntilFirstUpdate:!0})],jt.prototype,"handleValueChange",1);var T4=jt;jt.define("zn-defined-label");var A0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.note{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;flex-wrap:nowrap;padding:var(--zn-spacing-x-small) var(--zn-spacing-small);gap:var(--zn-spacing-3x-small);border-left:3px solid transparent}.note__header{display:flex;justify-content:space-between}.note__header__caption{font-weight:var(--zn-font-weight-semibold);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-heading))}.note__header__date{font-size:var(--zn-font-size-small)}.note__header__end{display:flex;gap:var(--zn-spacing-small)}.note__body-container{position:relative;max-width:var(--zn-container-md)}.note__body{display:block}.note__toggle{margin-top:var(--zn-spacing-2x-small)}.note__toggle__btn{background:none;border:none;color:var(--zn-color-primary-500,currentColor);font:inherit;cursor:pointer;padding:0}.note__body--clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--note-collapse-lines,0);overflow:hidden;text-overflow:ellipsis}.note--red .note__header__caption{color:hsl(from var(--zn-color-red-600) h s 40%)}.note--red{border-left:3px solid var(--zn-color-red-600);background-color:hsla(from var(--zn-color-red-600) h s l/0.02)}.note--blue .note__header__caption{color:hsl(from var(--zn-color-blue-500) h s 40%)}.note--blue{border-left:3px solid var(--zn-color-blue-500);background-color:hsla(from var(--zn-color-blue-500) h s l/0.02)}.note--orange .note__header__caption{color:hsl(from var(--zn-color-orange-500) h s 40%)}.note--orange{border-left:3px solid var(--zn-color-orange-500);background-color:hsla(from var(--zn-color-orange-500) h s l/0.02)}.note--yellow .note__header__caption{color:hsl(from var(--zn-color-yellow-400) h s 40%)}.note--yellow{border-left:3px solid var(--zn-color-yellow-400);background-color:hsla(from var(--zn-color-yellow-400) h s l/0.02)}.note--indigo .note__header__caption{color:hsl(from var(--zn-color-indigo-400) h s 40%)}.note--indigo{border-left:3px solid var(--zn-color-indigo-400);background-color:hsla(from var(--zn-color-indigo-400) h s l/0.02)}.note--violet .note__header__caption{color:hsl(from var(--zn-color-violet-600) h s 40%)}.note--violet{border-left:3px solid var(--zn-color-violet-600);background-color:hsla(from var(--zn-color-violet-600) h s l/0.02)}.note--green .note__header__caption{color:hsl(from var(--zn-color-green-500) h s 40%)}.note--green{border-left:3px solid var(--zn-color-green-500);background-color:hsla(from var(--zn-color-green-500) h s l/0.02)}.note--pink .note__header__caption{color:hsl(from var(--zn-color-pink-400) h s 40%)}.note--pink{border-left:3px solid var(--zn-color-pink-400);background-color:hsla(from var(--zn-color-pink-400) h s l/0.02)}.note--gray .note__header__caption{color:hsl(from var(--zn-color-gray-500) h s 40%)}.note--gray{border-left:3px solid var(--zn-color-gray-500);background-color:hsla(from var(--zn-color-gray-500) h s l/0.02)}.note__footer{display:flex;flex-direction:row;flex-wrap:wrap;gap:var(--zn-spacing-x-small)}`;var qi=class extends k{constructor(){super(...arguments);this.caption="";this.date="";this.body="";this.hasSlotController=new Y(this,"caption","date","[default]","snippet","footer");this.expanded=!1}_toggleExpand(){this.expanded=!this.expanded}render(){let t=this.hasSlotController.test("snippet")&&this.hasSlotController.test("[default]");return u`
|
|
1664
1668
|
<div class="${M({note:!0,"note--red":this.color==="red","note--blue":this.color==="blue","note--orange":this.color==="orange","note--yellow":this.color==="yellow","note--indigo":this.color==="indigo","note--violet":this.color==="violet","note--green":this.color==="green","note--pink":this.color==="pink","note--gray":this.color==="gray"})}">
|
|
1665
1669
|
<div class="note__header">
|
|
1666
1670
|
<slot name="caption" class="note__header__caption">${this.caption}</slot>
|
|
@@ -1690,7 +1694,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1690
1694
|
</div>`:""}
|
|
1691
1695
|
<slot name="footer" class="note__footer"></slot>
|
|
1692
1696
|
</div>
|
|
1693
|
-
`}};
|
|
1697
|
+
`}};qi.styles=z(A0),c([d({reflect:!0})],qi.prototype,"color",2),c([d({reflect:!0})],qi.prototype,"caption",2),c([d({reflect:!0})],qi.prototype,"date",2),c([d({type:HTMLElement,reflect:!0})],qi.prototype,"body",2),c([R()],qi.prototype,"expanded",2);var $4=qi;qi.define("zn-note");var M0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-description.tile--has-caption{padding-block:var(--zn-base-gap)}.tile--has-image{padding:var(--zn-base-gap)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;justify-content:space-between;flex:1;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;flex-shrink:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}`;var Gt=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","properties","actions","image")}_isLink(){return this.href||this.dataUri}_handleActionsClick(t){if(this._isLink()){for(let r of t.composedPath()){if(r===this)break;if(!(r instanceof Element))continue;let n=r.getAttribute("href");if(r.hasAttribute("data-uri")||n!==null&&n!==""&&!n.startsWith("#"))return}t.stopPropagation()}}render(){let t=this._isLink(),r=t?Ai`a`:Ai`div`,n=this.caption&&this.caption.length>0,a=this.description&&this.description.length>0,s=this.hasSlotController.test("properties"),l=this.hasSlotController.test("actions"),p=this.hasSlotController.test("image");return ke`
|
|
1694
1698
|
<div
|
|
1695
1699
|
class="${M({tile:!0,"tile--flush":this.flush,"tile--flush-x":this.flushX,"tile--flush-y":this.flushY,"tile--inline":this.inline,"tile--plain":this.plain,"tile--has-href":t,"tile--has-caption":n,"tile--has-description":a,"tile--has-properties":s,"tile--has-actions":l,"tile--has-image":p})}">
|
|
1696
1700
|
<${r}
|
|
@@ -1798,7 +1802,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1798
1802
|
gaid=${this.acceptGaid}
|
|
1799
1803
|
no-hover>
|
|
1800
1804
|
</zn-button>
|
|
1801
|
-
</slot>`}};Ze.styles=z(I0),c([d({type:Boolean,reflect:!0})],Ze.prototype,"available",2),c([d({type:Boolean,reflect:!0})],Ze.prototype,"incoming",2),c([d({reflect:!0})],Ze.prototype,"variant",2),c([d()],Ze.prototype,"header",2),c([d()],Ze.prototype,"icon",2),c([d({reflect:!0})],Ze.prototype,"color",2),c([d()],Ze.prototype,"title",2),c([d()],Ze.prototype,"subtitle",2),c([d({type:Number})],Ze.prototype,"progress",2),c([d({attribute:"progress-color"})],Ze.prototype,"progressColor",2),c([d({attribute:"item-id"})],Ze.prototype,"itemId",2),c([d({attribute:"accept-uri"})],Ze.prototype,"acceptUri",2),c([d({type:Number,attribute:"reserved-until"})],Ze.prototype,"reservedUntil",2),c([d({type:Number,attribute:"auto-accept-delay"})],Ze.prototype,"autoAcceptDelay",2),c([d({type:Boolean,reflect:!0})],Ze.prototype,"rejectable",2),c([d({attribute:"accept-icon"})],Ze.prototype,"acceptIcon",2),c([d({attribute:"accept-gaid"})],Ze.prototype,"acceptGaid",2),c([d({attribute:"reject-icon"})],Ze.prototype,"rejectIcon",2),c([d({attribute:"reject-label"})],Ze.prototype,"rejectLabel",2);var q4=Ze;Ze.define("zn-channel-tile");function Co(o,i){let t=o.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",r=o.textColor??t,n=o.enableAnimations!==!1&&o.enableAnimations!==0,a=typeof o.enableAnimations=="number"?o.enableAnimations:1500;return{animation:n,animationDuration:a,animationEasing:"cubicOut",...o.colors?{color:o.colors}:{},textStyle:{color:r},tooltip:{trigger:i,appendTo:"body",valueFormatter:o.yAxisAppend?s=>`${s}${o.yAxisAppend}`:void 0},legend:{top:0,right:0,icon:"circle",textStyle:{color:r}}}}function Vd(o){return{...Co(o,"axis"),grid:{left:40,right:20,top:40,bottom:30}}}function I4(o){return o.length===0||o.every(i=>!i.data||i.data.length===0)}function Ud(o){let i=I4(o.data)?{min:0,max:6}:{},t=o.scale?{scale:!0,...typeof o.scale=="number"?{boundaryGap:[`${o.scale}%`,`${o.scale}%`]}:{}}:{};return{type:"value",...o.borderColor?{splitLine:{lineStyle:{color:o.borderColor}}}:{},...i,...t,axisLabel:o.yAxisAppend?{formatter:n=>`${n}${o.yAxisAppend}`}:{}}}function jd(o,i=!1){let t=o.borderColor?{axisLine:{lineStyle:{color:o.borderColor}}}:{};return o.xAxisType==="datetime"?{type:"time",...t}:o.xAxisType==="numeric"?{type:"value",...t}:{type:"category",data:o.categories,...i?{boundaryGap:!1}:{},...t}}function R0(o){return o.map(i=>i&&typeof i=="object"&&!Array.isArray(i)&&"x"in i&&"y"in i?[i.x,i.y]:i)}function Gd(o,i,t=()=>({})){return o.data.map(r=>({type:i,name:r.name,data:R0(r.data),...r.color?{itemStyle:{color:r.color}}:{},...o.stacked?{stack:"total"}:{},...o.enableAnimations!==!1&&o.enableAnimations!==0&&i==="bar"?{animationDelay:n=>n*50}:{},...t(r)}))}function em(o){return{...Vd(o),xAxis:jd(o),yAxis:Ud(o),series:Gd(o,"bar")}}function N0(o){return{...Vd(o),xAxis:jd(o,!0),yAxis:Ud(o),series:Gd(o,"line",()=>({symbolSize:o.datapointSize,smooth:o.smooth}))}}function O0(o){return{...Vd(o),xAxis:jd(o,!0),yAxis:Ud(o),series:Gd(o,"line",()=>({symbolSize:o.datapointSize,smooth:o.smooth,areaStyle:{opacity:.1}}))}}function P0(o){return{...Vd(o),xAxis:jd({...o,xAxisType:o.xAxisType??"numeric"}),yAxis:Ud(o),series:Gd(o,"scatter",()=>({symbolSize:o.datapointSize}))}}function tm(o,i){return o.map((t,r)=>{if(typeof t=="number")return{name:i[r]??`${r+1}`,value:t};let{color:n,itemStyle:a,...s}=t;return{...s,name:t.name??i[r]??`${r+1}`,...n?{itemStyle:{...a,color:n}}:a?{itemStyle:a}:{}}})}function H0(o){let i=o.data[0]??{name:"",data:[]},t=o.textColor??(o.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)"),r=o.type==="donut"?o.innerRadius??"50%":0,n=o.outerRadius??"70%";return{...Co(o,"item"),series:[{type:"pie",name:i.name,data:tm(i.data??[],o.categories),radius:[r,n],center:["50%","55%"],avoidLabelOverlap:!0,label:{show:o.showLabels??!1,color:t},labelLine:{show:o.showLabels??!1,...o.borderColor?{lineStyle:{color:o.borderColor}}:{}},emphasis:{label:{show:o.showLabels??!1}}}]}}function F0(o){let i=o.indicators?.length?o.indicators:o.categories.map(t=>({name:t}));return{...Co(o,"item"),radar:{indicator:i},series:[{type:"radar",data:o.data.map(t=>({name:t.name,value:R0(t.data),...t.color?{itemStyle:{color:t.color},lineStyle:{color:t.color}}:{}}))}]}}function B0(o){let i=o.data[0]??{name:"",data:[]},[t]=i.data,r=typeof t=="number"?[{name:i.name,value:t}]:tm(i.data??[],o.categories);return{...Co(o,"item"),series:[{type:"gauge",name:i.name,min:o.minValue??0,max:o.maxValue??100,data:r,progress:{show:!0},detail:{valueAnimation:o.enableAnimations!==!1&&o.enableAnimations!==0,formatter:o.yAxisAppend?n=>`${n}${o.yAxisAppend}`:"{value}"}}]}}function V0(o){let i=o.data[0]??{name:"",data:[]};return{...Co(o,"item"),series:[{type:"funnel",name:i.name,min:o.minValue,max:o.maxValue,data:tm(i.data??[],o.categories),label:{show:o.showLabels??!0},emphasis:{label:{fontWeight:"bold"}}}]}}function D4(o){return Array.isArray(o)?typeof o[2]=="number":!1}function D0(o,i,t){let r=o.filter(D4).map(n=>n[2]);return r.length?Math[i](...r):t}function U0(o){let i=o.data[0]??{name:"",data:[]},t=i.data??[];return{...Co(o,"item"),grid:{left:60,right:20,top:40,bottom:70},xAxis:{type:"category",data:o.categories,splitArea:{show:!0}},yAxis:{type:"category",data:o.yCategories??[],splitArea:{show:!0}},visualMap:{min:o.minValue??D0(t,"min",0),max:o.maxValue??D0(t,"max",100),calculable:!0,orient:"horizontal",left:"center",bottom:0},series:[{type:"heatmap",name:i.name,data:t,label:{show:o.showLabels??!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.35)"}}}]}}function j0(o){let i=o.data[0]??{name:"",data:[]};return{...Co(o,"item"),series:[{type:"treemap",name:i.name,data:i.data??[],label:{show:o.showLabels??!0},upperLabel:{show:o.showLabels??!0}}]}}function G0(o){let i=o.data[0]??{name:"",data:[]};return{...Co(o,"item"),series:[{type:"sunburst",name:i.name,data:i.data??[],radius:[o.innerRadius??0,o.outerRadius??"90%"],label:{show:o.showLabels??!0},emphasis:{focus:"ancestor"}}]}}function R4(o){let i=new Set,t=[];for(let r of o)i.has(r.source)||(i.add(r.source),t.push({name:r.source})),i.has(r.target)||(i.add(r.target),t.push({name:r.target}));return t}function W0(o){let i=o.data[0]??{name:"",data:[]},t=i.data??[],n=i.nodes??R4(t),a=o.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",s=o.textColor??a,l=o.enableAnimations!==!1&&o.enableAnimations!==0,p=typeof o.enableAnimations=="number"?o.enableAnimations:1500;return{animation:l,animationDuration:p,animationEasing:"cubicOut",...o.colors?{color:o.colors}:{},textStyle:{color:s},tooltip:{trigger:"item",appendTo:"body"},series:[{type:"sankey",name:i.name,data:n,links:t,label:{color:s,textBorderWidth:0},lineStyle:{color:"source",opacity:o.theme==="dark"?.4:.3},emphasis:{focus:"adjacency"}}]}}var K0;function Wd(){return K0??(K0=(async()=>{let[o,i,t,r]=await Promise.all([import("./chunks/zn.AI3T35DX.js"),import("./chunks/zn.EHO4QQOL.js"),import("./chunks/zn.6RARZYEJ.js"),import("./chunks/zn.S4ZVBYAS.js")]);return o.use([i.BarChart,i.FunnelChart,i.GaugeChart,i.HeatmapChart,i.LineChart,i.PieChart,i.RadarChart,i.SankeyChart,i.ScatterChart,i.SunburstChart,i.TreemapChart,t.GridComponent,t.TooltipComponent,t.LegendComponent,t.TitleComponent,t.DataZoomComponent,t.RadarComponent,t.VisualMapComponent,r.CanvasRenderer]),o})()),K0}var Y0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;width:100%}.chart{position:relative}`;var Pe=class extends k{constructor(){super(...arguments);this.type="bar";this.data=[];this.categories=[];this.yCategories=[];this.indicators=[];this.datapointSize=1;this.stacked=!1;this.live=!1;this.dataUrl="";this.liveInterval=1e3;this.height=300;this.enableAnimations=!1;this.smooth=!1;this.scale=!1;this.resizeObserver=new ht(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(t){this.initPromise=this.initChart().catch(()=>{}),super.firstUpdated(t)}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}getTheme(){return this.getAttribute("m")==="dark"?"dark":this.getAttribute("m")==="light"?"light":this.getAttribute("t")==="dark"?"dark":"light"}getTextColor(){let t=getComputedStyle(this),r=t.getPropertyValue("--zn-text").trim();if(!r)return;let n=t.getPropertyValue("--zn-text-opacity").trim()||"1";return`rgba(${r}, ${n})`}getBorderColor(){let t=getComputedStyle(this).getPropertyValue("--zn-border-color").trim();return t?`rgb(${t})`:void 0}buildOption(){let t={type:this.type,data:this.data??[],categories:Array.isArray(this.categories)?this.categories:[],xAxisType:this.xAxis,yAxisAppend:this.yAxisAppend,stacked:this.stacked,enableAnimations:this.enableAnimations,datapointSize:this.datapointSize,colors:this.colors,theme:this.getTheme(),smooth:this.smooth,scale:this.scale,textColor:this.getTextColor(),borderColor:this.getBorderColor(),innerRadius:this.innerRadius,outerRadius:this.outerRadius,showLabels:this.showLabels,yCategories:Array.isArray(this.yCategories)?this.yCategories:[],indicators:Array.isArray(this.indicators)?this.indicators:[],minValue:this.minValue,maxValue:this.maxValue};switch(this.type){case"bar":return em(t);case"line":return N0(t);case"area":return O0(t);case"funnel":return V0(t);case"gauge":return B0(t);case"heatmap":return U0(t);case"donut":case"pie":return H0(t);case"radar":return F0(t);case"sankey":return W0(t);case"scatter":return P0(t);case"sunburst":return G0(t);case"treemap":return j0(t);default:return em(t)}}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;t.style.height=`${this.height}px`;let r=await Wd();!this.isConnected||this.chart||(this.echarts=r,this.chart=r.init(t),this.chart.setOption(this.buildOption()),this.syncGroup&&(this.chart.group=this.syncGroup,r.connect(this.syncGroup)),this.resizeObserver.observe(t),this.live&&this.dataUrl&&this.startLive())}startLive(){this.liveTimer=window.setInterval(async()=>{try{let r=await(await fetch(this.dataUrl)).json();this.data=r,this.chart?.setOption({...this.buildOption()})}catch{}},this.liveInterval)}reinit(){this.chart?.dispose(),this.chart=void 0,this.initPromise=this.initChart().catch(()=>{})}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),!!this.chart){if(t==="t"){this.reinit();return}if(t==="type"){this.reinit();return}if(t==="height"){let a=this.shadowRoot?.getElementById("chart");a&&(a.style.height=`${this.height}px`),this.chart.resize();return}if(t==="sync-group"){n?(this.chart.group=n,this.echarts?.connect(n)):this.chart.group="";return}this.chart.setOption({...this.buildOption()})}}disconnectedCallback(){super.disconnectedCallback(),this.liveTimer&&clearInterval(this.liveTimer),this.chart?.dispose(),this.chart=void 0}render(){return u`<div class="chart"><div id="chart"></div></div>`}};Pe.styles=z(Y0),c([d()],Pe.prototype,"type",2),c([d({type:Array})],Pe.prototype,"data",2),c([d({type:Array})],Pe.prototype,"categories",2),c([d({attribute:"y-categories",type:Array})],Pe.prototype,"yCategories",2),c([d({type:Array})],Pe.prototype,"indicators",2),c([d({attribute:"xaxis"})],Pe.prototype,"xAxis",2),c([d({type:Number,attribute:"d-size"})],Pe.prototype,"datapointSize",2),c([d({type:Boolean})],Pe.prototype,"stacked",2),c([d({type:Boolean})],Pe.prototype,"live",2),c([d({attribute:"data-url"})],Pe.prototype,"dataUrl",2),c([d({attribute:"live-interval",type:Number})],Pe.prototype,"liveInterval",2),c([d({type:Number,reflect:!0})],Pe.prototype,"height",2),c([d({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],Pe.prototype,"enableAnimations",2),c([d({attribute:"y-axis-append"})],Pe.prototype,"yAxisAppend",2),c([d({type:Array})],Pe.prototype,"colors",2),c([d({attribute:"sync-group"})],Pe.prototype,"syncGroup",2),c([d({type:Boolean})],Pe.prototype,"smooth",2),c([d({attribute:"inner-radius"})],Pe.prototype,"innerRadius",2),c([d({attribute:"outer-radius"})],Pe.prototype,"outerRadius",2),c([d({attribute:"show-labels",type:Boolean})],Pe.prototype,"showLabels",2),c([d({attribute:"min-value",type:Number})],Pe.prototype,"minValue",2),c([d({attribute:"max-value",type:Number})],Pe.prototype,"maxValue",2),c([d({converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],Pe.prototype,"scale",2);var N4=Pe;Pe.define("zn-chart");var Q0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host>div,zn-simplechart>div{width:115px;height:50px;cursor:pointer}`;var O4=["Jun 2016","Jul 2016","Aug 2016","Sep 2016","Oct 2016","Nov 2016","Dec 2016","Jan 2017","Feb 2017","Mar 2017","Apr 2017","May 2017"],P4=[56.4,39.8,66.8,66.4,40.6,55.2,77.4,69.8,57.8,76,110.8,142.6],Tn=class extends k{constructor(){super(...arguments);this.enableAnimations=!1;this.resizeObserver=new ht(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(){this.initPromise=this.initChart().catch(()=>{})}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;let r=await Wd();if(!this.isConnected||this.chart)return;this.chart=r.init(t);let n=this.datasets?.[0]?.data??P4,a=this.labels??O4,s=this.enableAnimations!==!1&&this.enableAnimations!==0,l=typeof this.enableAnimations=="number"?this.enableAnimations:1500;this.chart.setOption({animation:s,animationDuration:l,animationEasing:"cubicOut",tooltip:{trigger:"axis",appendTo:"body",backgroundColor:"rgba(0,0,0,0.7)",borderWidth:0,textStyle:{color:"#fff"}},xAxis:{type:"category",data:a,show:!1},yAxis:{type:"value",show:!1},grid:{left:0,right:0,top:0,bottom:0},series:[{type:"bar",data:n,barWidth:7,itemStyle:{color:"#29C1BC",borderRadius:10},emphasis:{itemStyle:{color:"#19837f"}}}]}),this.resizeObserver.observe(t)}disconnectedCallback(){super.disconnectedCallback(),this.chart?.dispose()}render(){return u`<div id="chart"></div>`}};Tn.styles=z(Q0),c([d({attribute:"datasets",type:Array})],Tn.prototype,"datasets",2),c([d({attribute:"labels",type:Array})],Tn.prototype,"labels",2),c([d({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],Tn.prototype,"enableAnimations",2);var H4=Tn;Tn.define("zn-simple-chart");var X0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.header{flex-grow:1}.header .caption{justify-content:space-between;gap:var(--zn-base-gap);max-width:100%}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);text-transform:var(--zn-text-h1-transform,none);letter-spacing:var(--zn-text-h1-letter-spacing,normal);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-2x-small);align-items:center;text-wrap:auto}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}:host([transparent])>div{background-color:transparent}:host([with-closer]) .content{padding-right:40px}:host([navigation])>div h1{padding-bottom:0}:host #nav-container{gap:0;border-bottom:1px solid rgb(var(--zn-border-color));margin:0 3px}.alt-overlay{display:none}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex;gap:10px;align-items:flex-end;position:absolute;left:0;top:10px;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}:host(.alt-pressed) .alt-overlay a{display:flex}:host(.alt-pressed) .alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}:host([transparent]) .header{margin:0}.header{display:flex;flex-direction:column;margin:0;overflow:hidden}.header .content{display:flex;flex-wrap:wrap;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;min-height:var(--zn-input-height-medium,36px);gap:10px;margin:0 auto;padding:var(--zn-base-gap)}.header__left{display:flex;justify-content:center;flex-direction:column;gap:1px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow-x:clip;overflow-y:visible;min-width:20px}.header .navless{min-height:10px}.header .content{position:relative;gap:10px}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted(a)::after{content:">";margin-left:var(--zn-spacing-2x-small);color:rgb(var(--zn-text-muted));font-weight:var(--zn-font-weight-normal)}.header .caption{flex-grow:1;display:flex;align-items:center;gap:10px;max-width:100%;line-height:var(--zn-icon-size,20px)}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header .caption a zn-icon{cursor:pointer}.header .caption a zn-icon:hover{color:rgb(var(--zn-primary))}.header h1{flex-grow:1;overflow:hidden;text-overflow:ellipsis;color:rgb(var(--zn-text-page-title));margin:0;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-medium)}@media screen and (min-width:var(--zn-container-lg)){.header h1{font-size:var(--zn-font-size-large)}}.header h1:empty{display:none}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);word-break:break-word}.header slot[name=nav]{flex-basis:100%}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.header .actions{display:flex}:host([baseless]) .header{border-bottom:none !important}`;var Wt=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","nav","breadcrumb");this.transparent=!1;this.navigation=[];this.hideBreadcrumb=!1;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp)}firstUpdated(t){super.firstUpdated(t),this.navbar=this.querySelector("zn-navbar"),this.updateNav()}updateNav(){if(!this.navbar&&this.navigation&&this.navigation.length>0){this.navbar=document.createElement("zn-navbar");let t=this.shadowRoot?.querySelector("#nav-container");t&&t.appendChild(this.navbar)}this.navbar&&(this.navbar.navigation=this.navigation,this.navbar.setAttribute("baseless",""))}render(){let t=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("nav"),n=this.navigation&&this.navigation.length>0||r,a=this.previousPath,s=this.entityId,l=this.fullLocation,p=!this.hideBreadcrumb&&this.hasSlotController.test("breadcrumb"),h=u`
|
|
1805
|
+
</slot>`}};Ze.styles=z(I0),c([d({type:Boolean,reflect:!0})],Ze.prototype,"available",2),c([d({type:Boolean,reflect:!0})],Ze.prototype,"incoming",2),c([d({reflect:!0})],Ze.prototype,"variant",2),c([d()],Ze.prototype,"header",2),c([d()],Ze.prototype,"icon",2),c([d({reflect:!0})],Ze.prototype,"color",2),c([d()],Ze.prototype,"title",2),c([d()],Ze.prototype,"subtitle",2),c([d({type:Number})],Ze.prototype,"progress",2),c([d({attribute:"progress-color"})],Ze.prototype,"progressColor",2),c([d({attribute:"item-id"})],Ze.prototype,"itemId",2),c([d({attribute:"accept-uri"})],Ze.prototype,"acceptUri",2),c([d({type:Number,attribute:"reserved-until"})],Ze.prototype,"reservedUntil",2),c([d({type:Number,attribute:"auto-accept-delay"})],Ze.prototype,"autoAcceptDelay",2),c([d({type:Boolean,reflect:!0})],Ze.prototype,"rejectable",2),c([d({attribute:"accept-icon"})],Ze.prototype,"acceptIcon",2),c([d({attribute:"accept-gaid"})],Ze.prototype,"acceptGaid",2),c([d({attribute:"reject-icon"})],Ze.prototype,"rejectIcon",2),c([d({attribute:"reject-label"})],Ze.prototype,"rejectLabel",2);var q4=Ze;Ze.define("zn-channel-tile");function Co(o,i){let t=o.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",r=o.textColor??t,n=o.enableAnimations!==!1&&o.enableAnimations!==0,a=typeof o.enableAnimations=="number"?o.enableAnimations:1500;return{animation:n,animationDuration:a,animationEasing:"cubicOut",...o.colors?{color:o.colors}:{},textStyle:{color:r},tooltip:{trigger:i,appendTo:"body",valueFormatter:o.yAxisAppend?s=>`${s}${o.yAxisAppend}`:void 0},legend:{top:0,right:0,icon:"circle",textStyle:{color:r}}}}function Vd(o){return{...Co(o,"axis"),grid:{left:40,right:20,top:40,bottom:30}}}function I4(o){return o.length===0||o.every(i=>!i.data||i.data.length===0)}function Ud(o){let i=I4(o.data)?{min:0,max:6}:{},t=o.scale?{scale:!0,...typeof o.scale=="number"?{boundaryGap:[`${o.scale}%`,`${o.scale}%`]}:{}}:{};return{type:"value",...o.borderColor?{splitLine:{lineStyle:{color:o.borderColor}}}:{},...i,...t,axisLabel:o.yAxisAppend?{formatter:n=>`${n}${o.yAxisAppend}`}:{}}}function jd(o,i=!1){let t=o.borderColor?{axisLine:{lineStyle:{color:o.borderColor}}}:{};return o.xAxisType==="datetime"?{type:"time",...t}:o.xAxisType==="numeric"?{type:"value",...t}:{type:"category",data:o.categories,...i?{boundaryGap:!1}:{},...t}}function R0(o){return o.map(i=>i&&typeof i=="object"&&!Array.isArray(i)&&"x"in i&&"y"in i?[i.x,i.y]:i)}function Gd(o,i,t=()=>({})){return o.data.map(r=>({type:i,name:r.name,data:R0(r.data),...r.color?{itemStyle:{color:r.color}}:{},...o.stacked?{stack:"total"}:{},...o.enableAnimations!==!1&&o.enableAnimations!==0&&i==="bar"?{animationDelay:n=>n*50}:{},...t(r)}))}function em(o){return{...Vd(o),xAxis:jd(o),yAxis:Ud(o),series:Gd(o,"bar")}}function N0(o){return{...Vd(o),xAxis:jd(o,!0),yAxis:Ud(o),series:Gd(o,"line",()=>({symbolSize:o.datapointSize,smooth:o.smooth}))}}function O0(o){return{...Vd(o),xAxis:jd(o,!0),yAxis:Ud(o),series:Gd(o,"line",()=>({symbolSize:o.datapointSize,smooth:o.smooth,areaStyle:{opacity:.1}}))}}function P0(o){return{...Vd(o),xAxis:jd({...o,xAxisType:o.xAxisType??"numeric"}),yAxis:Ud(o),series:Gd(o,"scatter",()=>({symbolSize:o.datapointSize}))}}function tm(o,i){return o.map((t,r)=>{if(typeof t=="number")return{name:i[r]??`${r+1}`,value:t};let{color:n,itemStyle:a,...s}=t;return{...s,name:t.name??i[r]??`${r+1}`,...n?{itemStyle:{...a,color:n}}:a?{itemStyle:a}:{}}})}function H0(o){let i=o.data[0]??{name:"",data:[]},t=o.textColor??(o.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)"),r=o.type==="donut"?o.innerRadius??"50%":0,n=o.outerRadius??"70%";return{...Co(o,"item"),series:[{type:"pie",name:i.name,data:tm(i.data??[],o.categories),radius:[r,n],center:["50%","55%"],avoidLabelOverlap:!0,label:{show:o.showLabels??!1,color:t},labelLine:{show:o.showLabels??!1,...o.borderColor?{lineStyle:{color:o.borderColor}}:{}},emphasis:{label:{show:o.showLabels??!1}}}]}}function F0(o){let i=o.indicators?.length?o.indicators:o.categories.map(t=>({name:t}));return{...Co(o,"item"),radar:{indicator:i},series:[{type:"radar",data:o.data.map(t=>({name:t.name,value:R0(t.data),...t.color?{itemStyle:{color:t.color},lineStyle:{color:t.color}}:{}}))}]}}function B0(o){let i=o.data[0]??{name:"",data:[]},[t]=i.data,r=typeof t=="number"?[{name:i.name,value:t}]:tm(i.data??[],o.categories);return{...Co(o,"item"),series:[{type:"gauge",name:i.name,min:o.minValue??0,max:o.maxValue??100,data:r,progress:{show:!0},detail:{valueAnimation:o.enableAnimations!==!1&&o.enableAnimations!==0,formatter:o.yAxisAppend?n=>`${n}${o.yAxisAppend}`:"{value}"}}]}}function V0(o){let i=o.data[0]??{name:"",data:[]};return{...Co(o,"item"),series:[{type:"funnel",name:i.name,min:o.minValue,max:o.maxValue,data:tm(i.data??[],o.categories),label:{show:o.showLabels??!0},emphasis:{label:{fontWeight:"bold"}}}]}}function D4(o){return Array.isArray(o)?typeof o[2]=="number":!1}function D0(o,i,t){let r=o.filter(D4).map(n=>n[2]);return r.length?Math[i](...r):t}function U0(o){let i=o.data[0]??{name:"",data:[]},t=i.data??[];return{...Co(o,"item"),grid:{left:60,right:20,top:40,bottom:70},xAxis:{type:"category",data:o.categories,splitArea:{show:!0}},yAxis:{type:"category",data:o.yCategories??[],splitArea:{show:!0}},visualMap:{min:o.minValue??D0(t,"min",0),max:o.maxValue??D0(t,"max",100),calculable:!0,orient:"horizontal",left:"center",bottom:0},series:[{type:"heatmap",name:i.name,data:t,label:{show:o.showLabels??!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.35)"}}}]}}function j0(o){let i=o.data[0]??{name:"",data:[]};return{...Co(o,"item"),series:[{type:"treemap",name:i.name,data:i.data??[],label:{show:o.showLabels??!0},upperLabel:{show:o.showLabels??!0}}]}}function G0(o){let i=o.data[0]??{name:"",data:[]};return{...Co(o,"item"),series:[{type:"sunburst",name:i.name,data:i.data??[],radius:[o.innerRadius??0,o.outerRadius??"90%"],label:{show:o.showLabels??!0},emphasis:{focus:"ancestor"}}]}}function R4(o){let i=new Set,t=[];for(let r of o)i.has(r.source)||(i.add(r.source),t.push({name:r.source})),i.has(r.target)||(i.add(r.target),t.push({name:r.target}));return t}function W0(o){let i=o.data[0]??{name:"",data:[]},t=i.data??[],n=i.nodes??R4(t),a=o.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",s=o.textColor??a,l=o.enableAnimations!==!1&&o.enableAnimations!==0,p=typeof o.enableAnimations=="number"?o.enableAnimations:1500;return{animation:l,animationDuration:p,animationEasing:"cubicOut",...o.colors?{color:o.colors}:{},textStyle:{color:s},tooltip:{trigger:"item",appendTo:"body"},series:[{type:"sankey",name:i.name,data:n,links:t,label:{color:s,textBorderWidth:0},lineStyle:{color:"source",opacity:o.theme==="dark"?.4:.3},emphasis:{focus:"adjacency"}}]}}var K0;function Wd(){return K0??(K0=(async()=>{let[o,i,t,r]=await Promise.all([import("./chunks/zn.AI3T35DX.js"),import("./chunks/zn.EHO4QQOL.js"),import("./chunks/zn.6RARZYEJ.js"),import("./chunks/zn.S4ZVBYAS.js")]);return o.use([i.BarChart,i.FunnelChart,i.GaugeChart,i.HeatmapChart,i.LineChart,i.PieChart,i.RadarChart,i.SankeyChart,i.ScatterChart,i.SunburstChart,i.TreemapChart,t.GridComponent,t.TooltipComponent,t.LegendComponent,t.TitleComponent,t.DataZoomComponent,t.RadarComponent,t.VisualMapComponent,r.CanvasRenderer]),o})()),K0}var Y0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;width:100%}.chart{position:relative}`;var Pe=class extends k{constructor(){super(...arguments);this.type="bar";this.data=[];this.categories=[];this.yCategories=[];this.indicators=[];this.datapointSize=1;this.stacked=!1;this.live=!1;this.dataUrl="";this.liveInterval=1e3;this.height=300;this.enableAnimations=!1;this.smooth=!1;this.scale=!1;this.resizeObserver=new ht(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(t){this.initPromise=this.initChart().catch(()=>{}),super.firstUpdated(t)}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}getTheme(){return this.getAttribute("m")==="dark"?"dark":this.getAttribute("m")==="light"?"light":this.getAttribute("t")==="dark"?"dark":"light"}getTextColor(){let t=getComputedStyle(this),r=t.getPropertyValue("--zn-text").trim();if(!r)return;let n=t.getPropertyValue("--zn-text-opacity").trim()||"1";return`rgba(${r}, ${n})`}getBorderColor(){let t=getComputedStyle(this).getPropertyValue("--zn-border-color").trim();return t?`rgb(${t})`:void 0}buildOption(){let t={type:this.type,data:this.data??[],categories:Array.isArray(this.categories)?this.categories:[],xAxisType:this.xAxis,yAxisAppend:this.yAxisAppend,stacked:this.stacked,enableAnimations:this.enableAnimations,datapointSize:this.datapointSize,colors:this.colors,theme:this.getTheme(),smooth:this.smooth,scale:this.scale,textColor:this.getTextColor(),borderColor:this.getBorderColor(),innerRadius:this.innerRadius,outerRadius:this.outerRadius,showLabels:this.showLabels,yCategories:Array.isArray(this.yCategories)?this.yCategories:[],indicators:Array.isArray(this.indicators)?this.indicators:[],minValue:this.minValue,maxValue:this.maxValue};switch(this.type){case"bar":return em(t);case"line":return N0(t);case"area":return O0(t);case"funnel":return V0(t);case"gauge":return B0(t);case"heatmap":return U0(t);case"donut":case"pie":return H0(t);case"radar":return F0(t);case"sankey":return W0(t);case"scatter":return P0(t);case"sunburst":return G0(t);case"treemap":return j0(t);default:return em(t)}}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;t.style.height=`${this.height}px`;let r=await Wd();!this.isConnected||this.chart||(this.echarts=r,this.chart=r.init(t),this.chart.setOption(this.buildOption()),this.syncGroup&&(this.chart.group=this.syncGroup,r.connect(this.syncGroup)),this.resizeObserver.observe(t),this.live&&this.dataUrl&&this.startLive())}startLive(){this.liveTimer=window.setInterval(async()=>{try{let r=await(await fetch(this.dataUrl)).json();this.data=r,this.chart?.setOption({...this.buildOption()})}catch{}},this.liveInterval)}reinit(){this.chart?.dispose(),this.chart=void 0,this.initPromise=this.initChart().catch(()=>{})}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),!!this.chart){if(t==="t"){this.reinit();return}if(t==="type"){this.reinit();return}if(t==="height"){let a=this.shadowRoot?.getElementById("chart");a&&(a.style.height=`${this.height}px`),this.chart.resize();return}if(t==="sync-group"){n?(this.chart.group=n,this.echarts?.connect(n)):this.chart.group="";return}this.chart.setOption({...this.buildOption()})}}disconnectedCallback(){super.disconnectedCallback(),this.liveTimer&&clearInterval(this.liveTimer),this.chart?.dispose(),this.chart=void 0}render(){return u`<div class="chart"><div id="chart"></div></div>`}};Pe.styles=z(Y0),c([d()],Pe.prototype,"type",2),c([d({type:Array})],Pe.prototype,"data",2),c([d({type:Array})],Pe.prototype,"categories",2),c([d({attribute:"y-categories",type:Array})],Pe.prototype,"yCategories",2),c([d({type:Array})],Pe.prototype,"indicators",2),c([d({attribute:"xaxis"})],Pe.prototype,"xAxis",2),c([d({type:Number,attribute:"d-size"})],Pe.prototype,"datapointSize",2),c([d({type:Boolean})],Pe.prototype,"stacked",2),c([d({type:Boolean})],Pe.prototype,"live",2),c([d({attribute:"data-url"})],Pe.prototype,"dataUrl",2),c([d({attribute:"live-interval",type:Number})],Pe.prototype,"liveInterval",2),c([d({type:Number,reflect:!0})],Pe.prototype,"height",2),c([d({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],Pe.prototype,"enableAnimations",2),c([d({attribute:"y-axis-append"})],Pe.prototype,"yAxisAppend",2),c([d({type:Array})],Pe.prototype,"colors",2),c([d({attribute:"sync-group"})],Pe.prototype,"syncGroup",2),c([d({type:Boolean})],Pe.prototype,"smooth",2),c([d({attribute:"inner-radius"})],Pe.prototype,"innerRadius",2),c([d({attribute:"outer-radius"})],Pe.prototype,"outerRadius",2),c([d({attribute:"show-labels",type:Boolean})],Pe.prototype,"showLabels",2),c([d({attribute:"min-value",type:Number})],Pe.prototype,"minValue",2),c([d({attribute:"max-value",type:Number})],Pe.prototype,"maxValue",2),c([d({converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],Pe.prototype,"scale",2);var N4=Pe;Pe.define("zn-chart");var Q0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host>div,zn-simplechart>div{width:115px;height:50px;cursor:pointer}`;var O4=["Jun 2016","Jul 2016","Aug 2016","Sep 2016","Oct 2016","Nov 2016","Dec 2016","Jan 2017","Feb 2017","Mar 2017","Apr 2017","May 2017"],P4=[56.4,39.8,66.8,66.4,40.6,55.2,77.4,69.8,57.8,76,110.8,142.6],Tn=class extends k{constructor(){super(...arguments);this.enableAnimations=!1;this.resizeObserver=new ht(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(){this.initPromise=this.initChart().catch(()=>{})}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;let r=await Wd();if(!this.isConnected||this.chart)return;this.chart=r.init(t);let n=this.datasets?.[0]?.data??P4,a=this.labels??O4,s=this.enableAnimations!==!1&&this.enableAnimations!==0,l=typeof this.enableAnimations=="number"?this.enableAnimations:1500;this.chart.setOption({animation:s,animationDuration:l,animationEasing:"cubicOut",tooltip:{trigger:"axis",appendTo:"body",backgroundColor:"rgba(0,0,0,0.7)",borderWidth:0,textStyle:{color:"#fff"}},xAxis:{type:"category",data:a,show:!1},yAxis:{type:"value",show:!1},grid:{left:0,right:0,top:0,bottom:0},series:[{type:"bar",data:n,barWidth:7,itemStyle:{color:"#29C1BC",borderRadius:10},emphasis:{itemStyle:{color:"#19837f"}}}]}),this.resizeObserver.observe(t)}disconnectedCallback(){super.disconnectedCallback(),this.chart?.dispose()}render(){return u`<div id="chart"></div>`}};Tn.styles=z(Q0),c([d({attribute:"datasets",type:Array})],Tn.prototype,"datasets",2),c([d({attribute:"labels",type:Array})],Tn.prototype,"labels",2),c([d({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],Tn.prototype,"enableAnimations",2);var H4=Tn;Tn.define("zn-simple-chart");var X0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.header{flex-grow:1}.header .caption{justify-content:space-between;gap:var(--zn-base-gap);max-width:100%}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);text-transform:var(--zn-text-h1-transform,none);letter-spacing:var(--zn-text-h1-letter-spacing,normal);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-2x-small);align-items:center;text-wrap:auto}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}:host([transparent])>div{background-color:transparent}:host([with-closer]) .content{padding-right:40px}:host([navigation])>div h1{padding-bottom:0}:host #nav-container{gap:0;border-bottom:1px solid rgb(var(--zn-border-color));margin:0 3px}.alt-overlay{display:none}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex;gap:10px;align-items:flex-end;position:absolute;left:0;top:10px;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}:host(.alt-pressed) .alt-overlay a{display:flex}:host(.alt-pressed) .alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}:host([transparent]) .header{margin:0}.header{display:flex;flex-direction:column;margin:0;overflow:hidden}.header .content{display:flex;flex-wrap:wrap;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;min-height:var(--zn-input-height-medium,36px);gap:10px;margin:0 auto;padding:var(--zn-base-gap)}.header__left{display:flex;justify-content:center;flex-direction:column;gap:1px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow-x:clip;overflow-clip-margin:var(--zn-focus-ring-width);overflow-y:visible;min-width:20px}.header .navless{min-height:10px}.header .content{position:relative;gap:10px}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted(a)::after{content:">";margin-left:var(--zn-spacing-2x-small);color:rgb(var(--zn-text-muted));font-weight:var(--zn-font-weight-normal)}.header .caption{flex-grow:1;display:flex;align-items:center;gap:10px;max-width:100%;line-height:var(--zn-icon-size,20px)}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header .caption a zn-icon{cursor:pointer}.header .caption a zn-icon:hover{color:rgb(var(--zn-primary))}.header h1{flex-grow:1;overflow:hidden;text-overflow:ellipsis;color:rgb(var(--zn-text-page-title));margin:0;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-medium)}@media screen and (min-width:var(--zn-container-lg)){.header h1{font-size:var(--zn-font-size-large)}}.header h1:empty{display:none}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);word-break:break-word}.header slot[name=nav]{flex-basis:100%}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.header .actions{display:flex}:host([baseless]) .header{border-bottom:none !important}`;var Wt=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","nav","breadcrumb");this.transparent=!1;this.navigation=[];this.hideBreadcrumb=!1;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp)}firstUpdated(t){super.firstUpdated(t),this.navbar=this.querySelector("zn-navbar"),this.updateNav()}updateNav(){if(!this.navbar&&this.navigation&&this.navigation.length>0){this.navbar=document.createElement("zn-navbar");let t=this.shadowRoot?.querySelector("#nav-container");t&&t.appendChild(this.navbar)}this.navbar&&(this.navbar.navigation=this.navigation,this.navbar.setAttribute("baseless",""))}render(){let t=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("nav"),n=this.navigation&&this.navigation.length>0||r,a=this.previousPath,s=this.entityId,l=this.fullLocation,p=!this.hideBreadcrumb&&this.hasSlotController.test("breadcrumb"),h=u`
|
|
1802
1806
|
<div class="${M({header:!0,"header--transparent":this.transparent,"header--full-width":this.fullWidth,"header--has-nav":n,"header--has-breadcrumb":p,"header--has-previous":a,"header--has-entity-id":s,"header--has-full-location":l})}" part="base">
|
|
1803
1807
|
|
|
1804
1808
|
${l||s?u`
|
|
@@ -1898,7 +1902,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
1898
1902
|
`:""}
|
|
1899
1903
|
</div>
|
|
1900
1904
|
<slot name="bottom" part="bottom"></slot>`}};We.styles=z(J0),We.dependencies={"zn-dropdown":pr},c([d({attribute:"navigation",type:Array})],We.prototype,"navigation",2),c([d({attribute:"full-width",type:Boolean,reflect:!0})],We.prototype,"fullWidth",2),c([d({attribute:"icon-bar",type:Boolean,reflect:!0})],We.prototype,"iconBar",2),c([d({attribute:"slim",type:Boolean,reflect:!0})],We.prototype,"slim",2),c([d({attribute:"border",type:Boolean,reflect:!0})],We.prototype,"border",2),c([d({attribute:"hide-one",type:Boolean,reflect:!0})],We.prototype,"hideOne",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],We.prototype,"flush",2),c([d({attribute:"gutter",type:Boolean,reflect:!0})],We.prototype,"gutter",2),c([d({type:Boolean})],We.prototype,"stacked",2),c([d({type:Array})],We.prototype,"dropdown",2),c([d({attribute:"no-pad",type:Boolean})],We.prototype,"noPad",2),c([d({attribute:"manual-add-items",type:Boolean})],We.prototype,"manualAddItems",2),c([d({type:Boolean})],We.prototype,"isolated",2),c([d({reflect:!0})],We.prototype,"color",2),c([d({attribute:"master-id",reflect:!0})],We.prototype,"masterId",2),c([d({attribute:"store-key",type:String})],We.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],We.prototype,"storeTtl",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],We.prototype,"localStorage",2),c([d()],We.prototype,"_appended",2);var Ca=We;We.define("zn-navbar");function Kd(o){function i(he,ae){return he<<ae|he>>>32-ae}function t(he,ae){let ze,O,x,E,w;return x=he&2147483648,E=ae&2147483648,ze=he&1073741824,O=ae&1073741824,w=(he&1073741823)+(ae&1073741823),ze&&O?w^2147483648^x^E:ze||O?w?w^3221225472^x^E:w^1073741824^x^E:w^x^E}function r(he,ae,ze){return he&ae|~he&ze}function n(he,ae,ze){return he&ze|ae&~ze}function a(he,ae,ze){return he^ae^ze}function s(he,ae,ze){return ae^(he|~ze)}function l(he,ae,ze,O,x,E,w){return he=t(he,t(t(r(ae,ze,O),x),w)),t(i(he,E),ae)}function p(he,ae,ze,O,x,E,w){return he=t(he,t(t(n(ae,ze,O),x),w)),t(i(he,E),ae)}function h(he,ae,ze,O,x,E,w){return he=t(he,t(t(a(ae,ze,O),x),w)),t(i(he,E),ae)}function m(he,ae,ze,O,x,E,w){return he=t(he,t(t(s(ae,ze,O),x),w)),t(i(he,E),ae)}function f(he){for(var ae,ze=he.length,O=ze+8,x=(O-O%64)/64,E=(x+1)*16,w=Array(E-1),D=0,q=0;q<ze;)ae=(q-q%4)/4,D=q%4*8,w[ae]=w[ae]|he.charCodeAt(q)<<D,q++;return ae=(q-q%4)/4,D=q%4*8,w[ae]=w[ae]|128<<D,w[E-2]=ze<<3,w[E-1]=ze>>>29,w}function b(he){var ae="",ze="",O,x;for(x=0;x<=3;x++)O=he>>>x*8&255,ze="0"+O.toString(16),ae=ae+ze.substr(ze.length-2,2);return ae}function g(he){he=he.replace(/\r\n/g,`
|
|
1901
|
-
`);let ae="";for(let ze=0;ze<he.length;ze++){let O=he.charCodeAt(ze);O<128?ae+=String.fromCharCode(O):O>127&&O<2048?(ae+=String.fromCharCode(O>>6|192),ae+=String.fromCharCode(O&63|128)):(ae+=String.fromCharCode(O>>12|224),ae+=String.fromCharCode(O>>6&63|128),ae+=String.fromCharCode(O&63|128))}return ae}let v,y,S,T,N,U,I,C,$,L,W=7,oe=12,xe=17,De=22,Ne=5,rt=9,er=14,Pr=20,wr=4,Nt=11,tr=16,Mt=23,uo=6,Ya=10,ue=15,Ki=21;for(o=g(o),v=f(o),I=1732584193,C=4023233417,$=2562383102,L=271733878,y=0;y<v.length;y+=16)S=I,T=C,N=$,U=L,I=l(I,C,$,L,v[y+0],W,3614090360),L=l(L,I,C,$,v[y+1],oe,3905402710),$=l($,L,I,C,v[y+2],xe,606105819),C=l(C,$,L,I,v[y+3],De,3250441966),I=l(I,C,$,L,v[y+4],W,4118548399),L=l(L,I,C,$,v[y+5],oe,1200080426),$=l($,L,I,C,v[y+6],xe,2821735955),C=l(C,$,L,I,v[y+7],De,4249261313),I=l(I,C,$,L,v[y+8],W,1770035416),L=l(L,I,C,$,v[y+9],oe,2336552879),$=l($,L,I,C,v[y+10],xe,4294925233),C=l(C,$,L,I,v[y+11],De,2304563134),I=l(I,C,$,L,v[y+12],W,1804603682),L=l(L,I,C,$,v[y+13],oe,4254626195),$=l($,L,I,C,v[y+14],xe,2792965006),C=l(C,$,L,I,v[y+15],De,1236535329),I=p(I,C,$,L,v[y+1],Ne,4129170786),L=p(L,I,C,$,v[y+6],rt,3225465664),$=p($,L,I,C,v[y+11],er,643717713),C=p(C,$,L,I,v[y+0],Pr,3921069994),I=p(I,C,$,L,v[y+5],Ne,3593408605),L=p(L,I,C,$,v[y+10],rt,38016083),$=p($,L,I,C,v[y+15],er,3634488961),C=p(C,$,L,I,v[y+4],Pr,3889429448),I=p(I,C,$,L,v[y+9],Ne,568446438),L=p(L,I,C,$,v[y+14],rt,3275163606),$=p($,L,I,C,v[y+3],er,4107603335),C=p(C,$,L,I,v[y+8],Pr,1163531501),I=p(I,C,$,L,v[y+13],Ne,2850285829),L=p(L,I,C,$,v[y+2],rt,4243563512),$=p($,L,I,C,v[y+7],er,1735328473),C=p(C,$,L,I,v[y+12],Pr,2368359562),I=h(I,C,$,L,v[y+5],wr,4294588738),L=h(L,I,C,$,v[y+8],Nt,2272392833),$=h($,L,I,C,v[y+11],tr,1839030562),C=h(C,$,L,I,v[y+14],Mt,4259657740),I=h(I,C,$,L,v[y+1],wr,2763975236),L=h(L,I,C,$,v[y+4],Nt,1272893353),$=h($,L,I,C,v[y+7],tr,4139469664),C=h(C,$,L,I,v[y+10],Mt,3200236656),I=h(I,C,$,L,v[y+13],wr,681279174),L=h(L,I,C,$,v[y+0],Nt,3936430074),$=h($,L,I,C,v[y+3],tr,3572445317),C=h(C,$,L,I,v[y+6],Mt,76029189),I=h(I,C,$,L,v[y+9],wr,3654602809),L=h(L,I,C,$,v[y+12],Nt,3873151461),$=h($,L,I,C,v[y+15],tr,530742520),C=h(C,$,L,I,v[y+2],Mt,3299628645),I=m(I,C,$,L,v[y+0],uo,4096336452),L=m(L,I,C,$,v[y+7],Ya,1126891415),$=m($,L,I,C,v[y+14],ue,2878612391),C=m(C,$,L,I,v[y+5],Ki,4237533241),I=m(I,C,$,L,v[y+12],uo,1700485571),L=m(L,I,C,$,v[y+3],Ya,2399980690),$=m($,L,I,C,v[y+10],ue,4293915773),C=m(C,$,L,I,v[y+1],Ki,2240044497),I=m(I,C,$,L,v[y+8],uo,1873313359),L=m(L,I,C,$,v[y+15],Ya,4264355552),$=m($,L,I,C,v[y+6],ue,2734768916),C=m(C,$,L,I,v[y+13],Ki,1309151649),I=m(I,C,$,L,v[y+4],uo,4149444226),L=m(L,I,C,$,v[y+11],Ya,3174756917),$=m($,L,I,C,v[y+2],ue,718787259),C=m(C,$,L,I,v[y+9],Ki,3951481745),I=t(I,S),C=t(C,T),$=t($,N),L=t(L,U);var Yi=b(I)+b(C)+b($)+b(L);return Yi.toLowerCase()}var Z0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar{width:5px;height:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-track{background:transparent}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.expanding-action--drop .expanding-action__frame{--expanding-action-trigger-width:36px;position:relative;display:flex;flex-direction:column;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;max-height:var(--expanding-action-max-height,var(--auto-size-available-height,80vh));background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__frame::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}.expanding-action--drop .expanding-action__content{flex:1 1 auto;min-height:0;overflow-y:auto;border-radius:inherit}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var Kt=class extends k{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Oe(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Ge("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Oe(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Ge("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Ge("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Ge("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+Kd(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
|
|
1905
|
+
`);let ae="";for(let ze=0;ze<he.length;ze++){let O=he.charCodeAt(ze);O<128?ae+=String.fromCharCode(O):O>127&&O<2048?(ae+=String.fromCharCode(O>>6|192),ae+=String.fromCharCode(O&63|128)):(ae+=String.fromCharCode(O>>12|224),ae+=String.fromCharCode(O>>6&63|128),ae+=String.fromCharCode(O&63|128))}return ae}let v,y,S,T,N,U,I,C,$,L,W=7,oe=12,xe=17,De=22,Ne=5,rt=9,er=14,Pr=20,wr=4,Nt=11,tr=16,Mt=23,uo=6,Ya=10,ue=15,Yi=21;for(o=g(o),v=f(o),I=1732584193,C=4023233417,$=2562383102,L=271733878,y=0;y<v.length;y+=16)S=I,T=C,N=$,U=L,I=l(I,C,$,L,v[y+0],W,3614090360),L=l(L,I,C,$,v[y+1],oe,3905402710),$=l($,L,I,C,v[y+2],xe,606105819),C=l(C,$,L,I,v[y+3],De,3250441966),I=l(I,C,$,L,v[y+4],W,4118548399),L=l(L,I,C,$,v[y+5],oe,1200080426),$=l($,L,I,C,v[y+6],xe,2821735955),C=l(C,$,L,I,v[y+7],De,4249261313),I=l(I,C,$,L,v[y+8],W,1770035416),L=l(L,I,C,$,v[y+9],oe,2336552879),$=l($,L,I,C,v[y+10],xe,4294925233),C=l(C,$,L,I,v[y+11],De,2304563134),I=l(I,C,$,L,v[y+12],W,1804603682),L=l(L,I,C,$,v[y+13],oe,4254626195),$=l($,L,I,C,v[y+14],xe,2792965006),C=l(C,$,L,I,v[y+15],De,1236535329),I=p(I,C,$,L,v[y+1],Ne,4129170786),L=p(L,I,C,$,v[y+6],rt,3225465664),$=p($,L,I,C,v[y+11],er,643717713),C=p(C,$,L,I,v[y+0],Pr,3921069994),I=p(I,C,$,L,v[y+5],Ne,3593408605),L=p(L,I,C,$,v[y+10],rt,38016083),$=p($,L,I,C,v[y+15],er,3634488961),C=p(C,$,L,I,v[y+4],Pr,3889429448),I=p(I,C,$,L,v[y+9],Ne,568446438),L=p(L,I,C,$,v[y+14],rt,3275163606),$=p($,L,I,C,v[y+3],er,4107603335),C=p(C,$,L,I,v[y+8],Pr,1163531501),I=p(I,C,$,L,v[y+13],Ne,2850285829),L=p(L,I,C,$,v[y+2],rt,4243563512),$=p($,L,I,C,v[y+7],er,1735328473),C=p(C,$,L,I,v[y+12],Pr,2368359562),I=h(I,C,$,L,v[y+5],wr,4294588738),L=h(L,I,C,$,v[y+8],Nt,2272392833),$=h($,L,I,C,v[y+11],tr,1839030562),C=h(C,$,L,I,v[y+14],Mt,4259657740),I=h(I,C,$,L,v[y+1],wr,2763975236),L=h(L,I,C,$,v[y+4],Nt,1272893353),$=h($,L,I,C,v[y+7],tr,4139469664),C=h(C,$,L,I,v[y+10],Mt,3200236656),I=h(I,C,$,L,v[y+13],wr,681279174),L=h(L,I,C,$,v[y+0],Nt,3936430074),$=h($,L,I,C,v[y+3],tr,3572445317),C=h(C,$,L,I,v[y+6],Mt,76029189),I=h(I,C,$,L,v[y+9],wr,3654602809),L=h(L,I,C,$,v[y+12],Nt,3873151461),$=h($,L,I,C,v[y+15],tr,530742520),C=h(C,$,L,I,v[y+2],Mt,3299628645),I=m(I,C,$,L,v[y+0],uo,4096336452),L=m(L,I,C,$,v[y+7],Ya,1126891415),$=m($,L,I,C,v[y+14],ue,2878612391),C=m(C,$,L,I,v[y+5],Yi,4237533241),I=m(I,C,$,L,v[y+12],uo,1700485571),L=m(L,I,C,$,v[y+3],Ya,2399980690),$=m($,L,I,C,v[y+10],ue,4293915773),C=m(C,$,L,I,v[y+1],Yi,2240044497),I=m(I,C,$,L,v[y+8],uo,1873313359),L=m(L,I,C,$,v[y+15],Ya,4264355552),$=m($,L,I,C,v[y+6],ue,2734768916),C=m(C,$,L,I,v[y+13],Yi,1309151649),I=m(I,C,$,L,v[y+4],uo,4149444226),L=m(L,I,C,$,v[y+11],Ya,3174756917),$=m($,L,I,C,v[y+2],ue,718787259),C=m(C,$,L,I,v[y+9],Yi,3951481745),I=t(I,S),C=t(C,T),$=t($,N),L=t(L,U);var Qi=b(I)+b(C)+b($)+b(L);return Qi.toLowerCase()}var Z0=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.expanding-action--fill{padding-inline:var(--zn-spacing-medium);padding-bottom:var(--zn-spacing-2x-small);position:absolute;top:0;left:auto;right:0;bottom:0;background-color:rgb(var(--zn-panel));width:0;transition:width var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),opacity var(--zn-transition-slow) cubic-bezier(0.62,0.16,0.13,1.01),display var(--zn-transition-slow) ease-in-out allow-discrete}@starting-style {.expanding-action--fill.expanding-action--open{width:0}}.expanding-action--fill.expanding-action--open{display:flex;flex-direction:row;align-items:center;gap:10px;height:100%;width:min(100%,800px);overflow:hidden;z-index:100;max-width:800px}.expanding-action--fill.expanding-action--open::before{content:"";position:absolute;left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1);bottom:6px;background-color:rgb(var(--zn-primary));height:2px}.expanding-action--fill.expanding-action--open>zn-icon{display:block;color:rgb(var(--zn-primary))}.expanding-action--fill.expanding-action--closed{display:none;opacity:0}@starting-style {.expanding-action--fill .expanding-action__content{opacity:0}}.expanding-action--fill .expanding-action__content{opacity:1;width:100%;display:flex;flex-direction:column;justify-content:center;padding:0}.expanding-action--drop,.expanding-action--drop .expanding-action__dropdown,.expanding-action--drop .expanding-action__dropdown zn-button[slot=trigger]{height:100%}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar{width:5px;height:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-track{background:transparent}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}.expanding-action--drop .expanding-action__frame{}.expanding-action--drop .expanding-action__frame ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}.expanding-action--drop .expanding-action__frame{--expanding-action-trigger-width:36px;position:relative;display:flex;flex-direction:column;min-width:300px;width:var(--expanding-action-basis,var(--zn-container-smp,320px));max-width:80vw;max-height:var(--expanding-action-max-height,var(--auto-size-available-height,80vh));background-color:rgb(var(--zn-panel));box-shadow:0 8px 16px -6px rgba(33,33,33,0.18);border:solid 1px rgb(var(--zn-border-color));border-radius:var(--zn-border-radius) 0 var(--zn-border-radius) var(--zn-border-radius);padding:0;height:100%}.expanding-action--drop .expanding-action__frame::before{content:"";position:absolute;top:-1px;left:calc(100% - var(--expanding-action-trigger-width) + 2px);right:0;z-index:1;height:2px;background:rgb(var(--zn-panel))}.expanding-action--drop .expanding-action__content{flex:1 1 auto;min-height:0;overflow-y:auto;border-radius:inherit}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame{border-radius:0 var(--zn-border-radius) var(--zn-border-radius) var(--zn-border-radius)}:host([data-trigger-side=left]) .expanding-action--drop .expanding-action__frame::before{left:0;right:calc(100% - var(--expanding-action-trigger-width) + 2px)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]{position:relative;z-index:calc(var(--zn-z-index-dropdown) + 1)}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::before{content:"";position:absolute;inset:0;z-index:-1;height:41px;background:rgb(var(--zn-panel));border:solid 1px rgb(var(--zn-border-color));border-bottom-color:rgb(var(--zn-panel));border-radius:var(--zn-border-radius) var(--zn-border-radius) 0 0}:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):hover,:host([open]) .expanding-action__dropdown zn-button[slot=trigger]::part(base):active{background:transparent}`;var Kt=class extends k{constructor(){super();this.method="drop";this.prefetch=!1;this.basis="300";this.open=!1;this.fetchStyle="";this.noPrefetch=!1;this._knownUri=new Map;this._actions=[];this._preload=!0;this._metaObserved=!1;this._countObserver=new Oe(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Ge("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="count"]');if(!r)return;let n=r.getAttribute("content"),a=this.shadowRoot?.querySelector(".expanding-action__dropdown zn-button");n&&a&&a.setAttribute("notification",n)}});this._colorObserver=new Oe(this,{target:null,config:{subtree:!0,attributes:!0,attributeFilter:["content"],childList:!0},callback:()=>{let r=Ge("app-content",this,"")[0]?.shadowRoot?.querySelector('meta[name="color"]');if(!r)return;let n=r.getAttribute("content");n&&(this.color=n)}});this.handleIconClicked=()=>{this.open=!this.open};this.handleIconCloseClicked=()=>{this.open=!1};this._updateTriggerSide=()=>{let t=this.shadowRoot?.querySelector('.expanding-action__dropdown zn-button[slot="trigger"]'),r=this.shadowRoot?.querySelector("#content");if(!t||!r)return;let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.width===0)return;let s=(n.left+n.right)/2,l=(a.left+a.right)/2;this.setAttribute("data-trigger-side",s>l?"right":"left")};this._panels=new Map}async connectedCallback(){super.connectedCallback(),this.masterId||(this.masterId=Math.floor(Math.random()*1e6).toString()),this._preload=!this.noPrefetch,await this.updateComplete,this._panel=this.shadowRoot?.querySelector("#content")}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>{this._registerActions()},10),this.contextUri&&setTimeout(()=>{this.fetchContextHeaders().then(r=>r)},10)}_observeMetaData(){if(this._metaObserved)return;let r=Ge("app-content",this,"")[0]?.shadowRoot;r&&(this._countObserver.observe(r),this._colorObserver.observe(r),this._metaObserved=!0)}_registerActions(){Ge("[action-uri]",this,"zn-expanding-action").forEach(t=>{t.getAttribute("action-uri")===""&&(t.setAttribute("action",""),t.removeAttribute("action-uri")),this._addAction(t)})}_addAction(t){this._actions.includes(t)||(this._actions.push(t),this._preload&&t.addEventListener("mouseover",this.fetchUri.bind(this,t)),t.addEventListener("click",this._handleClick.bind(this)))}_uriToId(t){return"action-"+Kd(t).substr(0,8)+"-"+this.masterId}_handleClick(t){let r=t.relatedTarget??t.target;r&&this.clickAction(r)}_createUriPanel(t,r,n){if(t.hasAttribute("action")||t.setAttribute("action",n),this._knownUri.has(r)||this._knownUri.set(r,n),this._panels.has(n)&&this._panels.get(n)!==void 0)return this._panels.get(n)[0];let a=document.createElement("div");return a.setAttribute("id",n),this.fetchStyle!==""&&a.setAttribute("data-fetch-style",this.fetchStyle),a.setAttribute("data-self-uri",r),a.setAttribute("data-fetch-style","expanding-action"),a.textContent="Loading ...",this._panel instanceof HTMLElement&&(this._panel.appendChild(a),this._panels.set(n,[a])),document.dispatchEvent(new CustomEvent("zn-new-element",{detail:{element:a,source:t}})),a}fetchUri(t){if(!t.hasAttribute("action")&&t.hasAttribute("action-uri")){let r=t.getAttribute("action-uri")??"";this._createUriPanel(t,r,this._uriToId(r)),this._observeMetaData()}}async fetchContextHeaders(){try{let t=await fetch(this.contextUri,{credentials:"same-origin",method:"head",headers:{"x-requested-with":"XMLHttpRequest"}}),r=t.headers.get("x-kubex-count");r&&(this.count=r);let n=t.headers.get("x-kubex-color");n&&(this.color=n)}catch{}}clickAction(t){this.fetchUri(t)}_observePlacement(){let r=this.shadowRoot?.querySelector(".expanding-action__dropdown")?.shadowRoot?.querySelector(".dropdown");if(!r){requestAnimationFrame(()=>this._observePlacement());return}this._updateTriggerSide(),!this._placementObserver&&(this._placementObserver=new MutationObserver(this._updateTriggerSide),this._placementObserver.observe(r,{attributes:!0,attributeFilter:["data-current-placement"]}))}disconnectedCallback(){super.disconnectedCallback(),this._placementObserver?.disconnect(),this._placementObserver=void 0}render(){return u`
|
|
1902
1906
|
${this.method==="fill"?u`
|
|
1903
1907
|
<zn-button class="expanding-action__button"
|
|
1904
1908
|
@click="${this.handleIconClicked}"
|
|
@@ -2440,7 +2444,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2440
2444
|
${l}
|
|
2441
2445
|
${n}
|
|
2442
2446
|
</div>
|
|
2443
|
-
`}};cn.styles=z(u1),c([d({attribute:"limit",type:Number,reflect:!0})],cn.prototype,"limit",2),c([d({attribute:"total",type:Number,reflect:!0})],cn.prototype,"total",2),c([d({attribute:"page",type:Number,reflect:!0})],cn.prototype,"page",2),c([d({attribute:"uri",type:String,reflect:!0})],cn.prototype,"uri",2);var Y4=cn;cn.define("zn-pagination");var m1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.vs{display:flex;flex-direction:row;flex-wrap:nowrap;width:100%}.vs__left{flex-shrink:1;flex-grow:0;display:flex;flex-direction:column;align-items:center;margin:0 var(--zn-spacing-small)}.vs__icon{width:var(--zn-spacing-large);height:var(--zn-spacing-large);background-color:rgb(var(--zn-input-bg));border-width:1px;border-radius:100%}.vs__line{min-height:50px;width:4px;border-width:1px;border-top:none;border-bottom:none;background-color:rgba(var(--zn-input-bg));flex-grow:1}.vs__right{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);flex-grow:1;margin-bottom:50px}.vs__right:last-of-type{margin-bottom:0}.vs__caption{font-size:14px;color:rgb(var(--zn-text-heading));line-height:20px;font-weight:600}.vs__description{font-size:12px;font-weight:500;line-height:18px;color:rgb(var(--zn-text))}:host([last]) .vs__line{display:none}:host([first]) .vs{margin-top:10px}:host([active]) .vs__icon{background-color:rgb(var(--zn-primary))}:host([active]) .vs__line{background-color:rgb(var(--zn-primary))}`;var
|
|
2447
|
+
`}};cn.styles=z(u1),c([d({attribute:"limit",type:Number,reflect:!0})],cn.prototype,"limit",2),c([d({attribute:"total",type:Number,reflect:!0})],cn.prototype,"total",2),c([d({attribute:"page",type:Number,reflect:!0})],cn.prototype,"page",2),c([d({attribute:"uri",type:String,reflect:!0})],cn.prototype,"uri",2);var Y4=cn;cn.define("zn-pagination");var m1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.vs{display:flex;flex-direction:row;flex-wrap:nowrap;width:100%}.vs__left{flex-shrink:1;flex-grow:0;display:flex;flex-direction:column;align-items:center;margin:0 var(--zn-spacing-small)}.vs__icon{width:var(--zn-spacing-large);height:var(--zn-spacing-large);background-color:rgb(var(--zn-input-bg));border-width:1px;border-radius:100%}.vs__line{min-height:50px;width:4px;border-width:1px;border-top:none;border-bottom:none;background-color:rgba(var(--zn-input-bg));flex-grow:1}.vs__right{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);flex-grow:1;margin-bottom:50px}.vs__right:last-of-type{margin-bottom:0}.vs__caption{font-size:14px;color:rgb(var(--zn-text-heading));line-height:20px;font-weight:600}.vs__description{font-size:12px;font-weight:500;line-height:18px;color:rgb(var(--zn-text))}:host([last]) .vs__line{display:none}:host([first]) .vs{margin-top:10px}:host([active]) .vs__icon{background-color:rgb(var(--zn-primary))}:host([active]) .vs__line{background-color:rgb(var(--zn-primary))}`;var Ii=class extends k{constructor(){super(...arguments);this.last=!1;this.first=!1;this.active=!1}render(){return u`
|
|
2444
2448
|
<div class="vs">
|
|
2445
2449
|
<div class="vs__left">
|
|
2446
2450
|
<div class="vs__icon">
|
|
@@ -2457,13 +2461,13 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2457
2461
|
</div>
|
|
2458
2462
|
</div>
|
|
2459
2463
|
</div>
|
|
2460
|
-
`}};
|
|
2464
|
+
`}};Ii.styles=z(m1),c([d({type:Boolean,reflect:!0})],Ii.prototype,"last",2),c([d({type:Boolean,reflect:!0})],Ii.prototype,"first",2),c([d({type:Boolean,reflect:!0})],Ii.prototype,"active",2),c([d({reflect:!0})],Ii.prototype,"description",2),c([d({reflect:!0})],Ii.prototype,"caption",2);var Q4=Ii;Ii.define("zn-vertical-stepper");var f1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}zn-timer,:host{--timer-color:var(--zn-color-success);pointer-events:none;white-space:nowrap;display:inline-block}zn-timer .last-message,:host .last-message{color:rgb(var(--timer-color));display:flex;align-items:center;gap:5px}zn-timer .last-message .time,:host .last-message .time{font-size:12px;line-height:15px;flex-grow:1}zn-timer .last-message-indicator,:host .last-message-indicator{display:inline-block;background-color:rgb(var(--timer-color));width:10px;height:10px;border-radius:50%}:host([flip]) .last-message{flex-direction:row-reverse}:host([type=error]){--timer-color:var(--zn-color-error)}`;var So=class extends k{constructor(){super(...arguments);this.timestamp="";this._timerId=null}disconnectedCallback(){super.disconnectedCallback(),this._timerId!==null&&(clearTimeout(this._timerId),this._timerId=null)}_getLastMessage(){let t=new Date(parseInt(this.timestamp)*1e3),r=new Date().getTime()-t.getTime(),n=this._getTimes(r);return this._timerId!==null&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>{this.requestUpdate()},1e3),u`
|
|
2461
2465
|
<div class="last-message upper-limit-reached">
|
|
2462
2466
|
<span class="time">${n}</span>
|
|
2463
2467
|
<span class="last-message-indicator" part="indicator"></span>
|
|
2464
2468
|
</div>`}render(){return u`
|
|
2465
2469
|
${this._getLastMessage()}
|
|
2466
|
-
`}_getTimes(t){let r=Math.floor(t/1e3/60/60/24/30),n=Math.floor(t/1e3/60/60/24/7),a=Math.floor(t/1e3/60/60/24),s=Math.floor(t/1e3/60/60)%24,l=Math.floor(t/1e3/60)%60,p=Math.floor(t/1e3)%60;return r>0?`${r} Month`+(r>1?"s":""):n>0?`${n} Week`+(n>1?"s":""):a>0?`${a} Day`+(a>1?"s":""):s>0?l>0?`${s}hr ${l}m`:`${s} Hour`+(s>1?"s":""):l>0?p>0?`${l}m ${p}s`:`${l} Minute`+(l>1?"s":""):`${p} Second`+(p>1?"s":"")}};So.styles=z(f1),c([d({type:Number})],So.prototype,"timestamp",2);var X4=So;So.define("zn-timer");var g1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);letter-spacing:var(--zn-text-button-label-letter-spacing,normal);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block}.table-wrapper{max-width:100%;width:100%;overflow:hidden;position:relative}zn-checkbox{padding:0}zn-icon[src=more_vert]{cursor:pointer}thead{color:rgb(var(--zn-text-heading));font-weight:600;font-size:14px}.table-wrapper{width:100%;max-width:100%;overflow-x:auto;display:block}table,thead,tbody,tr,td,th{box-sizing:border-box}tr td{min-height:40px;height:52px}tr.with-summary td{min-height:80px;height:80px}.table-row.table-row--error{color:rgb(var(--zn-color-error));border-color:rgb(var(--zn-color-error));background:rgba(var(--zn-color-error),0.1)}.table-row.table-row--info{color:rgb(var(--zn-color-info));border-color:rgb(var(--zn-color-info));background:rgba(var(--zn-color-info),0.1)}.table-row.table-row--warning{color:rgb(var(--zn-color-warning));border-color:rgb(var(--zn-color-warning));background:rgba(var(--zn-color-warning),0.1)}.table-row.table-row--success{color:rgb(var(--zn-color-success)) !important;border-color:rgb(var(--zn-color-success));background:rgba(var(--zn-color-success),0.1)}.table-row.table-row--nested td:first-of-type{padding-left:var(--zn-spacing-medium)}.table-row.table-row--nested td:first-of-type zn-icon{--icon-color:rgb(var(--zn-text-heading))}th.wide-column{width:60%}td.capcol .actions:empty{display:none}td.capcol .actions button{display:flex;padding:0;margin:0;background:transparent;border:transparent;color:rgb(var(--zn-text))}td.capcol>div{display:flex;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);align-items:center}td.capcol>div div{display:flex;justify-items:center}td.capcol>div div.capd{flex-grow:1;flex-direction:column}td.capcol>div div.capd span{display:block}td.capcol>div div.capd .caption:empty,td.capcol>div div.capd .summary:empty{display:none}td.capcol>div div.capd .caption{font-weight:600;color:rgb(var(--zn-text-heading));font-size:14px;text-decoration:none}td.capcol>div div.capd .caption a{color:inherit;text-decoration:inherit}td.capcol>div div.capd .summary{font-size:90%;text-wrap:initial}.table--last-right tr td:last-of-type,.table--last-right tr th:last-of-type{text-align:right}zn-table[fixed-first]{--capcol-width:250px}zn-table[fixed-first] tbody tr:nth-of-type(even) td.capcol{background-color:rgba(var(--zn-body))}zn-table[fixed-first] thead th:first-of-type,zn-table[fixed-first] td.capcol{position:sticky;left:0;top:0;overflow:hidden;background-color:rgba(var(--zn-panel));min-width:var(--capcol-width);max-width:var(--capcol-width);border-right:1px solid rgb(var(--zn-border-color))}zn-table[borders] tr,zn-table[borders] td{margin:0}zn-table[borders] tbody tr td:last-of-type{border-right-width:1px !important}zn-table[borders] tbody tr td:first-of-type{border-left-width:1px !important}zn-table[borders] tbody tr:first-of-type td{border-top-width:1px !important}zn-table[borders] tbody tr:last-of-type td{border-bottom-width:1px !important}zn-table[cborders] tbody tr td{border-left-width:1px !important}zn-table[fixed] table{table-layout:fixed}`;var
|
|
2470
|
+
`}_getTimes(t){let r=Math.floor(t/1e3/60/60/24/30),n=Math.floor(t/1e3/60/60/24/7),a=Math.floor(t/1e3/60/60/24),s=Math.floor(t/1e3/60/60)%24,l=Math.floor(t/1e3/60)%60,p=Math.floor(t/1e3)%60;return r>0?`${r} Month`+(r>1?"s":""):n>0?`${n} Week`+(n>1?"s":""):a>0?`${a} Day`+(a>1?"s":""):s>0?l>0?`${s}hr ${l}m`:`${s} Hour`+(s>1?"s":""):l>0?p>0?`${l}m ${p}s`:`${l} Minute`+(l>1?"s":""):`${p} Second`+(p>1?"s":"")}};So.styles=z(f1),c([d({type:Number})],So.prototype,"timestamp",2);var X4=So;So.define("zn-timer");var g1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);letter-spacing:var(--zn-text-button-label-letter-spacing,normal);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block}.table-wrapper{max-width:100%;width:100%;overflow:hidden;position:relative}zn-checkbox{padding:0}zn-icon[src=more_vert]{cursor:pointer}thead{color:rgb(var(--zn-text-heading));font-weight:600;font-size:14px}.table-wrapper{width:100%;max-width:100%;overflow-x:auto;display:block}table,thead,tbody,tr,td,th{box-sizing:border-box}tr td{min-height:40px;height:52px}tr.with-summary td{min-height:80px;height:80px}.table-row.table-row--error{color:rgb(var(--zn-color-error));border-color:rgb(var(--zn-color-error));background:rgba(var(--zn-color-error),0.1)}.table-row.table-row--info{color:rgb(var(--zn-color-info));border-color:rgb(var(--zn-color-info));background:rgba(var(--zn-color-info),0.1)}.table-row.table-row--warning{color:rgb(var(--zn-color-warning));border-color:rgb(var(--zn-color-warning));background:rgba(var(--zn-color-warning),0.1)}.table-row.table-row--success{color:rgb(var(--zn-color-success)) !important;border-color:rgb(var(--zn-color-success));background:rgba(var(--zn-color-success),0.1)}.table-row.table-row--nested td:first-of-type{padding-left:var(--zn-spacing-medium)}.table-row.table-row--nested td:first-of-type zn-icon{--icon-color:rgb(var(--zn-text-heading))}th.wide-column{width:60%}td.capcol .actions:empty{display:none}td.capcol .actions button{display:flex;padding:0;margin:0;background:transparent;border:transparent;color:rgb(var(--zn-text))}td.capcol>div{display:flex;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);align-items:center}td.capcol>div div{display:flex;justify-items:center}td.capcol>div div.capd{flex-grow:1;flex-direction:column}td.capcol>div div.capd span{display:block}td.capcol>div div.capd .caption:empty,td.capcol>div div.capd .summary:empty{display:none}td.capcol>div div.capd .caption{font-weight:600;color:rgb(var(--zn-text-heading));font-size:14px;text-decoration:none}td.capcol>div div.capd .caption a{color:inherit;text-decoration:inherit}td.capcol>div div.capd .summary{font-size:90%;text-wrap:initial}.table--last-right tr td:last-of-type,.table--last-right tr th:last-of-type{text-align:right}zn-table[fixed-first]{--capcol-width:250px}zn-table[fixed-first] tbody tr:nth-of-type(even) td.capcol{background-color:rgba(var(--zn-body))}zn-table[fixed-first] thead th:first-of-type,zn-table[fixed-first] td.capcol{position:sticky;left:0;top:0;overflow:hidden;background-color:rgba(var(--zn-panel));min-width:var(--capcol-width);max-width:var(--capcol-width);border-right:1px solid rgb(var(--zn-border-color))}zn-table[borders] tr,zn-table[borders] td{margin:0}zn-table[borders] tbody tr td:last-of-type{border-right-width:1px !important}zn-table[borders] tbody tr td:first-of-type{border-left-width:1px !important}zn-table[borders] tbody tr:first-of-type td{border-top-width:1px !important}zn-table[borders] tbody tr:last-of-type td{border-bottom-width:1px !important}zn-table[cborders] tbody tr td{border-left-width:1px !important}zn-table[fixed] table{table-layout:fixed}`;var wi=class extends k{constructor(){super(...arguments);this.fixedFirst=!1;this.hasActions=!1;this.headless=!1;this.allLeft=!1;this.boolIcons=!1;this.columns=[];this.columnDisplay=[];this.wideColumn=[];this.rows=[];this.resizeObserver=new ht(this,{target:null,callback:()=>this.resizing()})}resizing(){}connectedCallback(){if(this.fixedFirst&&this.parentElement&&this.resizeObserver.observe(this.parentElement),(this.data===null||this.data===void 0)&&this.childNodes.length>0&&this.childNodes[0].nodeType===3){let t=this.childNodes,r="";for(let n of t)r+=n.textContent;r=r.replace(/\n/g,"");try{this.data=JSON.parse(r),this.innerText=""}catch(n){console.error("Error parsing JSON",n)}}if(this.data!==null&&this.data!==void 0&&(this.data.hasOwnProperty("header")&&this.data.header.forEach(t=>{typeof t=="string"&&(t={name:t}),this.columns.push(t.hasOwnProperty("name")?t.name:""),this.columnDisplay.push(t.hasOwnProperty("display")?t.display:""),this.wideColumn.push(t.hasOwnProperty("wide")?t.wide:"")}),this.data.hasOwnProperty("items")&&this.data.items!=null&&(this.rows=this.data.items),this.rows.length==0&&this.columns.length==0)){this.columns.push("");for(let t in this.data){for(let r in this.data[t]){let n=r.replace(/([A-Z]+)/g," $1").replace(/([A-Z][a-z])/g," $1");this.columns.includes(n)||this.columns.push(n)}this.rows.push({data:Object.values(this.data[t])})}}return super.connectedCallback()}tableHead(){if(this.headless)return;let t=[];return this.columns.forEach((r,n)=>{if(r==="")return;r==="_"&&(r="");let a=this.columnDisplay[n];if(n==0)t.push(u`
|
|
2467
2471
|
<th>${r}</th>`);else{let s="";a!=""&&a!=null&&(s="hidden "+a+":table-cell"),this.wideColumn[n]&&(s+=" wide-column"),t.push(u`
|
|
2468
2472
|
<th class="${s}">${r}</th>`)}}),u`
|
|
2469
2473
|
<thead>
|
|
@@ -2500,7 +2504,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2500
2504
|
${this.tableBody()}
|
|
2501
2505
|
</table>
|
|
2502
2506
|
</div>
|
|
2503
|
-
`}};
|
|
2507
|
+
`}};wi.styles=z(g1),c([d({attribute:"fixed-first",type:Boolean,reflect:!0})],wi.prototype,"fixedFirst",2),c([d({attribute:"has-actions",type:Boolean,reflect:!0})],wi.prototype,"hasActions",2),c([d({attribute:"headless",type:Boolean,reflect:!0})],wi.prototype,"headless",2),c([d({attribute:"left-align",type:Boolean,reflect:!0})],wi.prototype,"allLeft",2),c([d({attribute:"data",type:Object,reflect:!0})],wi.prototype,"data",2),c([d({attribute:"bool-icons",type:Boolean})],wi.prototype,"boolIcons",2);var J4=wi;wi.define("zn-table");var b1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{container-type:inline-size;display:flex;flex-direction:column;height:100%;max-height:100%;max-width:100%;flex-grow:1;overflow:hidden;margin:0}zn-header{position:sticky;top:0;z-index:2}.pane__content{z-index:0;min-height:0;overflow:auto;display:flex;flex:1 1}.pane__content--flush{padding:0}.width-container{display:flex;flex-direction:column;flex-grow:1}slot{display:flex;flex-direction:column;align-items:normal;gap:var(--zn-gap,0);width:100%;height:100%}`;var Eo=class extends k{constructor(){super(...arguments);this._header=null}connectedCallback(){super.connectedCallback(),this._header=Array.from(this.children).find(t=>t.tagName==="ZN-HEADER")??null}render(){return this._header&&(this.classList.add("with-header"),this._header.setAttribute("slot","top")),u`
|
|
2504
2508
|
${this._header}
|
|
2505
2509
|
<div class="${M({pane__content:!0,"pane__content--flush":this.flush})}">
|
|
2506
2510
|
<slot></slot>
|
|
@@ -2549,7 +2553,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2549
2553
|
</div>`}handleClick(t){this.open=!this.open,t.stopPropagation()}};dn.styles=z(y1),c([d({attribute:"caption",reflect:!0})],dn.prototype,"caption",2),c([d({attribute:"open",type:Boolean,reflect:!0})],dn.prototype,"open",2),c([d({attribute:"start-scrolled",type:Boolean,reflect:!0})],dn.prototype,"startScrolled",2),c([d({type:Boolean})],dn.prototype,"wide",2);var r8=dn;dn.define("zn-sidebar");var x1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;--zn-sp-padding:var(--zn-base-gap);--zn-sp-gap:var(--zn-base-gap)}:host([grow]){display:flex;flex-grow:1;height:100%}:host([max-full]){max-height:100%;overflow:hidden}:host([scroll]){max-height:100%;overflow:auto}.sp{position:relative;display:flex;flex-direction:column;flex-grow:0;padding:var(--zn-sp-padding);gap:var(--zn-sp-gap);width:100%;height:100%;margin:var(--zn-default-margin,0 auto)}.sp--divide{gap:calc(var(--zn-sp-gap) * 2)}.sp--divide.sp--no-gap ::slotted(*:not(:last-child)){border-bottom:1px solid rgb(var(--zn-border-color)) !important}.sp--divide:not(.sp--no-gap) ::slotted(*:not(:last-child)){position:relative}.sp--divide:not(.sp--no-gap) ::slotted(*:not(:last-child)):after{content:"";position:absolute;display:block;height:1px;left:0;width:100%;max-width:100%;bottom:calc(var(--zn-sp-gap) / 1 * -1);background-color:rgb(var(--zn-border-color))}.sp--row{flex-direction:row}.sp--no-pos{position:unset}.sp--no-gap{gap:0}.sp--grow{flex-grow:1}.sp--flush{padding:0}.sp--flush-y{padding-top:0;padding-bottom:0}.sp--flush-x{padding-left:0;padding-right:0}.sp--flush-t{padding-top:0}.sp--flush-b{padding-bottom:0}.sp--flush-l{padding-left:0}.sp--flush-r{padding-right:0}:host([align=start]) .sp{align-items:flex-start}:host([align=center]) .sp{align-items:center}:host([align=end]) .sp{align-items:flex-end}:host([align=stretch]) .sp{align-items:stretch}:host([align=baseline]) .sp{align-items:baseline}:host([justify=start]) .sp{justify-content:flex-start}:host([justify=center]) .sp{justify-content:center}:host([justify=end]) .sp{justify-content:flex-end}:host([justify=between]) .sp{justify-content:space-between}:host([justify=around]) .sp{justify-content:space-around}:host([justify=evenly]) .sp{justify-content:space-evenly}`;var i8={px:"1",xxs:"3",xs:"5",sm:"10",md:"15",lg:"20",xl:"25"},Ye=class extends k{constructor(){super(...arguments);this.divide=!1;this.row=!1;this.grow=!1;this.padX=!1;this.padY=!1;this.noGap=!1;this.noPosition=!1;this.flush=!1;this.flushX=!1;this.flushY=!1;this.flushT=!1;this.flushB=!1;this.flushL=!1;this.flushR=!1;this.widthContainer=!1;this.formContainer=!1;this.wideFormContainer=!1}connectedCallback(){if(this.gap){let t=i8[this.gap];if(t){let r=parseInt(t)*4;this.style.setProperty("--zn-divide-gap",`${r}px`)}}super.connectedCallback()}render(){return u`
|
|
2550
2554
|
<div part="base" class="${M({sp:!0,"sp--divide":this.divide,"sp--row":this.row,"sp--grow":this.grow,"sp--no-gap":this.noGap,"sp--no-pos":this.noPosition,"sp--flush":this.flush,"sp--flush-y":this.flushY,"sp--flush-x":this.flushX,"sp--flush-t":this.flushT,"sp--flush-b":this.flushB,"sp--flush-l":this.flushL,"sp--flush-r":this.flushR,"width-container":this.widthContainer,"form-container":this.formContainer,"wide-form-container":this.wideFormContainer})}">
|
|
2551
2555
|
<slot></slot>
|
|
2552
|
-
</div>`}};Ye.styles=z(x1),c([d({attribute:"divide",type:Boolean,reflect:!0})],Ye.prototype,"divide",2),c([d({attribute:"gap",reflect:!0})],Ye.prototype,"gap",2),c([d({attribute:"row",type:Boolean,reflect:!0})],Ye.prototype,"row",2),c([d({reflect:!0})],Ye.prototype,"align",2),c([d({reflect:!0})],Ye.prototype,"justify",2),c([d({attribute:"grow",type:Boolean,reflect:!0})],Ye.prototype,"grow",2),c([d({attribute:"pad-x",type:Boolean,reflect:!0})],Ye.prototype,"padX",2),c([d({attribute:"pad-y",type:Boolean,reflect:!0})],Ye.prototype,"padY",2),c([d({attribute:"no-gap",type:Boolean,reflect:!0})],Ye.prototype,"noGap",2),c([d({attribute:"no-pos",type:Boolean,reflect:!0})],Ye.prototype,"noPosition",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],Ye.prototype,"flush",2),c([d({attribute:"flush-x",type:Boolean,reflect:!0})],Ye.prototype,"flushX",2),c([d({attribute:"flush-y",type:Boolean,reflect:!0})],Ye.prototype,"flushY",2),c([d({attribute:"flush-t",type:Boolean,reflect:!0})],Ye.prototype,"flushT",2),c([d({attribute:"flush-b",type:Boolean,reflect:!0})],Ye.prototype,"flushB",2),c([d({attribute:"flush-l",type:Boolean,reflect:!0})],Ye.prototype,"flushL",2),c([d({attribute:"flush-r",type:Boolean,reflect:!0})],Ye.prototype,"flushR",2),c([d({attribute:"width-container",type:Boolean,reflect:!0})],Ye.prototype,"widthContainer",2),c([d({attribute:"form-container",type:Boolean,reflect:!0})],Ye.prototype,"formContainer",2),c([d({attribute:"wide-form-container",type:Boolean,reflect:!0})],Ye.prototype,"wideFormContainer",2);var n8=Ye;Ye.define("zn-sp");var w1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{width:calc(100% - 4px);display:flex;flex-direction:column;padding:10px 0}.header{font-weight:500;color:rgb(var(--zn-text-heading))}.progress{color:rgb(var(--zn-text))}.info{font-size:90%}.header{display:flex;align-items:center;justify-content:space-between}.label,.info{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header{margin-bottom:var(--zn-spacing-x-small)}.step-container{width:100%;position:relative;height:12px;display:flex;align-items:center}.step-line{position:absolute;width:100%;left:2px;height:2px;background-color:rgb(var(--zn-border-color))}.step-progress{background-color:rgb(var(--zn-primary));height:8px;position:absolute;top:2px;border-radius:10px}.steps{position:relative;width:100%;left:2px;display:flex;justify-content:space-between;flex-direction:row}.step{position:relative;width:17px;height:17px;border-radius:50%;background-color:rgb(var(--zn-border-color));display:flex;align-items:center;justify-content:center;cursor:pointer;border-width:3px;border-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}`;var
|
|
2556
|
+
</div>`}};Ye.styles=z(x1),c([d({attribute:"divide",type:Boolean,reflect:!0})],Ye.prototype,"divide",2),c([d({attribute:"gap",reflect:!0})],Ye.prototype,"gap",2),c([d({attribute:"row",type:Boolean,reflect:!0})],Ye.prototype,"row",2),c([d({reflect:!0})],Ye.prototype,"align",2),c([d({reflect:!0})],Ye.prototype,"justify",2),c([d({attribute:"grow",type:Boolean,reflect:!0})],Ye.prototype,"grow",2),c([d({attribute:"pad-x",type:Boolean,reflect:!0})],Ye.prototype,"padX",2),c([d({attribute:"pad-y",type:Boolean,reflect:!0})],Ye.prototype,"padY",2),c([d({attribute:"no-gap",type:Boolean,reflect:!0})],Ye.prototype,"noGap",2),c([d({attribute:"no-pos",type:Boolean,reflect:!0})],Ye.prototype,"noPosition",2),c([d({attribute:"flush",type:Boolean,reflect:!0})],Ye.prototype,"flush",2),c([d({attribute:"flush-x",type:Boolean,reflect:!0})],Ye.prototype,"flushX",2),c([d({attribute:"flush-y",type:Boolean,reflect:!0})],Ye.prototype,"flushY",2),c([d({attribute:"flush-t",type:Boolean,reflect:!0})],Ye.prototype,"flushT",2),c([d({attribute:"flush-b",type:Boolean,reflect:!0})],Ye.prototype,"flushB",2),c([d({attribute:"flush-l",type:Boolean,reflect:!0})],Ye.prototype,"flushL",2),c([d({attribute:"flush-r",type:Boolean,reflect:!0})],Ye.prototype,"flushR",2),c([d({attribute:"width-container",type:Boolean,reflect:!0})],Ye.prototype,"widthContainer",2),c([d({attribute:"form-container",type:Boolean,reflect:!0})],Ye.prototype,"formContainer",2),c([d({attribute:"wide-form-container",type:Boolean,reflect:!0})],Ye.prototype,"wideFormContainer",2);var n8=Ye;Ye.define("zn-sp");var w1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{width:calc(100% - 4px);display:flex;flex-direction:column;padding:10px 0}.header{font-weight:500;color:rgb(var(--zn-text-heading))}.progress{color:rgb(var(--zn-text))}.info{font-size:90%}.header{display:flex;align-items:center;justify-content:space-between}.label,.info{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header{margin-bottom:var(--zn-spacing-x-small)}.step-container{width:100%;position:relative;height:12px;display:flex;align-items:center}.step-line{position:absolute;width:100%;left:2px;height:2px;background-color:rgb(var(--zn-border-color))}.step-progress{background-color:rgb(var(--zn-primary));height:8px;position:absolute;top:2px;border-radius:10px}.steps{position:relative;width:100%;left:2px;display:flex;justify-content:space-between;flex-direction:row}.step{position:relative;width:17px;height:17px;border-radius:50%;background-color:rgb(var(--zn-border-color));display:flex;align-items:center;justify-content:center;cursor:pointer;border-width:3px;border-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}`;var Di=class extends k{render(){let i=[];for(let r=0;r<this.steps;r++)i.push(u`
|
|
2553
2557
|
<div class="step">
|
|
2554
2558
|
</div>
|
|
2555
2559
|
`);let t=this.value/this.steps*100;return t>100&&(t=100),u`
|
|
@@ -2577,7 +2581,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2577
2581
|
${i}
|
|
2578
2582
|
</div>
|
|
2579
2583
|
</div>
|
|
2580
|
-
`}};
|
|
2584
|
+
`}};Di.styles=z(w1),c([d({reflect:!0})],Di.prototype,"caption",2),c([d({reflect:!0})],Di.prototype,"label",2),c([d({type:Number,reflect:!0})],Di.prototype,"steps",2),c([d({type:Number,reflect:!0})],Di.prototype,"value",2),c([d({type:Boolean,reflect:!0,attribute:"show-progress"})],Di.prototype,"showProgress",2);var o8=Di;Di.define("zn-stepper");var z1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.stat-tile .caption,.stat-tile .description,.stat-tile .amount,.stat-tile .bottom{margin:0}.stat-tile .caption{margin-bottom:var(--zn-spacing-x-small);font-size:var(--zn-text-chart-minor-font-size);line-height:var(--zn-text-chart-minor-line-height);font-weight:var(--zn-text-chart-minor-font-weight);color:var(--zn-text-chart-minor-color)}.stat-tile .container{display:flex;flex-direction:row;gap:var(--zn-spacing-medium);height:100%}.stat-tile .left{flex-basis:50%;display:flex;flex-direction:column}.stat-tile .right{flex-basis:50%}.stat-tile .amount{color:var(--zn-text-chart-major-color);font-weight:var(--zn-text-chart-major-font-weight);font-size:var(--zn-text-chart-major-font-size);line-height:var(--zn-text-chart-major-line-height);display:flex;flex-grow:1;align-items:center}.stat-tile .bottom{color:rgb(var(--zn-text));font-weight:400;padding-top:var(--zn-spacing-medium);font-size:var(--zn-font-size-small)}.stat-tile .bottom:empty{display:none}.stat-tile .diff .positive{color:rgb(var(--zn-color-success))}.stat-tile .diff .negative{color:rgb(var(--zn-color-error))}.stat-tile .diff .neutral{color:rgb(var(--zn-color-warning))}.stat-tile--chart .amount{padding-top:var(--zn-spacing-small)}.stat-tile--chart .bottom{padding-top:var(--zn-spacing-small)}.stat-tile--primary{color:rgb(var(--zn-primary))}.stat-tile--error{color:rgb(var(--zn-color-error))}.stat-tile--info{color:rgb(var(--zn-color-info))}.stat-tile--warning{color:rgb(var(--zn-color-warning))}.stat-tile--success{color:rgb(var(--zn-color-success))}.stat-tile--neutral{color:rgb(var(--zn-text))}@container (max-width:550px){.stat-tile ::slotted(.zn-col-1){flex-basis:170px}.stat-tile .amount{font-size:20px;line-height:20px;padding-top:5px}}`;var Fr=class extends k{constructor(){super(...arguments);this.caption="";this.description="";this.amount="0";this.type="number";this.previous="0";this.currency="";this.showDelta=!1;this.color="primary"}calcPercentageDifference(){let t=parseFloat(this.previous),n=(parseFloat(this.amount)-t)/t*100;return n=Math.round(n*10)/10,n}getCurrentAmount(){if(this.currency=="")return this.amount;let t=parseFloat(this.amount),r=this.currency,n=t.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${r}${n}`}getDisplayAmount(){if(this.currency!=="")return this.getCurrentAmount();if(this.type==="percent")return`${this.amount}%`;if(this.type==="time"){let t=parseInt(this.amount),r=Math.floor(t/60),n=Math.floor(r/60);return n<=0?[r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s":[n,r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s"}return this.amount}diffText(){if(this.showDelta){let t=this.calcPercentageDifference(),r="neutral",n="~";return t>0&&(r="positive",n="+"),t<0&&(r="negative",n="-"),u`<p class="diff"><span class="${r}">${n}${t}%</span> on Previous Period</p>`}return null}render(){return u`
|
|
2581
2585
|
<div class="${M({"stat-tile":!0,[`stat-tile--${this.color}`]:!0})}">
|
|
2582
2586
|
<div class="container">
|
|
2583
2587
|
<div class="left">
|
|
@@ -2630,7 +2634,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2630
2634
|
${this.endTime?this.getHumanReadableTime(this.endTime-this.startTime):l}
|
|
2631
2635
|
</div>
|
|
2632
2636
|
</div>
|
|
2633
|
-
`}};$r.styles=z(k1),c([d({type:Number,attribute:"start-time"})],$r.prototype,"startTime",2),c([d({type:Number,attribute:"wait-time",reflect:!0})],$r.prototype,"waitTime",2),c([d({type:Number,attribute:"max-time"})],$r.prototype,"maxTime",2),c([d({type:Number,attribute:"end-time"})],$r.prototype,"endTime",2),c([d({type:Number,attribute:"max-wait-time"})],$r.prototype,"maxWaitTime",2),c([d({type:Boolean,attribute:"waiting-agent-response"})],$r.prototype,"waitingAgentResponse",2),c([d()],$r.prototype,"status",2),c([d()],$r.prototype,"avatar",2),c([d()],$r.prototype,"caption",2);var l8=$r;$r.define("zn-progress-tile");var C1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{width:calc(100% - 4px);display:flex;flex-direction:column;padding:10px 0;--zn-progress-bar-color:rgb(var(--zn-primary))}:host([color=info]){--zn-progress-bar-color:rgb(var(--zn-color-info))}:host([color=error]){--zn-progress-bar-color:rgb(var(--zn-color-error))}:host([color=success]){--zn-progress-bar-color:rgb(var(--zn-color-success))}:host([color=warning]){--zn-progress-bar-color:rgb(var(--zn-color-warning))}.header{font-weight:500;color:rgb(var(--zn-text-heading))}.header,.footer{display:flex;align-items:center;justify-content:space-between}.progress{color:rgb(var(--zn-text))}.label,.info{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.info{font-size:90%}.header{margin-bottom:var(--zn-spacing-x-small)}.footer{margin-top:var(--zn-spacing-x-small)}`;var
|
|
2637
|
+
`}};$r.styles=z(k1),c([d({type:Number,attribute:"start-time"})],$r.prototype,"startTime",2),c([d({type:Number,attribute:"wait-time",reflect:!0})],$r.prototype,"waitTime",2),c([d({type:Number,attribute:"max-time"})],$r.prototype,"maxTime",2),c([d({type:Number,attribute:"end-time"})],$r.prototype,"endTime",2),c([d({type:Number,attribute:"max-wait-time"})],$r.prototype,"maxWaitTime",2),c([d({type:Boolean,attribute:"waiting-agent-response"})],$r.prototype,"waitingAgentResponse",2),c([d()],$r.prototype,"status",2),c([d()],$r.prototype,"avatar",2),c([d()],$r.prototype,"caption",2);var l8=$r;$r.define("zn-progress-tile");var C1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{width:calc(100% - 4px);display:flex;flex-direction:column;padding:10px 0;--zn-progress-bar-color:rgb(var(--zn-primary))}:host([color=info]){--zn-progress-bar-color:rgb(var(--zn-color-info))}:host([color=error]){--zn-progress-bar-color:rgb(var(--zn-color-error))}:host([color=success]){--zn-progress-bar-color:rgb(var(--zn-color-success))}:host([color=warning]){--zn-progress-bar-color:rgb(var(--zn-color-warning))}.header{font-weight:500;color:rgb(var(--zn-text-heading))}.header,.footer{display:flex;align-items:center;justify-content:space-between}.progress{color:rgb(var(--zn-text))}.label,.info{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.info{font-size:90%}.header{margin-bottom:var(--zn-spacing-x-small)}.footer{margin-top:var(--zn-spacing-x-small)}`;var Ri=class extends k{constructor(){super(...arguments);this.color="current"}render(){return u`
|
|
2634
2638
|
${this.caption||this.showProgress?u`
|
|
2635
2639
|
<div part="header" class="header">
|
|
2636
2640
|
<p part="caption" class="caption">${this.caption}</p>
|
|
@@ -2668,7 +2672,7 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2668
2672
|
</p>`:""}
|
|
2669
2673
|
</div>
|
|
2670
2674
|
`:""}
|
|
2671
|
-
`}};
|
|
2675
|
+
`}};Ri.styles=z(C1),c([d({type:String,reflect:!0})],Ri.prototype,"caption",2),c([d({reflect:!0})],Ri.prototype,"color",2),c([d({type:String,reflect:!0})],Ri.prototype,"description",2),c([d({type:Number,reflect:!0})],Ri.prototype,"value",2),c([d({type:Boolean,reflect:!0,attribute:"show-progress"})],Ri.prototype,"showProgress",2);var c8=Ri;Ri.define("zn-progress-bar");var S1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.table{display:flex;flex-direction:column;width:100%}.header{display:flex;align-items:center;width:100%}.header-item,.row-item{padding:10px 15px;display:flex;flex-direction:column;align-items:center;vertical-align:middle;justify-content:center;gap:var(--zn-spacing-small)}.header-item .content,.row-item .content{display:flex;flex-direction:column;justify-content:center;gap:var(--zn-spacing-small)}.header-item:last-child,.row-item:last-child{flex-direction:column-reverse}@container (min-width:768px){.header-item,.row-item{flex:1;border-bottom:1px solid rgb(var(--zn-border-color))}.header-item:first-child,.row-item:first-child{width:35%;flex-basis:35%;align-items:flex-start}.header-item:first-child.row-caption,.row-item:first-child.row-caption{text-align:left}.header-item:last-child,.row-item:last-child{text-align:right}}.sub-row:last-of-type{border-bottom:2px solid rgb(var(--zn-border-color))}@container (min-width:768px){.sub-row:last-of-type{border-bottom:none}.sub-row:last-of-type .row-item{border-bottom:2px solid rgb(var(--zn-border-color))}}.row{background-color:rgba(var(--zn-panel-highlight),var(--zn-panel-highlight-opacity,1))}.header-item{font-size:14px;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap}.row-caption .content div:first-of-type{font-size:14px;font-weight:600;color:rgb(var(--zn-text-heading))}.rows{width:100%;display:flex;flex-direction:column}.row{display:flex;justify-content:space-between;border-bottom:1px solid rgb(var(--zn-border-color));width:100%}@container (min-width:768px){.row{border-bottom:none}}.row:first-of-type{margin-top:0}.sub{width:100%}@container (min-width:768px){.sub{display:contents}}.sub-row{display:flex;justify-content:space-between;border-bottom:1px solid rgb(var(--zn-border-color));width:100%}@container (min-width:768px){.sub-row{border-bottom:none}}.summary{width:100%;padding-top:10px;margin-left:auto}@container (min-width:768px){.summary{width:50%}}.summary-item{display:flex;flex-direction:row;justify-content:space-between;font-size:14px;font-weight:600;color:rgb(var(--zn-text-heading))}.summary-item:first-of-type .summary-item-value{font-weight:400}.summary-divide{border-bottom:1px solid rgb(var(--zn-border-color))}.summary-item-title,.summary-item-value{padding:10px 20px}@container (min-width:768px){.summary-item-title,.summary-item-value{padding:10px}}`;var To=class extends k{constructor(){super(...arguments);this.isMobile=!1;this.resizeEventHandler=()=>{window.innerWidth<768&&!this.isMobile?(this.isMobile=!0,this.requestUpdate()):window.innerWidth>=768&&this.isMobile&&(this.isMobile=!1,this.requestUpdate())}}connectedCallback(){if(this.isMobile=window.innerWidth<768,this.modifiedData=this.data,window.addEventListener("resize",this.resizeEventHandler),(this.data===null||this.data===void 0)&&this.childNodes.length>0&&this.childNodes[0].nodeType===3){let t=this.childNodes[0];try{this.data=JSON.parse(t?.textContent)}catch{}}super.connectedCallback()}disconnectedCallback(){window.removeEventListener("resize",this.resizeEventHandler)}render(){return this.modifiedData=this.data,this.isMobile?u`
|
|
2672
2676
|
<div class="mobile-table">
|
|
2673
2677
|
${this.getMobileRows()}
|
|
2674
2678
|
</div>
|
|
@@ -2854,10 +2858,10 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2854
2858
|
<zn-input type="text"
|
|
2855
2859
|
class="query-builder__value"
|
|
2856
2860
|
@zn-input="${a=>this._updateValue(t,a)}">
|
|
2857
|
-
</zn-input>`;return qt(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Zr.styles=[z(ms),z(E1)],Zr.dependencies={"zn-button":$e,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".bulk-actions")],Zr.prototype,"container",2),c([F(".add-rule")],Zr.prototype,"addRule",2),c([F("input#main-input")],Zr.prototype,"input",2),c([d()],Zr.prototype,"name",2),c([d()],Zr.prototype,"value",2),c([d({type:Array})],Zr.prototype,"actions",2);var p8=Zr;Zr.define("zn-bulk-actions");var h8=()=>{let o="attachment",i=new Date().getTime();return`${o}_${i}`},jl=class{constructor(i,t){this._attachmentContainer=document.createElement("div");this._quill=i,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let i=this._fileHolder.files[0];this.addAttachment(i)}addAttachment(i,t){let r=h8(),n=a=>{this._insertAttachment({dataUrl:a,file:i,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(i)}typeof this._options.upload=="function"&&this._options.upload(i).then(async({path:a,url:s})=>{await this._uploadAttachment(i,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let i=this._attachmentContainer;i.id="attachment-container",i.style.display="flex",i.style.flexWrap="wrap",i.style.gap="10px",i.style.position="absolute",i.style.bottom="0",i.style.left="0",i.style.right="0",i.style.padding="10px",this._quill.container.appendChild(i)}_insertAttachment({dataUrl:i,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(i,t,r))}_updateAttachment(i,t,r){let n=this._quill.container.querySelector(`#${i}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,p=l?JSON.parse(l):[];p.push(r),s.value=JSON.stringify(p)}}_createAttachment(i,t,r){let n=document.createElement("a");n.setAttribute("href",i),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let i=this._options.attachmentInput;i&&(i.value="")}_removeAttachment(i){let t=this._quill.container.querySelector(`#${i}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(i,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",i.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(i)})}};var C_=_r(ei(),1);var $C=typeof global=="object"&&global&&global.Object===Object&&global,Cp=$C;var AC=typeof self=="object"&&self&&self.Object===Object&&self,MC=Cp||AC||Function("return this")(),Ft=MC;var LC=Ft.Symbol,Ni=LC;var dx=Object.prototype,qC=dx.hasOwnProperty,IC=dx.toString,tc=Ni?Ni.toStringTag:void 0;function DC(o){var i=qC.call(o,tc),t=o[tc];try{o[tc]=void 0;var r=!0}catch{}var n=IC.call(o);return r&&(i?o[tc]=t:delete o[tc]),n}var px=DC;var RC=Object.prototype,NC=RC.toString;function OC(o){return NC.call(o)}var hx=OC;var PC="[object Null]",HC="[object Undefined]",ux=Ni?Ni.toStringTag:void 0;function FC(o){return o==null?o===void 0?HC:PC:ux&&ux in Object(o)?px(o):hx(o)}var hn=FC;function BC(o){return o!=null&&typeof o=="object"}var gr=BC;var VC=Array.isArray,Oi=VC;function UC(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}var Ar=UC;function jC(o){return o}var Sp=jC;var GC="[object AsyncFunction]",WC="[object Function]",KC="[object GeneratorFunction]",YC="[object Proxy]";function QC(o){if(!Ar(o))return!1;var i=hn(o);return i==WC||i==KC||i==GC||i==YC}var Cs=QC;var XC=Ft["__core-js_shared__"],Ep=XC;var mx=(function(){var o=/[^.]+$/.exec(Ep&&Ep.keys&&Ep.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function JC(o){return!!mx&&mx in o}var fx=JC;var ZC=Function.prototype,eS=ZC.toString;function tS(o){if(o!=null){try{return eS.call(o)}catch{}try{return o+""}catch{}}return""}var to=tS;var rS=/[\\^$.*+?()[\]{}|]/g,iS=/^\[object .+?Constructor\]$/,nS=Function.prototype,oS=Object.prototype,aS=nS.toString,sS=oS.hasOwnProperty,lS=RegExp("^"+aS.call(sS).replace(rS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cS(o){if(!Ar(o)||fx(o))return!1;var i=Cs(o)?lS:iS;return i.test(to(o))}var gx=cS;function dS(o,i){return o?.[i]}var bx=dS;function pS(o,i){var t=bx(o,i);return gx(t)?t:void 0}var ti=pS;var hS=ti(Ft,"WeakMap"),Tp=hS;var vx=Object.create,uS=(function(){function o(){}return function(i){if(!Ar(i))return{};if(vx)return vx(i);o.prototype=i;var t=new o;return o.prototype=void 0,t}})(),yx=uS;function mS(o,i,t){switch(t.length){case 0:return o.call(i);case 1:return o.call(i,t[0]);case 2:return o.call(i,t[0],t[1]);case 3:return o.call(i,t[0],t[1],t[2])}return o.apply(i,t)}var xx=mS;function fS(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}var $p=fS;var gS=800,bS=16,vS=Date.now;function yS(o){var i=0,t=0;return function(){var r=vS(),n=bS-(r-t);if(t=r,n>0){if(++i>=gS)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}var wx=yS;function xS(o){return function(){return o}}var zx=xS;var wS=(function(){try{var o=ti(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Ss=wS;var zS=Ss?function(o,i){return Ss(o,"toString",{configurable:!0,enumerable:!1,value:zx(i),writable:!0})}:Sp,_x=zS;var _S=wx(_x),kx=_S;function kS(o,i){for(var t=-1,r=o==null?0:o.length;++t<r&&i(o[t],t,o)!==!1;);return o}var Cx=kS;var CS=9007199254740991,SS=/^(?:0|[1-9]\d*)$/;function ES(o,i){var t=typeof o;return i=i??CS,!!i&&(t=="number"||t!="symbol"&&SS.test(o))&&o>-1&&o%1==0&&o<i}var Ap=ES;function TS(o,i,t){i=="__proto__"&&Ss?Ss(o,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[i]=t}var Es=TS;function $S(o,i){return o===i||o!==o&&i!==i}var An=$S;var AS=Object.prototype,MS=AS.hasOwnProperty;function LS(o,i,t){var r=o[i];(!(MS.call(o,i)&&An(r,t))||t===void 0&&!(i in o))&&Es(o,i,t)}var Mp=LS;function qS(o,i,t,r){var n=!t;t||(t={});for(var a=-1,s=i.length;++a<s;){var l=i[a],p=r?r(t[l],o[l],l,t,o):void 0;p===void 0&&(p=o[l]),n?Es(t,l,p):Mp(t,l,p)}return t}var Mn=qS;var Sx=Math.max;function IS(o,i,t){return i=Sx(i===void 0?o.length-1:i,0),function(){for(var r=arguments,n=-1,a=Sx(r.length-i,0),s=Array(a);++n<a;)s[n]=r[i+n];n=-1;for(var l=Array(i+1);++n<i;)l[n]=r[n];return l[i]=t(s),xx(o,this,l)}}var Ex=IS;function DS(o,i){return kx(Ex(o,i,Sp),o+"")}var Tx=DS;var RS=9007199254740991;function NS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=RS}var Lp=NS;function OS(o){return o!=null&&Lp(o.length)&&!Cs(o)}var Lo=OS;function PS(o,i,t){if(!Ar(t))return!1;var r=typeof i;return(r=="number"?Lo(t)&&Ap(i,t.length):r=="string"&&i in t)?An(t[i],o):!1}var $x=PS;function HS(o){return Tx(function(i,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=o.length>3&&typeof a=="function"?(n--,a):void 0,s&&$x(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),i=Object(i);++r<n;){var l=t[r];l&&o(i,l,r,a)}return i})}var Ax=HS;var FS=Object.prototype;function BS(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||FS;return o===t}var Ts=BS;function VS(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}var Mx=VS;var US="[object Arguments]";function jS(o){return gr(o)&&hn(o)==US}var Gm=jS;var Lx=Object.prototype,GS=Lx.hasOwnProperty,WS=Lx.propertyIsEnumerable,KS=Gm((function(){return arguments})())?Gm:function(o){return gr(o)&&GS.call(o,"callee")&&!WS.call(o,"callee")},rc=KS;function YS(){return!1}var qx=YS;var Rx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ix=Rx&&typeof module=="object"&&module&&!module.nodeType&&module,QS=Ix&&Ix.exports===Rx,Dx=QS?Ft.Buffer:void 0,XS=Dx?Dx.isBuffer:void 0,JS=XS||qx,ro=JS;var ZS="[object Arguments]",e7="[object Array]",t7="[object Boolean]",r7="[object Date]",i7="[object Error]",n7="[object Function]",o7="[object Map]",a7="[object Number]",s7="[object Object]",l7="[object RegExp]",c7="[object Set]",d7="[object String]",p7="[object WeakMap]",h7="[object ArrayBuffer]",u7="[object DataView]",m7="[object Float32Array]",f7="[object Float64Array]",g7="[object Int8Array]",b7="[object Int16Array]",v7="[object Int32Array]",y7="[object Uint8Array]",x7="[object Uint8ClampedArray]",w7="[object Uint16Array]",z7="[object Uint32Array]",lt={};lt[m7]=lt[f7]=lt[g7]=lt[b7]=lt[v7]=lt[y7]=lt[x7]=lt[w7]=lt[z7]=!0;lt[ZS]=lt[e7]=lt[h7]=lt[t7]=lt[u7]=lt[r7]=lt[i7]=lt[n7]=lt[o7]=lt[a7]=lt[s7]=lt[l7]=lt[c7]=lt[d7]=lt[p7]=!1;function _7(o){return gr(o)&&Lp(o.length)&&!!lt[hn(o)]}var Nx=_7;function k7(o){return function(i){return o(i)}}var $s=k7;var Ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ic=Ox&&typeof module=="object"&&module&&!module.nodeType&&module,C7=ic&&ic.exports===Ox,Wm=C7&&Cp.process,S7=(function(){try{var o=ic&&ic.require&&ic.require("util").types;return o||Wm&&Wm.binding&&Wm.binding("util")}catch{}})(),io=S7;var Px=io&&io.isTypedArray,E7=Px?$s(Px):Nx,As=E7;var T7=Object.prototype,$7=T7.hasOwnProperty;function A7(o,i){var t=Oi(o),r=!t&&rc(o),n=!t&&!r&&ro(o),a=!t&&!r&&!n&&As(o),s=t||r||n||a,l=s?Mx(o.length,String):[],p=l.length;for(var h in o)(i||$7.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Ap(h,p)))&&l.push(h);return l}var qp=A7;function M7(o,i){return function(t){return o(i(t))}}var Ip=M7;var L7=Ip(Object.keys,Object),Hx=L7;var q7=Object.prototype,I7=q7.hasOwnProperty;function D7(o){if(!Ts(o))return Hx(o);var i=[];for(var t in Object(o))I7.call(o,t)&&t!="constructor"&&i.push(t);return i}var Fx=D7;function R7(o){return Lo(o)?qp(o):Fx(o)}var Ms=R7;function N7(o){var i=[];if(o!=null)for(var t in Object(o))i.push(t);return i}var Bx=N7;var O7=Object.prototype,P7=O7.hasOwnProperty;function H7(o){if(!Ar(o))return Bx(o);var i=Ts(o),t=[];for(var r in o)r=="constructor"&&(i||!P7.call(o,r))||t.push(r);return t}var Vx=H7;function F7(o){return Lo(o)?qp(o,!0):Vx(o)}var Ln=F7;var B7=ti(Object,"create"),no=B7;function V7(){this.__data__=no?no(null):{},this.size=0}var Ux=V7;function U7(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}var jx=U7;var j7="__lodash_hash_undefined__",G7=Object.prototype,W7=G7.hasOwnProperty;function K7(o){var i=this.__data__;if(no){var t=i[o];return t===j7?void 0:t}return W7.call(i,o)?i[o]:void 0}var Gx=K7;var Y7=Object.prototype,Q7=Y7.hasOwnProperty;function X7(o){var i=this.__data__;return no?i[o]!==void 0:Q7.call(i,o)}var Wx=X7;var J7="__lodash_hash_undefined__";function Z7(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=no&&i===void 0?J7:i,this}var Kx=Z7;function Ls(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ls.prototype.clear=Ux;Ls.prototype.delete=jx;Ls.prototype.get=Gx;Ls.prototype.has=Wx;Ls.prototype.set=Kx;var Km=Ls;function eE(){this.__data__=[],this.size=0}var Yx=eE;function tE(o,i){for(var t=o.length;t--;)if(An(o[t][0],i))return t;return-1}var qo=tE;var rE=Array.prototype,iE=rE.splice;function nE(o){var i=this.__data__,t=qo(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():iE.call(i,t,1),--this.size,!0}var Qx=nE;function oE(o){var i=this.__data__,t=qo(i,o);return t<0?void 0:i[t][1]}var Xx=oE;function aE(o){return qo(this.__data__,o)>-1}var Jx=aE;function sE(o,i){var t=this.__data__,r=qo(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}var Zx=sE;function qs(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}qs.prototype.clear=Yx;qs.prototype.delete=Qx;qs.prototype.get=Xx;qs.prototype.has=Jx;qs.prototype.set=Zx;var Io=qs;var lE=ti(Ft,"Map"),Do=lE;function cE(){this.size=0,this.__data__={hash:new Km,map:new(Do||Io),string:new Km}}var ew=cE;function dE(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}var tw=dE;function pE(o,i){var t=o.__data__;return tw(i)?t[typeof i=="string"?"string":"hash"]:t.map}var Ro=pE;function hE(o){var i=Ro(this,o).delete(o);return this.size-=i?1:0,i}var rw=hE;function uE(o){return Ro(this,o).get(o)}var iw=uE;function mE(o){return Ro(this,o).has(o)}var nw=mE;function fE(o,i){var t=Ro(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}var ow=fE;function Is(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Is.prototype.clear=ew;Is.prototype.delete=rw;Is.prototype.get=iw;Is.prototype.has=nw;Is.prototype.set=ow;var Dp=Is;function gE(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}var Rp=gE;var bE=Ip(Object.getPrototypeOf,Object),Ds=bE;var vE="[object Object]",yE=Function.prototype,xE=Object.prototype,aw=yE.toString,wE=xE.hasOwnProperty,zE=aw.call(Object);function _E(o){if(!gr(o)||hn(o)!=vE)return!1;var i=Ds(o);if(i===null)return!0;var t=wE.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&aw.call(t)==zE}var sw=_E;function kE(){this.__data__=new Io,this.size=0}var lw=kE;function CE(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}var cw=CE;function SE(o){return this.__data__.get(o)}var dw=SE;function EE(o){return this.__data__.has(o)}var pw=EE;var TE=200;function $E(o,i){var t=this.__data__;if(t instanceof Io){var r=t.__data__;if(!Do||r.length<TE-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Dp(r)}return t.set(o,i),this.size=t.size,this}var hw=$E;function Rs(o){var i=this.__data__=new Io(o);this.size=i.size}Rs.prototype.clear=lw;Rs.prototype.delete=cw;Rs.prototype.get=dw;Rs.prototype.has=pw;Rs.prototype.set=hw;var No=Rs;function AE(o,i){return o&&Mn(i,Ms(i),o)}var uw=AE;function ME(o,i){return o&&Mn(i,Ln(i),o)}var mw=ME;var vw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fw=vw&&typeof module=="object"&&module&&!module.nodeType&&module,LE=fw&&fw.exports===vw,gw=LE?Ft.Buffer:void 0,bw=gw?gw.allocUnsafe:void 0;function qE(o,i){if(i)return o.slice();var t=o.length,r=bw?bw(t):new o.constructor(t);return o.copy(r),r}var Np=qE;function IE(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}var yw=IE;function DE(){return[]}var Op=DE;var RE=Object.prototype,NE=RE.propertyIsEnumerable,xw=Object.getOwnPropertySymbols,OE=xw?function(o){return o==null?[]:(o=Object(o),yw(xw(o),function(i){return NE.call(o,i)}))}:Op,Ns=OE;function PE(o,i){return Mn(o,Ns(o),i)}var ww=PE;var HE=Object.getOwnPropertySymbols,FE=HE?function(o){for(var i=[];o;)Rp(i,Ns(o)),o=Ds(o);return i}:Op,Pp=FE;function BE(o,i){return Mn(o,Pp(o),i)}var zw=BE;function VE(o,i,t){var r=i(o);return Oi(o)?r:Rp(r,t(o))}var Hp=VE;function UE(o){return Hp(o,Ms,Ns)}var nc=UE;function jE(o){return Hp(o,Ln,Pp)}var _w=jE;var GE=ti(Ft,"DataView"),Fp=GE;var WE=ti(Ft,"Promise"),Bp=WE;var KE=ti(Ft,"Set"),Vp=KE;var kw="[object Map]",YE="[object Object]",Cw="[object Promise]",Sw="[object Set]",Ew="[object WeakMap]",Tw="[object DataView]",QE=to(Fp),XE=to(Do),JE=to(Bp),ZE=to(Vp),eT=to(Tp),Ia=hn;(Fp&&Ia(new Fp(new ArrayBuffer(1)))!=Tw||Do&&Ia(new Do)!=kw||Bp&&Ia(Bp.resolve())!=Cw||Vp&&Ia(new Vp)!=Sw||Tp&&Ia(new Tp)!=Ew)&&(Ia=function(o){var i=hn(o),t=i==YE?o.constructor:void 0,r=t?to(t):"";if(r)switch(r){case QE:return Tw;case XE:return kw;case JE:return Cw;case ZE:return Sw;case eT:return Ew}return i});var oo=Ia;var tT=Object.prototype,rT=tT.hasOwnProperty;function iT(o){var i=o.length,t=new o.constructor(i);return i&&typeof o[0]=="string"&&rT.call(o,"index")&&(t.index=o.index,t.input=o.input),t}var $w=iT;var nT=Ft.Uint8Array,Os=nT;function oT(o){var i=new o.constructor(o.byteLength);return new Os(i).set(new Os(o)),i}var Ps=oT;function aT(o,i){var t=i?Ps(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}var Aw=aT;var sT=/\w*$/;function lT(o){var i=new o.constructor(o.source,sT.exec(o));return i.lastIndex=o.lastIndex,i}var Mw=lT;var Lw=Ni?Ni.prototype:void 0,qw=Lw?Lw.valueOf:void 0;function cT(o){return qw?Object(qw.call(o)):{}}var Iw=cT;function dT(o,i){var t=i?Ps(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}var Up=dT;var pT="[object Boolean]",hT="[object Date]",uT="[object Map]",mT="[object Number]",fT="[object RegExp]",gT="[object Set]",bT="[object String]",vT="[object Symbol]",yT="[object ArrayBuffer]",xT="[object DataView]",wT="[object Float32Array]",zT="[object Float64Array]",_T="[object Int8Array]",kT="[object Int16Array]",CT="[object Int32Array]",ST="[object Uint8Array]",ET="[object Uint8ClampedArray]",TT="[object Uint16Array]",$T="[object Uint32Array]";function AT(o,i,t){var r=o.constructor;switch(i){case yT:return Ps(o);case pT:case hT:return new r(+o);case xT:return Aw(o,t);case wT:case zT:case _T:case kT:case CT:case ST:case ET:case TT:case $T:return Up(o,t);case uT:return new r;case mT:case bT:return new r(o);case fT:return Mw(o);case gT:return new r;case vT:return Iw(o)}}var Dw=AT;function MT(o){return typeof o.constructor=="function"&&!Ts(o)?yx(Ds(o)):{}}var jp=MT;var LT="[object Map]";function qT(o){return gr(o)&&oo(o)==LT}var Rw=qT;var Nw=io&&io.isMap,IT=Nw?$s(Nw):Rw,Ow=IT;var DT="[object Set]";function RT(o){return gr(o)&&oo(o)==DT}var Pw=RT;var Hw=io&&io.isSet,NT=Hw?$s(Hw):Pw,Fw=NT;var OT=1,PT=2,HT=4,Bw="[object Arguments]",FT="[object Array]",BT="[object Boolean]",VT="[object Date]",UT="[object Error]",Vw="[object Function]",jT="[object GeneratorFunction]",GT="[object Map]",WT="[object Number]",Uw="[object Object]",KT="[object RegExp]",YT="[object Set]",QT="[object String]",XT="[object Symbol]",JT="[object WeakMap]",ZT="[object ArrayBuffer]",e$="[object DataView]",t$="[object Float32Array]",r$="[object Float64Array]",i$="[object Int8Array]",n$="[object Int16Array]",o$="[object Int32Array]",a$="[object Uint8Array]",s$="[object Uint8ClampedArray]",l$="[object Uint16Array]",c$="[object Uint32Array]",tt={};tt[Bw]=tt[FT]=tt[ZT]=tt[e$]=tt[BT]=tt[VT]=tt[t$]=tt[r$]=tt[i$]=tt[n$]=tt[o$]=tt[GT]=tt[WT]=tt[Uw]=tt[KT]=tt[YT]=tt[QT]=tt[XT]=tt[a$]=tt[s$]=tt[l$]=tt[c$]=!0;tt[UT]=tt[Vw]=tt[JT]=!1;function Gp(o,i,t,r,n,a){var s,l=i&OT,p=i&PT,h=i&HT;if(t&&(s=n?t(o,r,n,a):t(o)),s!==void 0)return s;if(!Ar(o))return o;var m=Oi(o);if(m){if(s=$w(o),!l)return $p(o,s)}else{var f=oo(o),b=f==Vw||f==jT;if(ro(o))return Np(o,l);if(f==Uw||f==Bw||b&&!n){if(s=p||b?{}:jp(o),!l)return p?zw(o,mw(s,o)):ww(o,uw(s,o))}else{if(!tt[f])return n?o:{};s=Dw(o,f,l)}}a||(a=new No);var g=a.get(o);if(g)return g;a.set(o,s),Fw(o)?o.forEach(function(S){s.add(Gp(S,i,t,S,o,a))}):Ow(o)&&o.forEach(function(S,T){s.set(T,Gp(S,i,t,T,o,a))});var v=h?p?_w:nc:p?Ln:Ms,y=m?void 0:v(o);return Cx(y||o,function(S,T){y&&(T=S,S=o[T]),Mp(s,T,Gp(S,i,t,T,o,a))}),s}var jw=Gp;var d$=1,p$=4;function h$(o){return jw(o,d$|p$)}var qn=h$;var u$="__lodash_hash_undefined__";function m$(o){return this.__data__.set(o,u$),this}var Gw=m$;function f$(o){return this.__data__.has(o)}var Ww=f$;function Wp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Dp;++i<t;)this.add(o[i])}Wp.prototype.add=Wp.prototype.push=Gw;Wp.prototype.has=Ww;var Kw=Wp;function g$(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}var Yw=g$;function b$(o,i){return o.has(i)}var Qw=b$;var v$=1,y$=2;function x$(o,i,t,r,n,a){var s=t&v$,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o),m=a.get(i);if(h&&m)return h==i&&m==o;var f=-1,b=!0,g=t&y$?new Kw:void 0;for(a.set(o,i),a.set(i,o);++f<l;){var v=o[f],y=i[f];if(r)var S=s?r(y,v,f,i,o,a):r(v,y,f,o,i,a);if(S!==void 0){if(S)continue;b=!1;break}if(g){if(!Yw(i,function(T,N){if(!Qw(g,N)&&(v===T||n(v,T,t,r,a)))return g.push(N)})){b=!1;break}}else if(!(v===y||n(v,y,t,r,a))){b=!1;break}}return a.delete(o),a.delete(i),b}var Kp=x$;function w$(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}var Xw=w$;function z$(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var Jw=z$;var _$=1,k$=2,C$="[object Boolean]",S$="[object Date]",E$="[object Error]",T$="[object Map]",$$="[object Number]",A$="[object RegExp]",M$="[object Set]",L$="[object String]",q$="[object Symbol]",I$="[object ArrayBuffer]",D$="[object DataView]",Zw=Ni?Ni.prototype:void 0,Ym=Zw?Zw.valueOf:void 0;function R$(o,i,t,r,n,a,s){switch(t){case D$:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case I$:return!(o.byteLength!=i.byteLength||!a(new Os(o),new Os(i)));case C$:case S$:case $$:return An(+o,+i);case E$:return o.name==i.name&&o.message==i.message;case A$:case L$:return o==i+"";case T$:var l=Xw;case M$:var p=r&_$;if(l||(l=Jw),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=k$,s.set(o,i);var m=Kp(l(o),l(i),r,n,a,s);return s.delete(o),m;case q$:if(Ym)return Ym.call(o)==Ym.call(i)}return!1}var ez=R$;var N$=1,O$=Object.prototype,P$=O$.hasOwnProperty;function H$(o,i,t,r,n,a){var s=t&N$,l=nc(o),p=l.length,h=nc(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:P$.call(i,b)))return!1}var g=a.get(o),v=a.get(i);if(g&&v)return g==i&&v==o;var y=!0;a.set(o,i),a.set(i,o);for(var S=s;++f<p;){b=l[f];var T=o[b],N=i[b];if(r)var U=s?r(N,T,b,i,o,a):r(T,N,b,o,i,a);if(!(U===void 0?T===N||n(T,N,t,r,a):U)){y=!1;break}S||(S=b=="constructor")}if(y&&!S){var I=o.constructor,C=i.constructor;I!=C&&"constructor"in o&&"constructor"in i&&!(typeof I=="function"&&I instanceof I&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(o),a.delete(i),y}var tz=H$;var F$=1,rz="[object Arguments]",iz="[object Array]",Yp="[object Object]",B$=Object.prototype,nz=B$.hasOwnProperty;function V$(o,i,t,r,n,a){var s=Oi(o),l=Oi(i),p=s?iz:oo(o),h=l?iz:oo(i);p=p==rz?Yp:p,h=h==rz?Yp:h;var m=p==Yp,f=h==Yp,b=p==h;if(b&&ro(o)){if(!ro(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new No),s||As(o)?Kp(o,i,t,r,n,a):ez(o,i,p,t,r,n,a);if(!(t&F$)){var g=m&&nz.call(o,"__wrapped__"),v=f&&nz.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new No),n(y,S,t,r,a)}}return b?(a||(a=new No),tz(o,i,t,r,n,a)):!1}var oz=V$;function az(o,i,t,r,n){return o===i?!0:o==null||i==null||!gr(o)&&!gr(i)?o!==o&&i!==i:oz(o,i,t,r,az,n)}var sz=az;function U$(o){return function(i,t,r){for(var n=-1,a=Object(i),s=r(i),l=s.length;l--;){var p=s[o?l:++n];if(t(a[p],p,a)===!1)break}return i}}var lz=U$;var j$=lz(),cz=j$;function G$(o,i,t){(t!==void 0&&!An(o[i],t)||t===void 0&&!(i in o))&&Es(o,i,t)}var oc=G$;function W$(o){return gr(o)&&Lo(o)}var dz=W$;function K$(o,i){if(!(i==="constructor"&&typeof o[i]=="function")&&i!="__proto__")return o[i]}var ac=K$;function Y$(o){return Mn(o,Ln(o))}var pz=Y$;function Q$(o,i,t,r,n,a,s){var l=ac(o,t),p=ac(i,t),h=s.get(p);if(h){oc(o,t,h);return}var m=a?a(l,p,t+"",o,i,s):void 0,f=m===void 0;if(f){var b=Oi(p),g=!b&&ro(p),v=!b&&!g&&As(p);m=p,b||g||v?Oi(l)?m=l:dz(l)?m=$p(l):g?(f=!1,m=Np(p,!0)):v?(f=!1,m=Up(p,!0)):m=[]:sw(p)||rc(p)?(m=l,rc(l)?m=pz(l):(!Ar(l)||Cs(l))&&(m=jp(p))):f=!1}f&&(s.set(p,m),n(m,p,r,a,s),s.delete(p)),oc(o,t,m)}var hz=Q$;function uz(o,i,t,r,n){o!==i&&cz(i,function(a,s){if(n||(n=new No),Ar(a))hz(o,i,s,t,uz,r,n);else{var l=r?r(ac(o,s),a,s+"",o,i,n):void 0;l===void 0&&(l=a),oc(o,s,l)}},Ln)}var mz=uz;function X$(o,i){return sz(o,i)}var Da=X$;var J$=Ax(function(o,i,t){mz(o,i,t)}),ri=J$;var cc={};d3(cc,{Attributor:()=>Vr,AttributorStore:()=>sc,BlockBlot:()=>Ra,ClassAttributor:()=>Bt,ContainerBlot:()=>Us,EmbedBlot:()=>wt,InlineBlot:()=>Qp,LeafBlot:()=>Vt,ParentBlot:()=>ii,Registry:()=>Ho,Scope:()=>X,ScrollBlot:()=>lc,StyleAttributor:()=>ni,TextBlot:()=>js});var X=(o=>(o[o.TYPE=3]="TYPE",o[o.LEVEL=12]="LEVEL",o[o.ATTRIBUTE=13]="ATTRIBUTE",o[o.BLOT=14]="BLOT",o[o.INLINE=7]="INLINE",o[o.BLOCK=11]="BLOCK",o[o.BLOCK_BLOT=10]="BLOCK_BLOT",o[o.INLINE_BLOT=6]="INLINE_BLOT",o[o.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",o[o.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",o[o.ANY=15]="ANY",o))(X||{}),Vr=class{constructor(i,t,r={}){this.attrName=i,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(i){return Array.from(i.attributes).map(t=>t.name)}add(i,t){return this.canAdd(i,t)?(i.setAttribute(this.keyName,t),!0):!1}canAdd(i,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(i){i.removeAttribute(this.keyName)}value(i){let t=i.getAttribute(this.keyName);return this.canAdd(i,t)&&t?t:""}},Po=class extends Error{constructor(i){i="[Parchment] "+i,super(i),this.message=i,this.name=this.constructor.name}},bz=class Xm{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(i,t=!1){if(i==null)return null;if(this.blots.has(i))return this.blots.get(i)||null;if(t){let r=null;try{r=i.parentNode}catch{return null}return this.find(r,t)}return null}create(i,t,r){let n=this.query(t);if(n==null)throw new Po(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(i,s,r);return Xm.blots.set(l.domNode,l),l}find(i,t=!1){return Xm.find(i,t)}query(i,t=X.ANY){let r;return typeof i=="string"?r=this.types[i]||this.attributes[i]:i instanceof Text||i.nodeType===Node.TEXT_NODE?r=this.types.text:typeof i=="number"?i&X.LEVEL&X.BLOCK?r=this.types.block:i&X.LEVEL&X.INLINE&&(r=this.types.inline):i instanceof Element&&((i.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[i.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...i){return i.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new Po("Invalid definition");if(r&&t.blotName==="abstract")throw new Po("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};bz.blots=new WeakMap;var Ho=bz;function fz(o,i){return(o.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${i}-`)===0)}var Jm=class extends Vr{static keys(i){return(i.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(`${this.keyName}-${t}`),!0):!1}remove(i){fz(i,this.keyName).forEach(t=>{i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")}value(i){let t=(fz(i,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(i,t)?t:""}},Bt=Jm;function Qm(o){let i=o.split("-"),t=i.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return i[0]+t}var Zm=class extends Vr{static keys(i){return(i.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(i,t){return this.canAdd(i,t)?(i.style[Qm(this.keyName)]=t,!0):!1}remove(i){i.style[Qm(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")}value(i){let t=i.style[Qm(this.keyName)];return this.canAdd(i,t)?t:""}},ni=Zm,ef=class{constructor(i){this.attributes={},this.domNode=i,this.build()}attribute(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])}build(){this.attributes={};let i=Ho.find(this.domNode);if(i==null)return;let t=Vr.keys(this.domNode),r=Bt.keys(this.domNode),n=ni.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=i.scroll.query(a,X.ATTRIBUTE);s instanceof Vr&&(this.attributes[s.attrName]=s)})}copy(i){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);i.format(t,r)})}move(i){this.copy(i),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((i,t)=>(i[t]=this.attributes[t].value(this.domNode),i),{})}},sc=ef,vz=class{constructor(i,t){this.scroll=i,this.domNode=t,Ho.blots.set(t,this),this.prev=null,this.next=null}static create(i){if(this.tagName==null)throw new Po("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof i=="string"?(r=i.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof i=="number"&&(r=i),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let i=this.domNode.cloneNode(!1);return this.scroll.create(i)}detach(){this.parent!=null&&this.parent.removeChild(this),Ho.blots.delete(this.domNode)}deleteAt(i,t){this.isolate(i,t).remove()}formatAt(i,t,r,n){let a=this.isolate(i,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(i,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(i);this.parent.insertBefore(n,a||void 0)}isolate(i,t){let r=this.split(i);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(i=this.parent){return this.parent==null||this===i?0:this.parent.children.offset(this)+this.parent.offset(i)}optimize(i){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(i,t){return i===0?this:this.next}update(i,t){}wrap(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Po(`Cannot wrap ${i}`);return r.appendChild(this),r}};vz.blotName="abstract";var yz=vz,xz=class extends yz{static value(i){return!0}index(i,t){return this.domNode===i||this.domNode.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(i,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return i>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};xz.scope=X.INLINE_BLOT;var Z$=xz,Vt=Z$,tf=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...i){if(this.insertBefore(i[0],null),i.length>1){let t=i.slice(1);this.append(...t)}}at(i){let t=this.iterator(),r=t();for(;r&&i>0;)i-=1,r=t();return r}contains(i){let t=this.iterator(),r=t();for(;r;){if(r===i)return!0;r=t()}return!1}indexOf(i){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===i)return n;n+=1,r=t()}return-1}insertBefore(i,t){i!=null&&(this.remove(i),i.next=t,t!=null?(i.prev=t.prev,t.prev!=null&&(t.prev.next=i),t.prev=i,t===this.head&&(this.head=i)):this.tail!=null?(this.tail.next=i,i.prev=this.tail,this.tail=i):(i.prev=null,this.head=this.tail=i),this.length+=1)}offset(i){let t=0,r=this.head;for(;r!=null;){if(r===i)return t;t+=r.length(),r=r.next}return-1}remove(i){this.contains(i)&&(i.prev!=null&&(i.prev.next=i.next),i.next!=null&&(i.next.prev=i.prev),i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),this.length-=1)}iterator(i=this.head){return()=>{let t=i;return i!=null&&(i=i.next),t}}find(i,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(i<a||t&&i===a&&(n.next==null||n.next.length()!==0))return[n,i];i-=a,n=r()}return[null,0]}forEach(i){let t=this.iterator(),r=t();for(;r;)i(r),r=t()}forEachAt(i,t,r){if(t<=0)return;let[n,a]=this.find(i),s=i-a,l=this.iterator(n),p=l();for(;p&&s<i+t;){let h=p.length();i>s?r(p,i-s,Math.min(t,s+h-i)):r(p,0,Math.min(h,i+t-s)),s+=h,p=l()}}map(i){return this.reduce((t,r)=>(t.push(i(r)),t),[])}reduce(i,t){let r=this.iterator(),n=r();for(;n;)t=i(t,n),n=r();return t}};function gz(o,i){let t=i.find(o);if(t)return t;try{return i.create(o)}catch{let r=i.create(X.INLINE);return Array.from(o.childNodes).forEach(n=>{r.domNode.appendChild(n)}),o.parentNode&&o.parentNode.replaceChild(r.domNode,o),r.attach(),r}}var wz=class Oo extends yz{constructor(i,t){super(i,t),this.uiNode=null,this.build()}appendChild(i){this.insertBefore(i)}attach(){super.attach(),this.children.forEach(i=>{i.attach()})}attachUI(i){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=i,Oo.uiClass&&this.uiNode.classList.add(Oo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new tf,Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).reverse().forEach(i=>{try{let t=gz(i,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Po)return;throw t}})}deleteAt(i,t){if(i===0&&t===this.length())return this.remove();this.children.forEachAt(i,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(i,t=0){let[r,n]=this.children.find(t);return i.blotName==null&&i(r)||i.blotName!=null&&r instanceof i?[r,n]:r instanceof Oo?r.descendant(i,n):[null,-1]}descendants(i,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,p)=>{(i.blotName==null&&i(s)||i.blotName!=null&&s instanceof i)&&n.push(s),s instanceof Oo&&(n=n.concat(s.descendants(i,l,a))),a-=p}),n}detach(){this.children.forEach(i=>{i.detach()}),super.detach()}enforceAllowedChildren(){let i=!1;this.children.forEach(t=>{i||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),i=!0):t instanceof Oo?t.unwrap():t.remove())})}formatAt(i,t,r,n){this.children.forEachAt(i,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(i,t,r){let[n,a]=this.children.find(i);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(i,t){i.parent!=null&&i.parent.children.remove(i);let r=null;this.children.insertBefore(i,t||null),i.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==i.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(i.domNode,r),i.attach()}length(){return this.children.reduce((i,t)=>i+t.length(),0)}moveChildren(i,t){this.children.forEach(r=>{i.insertBefore(r,t)})}optimize(i){if(super.optimize(i),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(i,t=!1){let[r,n]=this.children.find(i,t),a=[[this,i]];return r instanceof Oo?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(i){this.children.remove(i)}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return r instanceof Oo&&this.moveChildren(r),super.replaceWith(r)}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(i,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(i){let t=this.clone();for(;i.next!=null;)t.appendChild(i.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(i,t){let r=[],n=[];i.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=gz(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};wz.uiClass="";var eA=wz,ii=eA;function tA(o,i){if(Object.keys(o).length!==Object.keys(i).length)return!1;for(let t in o)if(o[t]!==i[t])return!1;return!0}var Hs=class Fs extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(Fs.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new sc(this.domNode)}format(i,t){if(i===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Fs||(r=r.wrap(Fs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(i,X.INLINE);if(r==null)return;r instanceof Vr?this.attributes.attribute(r,t):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t)}}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(i,t).format(r,n):super.formatAt(i,t,r,n)}optimize(i){super.optimize(i);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof Fs&&r.prev===this&&tA(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(i,t){let r=super.wrap(i,t);return r instanceof Fs&&this.attributes.move(r),r}};Hs.allowedChildren=[Hs,Vt],Hs.blotName="inline",Hs.scope=X.INLINE_BLOT,Hs.tagName="SPAN";var rA=Hs,Qp=rA,Bs=class rf extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(rf.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new sc(this.domNode)}format(i,t){let r=this.scroll.query(i,X.BLOCK);r!=null&&(r instanceof Vr?this.attributes.attribute(r,t):i===this.statics.blotName&&!t?this.replaceWith(rf.blotName):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t))}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(i,t,r,n)}insertAt(i,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(i,t,r);else{let n=this.split(i);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Bs.blotName="block",Bs.scope=X.BLOCK_BLOT,Bs.tagName="P",Bs.allowedChildren=[Qp,Bs,Vt];var iA=Bs,Ra=iA,nf=class extends ii{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(i,t){super.deleteAt(i,t),this.enforceAllowedChildren()}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.enforceAllowedChildren()}insertAt(i,t,r){super.insertAt(i,t,r),this.enforceAllowedChildren()}optimize(i){super.optimize(i),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};nf.blotName="container",nf.scope=X.BLOCK_BLOT;var nA=nf,Us=nA,of=class extends Vt{static formats(i,t){}format(i,t){super.formatAt(0,this.length(),i,t)}formatAt(i,t,r,n){i===0&&t===this.length()?this.format(r,n):super.formatAt(i,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},wt=of,oA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},aA=100,Vs=class extends ii{constructor(i,t){super(null,t),this.registry=i,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,oA),this.attach()}create(i,t){return this.registry.create(this,i,t)}find(i,t=!1){let r=this.registry.find(i,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(i,t=X.ANY){return this.registry.query(i,t)}register(...i){return this.registry.register(...i)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(i,t){this.update(),i===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(i,t)}formatAt(i,t,r,n){this.update(),super.formatAt(i,t,r,n)}insertAt(i,t,r){this.update(),super.insertAt(i,t,r)}optimize(i=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)i.push(n.pop());let a=(p,h=!0)=>{p==null||p===this||p.domNode.parentNode!=null&&(r.has(p.domNode)||r.set(p.domNode,[]),h&&a(p.parent))},s=p=>{r.has(p.domNode)&&(p instanceof ii&&p.children.forEach(s),r.delete(p.domNode),p.optimize(t))},l=i;for(let p=0;l.length>0;p+=1){if(p>=aA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof ii&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)i.push(n.pop())}}update(i,t={}){i=i||this.observer.takeRecords();let r=new WeakMap;i.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(i,t)}};Vs.blotName="scroll",Vs.defaultChild=Ra,Vs.allowedChildren=[Ra,Us],Vs.scope=X.BLOCK_BLOT,Vs.tagName="DIV";var sA=Vs,lc=sA,af=class zz extends Vt{static create(i){return document.createTextNode(i)}static value(i){return i.data}constructor(i,t){super(i,t),this.text=this.statics.value(this.domNode)}deleteAt(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)}index(i,t){return this.domNode===i?t:-1}insertAt(i,t,r){r==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):super.insertAt(i,t,r)}length(){return this.text.length}optimize(i){super.optimize(i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof zz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(i,t=!1){return[this.domNode,i]}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(i));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(i,t){i.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};af.blotName="text",af.scope=X.INLINE_BLOT;var lA=af,js=lA;var Bo=_r(ei(),1);var zt=_r(ei(),1);var lf=_r(ei(),1);var dc=class extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};dc.blotName="break";dc.tagName="BR";var Mr=dc;var Dt=class extends js{},cA={"&":"&","<":"<",">":">",'"':""","'":"'"};function Na(o){return o.replace(/[&<>"']/g,i=>cA[i])}var In=class In extends Qp{static compare(i,t){let r=In.order.indexOf(i),n=In.order.indexOf(t);return r>=0||n>=0?r-n:i===t?0:i<t?-1:1}formatAt(i,t,r,n){if(In.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(i,t);n&&a.wrap(r,n)}else super.formatAt(i,t,r,n)}optimize(i){if(super.optimize(i),this.parent instanceof In&&In.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};V(In,"allowedChildren",[In,Mr,wt,Dt]),V(In,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var sf=In,Lr=sf;var _z=1,Qe=class extends Ra{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=cf(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
|
|
2861
|
+
</zn-input>`;return qt(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Zr.styles=[z(ms),z(E1)],Zr.dependencies={"zn-button":$e,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".bulk-actions")],Zr.prototype,"container",2),c([F(".add-rule")],Zr.prototype,"addRule",2),c([F("input#main-input")],Zr.prototype,"input",2),c([d()],Zr.prototype,"name",2),c([d()],Zr.prototype,"value",2),c([d({type:Array})],Zr.prototype,"actions",2);var p8=Zr;Zr.define("zn-bulk-actions");var h8=()=>{let o="attachment",i=new Date().getTime();return`${o}_${i}`},jl=class{constructor(i,t){this._attachmentContainer=document.createElement("div");this._quill=i,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let i=this._fileHolder.files[0];this.addAttachment(i)}addAttachment(i,t){let r=h8(),n=a=>{this._insertAttachment({dataUrl:a,file:i,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(i)}typeof this._options.upload=="function"&&this._options.upload(i).then(async({path:a,url:s})=>{await this._uploadAttachment(i,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let i=this._attachmentContainer;i.id="attachment-container",i.style.display="flex",i.style.flexWrap="wrap",i.style.gap="10px",i.style.position="absolute",i.style.bottom="0",i.style.left="0",i.style.right="0",i.style.padding="10px",this._quill.container.appendChild(i)}_insertAttachment({dataUrl:i,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(i,t,r))}_updateAttachment(i,t,r){let n=this._quill.container.querySelector(`#${i}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,p=l?JSON.parse(l):[];p.push(r),s.value=JSON.stringify(p)}}_createAttachment(i,t,r){let n=document.createElement("a");n.setAttribute("href",i),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let i=this._options.attachmentInput;i&&(i.value="")}_removeAttachment(i){let t=this._quill.container.querySelector(`#${i}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(i,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",i.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(i)})}};var C_=_r(ei(),1);var $C=typeof global=="object"&&global&&global.Object===Object&&global,Cp=$C;var AC=typeof self=="object"&&self&&self.Object===Object&&self,MC=Cp||AC||Function("return this")(),Ft=MC;var LC=Ft.Symbol,Oi=LC;var dx=Object.prototype,qC=dx.hasOwnProperty,IC=dx.toString,tc=Oi?Oi.toStringTag:void 0;function DC(o){var i=qC.call(o,tc),t=o[tc];try{o[tc]=void 0;var r=!0}catch{}var n=IC.call(o);return r&&(i?o[tc]=t:delete o[tc]),n}var px=DC;var RC=Object.prototype,NC=RC.toString;function OC(o){return NC.call(o)}var hx=OC;var PC="[object Null]",HC="[object Undefined]",ux=Oi?Oi.toStringTag:void 0;function FC(o){return o==null?o===void 0?HC:PC:ux&&ux in Object(o)?px(o):hx(o)}var hn=FC;function BC(o){return o!=null&&typeof o=="object"}var gr=BC;var VC=Array.isArray,Pi=VC;function UC(o){var i=typeof o;return o!=null&&(i=="object"||i=="function")}var Ar=UC;function jC(o){return o}var Sp=jC;var GC="[object AsyncFunction]",WC="[object Function]",KC="[object GeneratorFunction]",YC="[object Proxy]";function QC(o){if(!Ar(o))return!1;var i=hn(o);return i==WC||i==KC||i==GC||i==YC}var Cs=QC;var XC=Ft["__core-js_shared__"],Ep=XC;var mx=(function(){var o=/[^.]+$/.exec(Ep&&Ep.keys&&Ep.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function JC(o){return!!mx&&mx in o}var fx=JC;var ZC=Function.prototype,eS=ZC.toString;function tS(o){if(o!=null){try{return eS.call(o)}catch{}try{return o+""}catch{}}return""}var to=tS;var rS=/[\\^$.*+?()[\]{}|]/g,iS=/^\[object .+?Constructor\]$/,nS=Function.prototype,oS=Object.prototype,aS=nS.toString,sS=oS.hasOwnProperty,lS=RegExp("^"+aS.call(sS).replace(rS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cS(o){if(!Ar(o)||fx(o))return!1;var i=Cs(o)?lS:iS;return i.test(to(o))}var gx=cS;function dS(o,i){return o?.[i]}var bx=dS;function pS(o,i){var t=bx(o,i);return gx(t)?t:void 0}var ti=pS;var hS=ti(Ft,"WeakMap"),Tp=hS;var vx=Object.create,uS=(function(){function o(){}return function(i){if(!Ar(i))return{};if(vx)return vx(i);o.prototype=i;var t=new o;return o.prototype=void 0,t}})(),yx=uS;function mS(o,i,t){switch(t.length){case 0:return o.call(i);case 1:return o.call(i,t[0]);case 2:return o.call(i,t[0],t[1]);case 3:return o.call(i,t[0],t[1],t[2])}return o.apply(i,t)}var xx=mS;function fS(o,i){var t=-1,r=o.length;for(i||(i=Array(r));++t<r;)i[t]=o[t];return i}var $p=fS;var gS=800,bS=16,vS=Date.now;function yS(o){var i=0,t=0;return function(){var r=vS(),n=bS-(r-t);if(t=r,n>0){if(++i>=gS)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}var wx=yS;function xS(o){return function(){return o}}var zx=xS;var wS=(function(){try{var o=ti(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Ss=wS;var zS=Ss?function(o,i){return Ss(o,"toString",{configurable:!0,enumerable:!1,value:zx(i),writable:!0})}:Sp,_x=zS;var _S=wx(_x),kx=_S;function kS(o,i){for(var t=-1,r=o==null?0:o.length;++t<r&&i(o[t],t,o)!==!1;);return o}var Cx=kS;var CS=9007199254740991,SS=/^(?:0|[1-9]\d*)$/;function ES(o,i){var t=typeof o;return i=i??CS,!!i&&(t=="number"||t!="symbol"&&SS.test(o))&&o>-1&&o%1==0&&o<i}var Ap=ES;function TS(o,i,t){i=="__proto__"&&Ss?Ss(o,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[i]=t}var Es=TS;function $S(o,i){return o===i||o!==o&&i!==i}var An=$S;var AS=Object.prototype,MS=AS.hasOwnProperty;function LS(o,i,t){var r=o[i];(!(MS.call(o,i)&&An(r,t))||t===void 0&&!(i in o))&&Es(o,i,t)}var Mp=LS;function qS(o,i,t,r){var n=!t;t||(t={});for(var a=-1,s=i.length;++a<s;){var l=i[a],p=r?r(t[l],o[l],l,t,o):void 0;p===void 0&&(p=o[l]),n?Es(t,l,p):Mp(t,l,p)}return t}var Mn=qS;var Sx=Math.max;function IS(o,i,t){return i=Sx(i===void 0?o.length-1:i,0),function(){for(var r=arguments,n=-1,a=Sx(r.length-i,0),s=Array(a);++n<a;)s[n]=r[i+n];n=-1;for(var l=Array(i+1);++n<i;)l[n]=r[n];return l[i]=t(s),xx(o,this,l)}}var Ex=IS;function DS(o,i){return kx(Ex(o,i,Sp),o+"")}var Tx=DS;var RS=9007199254740991;function NS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=RS}var Lp=NS;function OS(o){return o!=null&&Lp(o.length)&&!Cs(o)}var Lo=OS;function PS(o,i,t){if(!Ar(t))return!1;var r=typeof i;return(r=="number"?Lo(t)&&Ap(i,t.length):r=="string"&&i in t)?An(t[i],o):!1}var $x=PS;function HS(o){return Tx(function(i,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=o.length>3&&typeof a=="function"?(n--,a):void 0,s&&$x(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),i=Object(i);++r<n;){var l=t[r];l&&o(i,l,r,a)}return i})}var Ax=HS;var FS=Object.prototype;function BS(o){var i=o&&o.constructor,t=typeof i=="function"&&i.prototype||FS;return o===t}var Ts=BS;function VS(o,i){for(var t=-1,r=Array(o);++t<o;)r[t]=i(t);return r}var Mx=VS;var US="[object Arguments]";function jS(o){return gr(o)&&hn(o)==US}var Gm=jS;var Lx=Object.prototype,GS=Lx.hasOwnProperty,WS=Lx.propertyIsEnumerable,KS=Gm((function(){return arguments})())?Gm:function(o){return gr(o)&&GS.call(o,"callee")&&!WS.call(o,"callee")},rc=KS;function YS(){return!1}var qx=YS;var Rx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ix=Rx&&typeof module=="object"&&module&&!module.nodeType&&module,QS=Ix&&Ix.exports===Rx,Dx=QS?Ft.Buffer:void 0,XS=Dx?Dx.isBuffer:void 0,JS=XS||qx,ro=JS;var ZS="[object Arguments]",e7="[object Array]",t7="[object Boolean]",r7="[object Date]",i7="[object Error]",n7="[object Function]",o7="[object Map]",a7="[object Number]",s7="[object Object]",l7="[object RegExp]",c7="[object Set]",d7="[object String]",p7="[object WeakMap]",h7="[object ArrayBuffer]",u7="[object DataView]",m7="[object Float32Array]",f7="[object Float64Array]",g7="[object Int8Array]",b7="[object Int16Array]",v7="[object Int32Array]",y7="[object Uint8Array]",x7="[object Uint8ClampedArray]",w7="[object Uint16Array]",z7="[object Uint32Array]",lt={};lt[m7]=lt[f7]=lt[g7]=lt[b7]=lt[v7]=lt[y7]=lt[x7]=lt[w7]=lt[z7]=!0;lt[ZS]=lt[e7]=lt[h7]=lt[t7]=lt[u7]=lt[r7]=lt[i7]=lt[n7]=lt[o7]=lt[a7]=lt[s7]=lt[l7]=lt[c7]=lt[d7]=lt[p7]=!1;function _7(o){return gr(o)&&Lp(o.length)&&!!lt[hn(o)]}var Nx=_7;function k7(o){return function(i){return o(i)}}var $s=k7;var Ox=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ic=Ox&&typeof module=="object"&&module&&!module.nodeType&&module,C7=ic&&ic.exports===Ox,Wm=C7&&Cp.process,S7=(function(){try{var o=ic&&ic.require&&ic.require("util").types;return o||Wm&&Wm.binding&&Wm.binding("util")}catch{}})(),io=S7;var Px=io&&io.isTypedArray,E7=Px?$s(Px):Nx,As=E7;var T7=Object.prototype,$7=T7.hasOwnProperty;function A7(o,i){var t=Pi(o),r=!t&&rc(o),n=!t&&!r&&ro(o),a=!t&&!r&&!n&&As(o),s=t||r||n||a,l=s?Mx(o.length,String):[],p=l.length;for(var h in o)(i||$7.call(o,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Ap(h,p)))&&l.push(h);return l}var qp=A7;function M7(o,i){return function(t){return o(i(t))}}var Ip=M7;var L7=Ip(Object.keys,Object),Hx=L7;var q7=Object.prototype,I7=q7.hasOwnProperty;function D7(o){if(!Ts(o))return Hx(o);var i=[];for(var t in Object(o))I7.call(o,t)&&t!="constructor"&&i.push(t);return i}var Fx=D7;function R7(o){return Lo(o)?qp(o):Fx(o)}var Ms=R7;function N7(o){var i=[];if(o!=null)for(var t in Object(o))i.push(t);return i}var Bx=N7;var O7=Object.prototype,P7=O7.hasOwnProperty;function H7(o){if(!Ar(o))return Bx(o);var i=Ts(o),t=[];for(var r in o)r=="constructor"&&(i||!P7.call(o,r))||t.push(r);return t}var Vx=H7;function F7(o){return Lo(o)?qp(o,!0):Vx(o)}var Ln=F7;var B7=ti(Object,"create"),no=B7;function V7(){this.__data__=no?no(null):{},this.size=0}var Ux=V7;function U7(o){var i=this.has(o)&&delete this.__data__[o];return this.size-=i?1:0,i}var jx=U7;var j7="__lodash_hash_undefined__",G7=Object.prototype,W7=G7.hasOwnProperty;function K7(o){var i=this.__data__;if(no){var t=i[o];return t===j7?void 0:t}return W7.call(i,o)?i[o]:void 0}var Gx=K7;var Y7=Object.prototype,Q7=Y7.hasOwnProperty;function X7(o){var i=this.__data__;return no?i[o]!==void 0:Q7.call(i,o)}var Wx=X7;var J7="__lodash_hash_undefined__";function Z7(o,i){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=no&&i===void 0?J7:i,this}var Kx=Z7;function Ls(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Ls.prototype.clear=Ux;Ls.prototype.delete=jx;Ls.prototype.get=Gx;Ls.prototype.has=Wx;Ls.prototype.set=Kx;var Km=Ls;function eE(){this.__data__=[],this.size=0}var Yx=eE;function tE(o,i){for(var t=o.length;t--;)if(An(o[t][0],i))return t;return-1}var qo=tE;var rE=Array.prototype,iE=rE.splice;function nE(o){var i=this.__data__,t=qo(i,o);if(t<0)return!1;var r=i.length-1;return t==r?i.pop():iE.call(i,t,1),--this.size,!0}var Qx=nE;function oE(o){var i=this.__data__,t=qo(i,o);return t<0?void 0:i[t][1]}var Xx=oE;function aE(o){return qo(this.__data__,o)>-1}var Jx=aE;function sE(o,i){var t=this.__data__,r=qo(t,o);return r<0?(++this.size,t.push([o,i])):t[r][1]=i,this}var Zx=sE;function qs(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}qs.prototype.clear=Yx;qs.prototype.delete=Qx;qs.prototype.get=Xx;qs.prototype.has=Jx;qs.prototype.set=Zx;var Io=qs;var lE=ti(Ft,"Map"),Do=lE;function cE(){this.size=0,this.__data__={hash:new Km,map:new(Do||Io),string:new Km}}var ew=cE;function dE(o){var i=typeof o;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?o!=="__proto__":o===null}var tw=dE;function pE(o,i){var t=o.__data__;return tw(i)?t[typeof i=="string"?"string":"hash"]:t.map}var Ro=pE;function hE(o){var i=Ro(this,o).delete(o);return this.size-=i?1:0,i}var rw=hE;function uE(o){return Ro(this,o).get(o)}var iw=uE;function mE(o){return Ro(this,o).has(o)}var nw=mE;function fE(o,i){var t=Ro(this,o),r=t.size;return t.set(o,i),this.size+=t.size==r?0:1,this}var ow=fE;function Is(o){var i=-1,t=o==null?0:o.length;for(this.clear();++i<t;){var r=o[i];this.set(r[0],r[1])}}Is.prototype.clear=ew;Is.prototype.delete=rw;Is.prototype.get=iw;Is.prototype.has=nw;Is.prototype.set=ow;var Dp=Is;function gE(o,i){for(var t=-1,r=i.length,n=o.length;++t<r;)o[n+t]=i[t];return o}var Rp=gE;var bE=Ip(Object.getPrototypeOf,Object),Ds=bE;var vE="[object Object]",yE=Function.prototype,xE=Object.prototype,aw=yE.toString,wE=xE.hasOwnProperty,zE=aw.call(Object);function _E(o){if(!gr(o)||hn(o)!=vE)return!1;var i=Ds(o);if(i===null)return!0;var t=wE.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&aw.call(t)==zE}var sw=_E;function kE(){this.__data__=new Io,this.size=0}var lw=kE;function CE(o){var i=this.__data__,t=i.delete(o);return this.size=i.size,t}var cw=CE;function SE(o){return this.__data__.get(o)}var dw=SE;function EE(o){return this.__data__.has(o)}var pw=EE;var TE=200;function $E(o,i){var t=this.__data__;if(t instanceof Io){var r=t.__data__;if(!Do||r.length<TE-1)return r.push([o,i]),this.size=++t.size,this;t=this.__data__=new Dp(r)}return t.set(o,i),this.size=t.size,this}var hw=$E;function Rs(o){var i=this.__data__=new Io(o);this.size=i.size}Rs.prototype.clear=lw;Rs.prototype.delete=cw;Rs.prototype.get=dw;Rs.prototype.has=pw;Rs.prototype.set=hw;var No=Rs;function AE(o,i){return o&&Mn(i,Ms(i),o)}var uw=AE;function ME(o,i){return o&&Mn(i,Ln(i),o)}var mw=ME;var vw=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fw=vw&&typeof module=="object"&&module&&!module.nodeType&&module,LE=fw&&fw.exports===vw,gw=LE?Ft.Buffer:void 0,bw=gw?gw.allocUnsafe:void 0;function qE(o,i){if(i)return o.slice();var t=o.length,r=bw?bw(t):new o.constructor(t);return o.copy(r),r}var Np=qE;function IE(o,i){for(var t=-1,r=o==null?0:o.length,n=0,a=[];++t<r;){var s=o[t];i(s,t,o)&&(a[n++]=s)}return a}var yw=IE;function DE(){return[]}var Op=DE;var RE=Object.prototype,NE=RE.propertyIsEnumerable,xw=Object.getOwnPropertySymbols,OE=xw?function(o){return o==null?[]:(o=Object(o),yw(xw(o),function(i){return NE.call(o,i)}))}:Op,Ns=OE;function PE(o,i){return Mn(o,Ns(o),i)}var ww=PE;var HE=Object.getOwnPropertySymbols,FE=HE?function(o){for(var i=[];o;)Rp(i,Ns(o)),o=Ds(o);return i}:Op,Pp=FE;function BE(o,i){return Mn(o,Pp(o),i)}var zw=BE;function VE(o,i,t){var r=i(o);return Pi(o)?r:Rp(r,t(o))}var Hp=VE;function UE(o){return Hp(o,Ms,Ns)}var nc=UE;function jE(o){return Hp(o,Ln,Pp)}var _w=jE;var GE=ti(Ft,"DataView"),Fp=GE;var WE=ti(Ft,"Promise"),Bp=WE;var KE=ti(Ft,"Set"),Vp=KE;var kw="[object Map]",YE="[object Object]",Cw="[object Promise]",Sw="[object Set]",Ew="[object WeakMap]",Tw="[object DataView]",QE=to(Fp),XE=to(Do),JE=to(Bp),ZE=to(Vp),eT=to(Tp),Ia=hn;(Fp&&Ia(new Fp(new ArrayBuffer(1)))!=Tw||Do&&Ia(new Do)!=kw||Bp&&Ia(Bp.resolve())!=Cw||Vp&&Ia(new Vp)!=Sw||Tp&&Ia(new Tp)!=Ew)&&(Ia=function(o){var i=hn(o),t=i==YE?o.constructor:void 0,r=t?to(t):"";if(r)switch(r){case QE:return Tw;case XE:return kw;case JE:return Cw;case ZE:return Sw;case eT:return Ew}return i});var oo=Ia;var tT=Object.prototype,rT=tT.hasOwnProperty;function iT(o){var i=o.length,t=new o.constructor(i);return i&&typeof o[0]=="string"&&rT.call(o,"index")&&(t.index=o.index,t.input=o.input),t}var $w=iT;var nT=Ft.Uint8Array,Os=nT;function oT(o){var i=new o.constructor(o.byteLength);return new Os(i).set(new Os(o)),i}var Ps=oT;function aT(o,i){var t=i?Ps(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.byteLength)}var Aw=aT;var sT=/\w*$/;function lT(o){var i=new o.constructor(o.source,sT.exec(o));return i.lastIndex=o.lastIndex,i}var Mw=lT;var Lw=Oi?Oi.prototype:void 0,qw=Lw?Lw.valueOf:void 0;function cT(o){return qw?Object(qw.call(o)):{}}var Iw=cT;function dT(o,i){var t=i?Ps(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}var Up=dT;var pT="[object Boolean]",hT="[object Date]",uT="[object Map]",mT="[object Number]",fT="[object RegExp]",gT="[object Set]",bT="[object String]",vT="[object Symbol]",yT="[object ArrayBuffer]",xT="[object DataView]",wT="[object Float32Array]",zT="[object Float64Array]",_T="[object Int8Array]",kT="[object Int16Array]",CT="[object Int32Array]",ST="[object Uint8Array]",ET="[object Uint8ClampedArray]",TT="[object Uint16Array]",$T="[object Uint32Array]";function AT(o,i,t){var r=o.constructor;switch(i){case yT:return Ps(o);case pT:case hT:return new r(+o);case xT:return Aw(o,t);case wT:case zT:case _T:case kT:case CT:case ST:case ET:case TT:case $T:return Up(o,t);case uT:return new r;case mT:case bT:return new r(o);case fT:return Mw(o);case gT:return new r;case vT:return Iw(o)}}var Dw=AT;function MT(o){return typeof o.constructor=="function"&&!Ts(o)?yx(Ds(o)):{}}var jp=MT;var LT="[object Map]";function qT(o){return gr(o)&&oo(o)==LT}var Rw=qT;var Nw=io&&io.isMap,IT=Nw?$s(Nw):Rw,Ow=IT;var DT="[object Set]";function RT(o){return gr(o)&&oo(o)==DT}var Pw=RT;var Hw=io&&io.isSet,NT=Hw?$s(Hw):Pw,Fw=NT;var OT=1,PT=2,HT=4,Bw="[object Arguments]",FT="[object Array]",BT="[object Boolean]",VT="[object Date]",UT="[object Error]",Vw="[object Function]",jT="[object GeneratorFunction]",GT="[object Map]",WT="[object Number]",Uw="[object Object]",KT="[object RegExp]",YT="[object Set]",QT="[object String]",XT="[object Symbol]",JT="[object WeakMap]",ZT="[object ArrayBuffer]",e$="[object DataView]",t$="[object Float32Array]",r$="[object Float64Array]",i$="[object Int8Array]",n$="[object Int16Array]",o$="[object Int32Array]",a$="[object Uint8Array]",s$="[object Uint8ClampedArray]",l$="[object Uint16Array]",c$="[object Uint32Array]",tt={};tt[Bw]=tt[FT]=tt[ZT]=tt[e$]=tt[BT]=tt[VT]=tt[t$]=tt[r$]=tt[i$]=tt[n$]=tt[o$]=tt[GT]=tt[WT]=tt[Uw]=tt[KT]=tt[YT]=tt[QT]=tt[XT]=tt[a$]=tt[s$]=tt[l$]=tt[c$]=!0;tt[UT]=tt[Vw]=tt[JT]=!1;function Gp(o,i,t,r,n,a){var s,l=i&OT,p=i&PT,h=i&HT;if(t&&(s=n?t(o,r,n,a):t(o)),s!==void 0)return s;if(!Ar(o))return o;var m=Pi(o);if(m){if(s=$w(o),!l)return $p(o,s)}else{var f=oo(o),b=f==Vw||f==jT;if(ro(o))return Np(o,l);if(f==Uw||f==Bw||b&&!n){if(s=p||b?{}:jp(o),!l)return p?zw(o,mw(s,o)):ww(o,uw(s,o))}else{if(!tt[f])return n?o:{};s=Dw(o,f,l)}}a||(a=new No);var g=a.get(o);if(g)return g;a.set(o,s),Fw(o)?o.forEach(function(S){s.add(Gp(S,i,t,S,o,a))}):Ow(o)&&o.forEach(function(S,T){s.set(T,Gp(S,i,t,T,o,a))});var v=h?p?_w:nc:p?Ln:Ms,y=m?void 0:v(o);return Cx(y||o,function(S,T){y&&(T=S,S=o[T]),Mp(s,T,Gp(S,i,t,T,o,a))}),s}var jw=Gp;var d$=1,p$=4;function h$(o){return jw(o,d$|p$)}var qn=h$;var u$="__lodash_hash_undefined__";function m$(o){return this.__data__.set(o,u$),this}var Gw=m$;function f$(o){return this.__data__.has(o)}var Ww=f$;function Wp(o){var i=-1,t=o==null?0:o.length;for(this.__data__=new Dp;++i<t;)this.add(o[i])}Wp.prototype.add=Wp.prototype.push=Gw;Wp.prototype.has=Ww;var Kw=Wp;function g$(o,i){for(var t=-1,r=o==null?0:o.length;++t<r;)if(i(o[t],t,o))return!0;return!1}var Yw=g$;function b$(o,i){return o.has(i)}var Qw=b$;var v$=1,y$=2;function x$(o,i,t,r,n,a){var s=t&v$,l=o.length,p=i.length;if(l!=p&&!(s&&p>l))return!1;var h=a.get(o),m=a.get(i);if(h&&m)return h==i&&m==o;var f=-1,b=!0,g=t&y$?new Kw:void 0;for(a.set(o,i),a.set(i,o);++f<l;){var v=o[f],y=i[f];if(r)var S=s?r(y,v,f,i,o,a):r(v,y,f,o,i,a);if(S!==void 0){if(S)continue;b=!1;break}if(g){if(!Yw(i,function(T,N){if(!Qw(g,N)&&(v===T||n(v,T,t,r,a)))return g.push(N)})){b=!1;break}}else if(!(v===y||n(v,y,t,r,a))){b=!1;break}}return a.delete(o),a.delete(i),b}var Kp=x$;function w$(o){var i=-1,t=Array(o.size);return o.forEach(function(r,n){t[++i]=[n,r]}),t}var Xw=w$;function z$(o){var i=-1,t=Array(o.size);return o.forEach(function(r){t[++i]=r}),t}var Jw=z$;var _$=1,k$=2,C$="[object Boolean]",S$="[object Date]",E$="[object Error]",T$="[object Map]",$$="[object Number]",A$="[object RegExp]",M$="[object Set]",L$="[object String]",q$="[object Symbol]",I$="[object ArrayBuffer]",D$="[object DataView]",Zw=Oi?Oi.prototype:void 0,Ym=Zw?Zw.valueOf:void 0;function R$(o,i,t,r,n,a,s){switch(t){case D$:if(o.byteLength!=i.byteLength||o.byteOffset!=i.byteOffset)return!1;o=o.buffer,i=i.buffer;case I$:return!(o.byteLength!=i.byteLength||!a(new Os(o),new Os(i)));case C$:case S$:case $$:return An(+o,+i);case E$:return o.name==i.name&&o.message==i.message;case A$:case L$:return o==i+"";case T$:var l=Xw;case M$:var p=r&_$;if(l||(l=Jw),o.size!=i.size&&!p)return!1;var h=s.get(o);if(h)return h==i;r|=k$,s.set(o,i);var m=Kp(l(o),l(i),r,n,a,s);return s.delete(o),m;case q$:if(Ym)return Ym.call(o)==Ym.call(i)}return!1}var ez=R$;var N$=1,O$=Object.prototype,P$=O$.hasOwnProperty;function H$(o,i,t,r,n,a){var s=t&N$,l=nc(o),p=l.length,h=nc(i),m=h.length;if(p!=m&&!s)return!1;for(var f=p;f--;){var b=l[f];if(!(s?b in i:P$.call(i,b)))return!1}var g=a.get(o),v=a.get(i);if(g&&v)return g==i&&v==o;var y=!0;a.set(o,i),a.set(i,o);for(var S=s;++f<p;){b=l[f];var T=o[b],N=i[b];if(r)var U=s?r(N,T,b,i,o,a):r(T,N,b,o,i,a);if(!(U===void 0?T===N||n(T,N,t,r,a):U)){y=!1;break}S||(S=b=="constructor")}if(y&&!S){var I=o.constructor,C=i.constructor;I!=C&&"constructor"in o&&"constructor"in i&&!(typeof I=="function"&&I instanceof I&&typeof C=="function"&&C instanceof C)&&(y=!1)}return a.delete(o),a.delete(i),y}var tz=H$;var F$=1,rz="[object Arguments]",iz="[object Array]",Yp="[object Object]",B$=Object.prototype,nz=B$.hasOwnProperty;function V$(o,i,t,r,n,a){var s=Pi(o),l=Pi(i),p=s?iz:oo(o),h=l?iz:oo(i);p=p==rz?Yp:p,h=h==rz?Yp:h;var m=p==Yp,f=h==Yp,b=p==h;if(b&&ro(o)){if(!ro(i))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new No),s||As(o)?Kp(o,i,t,r,n,a):ez(o,i,p,t,r,n,a);if(!(t&F$)){var g=m&&nz.call(o,"__wrapped__"),v=f&&nz.call(i,"__wrapped__");if(g||v){var y=g?o.value():o,S=v?i.value():i;return a||(a=new No),n(y,S,t,r,a)}}return b?(a||(a=new No),tz(o,i,t,r,n,a)):!1}var oz=V$;function az(o,i,t,r,n){return o===i?!0:o==null||i==null||!gr(o)&&!gr(i)?o!==o&&i!==i:oz(o,i,t,r,az,n)}var sz=az;function U$(o){return function(i,t,r){for(var n=-1,a=Object(i),s=r(i),l=s.length;l--;){var p=s[o?l:++n];if(t(a[p],p,a)===!1)break}return i}}var lz=U$;var j$=lz(),cz=j$;function G$(o,i,t){(t!==void 0&&!An(o[i],t)||t===void 0&&!(i in o))&&Es(o,i,t)}var oc=G$;function W$(o){return gr(o)&&Lo(o)}var dz=W$;function K$(o,i){if(!(i==="constructor"&&typeof o[i]=="function")&&i!="__proto__")return o[i]}var ac=K$;function Y$(o){return Mn(o,Ln(o))}var pz=Y$;function Q$(o,i,t,r,n,a,s){var l=ac(o,t),p=ac(i,t),h=s.get(p);if(h){oc(o,t,h);return}var m=a?a(l,p,t+"",o,i,s):void 0,f=m===void 0;if(f){var b=Pi(p),g=!b&&ro(p),v=!b&&!g&&As(p);m=p,b||g||v?Pi(l)?m=l:dz(l)?m=$p(l):g?(f=!1,m=Np(p,!0)):v?(f=!1,m=Up(p,!0)):m=[]:sw(p)||rc(p)?(m=l,rc(l)?m=pz(l):(!Ar(l)||Cs(l))&&(m=jp(p))):f=!1}f&&(s.set(p,m),n(m,p,r,a,s),s.delete(p)),oc(o,t,m)}var hz=Q$;function uz(o,i,t,r,n){o!==i&&cz(i,function(a,s){if(n||(n=new No),Ar(a))hz(o,i,s,t,uz,r,n);else{var l=r?r(ac(o,s),a,s+"",o,i,n):void 0;l===void 0&&(l=a),oc(o,s,l)}},Ln)}var mz=uz;function X$(o,i){return sz(o,i)}var Da=X$;var J$=Ax(function(o,i,t){mz(o,i,t)}),ri=J$;var cc={};d3(cc,{Attributor:()=>Vr,AttributorStore:()=>sc,BlockBlot:()=>Ra,ClassAttributor:()=>Bt,ContainerBlot:()=>Us,EmbedBlot:()=>wt,InlineBlot:()=>Qp,LeafBlot:()=>Vt,ParentBlot:()=>ii,Registry:()=>Ho,Scope:()=>X,ScrollBlot:()=>lc,StyleAttributor:()=>ni,TextBlot:()=>js});var X=(o=>(o[o.TYPE=3]="TYPE",o[o.LEVEL=12]="LEVEL",o[o.ATTRIBUTE=13]="ATTRIBUTE",o[o.BLOT=14]="BLOT",o[o.INLINE=7]="INLINE",o[o.BLOCK=11]="BLOCK",o[o.BLOCK_BLOT=10]="BLOCK_BLOT",o[o.INLINE_BLOT=6]="INLINE_BLOT",o[o.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",o[o.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",o[o.ANY=15]="ANY",o))(X||{}),Vr=class{constructor(i,t,r={}){this.attrName=i,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(i){return Array.from(i.attributes).map(t=>t.name)}add(i,t){return this.canAdd(i,t)?(i.setAttribute(this.keyName,t),!0):!1}canAdd(i,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(i){i.removeAttribute(this.keyName)}value(i){let t=i.getAttribute(this.keyName);return this.canAdd(i,t)&&t?t:""}},Po=class extends Error{constructor(i){i="[Parchment] "+i,super(i),this.message=i,this.name=this.constructor.name}},bz=class Xm{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(i,t=!1){if(i==null)return null;if(this.blots.has(i))return this.blots.get(i)||null;if(t){let r=null;try{r=i.parentNode}catch{return null}return this.find(r,t)}return null}create(i,t,r){let n=this.query(t);if(n==null)throw new Po(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(i,s,r);return Xm.blots.set(l.domNode,l),l}find(i,t=!1){return Xm.find(i,t)}query(i,t=X.ANY){let r;return typeof i=="string"?r=this.types[i]||this.attributes[i]:i instanceof Text||i.nodeType===Node.TEXT_NODE?r=this.types.text:typeof i=="number"?i&X.LEVEL&X.BLOCK?r=this.types.block:i&X.LEVEL&X.INLINE&&(r=this.types.inline):i instanceof Element&&((i.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[i.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...i){return i.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new Po("Invalid definition");if(r&&t.blotName==="abstract")throw new Po("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};bz.blots=new WeakMap;var Ho=bz;function fz(o,i){return(o.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${i}-`)===0)}var Jm=class extends Vr{static keys(i){return(i.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(i,t){return this.canAdd(i,t)?(this.remove(i),i.classList.add(`${this.keyName}-${t}`),!0):!1}remove(i){fz(i,this.keyName).forEach(t=>{i.classList.remove(t)}),i.classList.length===0&&i.removeAttribute("class")}value(i){let t=(fz(i,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(i,t)?t:""}},Bt=Jm;function Qm(o){let i=o.split("-"),t=i.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return i[0]+t}var Zm=class extends Vr{static keys(i){return(i.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(i,t){return this.canAdd(i,t)?(i.style[Qm(this.keyName)]=t,!0):!1}remove(i){i.style[Qm(this.keyName)]="",i.getAttribute("style")||i.removeAttribute("style")}value(i){let t=i.style[Qm(this.keyName)];return this.canAdd(i,t)?t:""}},ni=Zm,ef=class{constructor(i){this.attributes={},this.domNode=i,this.build()}attribute(i,t){t?i.add(this.domNode,t)&&(i.value(this.domNode)!=null?this.attributes[i.attrName]=i:delete this.attributes[i.attrName]):(i.remove(this.domNode),delete this.attributes[i.attrName])}build(){this.attributes={};let i=Ho.find(this.domNode);if(i==null)return;let t=Vr.keys(this.domNode),r=Bt.keys(this.domNode),n=ni.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=i.scroll.query(a,X.ATTRIBUTE);s instanceof Vr&&(this.attributes[s.attrName]=s)})}copy(i){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);i.format(t,r)})}move(i){this.copy(i),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((i,t)=>(i[t]=this.attributes[t].value(this.domNode),i),{})}},sc=ef,vz=class{constructor(i,t){this.scroll=i,this.domNode=t,Ho.blots.set(t,this),this.prev=null,this.next=null}static create(i){if(this.tagName==null)throw new Po("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof i=="string"?(r=i.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof i=="number"&&(r=i),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let i=this.domNode.cloneNode(!1);return this.scroll.create(i)}detach(){this.parent!=null&&this.parent.removeChild(this),Ho.blots.delete(this.domNode)}deleteAt(i,t){this.isolate(i,t).remove()}formatAt(i,t,r,n){let a=this.isolate(i,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(i,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(i);this.parent.insertBefore(n,a||void 0)}isolate(i,t){let r=this.split(i);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(i=this.parent){return this.parent==null||this===i?0:this.parent.children.offset(this)+this.parent.offset(i)}optimize(i){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(i,t){return i===0?this:this.next}update(i,t){}wrap(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Po(`Cannot wrap ${i}`);return r.appendChild(this),r}};vz.blotName="abstract";var yz=vz,xz=class extends yz{static value(i){return!0}index(i,t){return this.domNode===i||this.domNode.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(i,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return i>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};xz.scope=X.INLINE_BLOT;var Z$=xz,Vt=Z$,tf=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...i){if(this.insertBefore(i[0],null),i.length>1){let t=i.slice(1);this.append(...t)}}at(i){let t=this.iterator(),r=t();for(;r&&i>0;)i-=1,r=t();return r}contains(i){let t=this.iterator(),r=t();for(;r;){if(r===i)return!0;r=t()}return!1}indexOf(i){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===i)return n;n+=1,r=t()}return-1}insertBefore(i,t){i!=null&&(this.remove(i),i.next=t,t!=null?(i.prev=t.prev,t.prev!=null&&(t.prev.next=i),t.prev=i,t===this.head&&(this.head=i)):this.tail!=null?(this.tail.next=i,i.prev=this.tail,this.tail=i):(i.prev=null,this.head=this.tail=i),this.length+=1)}offset(i){let t=0,r=this.head;for(;r!=null;){if(r===i)return t;t+=r.length(),r=r.next}return-1}remove(i){this.contains(i)&&(i.prev!=null&&(i.prev.next=i.next),i.next!=null&&(i.next.prev=i.prev),i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),this.length-=1)}iterator(i=this.head){return()=>{let t=i;return i!=null&&(i=i.next),t}}find(i,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(i<a||t&&i===a&&(n.next==null||n.next.length()!==0))return[n,i];i-=a,n=r()}return[null,0]}forEach(i){let t=this.iterator(),r=t();for(;r;)i(r),r=t()}forEachAt(i,t,r){if(t<=0)return;let[n,a]=this.find(i),s=i-a,l=this.iterator(n),p=l();for(;p&&s<i+t;){let h=p.length();i>s?r(p,i-s,Math.min(t,s+h-i)):r(p,0,Math.min(h,i+t-s)),s+=h,p=l()}}map(i){return this.reduce((t,r)=>(t.push(i(r)),t),[])}reduce(i,t){let r=this.iterator(),n=r();for(;n;)t=i(t,n),n=r();return t}};function gz(o,i){let t=i.find(o);if(t)return t;try{return i.create(o)}catch{let r=i.create(X.INLINE);return Array.from(o.childNodes).forEach(n=>{r.domNode.appendChild(n)}),o.parentNode&&o.parentNode.replaceChild(r.domNode,o),r.attach(),r}}var wz=class Oo extends yz{constructor(i,t){super(i,t),this.uiNode=null,this.build()}appendChild(i){this.insertBefore(i)}attach(){super.attach(),this.children.forEach(i=>{i.attach()})}attachUI(i){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=i,Oo.uiClass&&this.uiNode.classList.add(Oo.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new tf,Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).reverse().forEach(i=>{try{let t=gz(i,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Po)return;throw t}})}deleteAt(i,t){if(i===0&&t===this.length())return this.remove();this.children.forEachAt(i,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(i,t=0){let[r,n]=this.children.find(t);return i.blotName==null&&i(r)||i.blotName!=null&&r instanceof i?[r,n]:r instanceof Oo?r.descendant(i,n):[null,-1]}descendants(i,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,p)=>{(i.blotName==null&&i(s)||i.blotName!=null&&s instanceof i)&&n.push(s),s instanceof Oo&&(n=n.concat(s.descendants(i,l,a))),a-=p}),n}detach(){this.children.forEach(i=>{i.detach()}),super.detach()}enforceAllowedChildren(){let i=!1;this.children.forEach(t=>{i||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),i=!0):t instanceof Oo?t.unwrap():t.remove())})}formatAt(i,t,r,n){this.children.forEachAt(i,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(i,t,r){let[n,a]=this.children.find(i);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(i,t){i.parent!=null&&i.parent.children.remove(i);let r=null;this.children.insertBefore(i,t||null),i.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==i.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(i.domNode,r),i.attach()}length(){return this.children.reduce((i,t)=>i+t.length(),0)}moveChildren(i,t){this.children.forEach(r=>{i.insertBefore(r,t)})}optimize(i){if(super.optimize(i),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(i,t=!1){let[r,n]=this.children.find(i,t),a=[[this,i]];return r instanceof Oo?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(i){this.children.remove(i)}replaceWith(i,t){let r=typeof i=="string"?this.scroll.create(i,t):i;return r instanceof Oo&&this.moveChildren(r),super.replaceWith(r)}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(i,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(i){let t=this.clone();for(;i.next!=null;)t.appendChild(i.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(i,t){let r=[],n=[];i.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=gz(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};wz.uiClass="";var eA=wz,ii=eA;function tA(o,i){if(Object.keys(o).length!==Object.keys(i).length)return!1;for(let t in o)if(o[t]!==i[t])return!1;return!0}var Hs=class Fs extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(Fs.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new sc(this.domNode)}format(i,t){if(i===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Fs||(r=r.wrap(Fs.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(i,X.INLINE);if(r==null)return;r instanceof Vr?this.attributes.attribute(r,t):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t)}}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(i,t).format(r,n):super.formatAt(i,t,r,n)}optimize(i){super.optimize(i);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof Fs&&r.prev===this&&tA(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(i,t){let r=super.wrap(i,t);return r instanceof Fs&&this.attributes.move(r),r}};Hs.allowedChildren=[Hs,Vt],Hs.blotName="inline",Hs.scope=X.INLINE_BLOT,Hs.tagName="SPAN";var rA=Hs,Qp=rA,Bs=class rf extends ii{static create(i){return super.create(i)}static formats(i,t){let r=t.query(rf.blotName);if(!(r!=null&&i.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return i.tagName.toLowerCase()}}constructor(i,t){super(i,t),this.attributes=new sc(this.domNode)}format(i,t){let r=this.scroll.query(i,X.BLOCK);r!=null&&(r instanceof Vr?this.attributes.attribute(r,t):i===this.statics.blotName&&!t?this.replaceWith(rf.blotName):t&&(i!==this.statics.blotName||this.formats()[i]!==t)&&this.replaceWith(i,t))}formats(){let i=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(i[this.statics.blotName]=t),i}formatAt(i,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(i,t,r,n)}insertAt(i,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(i,t,r);else{let n=this.split(i);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(i,t){let r=super.replaceWith(i,t);return this.attributes.copy(r),r}update(i,t){super.update(i,t),i.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Bs.blotName="block",Bs.scope=X.BLOCK_BLOT,Bs.tagName="P",Bs.allowedChildren=[Qp,Bs,Vt];var iA=Bs,Ra=iA,nf=class extends ii{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(i,t){super.deleteAt(i,t),this.enforceAllowedChildren()}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.enforceAllowedChildren()}insertAt(i,t,r){super.insertAt(i,t,r),this.enforceAllowedChildren()}optimize(i){super.optimize(i),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};nf.blotName="container",nf.scope=X.BLOCK_BLOT;var nA=nf,Us=nA,of=class extends Vt{static formats(i,t){}format(i,t){super.formatAt(0,this.length(),i,t)}formatAt(i,t,r,n){i===0&&t===this.length()?this.format(r,n):super.formatAt(i,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},wt=of,oA={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},aA=100,Vs=class extends ii{constructor(i,t){super(null,t),this.registry=i,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,oA),this.attach()}create(i,t){return this.registry.create(this,i,t)}find(i,t=!1){let r=this.registry.find(i,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(i,t=X.ANY){return this.registry.query(i,t)}register(...i){return this.registry.register(...i)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(i,t){this.update(),i===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(i,t)}formatAt(i,t,r,n){this.update(),super.formatAt(i,t,r,n)}insertAt(i,t,r){this.update(),super.insertAt(i,t,r)}optimize(i=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)i.push(n.pop());let a=(p,h=!0)=>{p==null||p===this||p.domNode.parentNode!=null&&(r.has(p.domNode)||r.set(p.domNode,[]),h&&a(p.parent))},s=p=>{r.has(p.domNode)&&(p instanceof ii&&p.children.forEach(s),r.delete(p.domNode),p.optimize(t))},l=i;for(let p=0;l.length>0;p+=1){if(p>=aA)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof ii&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)i.push(n.pop())}}update(i,t={}){i=i||this.observer.takeRecords();let r=new WeakMap;i.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(i,t)}};Vs.blotName="scroll",Vs.defaultChild=Ra,Vs.allowedChildren=[Ra,Us],Vs.scope=X.BLOCK_BLOT,Vs.tagName="DIV";var sA=Vs,lc=sA,af=class zz extends Vt{static create(i){return document.createTextNode(i)}static value(i){return i.data}constructor(i,t){super(i,t),this.text=this.statics.value(this.domNode)}deleteAt(i,t){this.domNode.data=this.text=this.text.slice(0,i)+this.text.slice(i+t)}index(i,t){return this.domNode===i?t:-1}insertAt(i,t,r){r==null?(this.text=this.text.slice(0,i)+t+this.text.slice(i),this.domNode.data=this.text):super.insertAt(i,t,r)}length(){return this.text.length}optimize(i){super.optimize(i),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof zz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(i,t=!1){return[this.domNode,i]}split(i,t=!1){if(!t){if(i===0)return this;if(i===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(i));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(i,t){i.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};af.blotName="text",af.scope=X.INLINE_BLOT;var lA=af,js=lA;var Bo=_r(ei(),1);var zt=_r(ei(),1);var lf=_r(ei(),1);var dc=class extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};dc.blotName="break";dc.tagName="BR";var Mr=dc;var Dt=class extends js{},cA={"&":"&","<":"<",">":">",'"':""","'":"'"};function Na(o){return o.replace(/[&<>"']/g,i=>cA[i])}var In=class In extends Qp{static compare(i,t){let r=In.order.indexOf(i),n=In.order.indexOf(t);return r>=0||n>=0?r-n:i===t?0:i<t?-1:1}formatAt(i,t,r,n){if(In.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(i,t);n&&a.wrap(r,n)}else super.formatAt(i,t,r,n)}optimize(i){if(super.optimize(i),this.parent instanceof In&&In.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};V(In,"allowedChildren",[In,Mr,wt,Dt]),V(In,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var sf=In,Lr=sf;var _z=1,Qe=class extends Ra{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=cf(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
|
|
2858
2862
|
`),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((p,h)=>(l=l.split(p,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof Mr&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+_z),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-_z)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Qe.blotName="block";Qe.tagName="P";Qe.defaultChild=Mr;Qe.allowedChildren=[Mr,Lr,wt,Dt];var Qt=class extends wt{attach(){super.attach(),this.attributes=new sc(this.domNode)}delta(){return new lf.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(i,t){let r=this.scroll.query(i,X.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(i,t,r,n){this.format(r,n)}insertAt(i,t,r){if(r!=null){super.insertAt(i,t,r);return}let n=t.split(`
|
|
2859
2863
|
`),a=n.pop(),s=n.map(p=>{let h=this.scroll.create(Qe.blotName);return h.insertAt(0,p),h}),l=this.split(i);s.forEach(p=>{this.parent.insertBefore(p,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}};Qt.scope=X.BLOCK_BLOT;function cf(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return o.descendants(Vt).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),oi(r,{},i)),new lf.default).insert(`
|
|
2860
|
-
`,oi(o))}function oi(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return o==null||("formats"in o&&typeof o.formats=="function"&&(i={...i,...o.formats()},t&&delete i["code-token"]),o.parent==null||o.parent.statics.blotName==="scroll"||o.parent.statics.scope!==o.statics.scope)?i:oi(o.parent,i,t)}var Pi=class Pi extends wt{static value(){}constructor(i,t,r){super(i,t),this.selection=r,this.textNode=document.createTextNode(Pi.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(i,t){if(this.savedLength!==0){super.format(i,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Pi.CONTENTS.length,r.optimize(),r.formatAt(n,Pi.CONTENTS.length,i,t),this.savedLength=0)}index(i,t){return i===this.textNode?0:super.index(i,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let i=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Dt?this.prev:null,r=t?t.length():0,n=this.next instanceof Dt?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(Pi.CONTENTS).join("");s.data=Pi.CONTENTS;let p;if(t)p=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)p=n,n.insertAt(0,l);else{let h=document.createTextNode(l);p=this.scroll.create(h),this.parent.insertBefore(p,this)}if(this.remove(),i){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(i.start.node,i.start.offset),f=h(i.end.node,i.end.offset);if(m!==null&&f!==null)return{startNode:p.domNode,startOffset:m,endNode:p.domNode,endOffset:f}}return null}update(i,t){if(i.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(i){super.optimize(i);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Pi.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};V(Pi,"blotName","cursor"),V(Pi,"className","ql-cursor"),V(Pi,"tagName","span"),V(Pi,"CONTENTS","\uFEFF");var df=Pi,Fo=df;var hf=_r(Cz(),1);var hc=new WeakMap;var uf=["error","warn","log","info"],mf="warn";function Sz(o){if(mf&&uf.indexOf(o)<=uf.indexOf(mf)){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];console[o](...t)}}function ff(o){return uf.reduce((i,t)=>(i[t]=Sz.bind(console,t,o),i),{})}ff.level=o=>{mf=o};Sz.level=ff.level;var zi=ff;var gf=zi("quill:events"),hA=["selectionchange","mousedown","mouseup","click"];hA.forEach(o=>{document.addEventListener(o,function(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=hc.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var uc=class extends hf.default{constructor(){super(),this.domListeners={},this.on("error",gf.error)}emit(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];return gf.log.call(gf,...t),super.emit(...t)}handleDOM(i){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[i.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(i.target===s||s.contains(i.target))&&l(i,...r)})}listenDOM(i,t,r){this.domListeners[i]||(this.domListeners[i]=[]),this.domListeners[i].push({node:t,handler:r})}};V(uc,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(uc,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=uc;var bf=zi("quill:selection"),jr=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=i,this.length=t}},yf=class{constructor(i,t){this.emitter=t,this.scroll=i,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:p}=n.range;this.setNativeRange(a,s,l,p),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let i=this.cursor.restore();if(!i)return;setTimeout(()=>{this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(i,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(i,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Vt){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(i,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();i=Math.min(i,r-1),t=Math.min(i+t,r-1)-i;let n,[a,s]=this.scroll.leaf(i);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(i+1);if(m){let[f]=this.scroll.line(i),[b]=this.scroll.line(i+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(i+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let p="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),p="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(p="right")}return{bottom:h.top+h.height,height:h.height,left:h[p],right:h[p],top:h.top,width:0}}getNativeRange(){let i=document.getSelection();if(i==null||i.rangeCount<=0)return null;let t=i.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return bf.info("getNativeRange",r),r}getRange(){let i=this.scroll.domNode;if("isConnected"in i&&!i.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&vf(this.root,document.activeElement)}normalizedToRange(i){let t=[[i.start.node,i.start.offset]];i.native.collapsed||t.push([i.end.node,i.end.offset]);let r=t.map(s=>{let[l,p]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return p===0?m:h instanceof Vt?m+h.index(l,p):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new jr(a,n-a)}normalizeNative(i){if(!vf(this.root,i.startContainer)||!i.collapsed&&!vf(this.root,i.endContainer))return null;let t={start:{node:i.startContainer,offset:i.startOffset},end:{node:i.endContainer,offset:i.endOffset},native:i};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(i){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(i.index,!1),...r(i.index+i.length,!0)]}setNativeRange(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(bf.info("setNativeRange",i,t,r,n),i!=null&&(this.root.parentNode==null||i.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(i!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||i!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){i instanceof Element&&i.tagName==="BR"&&(t=Array.from(i.parentNode.childNodes).indexOf(i),i=i.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let p=document.createRange();p.setStart(i,t),p.setEnd(r,n),s.removeAllRanges(),s.addRange(p)}}else s.removeAllRanges(),this.root.blur()}setRange(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),bf.info("setRange",i),i!=null){let n=this.rangeToNative(i);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Da(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,qn(this.lastRange),qn(t),i];this.emitter.emit(J.events.EDITOR_CHANGE,...a),i!==J.sources.SILENT&&this.emitter.emit(...a)}}};function vf(o,i){try{i.parentNode}catch{return!1}return o.contains(i)}var Ez=yf;var uA=/^[ -~]*$/,wf=class{constructor(i){this.scroll=i,this.delta=this.getDelta()}applyDelta(i){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=Tz(i),n=new zt.default;return fA(r.ops.slice()).reduce((s,l)=>{let p=zt.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(p),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
|
|
2864
|
+
`,oi(o))}function oi(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return o==null||("formats"in o&&typeof o.formats=="function"&&(i={...i,...o.formats()},t&&delete i["code-token"]),o.parent==null||o.parent.statics.blotName==="scroll"||o.parent.statics.scope!==o.statics.scope)?i:oi(o.parent,i,t)}var Hi=class Hi extends wt{static value(){}constructor(i,t,r){super(i,t),this.selection=r,this.textNode=document.createTextNode(Hi.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(i,t){if(this.savedLength!==0){super.format(i,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Hi.CONTENTS.length,r.optimize(),r.formatAt(n,Hi.CONTENTS.length,i,t),this.savedLength=0)}index(i,t){return i===this.textNode?0:super.index(i,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let i=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof Dt?this.prev:null,r=t?t.length():0,n=this.next instanceof Dt?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(Hi.CONTENTS).join("");s.data=Hi.CONTENTS;let p;if(t)p=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)p=n,n.insertAt(0,l);else{let h=document.createTextNode(l);p=this.scroll.create(h),this.parent.insertBefore(p,this)}if(this.remove(),i){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(i.start.node,i.start.offset),f=h(i.end.node,i.end.offset);if(m!==null&&f!==null)return{startNode:p.domNode,startOffset:m,endNode:p.domNode,endOffset:f}}return null}update(i,t){if(i.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(i){super.optimize(i);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Hi.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};V(Hi,"blotName","cursor"),V(Hi,"className","ql-cursor"),V(Hi,"tagName","span"),V(Hi,"CONTENTS","\uFEFF");var df=Hi,Fo=df;var hf=_r(Cz(),1);var hc=new WeakMap;var uf=["error","warn","log","info"],mf="warn";function Sz(o){if(mf&&uf.indexOf(o)<=uf.indexOf(mf)){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];console[o](...t)}}function ff(o){return uf.reduce((i,t)=>(i[t]=Sz.bind(console,t,o),i),{})}ff.level=o=>{mf=o};Sz.level=ff.level;var _i=ff;var gf=_i("quill:events"),hA=["selectionchange","mousedown","mouseup","click"];hA.forEach(o=>{document.addEventListener(o,function(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=hc.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var uc=class extends hf.default{constructor(){super(),this.domListeners={},this.on("error",gf.error)}emit(){for(var i=arguments.length,t=new Array(i),r=0;r<i;r++)t[r]=arguments[r];return gf.log.call(gf,...t),super.emit(...t)}handleDOM(i){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[i.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(i.target===s||s.contains(i.target))&&l(i,...r)})}listenDOM(i,t,r){this.domListeners[i]||(this.domListeners[i]=[]),this.domListeners[i].push({node:t,handler:r})}};V(uc,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(uc,"sources",{API:"api",SILENT:"silent",USER:"user"});var J=uc;var bf=_i("quill:selection"),jr=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=i,this.length=t}},yf=class{constructor(i,t){this.emitter=t,this.scroll=i,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new jr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,J.sources.USER),1)}),this.emitter.on(J.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(J.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?J.sources.SILENT:n)}catch{}})}),this.emitter.on(J.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:p}=n.range;this.setNativeRange(a,s,l,p),this.update(J.sources.SILENT)}}),this.update(J.sources.SILENT)}handleComposition(){this.emitter.on(J.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(J.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let i=this.cursor.restore();if(!i)return;setTimeout(()=>{this.setNativeRange(i.startNode,i.startOffset,i.endNode,i.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(J.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(i,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(i,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Vt){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(i,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();i=Math.min(i,r-1),t=Math.min(i+t,r-1)-i;let n,[a,s]=this.scroll.leaf(i);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(i+1);if(m){let[f]=this.scroll.line(i),[b]=this.scroll.line(i+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(i+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let p="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),p="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(p="right")}return{bottom:h.top+h.height,height:h.height,left:h[p],right:h[p],top:h.top,width:0}}getNativeRange(){let i=document.getSelection();if(i==null||i.rangeCount<=0)return null;let t=i.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return bf.info("getNativeRange",r),r}getRange(){let i=this.scroll.domNode;if("isConnected"in i&&!i.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&vf(this.root,document.activeElement)}normalizedToRange(i){let t=[[i.start.node,i.start.offset]];i.native.collapsed||t.push([i.end.node,i.end.offset]);let r=t.map(s=>{let[l,p]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return p===0?m:h instanceof Vt?m+h.index(l,p):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new jr(a,n-a)}normalizeNative(i){if(!vf(this.root,i.startContainer)||!i.collapsed&&!vf(this.root,i.endContainer))return null;let t={start:{node:i.startContainer,offset:i.startOffset},end:{node:i.endContainer,offset:i.endOffset},native:i};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(i){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(i.index,!1),...r(i.index+i.length,!0)]}setNativeRange(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(bf.info("setNativeRange",i,t,r,n),i!=null&&(this.root.parentNode==null||i.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(i!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||i!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){i instanceof Element&&i.tagName==="BR"&&(t=Array.from(i.parentNode.childNodes).indexOf(i),i=i.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let p=document.createRange();p.setStart(i,t),p.setEnd(r,n),s.removeAllRanges(),s.addRange(p)}}else s.removeAllRanges(),this.root.blur()}setRange(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;if(typeof t=="string"&&(r=t,t=!1),bf.info("setRange",i),i!=null){let n=this.rangeToNative(i);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!Da(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[J.events.SELECTION_CHANGE,qn(this.lastRange),qn(t),i];this.emitter.emit(J.events.EDITOR_CHANGE,...a),i!==J.sources.SILENT&&this.emitter.emit(...a)}}};function vf(o,i){try{i.parentNode}catch{return!1}return o.contains(i)}var Ez=yf;var uA=/^[ -~]*$/,wf=class{constructor(i){this.scroll=i,this.delta=this.getDelta()}applyDelta(i){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=Tz(i),n=new zt.default;return fA(r.ops.slice()).reduce((s,l)=>{let p=zt.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(p),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
|
|
2861
2865
|
`)&&(t<=s||!!this.scroll.descendant(Qt,s)[0]),this.scroll.insertAt(s,v);let[y,S]=this.scroll.line(s),T=ri({},oi(y));if(y instanceof Qe){let[N]=y.descendant(Vt,S);N&&(T=ri(T,oi(N)))}h=zt.AttributeMap.diff(T,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let y=this.scroll.query(v,X.INLINE)!=null;if(y)(t<=s||this.scroll.descendant(Qt,s)[0])&&(f=!0);else if(s>0){let[S,T]=this.scroll.descendant(Vt,s-1);S instanceof Dt?S.value()[T]!==`
|
|
2862
2866
|
`&&(m=!0):S instanceof wt&&S.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),y){let[S]=this.scroll.descendant(Vt,s);if(S){let T=ri({},oi(S));h=zt.AttributeMap.diff(T,h)||{}}}}t+=p}else if(n.push(l),l.retain!==null&&typeof l.retain=="object"){let v=Object.keys(l.retain)[0];if(v==null)return s;this.scroll.updateEmbedAt(s,v,l.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(s,p,v,h[v])});let b=m?1:0,g=f?1:0;return t+=b+g,n.retain(b),n.delete(g),s+p+b+g},0),n.reduce((s,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(s,l.delete),s):s+zt.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(i,t){return this.scroll.deleteAt(i,t),this.update(new zt.default().retain(i).delete(t))}formatLine(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(a=>{this.scroll.lines(i,Math.max(t,1)).forEach(s=>{s.format(a,r[a])})}),this.scroll.optimize();let n=new zt.default().retain(i).retain(t,qn(r));return this.update(n)}formatText(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(a=>{this.scroll.formatAt(i,t,a,r[a])});let n=new zt.default().retain(i).retain(t,qn(r));return this.update(n)}getContents(i,t){return this.delta.slice(i,i+t)}getDelta(){return this.scroll.lines().reduce((i,t)=>i.concat(t.delta()),new zt.default)}getFormat(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];t===0?this.scroll.path(i).forEach(l=>{let[p]=l;p instanceof Qe?r.push(p):p instanceof Vt&&n.push(p)}):(r=this.scroll.lines(i,t),n=this.scroll.descendants(Vt,i,t));let[a,s]=[r,n].map(l=>{let p=l.shift();if(p==null)return{};let h=oi(p);for(;Object.keys(h).length>0;){let m=l.shift();if(m==null)return h;h=mA(oi(m),h)}return h});return{...a,...s}}getHTML(i,t){let[r,n]=this.scroll.line(i);if(r){let a=r.length();return r.length()>=n+t&&!(n===0&&t===a)?mc(r,n,t,!0):mc(this.scroll,i,t,!0)}return""}getText(i,t){return this.getContents(i,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(i,t){let r=Tz(t),n=new zt.default().retain(i).concat(r);return this.scroll.insertContents(i,r),this.update(n)}insertEmbed(i,t,r){return this.scroll.insertAt(i,t,r),this.update(new zt.default().retain(i).insert({[t]:r}))}insertText(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
|
|
2863
2867
|
`).replace(/\r/g,`
|
|
@@ -2866,20 +2870,20 @@ import{a as Fn,b as d3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var j
|
|
|
2866
2870
|
`).replace(/\r/g,`
|
|
2867
2871
|
`);return i.insert(r,t.attributes)}return i.push(t)},new zt.default)}function $z(o,i){let{index:t,length:r}=o;return new jr(t+i,r)}function fA(o){let i=[];return o.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
|
|
2868
2872
|
`).forEach((n,a)=>{a&&i.push({insert:`
|
|
2869
|
-
`,attributes:t.attributes}),n&&i.push({insert:n,attributes:t.attributes})}):i.push(t)}),i}var Az=wf;var Jp=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=i,this.options=t}};V(Jp,"DEFAULTS",{});var mt=Jp;var Zp="\uFEFF",zf=class extends wt{constructor(i,t){super(i,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Zp),this.rightGuard=document.createTextNode(Zp),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(i,t){return i===this.leftGuard?0:i===this.rightGuard?1:super.index(i,t)}restore(i){let t=null,r,n=i.data.split(Zp).join("");if(i===this.leftGuard)if(this.prev instanceof Dt){let a=this.prev.length();this.prev.insertAt(a,n),t={startNode:this.prev.domNode,startOffset:a+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:n.length};else i===this.rightGuard&&(this.next instanceof Dt?(this.next.insertAt(0,n),t={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:n.length}));return i.data=Zp,t}update(i,t){i.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){let n=this.restore(r.target);n&&(t.range=n)}})}},Ws=zf;var _f=class{constructor(i,t){V(this,"isComposing",!1);this.scroll=i,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",i=>{this.isComposing||this.handleCompositionStart(i)}),this.scroll.domNode.addEventListener("compositionend",i=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(i)})})}handleCompositionStart(i){let t=i.target instanceof Node?this.scroll.find(i.target,!0):null;t&&!(t instanceof Ws)&&(this.emitter.emit(J.events.COMPOSITION_BEFORE_START,i),this.scroll.batchStart(),this.emitter.emit(J.events.COMPOSITION_START,i),this.isComposing=!0)}handleCompositionEnd(i){this.emitter.emit(J.events.COMPOSITION_BEFORE_END,i),this.scroll.batchEnd(),this.emitter.emit(J.events.COMPOSITION_END,i),this.isComposing=!1}},Mz=_f;var fc=class fc{constructor(i,t){V(this,"modules",{});this.quill=i,this.options=t}init(){Object.keys(this.options.modules).forEach(i=>{this.modules[i]==null&&this.addModule(i)})}addModule(i){let t=this.quill.constructor.import(`modules/${i}`);return this.modules[i]=new t(this.quill,this.options.modules[i]||{}),this.modules[i]}};V(fc,"DEFAULTS",{modules:{}}),V(fc,"themes",{default:fc});var kf=fc,Ks=kf;var gA=o=>o.parentElement||o.getRootNode().host||null,bA=o=>{let i=o.getBoundingClientRect(),t="offsetWidth"in o&&Math.abs(i.width)/o.offsetWidth||1,r="offsetHeight"in o&&Math.abs(i.height)/o.offsetHeight||1;return{top:i.top,right:i.left+o.clientWidth*t,bottom:i.top+o.clientHeight*r,left:i.left}},eh=o=>{let i=parseInt(o,10);return Number.isNaN(i)?0:i},Lz=(o,i,t,r,n,a)=>o<t&&i>r?0:o<t?-(t-o+n):i>r?i-o>r-t?o+n-t:i-r+a:0,vA=(o,i)=>{let t=o.ownerDocument,r=i,n=o;for(;n;){let a=n===t.body,s=a?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:bA(n),l=getComputedStyle(n),p=Lz(r.left,r.right,s.left,s.right,eh(l.scrollPaddingLeft),eh(l.scrollPaddingRight)),h=Lz(r.top,r.bottom,s.top,s.bottom,eh(l.scrollPaddingTop),eh(l.scrollPaddingBottom));if(p||h)if(a)t.defaultView?.scrollBy(p,h);else{let{scrollLeft:m,scrollTop:f}=n;h&&(n.scrollTop+=h),p&&(n.scrollLeft+=p);let b=n.scrollLeft-m,g=n.scrollTop-f;r={left:r.left-b,top:r.top-g,right:r.right-b,bottom:r.bottom-g}}n=a||l.position==="fixed"?null:gA(n)}},qz=vA;var yA=100,xA=["block","break","cursor","inline","scroll","text"],wA=(o,i,t)=>{let r=new Ho;return xA.forEach(n=>{let a=i.query(n);a&&r.register(a)}),o.forEach(n=>{let a=i.query(n);a||t.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,s+=1,s>yA){t.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},Iz=wA;var Ys=
|
|
2870
|
-
`});this.setContents(s)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof i=="string"){let r=i;i=document.createElement("div"),i.classList.add(r)}return this.container.insertBefore(i,t),i}blur(){this.selection.setRange(null)}deleteText(i,t,r){return[i,t,,r]=ao(i,t,r),un.call(this,()=>this.editor.deleteText(i,t),r,i,-1*t)}disable(){this.enable(!1)}editReadOnly(i){this.allowReadOnlyEdits=!0;let t=i();return this.allowReadOnlyEdits=!1,t}enable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(i),this.container.classList.toggle("ql-disabled",!i)}focus(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),i.preventScroll||this.scrollSelectionIntoView()}format(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;return un.call(this,()=>{let n=this.getSelection(!0),a=new Bo.default;if(n==null)return a;if(this.scroll.query(i,X.BLOCK))a=this.editor.formatLine(n.index,n.length,{[i]:t});else{if(n.length===0)return this.selection.format(i,t),a;a=this.editor.formatText(n.index,n.length,{[i]:t})}return this.setSelection(n,J.sources.SILENT),a},r)}formatLine(i,t,r,n,a){let s;return[i,t,s,a]=ao(i,t,r,n,a),un.call(this,()=>this.editor.formatLine(i,t,s),a,i,0)}formatText(i,t,r,n,a){let s;return[i,t,s,a]=ao(i,t,r,n,a),un.call(this,()=>this.editor.formatText(i,t,s),a,i,0)}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof i=="number"?r=this.selection.getBounds(i,t):r=this.selection.getBounds(i.index,i.length),!r)return null;let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-i;return[i,t]=ao(i,t),this.editor.getContents(i,t)}getFormat(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof i=="number"?this.editor.getFormat(i,t):this.editor.getFormat(i.index,i.length)}getIndex(i){return i.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(i){return this.scroll.leaf(i)}getLine(i){return this.scroll.line(i)}getLines(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof i!="number"?this.scroll.lines(i.index,i.length):this.scroll.lines(i,t)}getModule(i){return this.theme.modules[i]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof i=="number"&&(t=t??this.getLength()-i),[i,t]=ao(i,t),this.editor.getHTML(i,t)}getText(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof i=="number"&&(t=t??this.getLength()-i),[i,t]=ao(i,t),this.editor.getText(i,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(i,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:mn.sources.API;return un.call(this,()=>this.editor.insertEmbed(i,t,r),n,i)}insertText(i,t,r,n,a){let s;return[i,,s,a]=ao(i,0,r,n,a),un.call(this,()=>this.editor.insertText(i,t,s),a,i,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(i,t,r){return[i,t,,r]=ao(i,t,r),un.call(this,()=>this.editor.removeFormat(i,t),r,i)}scrollRectIntoView(i){qz(this.root,i)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let i=this.selection.lastRange,t=i&&this.selection.getBounds(i.index,i.length);t&&this.scrollRectIntoView(t)}setContents(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return un.call(this,()=>{i=new Bo.default(i);let r=this.getLength(),n=this.editor.deleteText(0,r),a=this.editor.insertContents(0,i),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(a).compose(s)},t)}setSelection(i,t,r){i==null?this.selection.setRange(null,t||mn.sources.API):([i,t,,r]=ao(i,t,r),this.selection.setRange(new jr(Math.max(0,i),t),r),r!==J.sources.SILENT&&this.scrollSelectionIntoView())}setText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API,r=new Bo.default().insert(i);return this.setContents(r,t)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.scroll.update(i);return this.selection.update(i),t}updateContents(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return un.call(this,()=>(i=new Bo.default(i),this.editor.applyDelta(i)),t,!0)}};V(mn,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:th,theme:"default"}),V(mn,"events",J.events),V(mn,"sources",J.sources),V(mn,"version","2.0.3"),V(mn,"imports",{delta:Bo.default,parchment:cc,"core/module":mt,"core/theme":Ks});var G=mn;function Dz(o){return typeof o=="string"?document.querySelector(o):o}function Cf(o){return Object.entries(o??{}).reduce((i,t)=>{let[r,n]=t;return{...i,[r]:n===!0?{}:n}},{})}function Rz(o){return Object.fromEntries(Object.entries(o).filter(i=>i[1]!==void 0))}function zA(o,i){let t=Dz(o);if(!t)throw new Error("Invalid Quill container");let n=!i.theme||i.theme===G.DEFAULTS.theme?Ks:G.import(`themes/${i.theme}`);if(!n)throw new Error(`Invalid theme ${i.theme}. Did you register it?`);let{modules:a,...s}=G.DEFAULTS,{modules:l,...p}=n.DEFAULTS,h=Cf(i.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});let m=ri({},Cf(a),Cf(l),h),f={...s,...Rz(p),...Rz(i)},b=i.registry;return b?i.formats&&Ys.warn('Ignoring "formats" option because "registry" is specified'):b=i.formats?Iz(i.formats,f.registry,Ys):f.registry,{...f,registry:b,container:t,theme:n,modules:Object.entries(m).reduce((g,v)=>{let[y,S]=v;if(!S)return g;let T=G.import(`modules/${y}`);return T==null?(Ys.error(`Cannot load ${y} module. Are you sure you registered it?`),g):{...g,[y]:ri({},T.DEFAULTS||{},S)}},{}),bounds:Dz(f.bounds)}}function un(o,i,t,r){if(!this.isEnabled()&&i===J.sources.USER&&!this.allowReadOnlyEdits)return new Bo.default;let n=t==null?null:this.getSelection(),a=this.editor.delta,s=o();if(n!=null&&(t===!0&&(t=n.index),r==null?n=Nz(n,s,i):r!==0&&(n=Nz(n,t,r,i)),this.setSelection(n,J.sources.SILENT)),s.length()>0){let l=[J.events.TEXT_CHANGE,s,a,i];this.emitter.emit(J.events.EDITOR_CHANGE,...l),i!==J.sources.SILENT&&this.emitter.emit(...l)}return s}function ao(o,i,t,r,n){let a={};return typeof o.index=="number"&&typeof o.length=="number"?typeof i!="number"?(n=r,r=t,t=i,i=o.length,o=o.index):(i=o.length,o=o.index):typeof i!="number"&&(n=r,r=t,t=i,i=0),typeof t=="object"?(a=t,n=r):typeof t=="string"&&(r!=null?a[t]=r:n=t),n=n||J.sources.API,[o,i,a,n]}function Nz(o,i,t,r){let n=typeof t=="number"?t:0;if(o==null)return null;let a,s;return i&&typeof i.transformPosition=="function"?[a,s]=[o.index,o.index+o.length].map(l=>i.transformPosition(l,r!==J.sources.USER)):[a,s]=[o.index,o.index+o.length].map(l=>l<i||l===i&&r===J.sources.USER?l:n>=0?l+n:Math.max(i,l+n)),new jr(a,s-a)}var Sf=class extends Us{},
|
|
2871
|
-
`)?n.insertAt(0,t.slice(0,-1),r):n.insertAt(0,t,r)}else{let n=this.scroll.create(t,r);this.appendChild(n)}else super.insertAt(i,t,r);this.optimize()}insertBefore(i,t){if(i.statics.scope===X.INLINE_BLOT){let r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(i),super.insertBefore(r,t)}else super.insertBefore(i,t)}insertContents(i,t){let r=this.deltaToRenderBlocks(t.concat(new
|
|
2872
|
-
`))),n=r.pop();if(n==null)return;this.batchStart();let a=r.shift();if(a){let p=a.type==="block"&&(a.delta.length()===0||!this.descendant(Qt,i)[0]&&i<this.length()),h=a.type==="block"?a.delta:new
|
|
2873
|
-
`);let b=oi(this.line(i)[0]),g=
|
|
2874
|
-
`);s.slice(0,-1).forEach(p=>{r.insert(p,n.attributes),t.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new
|
|
2873
|
+
`,attributes:t.attributes}),n&&i.push({insert:n,attributes:t.attributes})}):i.push(t)}),i}var Az=wf;var Jp=class{constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=i,this.options=t}};V(Jp,"DEFAULTS",{});var mt=Jp;var Zp="\uFEFF",zf=class extends wt{constructor(i,t){super(i,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Zp),this.rightGuard=document.createTextNode(Zp),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(i,t){return i===this.leftGuard?0:i===this.rightGuard?1:super.index(i,t)}restore(i){let t=null,r,n=i.data.split(Zp).join("");if(i===this.leftGuard)if(this.prev instanceof Dt){let a=this.prev.length();this.prev.insertAt(a,n),t={startNode:this.prev.domNode,startOffset:a+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:n.length};else i===this.rightGuard&&(this.next instanceof Dt?(this.next.insertAt(0,n),t={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:n.length}));return i.data=Zp,t}update(i,t){i.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){let n=this.restore(r.target);n&&(t.range=n)}})}},Ws=zf;var _f=class{constructor(i,t){V(this,"isComposing",!1);this.scroll=i,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",i=>{this.isComposing||this.handleCompositionStart(i)}),this.scroll.domNode.addEventListener("compositionend",i=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(i)})})}handleCompositionStart(i){let t=i.target instanceof Node?this.scroll.find(i.target,!0):null;t&&!(t instanceof Ws)&&(this.emitter.emit(J.events.COMPOSITION_BEFORE_START,i),this.scroll.batchStart(),this.emitter.emit(J.events.COMPOSITION_START,i),this.isComposing=!0)}handleCompositionEnd(i){this.emitter.emit(J.events.COMPOSITION_BEFORE_END,i),this.scroll.batchEnd(),this.emitter.emit(J.events.COMPOSITION_END,i),this.isComposing=!1}},Mz=_f;var fc=class fc{constructor(i,t){V(this,"modules",{});this.quill=i,this.options=t}init(){Object.keys(this.options.modules).forEach(i=>{this.modules[i]==null&&this.addModule(i)})}addModule(i){let t=this.quill.constructor.import(`modules/${i}`);return this.modules[i]=new t(this.quill,this.options.modules[i]||{}),this.modules[i]}};V(fc,"DEFAULTS",{modules:{}}),V(fc,"themes",{default:fc});var kf=fc,Ks=kf;var gA=o=>o.parentElement||o.getRootNode().host||null,bA=o=>{let i=o.getBoundingClientRect(),t="offsetWidth"in o&&Math.abs(i.width)/o.offsetWidth||1,r="offsetHeight"in o&&Math.abs(i.height)/o.offsetHeight||1;return{top:i.top,right:i.left+o.clientWidth*t,bottom:i.top+o.clientHeight*r,left:i.left}},eh=o=>{let i=parseInt(o,10);return Number.isNaN(i)?0:i},Lz=(o,i,t,r,n,a)=>o<t&&i>r?0:o<t?-(t-o+n):i>r?i-o>r-t?o+n-t:i-r+a:0,vA=(o,i)=>{let t=o.ownerDocument,r=i,n=o;for(;n;){let a=n===t.body,s=a?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:bA(n),l=getComputedStyle(n),p=Lz(r.left,r.right,s.left,s.right,eh(l.scrollPaddingLeft),eh(l.scrollPaddingRight)),h=Lz(r.top,r.bottom,s.top,s.bottom,eh(l.scrollPaddingTop),eh(l.scrollPaddingBottom));if(p||h)if(a)t.defaultView?.scrollBy(p,h);else{let{scrollLeft:m,scrollTop:f}=n;h&&(n.scrollTop+=h),p&&(n.scrollLeft+=p);let b=n.scrollLeft-m,g=n.scrollTop-f;r={left:r.left-b,top:r.top-g,right:r.right-b,bottom:r.bottom-g}}n=a||l.position==="fixed"?null:gA(n)}},qz=vA;var yA=100,xA=["block","break","cursor","inline","scroll","text"],wA=(o,i,t)=>{let r=new Ho;return xA.forEach(n=>{let a=i.query(n);a&&r.register(a)}),o.forEach(n=>{let a=i.query(n);a||t.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,s+=1,s>yA){t.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},Iz=wA;var Ys=_i("quill"),th=new Ho;ii.uiClass="ql-ui";var mn=class mn{static debug(i){i===!0&&(i="log"),_i.level(i)}static find(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return hc.get(i)||th.find(i,t)}static import(i){return this.imports[i]==null&&Ys.error(`Cannot import ${i}. Are you sure it was registered?`),this.imports[i]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let i=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in i?i.attrName:i.blotName;typeof r=="string"?this.register(`formats/${r}`,i,t):Object.keys(i).forEach(n=>{this.register(n,i[n],t)})}else{let i=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[i]!=null&&!r&&Ys.warn(`Overwriting ${i} with`,t),this.imports[i]=t,(i.startsWith("blots/")||i.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&th.register(t),typeof t.register=="function"&&t.register(th)}}constructor(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=zA(i,t),this.container=this.options.container,this.container==null){Ys.error("Invalid Quill container",i);return}this.options.debug&&mn.debug(this.options.debug);let r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",hc.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new J;let n=lc.blotName,a=this.options.registry.query(n);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Az(this.scroll),this.selection=new Ez(this.scroll,this.emitter),this.composition=new Mz(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(J.events.EDITOR_CHANGE,s=>{s===J.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(J.events.SCROLL_UPDATE,(s,l)=>{let p=this.selection.lastRange,[h]=this.selection.getRange(),m=p&&h?{oldRange:p,newRange:h}:void 0;un.call(this,()=>this.editor.update(null,l,m),s)}),this.emitter.on(J.events.SCROLL_EMBED_UPDATE,(s,l)=>{let p=this.selection.lastRange,[h]=this.selection.getRange(),m=p&&h?{oldRange:p,newRange:h}:void 0;un.call(this,()=>{let f=new Bo.default().retain(s.offset(this)).retain({[s.statics.blotName]:l});return this.editor.update(f,[],m)},mn.sources.USER)}),r){let s=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
|
|
2874
|
+
`});this.setContents(s)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof i=="string"){let r=i;i=document.createElement("div"),i.classList.add(r)}return this.container.insertBefore(i,t),i}blur(){this.selection.setRange(null)}deleteText(i,t,r){return[i,t,,r]=ao(i,t,r),un.call(this,()=>this.editor.deleteText(i,t),r,i,-1*t)}disable(){this.enable(!1)}editReadOnly(i){this.allowReadOnlyEdits=!0;let t=i();return this.allowReadOnlyEdits=!1,t}enable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(i),this.container.classList.toggle("ql-disabled",!i)}focus(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),i.preventScroll||this.scrollSelectionIntoView()}format(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.sources.API;return un.call(this,()=>{let n=this.getSelection(!0),a=new Bo.default;if(n==null)return a;if(this.scroll.query(i,X.BLOCK))a=this.editor.formatLine(n.index,n.length,{[i]:t});else{if(n.length===0)return this.selection.format(i,t),a;a=this.editor.formatText(n.index,n.length,{[i]:t})}return this.setSelection(n,J.sources.SILENT),a},r)}formatLine(i,t,r,n,a){let s;return[i,t,s,a]=ao(i,t,r,n,a),un.call(this,()=>this.editor.formatLine(i,t,s),a,i,0)}formatText(i,t,r,n,a){let s;return[i,t,s,a]=ao(i,t,r,n,a),un.call(this,()=>this.editor.formatText(i,t,s),a,i,0)}getBounds(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof i=="number"?r=this.selection.getBounds(i,t):r=this.selection.getBounds(i.index,i.length),!r)return null;let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-i;return[i,t]=ao(i,t),this.editor.getContents(i,t)}getFormat(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof i=="number"?this.editor.getFormat(i,t):this.editor.getFormat(i.index,i.length)}getIndex(i){return i.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(i){return this.scroll.leaf(i)}getLine(i){return this.scroll.line(i)}getLines(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof i!="number"?this.scroll.lines(i.index,i.length):this.scroll.lines(i,t)}getModule(i){return this.theme.modules[i]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof i=="number"&&(t=t??this.getLength()-i),[i,t]=ao(i,t),this.editor.getHTML(i,t)}getText(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof i=="number"&&(t=t??this.getLength()-i),[i,t]=ao(i,t),this.editor.getText(i,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(i,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:mn.sources.API;return un.call(this,()=>this.editor.insertEmbed(i,t,r),n,i)}insertText(i,t,r,n,a){let s;return[i,,s,a]=ao(i,0,r,n,a),un.call(this,()=>this.editor.insertText(i,t,s),a,i,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(i,t,r){return[i,t,,r]=ao(i,t,r),un.call(this,()=>this.editor.removeFormat(i,t),r,i)}scrollRectIntoView(i){qz(this.root,i)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let i=this.selection.lastRange,t=i&&this.selection.getBounds(i.index,i.length);t&&this.scrollRectIntoView(t)}setContents(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return un.call(this,()=>{i=new Bo.default(i);let r=this.getLength(),n=this.editor.deleteText(0,r),a=this.editor.insertContents(0,i),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(a).compose(s)},t)}setSelection(i,t,r){i==null?this.selection.setRange(null,t||mn.sources.API):([i,t,,r]=ao(i,t,r),this.selection.setRange(new jr(Math.max(0,i),t),r),r!==J.sources.SILENT&&this.scrollSelectionIntoView())}setText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API,r=new Bo.default().insert(i);return this.setContents(r,t)}update(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.sources.USER,t=this.scroll.update(i);return this.selection.update(i),t}updateContents(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J.sources.API;return un.call(this,()=>(i=new Bo.default(i),this.editor.applyDelta(i)),t,!0)}};V(mn,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:th,theme:"default"}),V(mn,"events",J.events),V(mn,"sources",J.sources),V(mn,"version","2.0.3"),V(mn,"imports",{delta:Bo.default,parchment:cc,"core/module":mt,"core/theme":Ks});var G=mn;function Dz(o){return typeof o=="string"?document.querySelector(o):o}function Cf(o){return Object.entries(o??{}).reduce((i,t)=>{let[r,n]=t;return{...i,[r]:n===!0?{}:n}},{})}function Rz(o){return Object.fromEntries(Object.entries(o).filter(i=>i[1]!==void 0))}function zA(o,i){let t=Dz(o);if(!t)throw new Error("Invalid Quill container");let n=!i.theme||i.theme===G.DEFAULTS.theme?Ks:G.import(`themes/${i.theme}`);if(!n)throw new Error(`Invalid theme ${i.theme}. Did you register it?`);let{modules:a,...s}=G.DEFAULTS,{modules:l,...p}=n.DEFAULTS,h=Cf(i.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});let m=ri({},Cf(a),Cf(l),h),f={...s,...Rz(p),...Rz(i)},b=i.registry;return b?i.formats&&Ys.warn('Ignoring "formats" option because "registry" is specified'):b=i.formats?Iz(i.formats,f.registry,Ys):f.registry,{...f,registry:b,container:t,theme:n,modules:Object.entries(m).reduce((g,v)=>{let[y,S]=v;if(!S)return g;let T=G.import(`modules/${y}`);return T==null?(Ys.error(`Cannot load ${y} module. Are you sure you registered it?`),g):{...g,[y]:ri({},T.DEFAULTS||{},S)}},{}),bounds:Dz(f.bounds)}}function un(o,i,t,r){if(!this.isEnabled()&&i===J.sources.USER&&!this.allowReadOnlyEdits)return new Bo.default;let n=t==null?null:this.getSelection(),a=this.editor.delta,s=o();if(n!=null&&(t===!0&&(t=n.index),r==null?n=Nz(n,s,i):r!==0&&(n=Nz(n,t,r,i)),this.setSelection(n,J.sources.SILENT)),s.length()>0){let l=[J.events.TEXT_CHANGE,s,a,i];this.emitter.emit(J.events.EDITOR_CHANGE,...l),i!==J.sources.SILENT&&this.emitter.emit(...l)}return s}function ao(o,i,t,r,n){let a={};return typeof o.index=="number"&&typeof o.length=="number"?typeof i!="number"?(n=r,r=t,t=i,i=o.length,o=o.index):(i=o.length,o=o.index):typeof i!="number"&&(n=r,r=t,t=i,i=0),typeof t=="object"?(a=t,n=r):typeof t=="string"&&(r!=null?a[t]=r:n=t),n=n||J.sources.API,[o,i,a,n]}function Nz(o,i,t,r){let n=typeof t=="number"?t:0;if(o==null)return null;let a,s;return i&&typeof i.transformPosition=="function"?[a,s]=[o.index,o.index+o.length].map(l=>i.transformPosition(l,r!==J.sources.USER)):[a,s]=[o.index,o.index+o.length].map(l=>l<i||l===i&&r===J.sources.USER?l:n>=0?l+n:Math.max(i,l+n)),new jr(a,s-a)}var Sf=class extends Us{},Fi=Sf;var Bi=_r(ei(),1);function Oz(o){return o instanceof Qe||o instanceof Qt}function Pz(o){return typeof o.updateContent=="function"}var Vo=class extends lc{constructor(i,t,r){let{emitter:n}=r;super(i,t),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",a=>this.handleDragStart(a))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let i=this.batch;this.batch=!1,this.update(i)}emitMount(i){this.emitter.emit(J.events.SCROLL_BLOT_MOUNT,i)}emitUnmount(i){this.emitter.emit(J.events.SCROLL_BLOT_UNMOUNT,i)}emitEmbedUpdate(i,t){this.emitter.emit(J.events.SCROLL_EMBED_UPDATE,i,t)}deleteAt(i,t){let[r,n]=this.line(i),[a]=this.line(i+t);if(super.deleteAt(i,t),a!=null&&r!==a&&n>0){if(r instanceof Qt||a instanceof Qt){this.optimize();return}let s=a.children.head instanceof Mr?null:a.children.head;r.moveChildren(a,s),r.remove()}this.optimize()}enable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",i?"true":"false")}formatAt(i,t,r,n){super.formatAt(i,t,r,n),this.optimize()}insertAt(i,t,r){if(i>=this.length())if(r==null||this.scroll.query(t,X.BLOCK)==null){let n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),r==null&&t.endsWith(`
|
|
2875
|
+
`)?n.insertAt(0,t.slice(0,-1),r):n.insertAt(0,t,r)}else{let n=this.scroll.create(t,r);this.appendChild(n)}else super.insertAt(i,t,r);this.optimize()}insertBefore(i,t){if(i.statics.scope===X.INLINE_BLOT){let r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(i),super.insertBefore(r,t)}else super.insertBefore(i,t)}insertContents(i,t){let r=this.deltaToRenderBlocks(t.concat(new Bi.default().insert(`
|
|
2876
|
+
`))),n=r.pop();if(n==null)return;this.batchStart();let a=r.shift();if(a){let p=a.type==="block"&&(a.delta.length()===0||!this.descendant(Qt,i)[0]&&i<this.length()),h=a.type==="block"?a.delta:new Bi.default().insert({[a.key]:a.value});Ef(this,i,h);let m=a.type==="block"?1:0,f=i+h.length()+m;p&&this.insertAt(f-1,`
|
|
2877
|
+
`);let b=oi(this.line(i)[0]),g=Bi.AttributeMap.diff(b,a.attributes)||{};Object.keys(g).forEach(v=>{this.formatAt(f-1,1,v,g[v])}),i=f}let[s,l]=this.children.find(i);if(r.length&&(s&&(s=s.split(l),l=0),r.forEach(p=>{if(p.type==="block"){let h=this.createBlock(p.attributes,s||void 0);Ef(h,0,p.delta)}else{let h=this.create(p.key,p.value);this.insertBefore(h,s||void 0),Object.keys(p.attributes).forEach(m=>{h.format(m,p.attributes[m])})}})),n.type==="block"&&n.delta.length()){let p=s?s.offset(s.scroll)+l:this.length();Ef(this,p,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(i){let t=this.path(i).pop();if(!t)return[null,-1];let[r,n]=t;return r instanceof Vt?[r,n]:[null,-1]}line(i){return i===this.length()?this.line(i-1):this.descendant(Oz,i)}lines(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,r=(n,a,s)=>{let l=[],p=s;return n.children.forEachAt(a,s,(h,m,f)=>{Oz(h)?l.push(h):h instanceof Us&&(l=l.concat(r(h,m,p))),p-=f}),l};return r(this,i,t)}optimize(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(i,t),i.length>0&&this.emitter.emit(J.events.SCROLL_OPTIMIZE,i,t))}path(i){return super.path(i).slice(1)}remove(){}update(i){if(this.batch){Array.isArray(i)&&(this.batch=this.batch.concat(i));return}let t=J.sources.USER;typeof i=="string"&&(t=i),Array.isArray(i)||(i=this.observer.takeRecords()),i=i.filter(r=>{let{target:n}=r,a=this.find(n,!0);return a&&!Pz(a)}),i.length>0&&this.emitter.emit(J.events.SCROLL_BEFORE_UPDATE,t,i),super.update(i.concat([])),i.length>0&&this.emitter.emit(J.events.SCROLL_UPDATE,t,i)}updateEmbedAt(i,t,r){let[n]=this.descendant(a=>a instanceof Qt,i);n&&n.statics.blotName===t&&Pz(n)&&n.updateContent(r)}handleDragStart(i){i.preventDefault()}deltaToRenderBlocks(i){let t=[],r=new Bi.default;return i.forEach(n=>{let a=n?.insert;if(a)if(typeof a=="string"){let s=a.split(`
|
|
2878
|
+
`);s.slice(0,-1).forEach(p=>{r.insert(p,n.attributes),t.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new Bi.default});let l=s[s.length-1];l&&r.insert(l,n.attributes)}else{let s=Object.keys(a)[0];if(!s)return;this.query(s,X.INLINE)?r.push(n):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new Bi.default,t.push({type:"blockEmbed",key:s,value:a[s],attributes:n.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(i,t){let r,n={};Object.entries(i).forEach(l=>{let[p,h]=l;this.query(p,X.BLOCK&X.BLOT)!=null?r=p:n[p]=h});let a=this.create(r||this.statics.defaultChild.blotName,r?i[r]:void 0);this.insertBefore(a,t||void 0);let s=a.length();return Object.entries(n).forEach(l=>{let[p,h]=l;a.formatAt(0,s,p,h)}),a}};V(Vo,"blotName","scroll"),V(Vo,"className","ql-editor"),V(Vo,"tagName","DIV"),V(Vo,"defaultChild",Qe),V(Vo,"allowedChildren",[Qe,Qt,Fi]);function Ef(o,i,t){t.reduce((r,n)=>{let a=Bi.Op.length(n),s=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){let l=n.insert;o.insertAt(r,l);let[p]=o.descendant(Vt,r),h=oi(p);s=Bi.AttributeMap.diff(h,s)||{}}else if(typeof n.insert=="object"){let l=Object.keys(n.insert)[0];if(l==null)return r;if(o.insertAt(r,l,n.insert[l]),o.scroll.query(l,X.INLINE)!=null){let[h]=o.descendant(Vt,r),m=oi(h);s=Bi.AttributeMap.diff(m,s)||{}}}}return Object.keys(s).forEach(l=>{o.formatAt(r,a,l,s[l])}),r+a},i)}var Hz=Vo;var ai=_r(ei(),1);var Tf={scope:X.BLOCK,whitelist:["right","center","justify"]},Fz=new Vr("align","align",Tf),$f=new Bt("align","ql-align",Tf),rh=new ni("align","text-align",Tf);var gc=class extends ni{value(i){let t=super.value(i);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):t}},Bz=new Bt("color","ql-color",{scope:X.INLINE}),bc=new gc("color","color",{scope:X.INLINE});var Vz=new Bt("background","ql-bg",{scope:X.INLINE}),vc=new gc("background","background-color",{scope:X.INLINE});var Dn=class extends Fi{static create(i){let t=super.create(i);return t.setAttribute("spellcheck","false"),t}code(i,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
|
|
2875
2879
|
`).slice(i,i+t)}html(i,t){return`<pre>
|
|
2876
2880
|
${Na(this.code(i,t))}
|
|
2877
|
-
</pre>`}},Rt=class extends Qe{static register(){G.register(Dn)}};V(Rt,"TAB"," ");var Qs=class extends Lr{};Qs.blotName="code";Qs.tagName="CODE";Rt.blotName="code-block";Rt.className="ql-code-block";Rt.tagName="DIV";Dn.blotName="code-block-container";Dn.className="ql-code-block-container";Dn.tagName="DIV";Dn.allowedChildren=[Rt];Rt.allowedChildren=[Dt,Mr,Fo];Rt.requiredContainer=Dn;var Af={scope:X.BLOCK,whitelist:["rtl"]},ih=new Vr("direction","dir",Af),Mf=new Bt("direction","ql-direction",Af),nh=new ni("direction","direction",Af);var Uz={scope:X.INLINE,whitelist:["serif","monospace"]},qf=new Bt("font","ql-font",Uz),Lf=class extends ni{value(i){return super.value(i).replace(/["']/g,"")}},oh=new Lf("font","font-family",Uz);var If=new Bt("size","ql-size",{scope:X.INLINE,whitelist:["small","large","huge"]}),ah=new ni("size","font-size",{scope:X.INLINE,whitelist:["10px","18px","32px"]});var Ir=_r(ei(),1);var _A=
|
|
2881
|
+
</pre>`}},Rt=class extends Qe{static register(){G.register(Dn)}};V(Rt,"TAB"," ");var Qs=class extends Lr{};Qs.blotName="code";Qs.tagName="CODE";Rt.blotName="code-block";Rt.className="ql-code-block";Rt.tagName="DIV";Dn.blotName="code-block-container";Dn.className="ql-code-block-container";Dn.tagName="DIV";Dn.allowedChildren=[Rt];Rt.allowedChildren=[Dt,Mr,Fo];Rt.requiredContainer=Dn;var Af={scope:X.BLOCK,whitelist:["rtl"]},ih=new Vr("direction","dir",Af),Mf=new Bt("direction","ql-direction",Af),nh=new ni("direction","direction",Af);var Uz={scope:X.INLINE,whitelist:["serif","monospace"]},qf=new Bt("font","ql-font",Uz),Lf=class extends ni{value(i){return super.value(i).replace(/["']/g,"")}},oh=new Lf("font","font-family",Uz);var If=new Bt("size","ql-size",{scope:X.INLINE,whitelist:["small","large","huge"]}),ah=new ni("size","font-size",{scope:X.INLINE,whitelist:["10px","18px","32px"]});var Ir=_r(ei(),1);var _A=_i("quill:keyboard"),kA=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",yc=class o extends mt{static match(i,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==i[r]&&t[r]!==null)?!1:t.key===i.key||t.key===i.which}constructor(i,t){super(i,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=SA(i);if(n==null){_A.warn("Attempted to add invalid keyboard binding",n);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(n.key)?n.key:[n.key]).forEach(s=>{let l={...n,key:s,...t,...r};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",i=>{if(i.defaultPrevented||i.isComposing||i.keyCode===229&&(i.key==="Enter"||i.key==="Backspace"))return;let n=(this.bindings[i.key]||[]).concat(this.bindings[i.which]||[]).filter(T=>o.match(i,T));if(n.length===0)return;let a=G.find(i.target,!0);if(a&&a.scroll!==this.quill.scroll)return;let s=this.quill.getSelection();if(s==null||!this.quill.hasFocus())return;let[l,p]=this.quill.getLine(s.index),[h,m]=this.quill.getLeaf(s.index),[f,b]=s.length===0?[h,m]:this.quill.getLeaf(s.index+s.length),g=h instanceof js?h.value().slice(0,m):"",v=f instanceof js?f.value().slice(b):"",y={collapsed:s.length===0,empty:s.length===0&&l.length()<=1,format:this.quill.getFormat(s),line:l,offset:p,prefix:g,suffix:v,event:i};n.some(T=>{if(T.collapsed!=null&&T.collapsed!==y.collapsed||T.empty!=null&&T.empty!==y.empty||T.offset!=null&&T.offset!==y.offset)return!1;if(Array.isArray(T.format)){if(T.format.every(N=>y.format[N]==null))return!1}else if(typeof T.format=="object"&&!Object.keys(T.format).every(N=>T.format[N]===!0?y.format[N]!=null:T.format[N]===!1?y.format[N]==null:Da(T.format[N],y.format[N])))return!1;return T.prefix!=null&&!T.prefix.test(y.prefix)||T.suffix!=null&&!T.suffix.test(y.suffix)?!1:T.handler.call(this,s,y,T)!==!0})&&i.preventDefault()})}handleBackspace(i,t){let r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(i.index===0||this.quill.getLength()<=1)return;let n={},[a]=this.quill.getLine(i.index),s=new Ir.default().retain(i.index-r).delete(r);if(t.offset===0){let[l]=this.quill.getLine(i.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){let h=a.formats(),m=this.quill.getFormat(i.index-1,1);if(n=Ir.AttributeMap.diff(h,m)||{},Object.keys(n).length>0){let f=new Ir.default().retain(i.index+a.length()-2).retain(1,n);s=s.compose(f)}}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDelete(i,t){let r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(i.index>=this.quill.getLength()-r)return;let n={},[a]=this.quill.getLine(i.index),s=new Ir.default().retain(i.index).delete(r);if(t.offset>=a.length()-1){let[l]=this.quill.getLine(i.index+1);if(l){let p=a.formats(),h=this.quill.getFormat(i.index,1);n=Ir.AttributeMap.diff(p,h)||{},Object.keys(n).length>0&&(s=s.retain(l.length()-1).retain(1,n))}}this.quill.updateContents(s,G.sources.USER),this.quill.focus()}handleDeleteRange(i){xc({range:i,quill:this.quill}),this.quill.focus()}handleEnter(i,t){let r=Object.keys(t.format).reduce((a,s)=>(this.quill.scroll.query(s,X.BLOCK)&&!Array.isArray(t.format[s])&&(a[s]=t.format[s]),a),{}),n=new Ir.default().retain(i.index).delete(i.length).insert(`
|
|
2878
2882
|
`,r);this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(i.index+1,G.sources.SILENT),this.quill.focus()}},CA={bindings:{bold:Df("bold"),italic:Df("italic"),underline:Df("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(o,i){return i.collapsed&&i.offset!==0?!0:(this.quill.format("indent","+1",G.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(o,i){return i.collapsed&&i.offset!==0?!0:(this.quill.format("indent","-1",G.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(o,i){i.format.indent!=null?this.quill.format("indent","-1",G.sources.USER):i.format.list!=null&&this.quill.format("list",!1,G.sources.USER)}},"indent code-block":jz(!0),"outdent code-block":jz(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(o){this.quill.deleteText(o.index-1,1,G.sources.USER)}},tab:{key:"Tab",handler(o,i){if(i.format.table)return!0;this.quill.history.cutoff();let t=new Ir.default().retain(o.index).delete(o.length).insert(" ");return this.quill.updateContents(t,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index+1,G.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,G.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(o,i){let t={list:!1};i.format.indent&&(t.indent=!1),this.quill.formatLine(o.index,o.length,t,G.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(o){let[i,t]=this.quill.getLine(o.index),r={...i.formats(),list:"checked"},n=new Ir.default().retain(o.index).insert(`
|
|
2879
2883
|
`,r).retain(i.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(o.index+1,G.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(o,i){let[t,r]=this.quill.getLine(o.index),n=new Ir.default().retain(o.index).insert(`
|
|
2880
2884
|
`,i.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(o.index+1,G.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(o){let i=this.quill.getModule("table");if(i){let[t,r,n,a]=i.getTable(o),s=EA(t,r,n,a);if(s==null)return;let l=t.offset();if(s<0){let p=new Ir.default().retain(l).insert(`
|
|
2881
2885
|
`);this.quill.updateContents(p,G.sources.USER),this.quill.setSelection(o.index+1,o.length,G.sources.SILENT)}else if(s>0){l+=t.length();let p=new Ir.default().retain(l).insert(`
|
|
2882
|
-
`);this.quill.updateContents(p,G.sources.USER),this.quill.setSelection(l,G.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(o,i){let{event:t,line:r}=i,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,G.sources.USER):this.quill.setSelection(n+r.length(),G.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(o,i){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=i.prefix,[r,n]=this.quill.getLine(o.index);if(n>t)return!0;let a;switch(i.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(o.index," ",G.sources.USER),this.quill.history.cutoff();let s=new Ir.default().retain(o.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index-t,G.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(o){let[i,t]=this.quill.getLine(o.index),r=2,n=i;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new Ir.default().retain(o.index+i.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,G.sources.USER),this.quill.setSelection(o.index-1,G.sources.SILENT),!1}return!0}},"embed left":sh("ArrowLeft",!1),"embed left shift":sh("ArrowLeft",!0),"embed right":sh("ArrowRight",!1),"embed right shift":sh("ArrowRight",!0),"table down":Gz(!1),"table up":Gz(!0)}};yc.DEFAULTS=CA;function jz(o){return{key:"Tab",shiftKey:!o,format:{"code-block":!0},handler(i,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(i.length===0&&!r.shiftKey){this.quill.insertText(i.index,a,G.sources.USER),this.quill.setSelection(i.index+a.length,G.sources.SILENT);return}let s=i.length===0?this.quill.getLines(i.index,1):this.quill.getLines(i),{index:l,length:p}=i;s.forEach((h,m)=>{o?(h.insertAt(0,a),m===0?l+=a.length:p+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:p-=a.length)}),this.quill.update(G.sources.USER),this.quill.setSelection(l,p,G.sources.SILENT)}}}function sh(o,i){return{key:o,shiftKey:i,altKey:null,[o==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;o==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof wt?(o==="ArrowLeft"?i?this.quill.setSelection(r.index-1,r.length+1,G.sources.USER):this.quill.setSelection(r.index-1,G.sources.USER):i?this.quill.setSelection(r.index,r.length+1,G.sources.USER):this.quill.setSelection(r.index+r.length+1,G.sources.USER),!1):!0}}}function Df(o){return{key:o[0],shortKey:!0,handler(i,t){this.quill.format(o,!t.format[o],G.sources.USER)}}}function Gz(o){return{key:o?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(i,t){let r=o?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let p=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(p,0,G.sources.USER)}}else{let s=n.table()[r];s!=null&&(o?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,G.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,G.sources.USER))}return!1}}}function SA(o){if(typeof o=="string"||typeof o=="number")o={key:o};else if(typeof o=="object")o=qn(o);else return null;return o.shortKey&&(o[kA]=o.shortKey,delete o.shortKey),o}function xc(o){let{quill:i,range:t}=o,r=i.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=Ir.AttributeMap.diff(s,a)||{}}i.deleteText(t,G.sources.USER),Object.keys(n).length>0&&i.formatLine(t.index,1,n,G.sources.USER),i.setSelection(t.index,G.sources.SILENT)}function EA(o,i,t,r){return i.prev==null&&i.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:i.prev==null?-1:i.next==null?1:null}var TA=/font-weight:\s*normal/,$A=["P","OL","UL"],Wz=o=>o&&$A.includes(o.tagName),AA=o=>{Array.from(o.querySelectorAll("br")).filter(i=>Wz(i.previousElementSibling)&&Wz(i.nextElementSibling)).forEach(i=>{i.parentNode?.removeChild(i)})},MA=o=>{Array.from(o.querySelectorAll('b[style*="font-weight"]')).filter(i=>i.getAttribute("style")?.match(TA)).forEach(i=>{let t=o.createDocumentFragment();t.append(...i.childNodes),i.parentNode?.replaceChild(t,i)})};function Rf(o){o.querySelector('[id^="docs-internal-guid-"]')&&(MA(o),AA(o))}var LA=/\bmso-list:[^;]*ignore/i,qA=/\bmso-list:[^;]*\bl(\d+)/i,IA=/\bmso-list:[^;]*\blevel(\d+)/i,DA=(o,i)=>{let t=o.getAttribute("style"),r=t?.match(qA);if(!r)return null;let n=Number(r[1]),a=t?.match(IA),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),p=i.match(l),h=p&&p[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:o}},RA=o=>{let i=Array.from(o.querySelectorAll("[style*=mso-list]")),t=[],r=[];i.forEach(s=>{(s.getAttribute("style")||"").match(LA)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=o.documentElement.innerHTML,a=r.map(s=>DA(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let p=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,p.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(p,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function Nf(o){o.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&RA(o)}var NA=[Nf,Rf],OA=o=>{o.documentElement&&NA.forEach(i=>{i(o)})},Kz=OA;var PA=
|
|
2886
|
+
`);this.quill.updateContents(p,G.sources.USER),this.quill.setSelection(l,G.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(o,i){let{event:t,line:r}=i,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,G.sources.USER):this.quill.setSelection(n+r.length(),G.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(o,i){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=i.prefix,[r,n]=this.quill.getLine(o.index);if(n>t)return!0;let a;switch(i.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(o.index," ",G.sources.USER),this.quill.history.cutoff();let s=new Ir.default().retain(o.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,G.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(o.index-t,G.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(o){let[i,t]=this.quill.getLine(o.index),r=2,n=i;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new Ir.default().retain(o.index+i.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,G.sources.USER),this.quill.setSelection(o.index-1,G.sources.SILENT),!1}return!0}},"embed left":sh("ArrowLeft",!1),"embed left shift":sh("ArrowLeft",!0),"embed right":sh("ArrowRight",!1),"embed right shift":sh("ArrowRight",!0),"table down":Gz(!1),"table up":Gz(!0)}};yc.DEFAULTS=CA;function jz(o){return{key:"Tab",shiftKey:!o,format:{"code-block":!0},handler(i,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(i.length===0&&!r.shiftKey){this.quill.insertText(i.index,a,G.sources.USER),this.quill.setSelection(i.index+a.length,G.sources.SILENT);return}let s=i.length===0?this.quill.getLines(i.index,1):this.quill.getLines(i),{index:l,length:p}=i;s.forEach((h,m)=>{o?(h.insertAt(0,a),m===0?l+=a.length:p+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:p-=a.length)}),this.quill.update(G.sources.USER),this.quill.setSelection(l,p,G.sources.SILENT)}}}function sh(o,i){return{key:o,shiftKey:i,altKey:null,[o==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;o==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof wt?(o==="ArrowLeft"?i?this.quill.setSelection(r.index-1,r.length+1,G.sources.USER):this.quill.setSelection(r.index-1,G.sources.USER):i?this.quill.setSelection(r.index,r.length+1,G.sources.USER):this.quill.setSelection(r.index+r.length+1,G.sources.USER),!1):!0}}}function Df(o){return{key:o[0],shortKey:!0,handler(i,t){this.quill.format(o,!t.format[o],G.sources.USER)}}}function Gz(o){return{key:o?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(i,t){let r=o?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let p=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(p,0,G.sources.USER)}}else{let s=n.table()[r];s!=null&&(o?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,G.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,G.sources.USER))}return!1}}}function SA(o){if(typeof o=="string"||typeof o=="number")o={key:o};else if(typeof o=="object")o=qn(o);else return null;return o.shortKey&&(o[kA]=o.shortKey,delete o.shortKey),o}function xc(o){let{quill:i,range:t}=o,r=i.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=Ir.AttributeMap.diff(s,a)||{}}i.deleteText(t,G.sources.USER),Object.keys(n).length>0&&i.formatLine(t.index,1,n,G.sources.USER),i.setSelection(t.index,G.sources.SILENT)}function EA(o,i,t,r){return i.prev==null&&i.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:i.prev==null?-1:i.next==null?1:null}var TA=/font-weight:\s*normal/,$A=["P","OL","UL"],Wz=o=>o&&$A.includes(o.tagName),AA=o=>{Array.from(o.querySelectorAll("br")).filter(i=>Wz(i.previousElementSibling)&&Wz(i.nextElementSibling)).forEach(i=>{i.parentNode?.removeChild(i)})},MA=o=>{Array.from(o.querySelectorAll('b[style*="font-weight"]')).filter(i=>i.getAttribute("style")?.match(TA)).forEach(i=>{let t=o.createDocumentFragment();t.append(...i.childNodes),i.parentNode?.replaceChild(t,i)})};function Rf(o){o.querySelector('[id^="docs-internal-guid-"]')&&(MA(o),AA(o))}var LA=/\bmso-list:[^;]*ignore/i,qA=/\bmso-list:[^;]*\bl(\d+)/i,IA=/\bmso-list:[^;]*\blevel(\d+)/i,DA=(o,i)=>{let t=o.getAttribute("style"),r=t?.match(qA);if(!r)return null;let n=Number(r[1]),a=t?.match(IA),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),p=i.match(l),h=p&&p[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:o}},RA=o=>{let i=Array.from(o.querySelectorAll("[style*=mso-list]")),t=[],r=[];i.forEach(s=>{(s.getAttribute("style")||"").match(LA)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=o.documentElement.innerHTML,a=r.map(s=>DA(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let p=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,p.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(p,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function Nf(o){o.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&RA(o)}var NA=[Nf,Rf],OA=o=>{o.documentElement&&NA.forEach(i=>{i(o)})},Kz=OA;var PA=_i("quill:clipboard"),HA=[[Node.TEXT_NODE,JA],[Node.TEXT_NODE,Qz],["br",jA],[Node.ELEMENT_NODE,Qz],[Node.ELEMENT_NODE,UA],[Node.ELEMENT_NODE,VA],[Node.ELEMENT_NODE,QA],["li",KA],["ol, ul",YA],["pre",GA],["tr",XA],["b",Of("bold")],["i",Of("italic")],["strike",Of("strike")],["style",WA]],FA=[Fz,ih].reduce((o,i)=>(o[i.keyName]=i,o),{}),Yz=[rh,vc,bc,nh,oh,ah].reduce((o,i)=>(o[i.keyName]=i,o),{}),wc=class extends mt{constructor(i,t){super(i,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],HA.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(i,t){this.matchers.push([i,t])}convert(i){let{html:t,text:r}=i,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[Rt.blotName])return new ai.default().insert(r||"",{[Rt.blotName]:n[Rt.blotName]});if(!t)return new ai.default().insert(r||"",n);let a=this.convertHTML(t);return zc(a,`
|
|
2883
2887
|
`)&&(a.ops[a.ops.length-1].attributes==null||n.table)?a.compose(new ai.default().retain(a.length()-1).delete(1)):a}normalizeHTML(i){Kz(i)}convertHTML(i){let t=new DOMParser().parseFromString(i,"text/html");this.normalizeHTML(t);let r=t.body,n=new WeakMap,[a,s]=this.prepareMatching(r,n);return ch(this.quill.scroll,r,a,s,n)}dangerouslyPasteHTML(i,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:G.sources.API;if(typeof i=="string"){let n=this.convert({html:i,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,G.sources.SILENT)}else{let n=this.convert({html:t,text:""});this.quill.updateContents(new ai.default().retain(i).concat(n),r),this.quill.setSelection(i+n.length(),G.sources.SILENT)}}onCaptureCopy(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i.defaultPrevented)return;i.preventDefault();let[r]=this.quill.selection.getRange();if(r==null)return;let{html:n,text:a}=this.onCopy(r,t);i.clipboardData?.setData("text/plain",a),i.clipboardData?.setData("text/html",n),t&&xc({range:r,quill:this.quill})}normalizeURIList(i){return i.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
|
|
2884
2888
|
`)}onCapturePaste(i){if(i.defaultPrevented||!this.quill.isEnabled())return;i.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=i.clipboardData?.getData("text/html"),n=i.clipboardData?.getData("text/plain");if(!r&&!n){let s=i.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(i.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(i){let t=this.quill.getText(i);return{html:this.quill.getSemanticHTML(i),text:t}}onPaste(i,t){let{text:r,html:n}=t,a=this.quill.getFormat(i.index),s=this.convert({text:r,html:n},a);PA.log("onPaste",s,{text:r,html:n});let l=new ai.default().retain(i.index).delete(i.length).concat(s);this.quill.updateContents(l,G.sources.USER),this.quill.setSelection(l.length()-i.length,G.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(i,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(i.querySelectorAll(s)).forEach(p=>{t.has(p)?t.get(p)?.push(l):t.set(p,[l])});break}}),[r,n]}};V(wc,"DEFAULTS",{matchers:[]});function Oa(o,i,t,r){return r.query(i)?o.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[i])return n.push(a);let s=t?{[i]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new ai.default):o}function zc(o,i){let t="";for(let r=o.ops.length-1;r>=0&&t.length<i.length;--r){let n=o.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*i.length)===i}function Uo(o,i){if(!(o instanceof Element))return!1;let t=i.query(o);return t&&t.prototype instanceof wt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(o.tagName.toLowerCase())}function BA(o,i){return o.previousElementSibling&&o.nextElementSibling&&!Uo(o.previousElementSibling,i)&&!Uo(o.nextElementSibling,i)}var lh=new WeakMap;function Xz(o){return o==null?!1:(lh.has(o)||(o.tagName==="PRE"?lh.set(o,!0):lh.set(o,Xz(o.parentNode))),lh.get(o))}function ch(o,i,t,r,n){return i.nodeType===i.TEXT_NODE?r.reduce((a,s)=>s(i,a,o),new ai.default):i.nodeType===i.ELEMENT_NODE?Array.from(i.childNodes||[]).reduce((a,s)=>{let l=ch(o,s,t,r,n);return s.nodeType===i.ELEMENT_NODE&&(l=t.reduce((p,h)=>h(s,p,o),l),l=(n.get(s)||[]).reduce((p,h)=>h(s,p,o),l)),a.concat(l)},new ai.default):new ai.default}function Of(o){return(i,t,r)=>Oa(t,o,!0,r)}function VA(o,i,t){let r=Vr.keys(o),n=Bt.keys(o),a=ni.keys(o),s={};return r.concat(n).concat(a).forEach(l=>{let p=t.query(l,X.ATTRIBUTE);p!=null&&(s[p.attrName]=p.value(o),s[p.attrName])||(p=FA[l],p!=null&&(p.attrName===l||p.keyName===l)&&(s[p.attrName]=p.value(o)||void 0),p=Yz[l],p!=null&&(p.attrName===l||p.keyName===l)&&(p=Yz[l],s[p.attrName]=p.value(o)||void 0))}),Object.entries(s).reduce((l,p)=>{let[h,m]=p;return Oa(l,h,m,t)},i)}function UA(o,i,t){let r=t.query(o);if(r==null)return i;if(r.prototype instanceof wt){let n={},a=r.value(o);if(a!=null)return n[r.blotName]=a,new ai.default().insert(n,r.formats(o,t))}else if(r.prototype instanceof Ra&&!zc(i,`
|
|
2885
2889
|
`)&&i.insert(`
|
|
@@ -2892,7 +2896,7 @@ ${Na(this.code(i,t))}
|
|
|
2892
2896
|
`);let n=t.query(r);if(n&&n.prototype instanceof Qt)return i.insert(`
|
|
2893
2897
|
`);r=r.firstChild}}}return i}function QA(o,i,t){let r={},n=o.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),i=Object.entries(r).reduce((a,s)=>{let[l,p]=s;return Oa(a,l,p,t)},i),parseFloat(n.textIndent||0)>0?new ai.default().insert(" ").concat(i):i}function XA(o,i,t){let r=o.parentElement?.tagName==="TABLE"?o.parentElement:o.parentElement?.parentElement;if(r!=null){let a=Array.from(r.querySelectorAll("tr")).indexOf(o)+1;return Oa(i,"table",a,t)}return i}function JA(o,i,t){let r=o.data;if(o.parentElement?.tagName==="O:P")return i.insert(r.trim());if(!Xz(o)){if(r.trim().length===0&&r.includes(`
|
|
2894
2898
|
`)&&!BA(o,t))return i;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(o.previousSibling==null&&o.parentElement!=null&&Uo(o.parentElement,t)||o.previousSibling instanceof Element&&Uo(o.previousSibling,t))&&(r=r.replace(/^ /,"")),(o.nextSibling==null&&o.parentElement!=null&&Uo(o.parentElement,t)||o.nextSibling instanceof Element&&Uo(o.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll("\xA0"," ")}return i.insert(r)}var _c=class extends mt{constructor(t,r){super(t,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(G.events.EDITOR_CHANGE,(n,a,s,l)=>{n===G.events.SELECTION_CHANGE?a&&l!==G.sources.SILENT&&(this.currentRange=a):n===G.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===G.sources.USER?this.record(a,s):this.transform(a)),this.currentRange=Pf(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;let n=this.stack[t].pop();if(!n)return;let a=this.quill.getContents(),s=n.delta.invert(a);this.stack[r].push({delta:s,range:Pf(n.range,s)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,G.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let n=t.invert(r),a=this.currentRange,s=Date.now();if(this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0){let l=this.stack.undo.pop();l&&(n=n.compose(l.delta),a=l.range)}else this.lastRecorded=s;n.length()!==0&&(this.stack.undo.push({delta:n,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){Jz(this.stack.undo,t),Jz(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,G.sources.USER);else{let r=eM(this.quill.scroll,t.delta);this.quill.setSelection(r,G.sources.USER)}}};V(_c,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Jz(o,i){let t=i;for(let r=o.length-1;r>=0;r-=1){let n=o[r];o[r]={delta:t.transform(n.delta,!0),range:n.range&&Pf(n.range,t)},t=n.delta.transform(t),o[r].delta.length()===0&&o.splice(r,1)}}function ZA(o,i){let t=i.ops[i.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
|
|
2895
|
-
`):t.attributes!=null?Object.keys(t.attributes).some(r=>o.query(r,X.BLOCK)!=null):!1}function eM(o,i){let t=i.reduce((n,a)=>n+(a.delete||0),0),r=i.length()-t;return ZA(o,i)&&(r-=1),r}function Pf(o,i){if(!o)return o;let t=i.transformPosition(o.index),r=i.transformPosition(o.index+o.length);return{index:t,length:r-t}}var Zz=_r(ei(),1);var dh=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&i.selection.normalizeNative(n);if(a){let s=i.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(i,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,i,r)}};dh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(o,i){if(!this.quill.scroll.query("image"))return;let t=i.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new Zz.default().retain(o.index).delete(o.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(o.index+r.length,J.sources.SILENT)})}};var e_=dh;var jo=_r(ei(),1);var t_=_r(ei(),1);var tM=["insertText","insertReplacementText"],Hf=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||i.on(G.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(i){xc({range:i,quill:this.quill})}replaceText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(i.length===0)return!1;if(t){let r=this.quill.getFormat(i.index,1);this.deleteRange(i),this.quill.updateContents(new t_.default().retain(i.index).insert(t,r),G.sources.USER)}else this.deleteRange(i);return this.quill.setSelection(i.index+t.length,0,G.sources.SILENT),!0}handleBeforeInput(i){if(this.quill.composition.isComposing||i.defaultPrevented||!tM.includes(i.inputType))return;let t=i.getTargetRanges?i.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=rM(i);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&i.preventDefault()}handleCompositionStart(){let i=this.quill.getSelection();i&&this.replaceText(i)}};function rM(o){return typeof o.data=="string"?o.data:o.dataTransfer?.types.includes("text/plain")?o.dataTransfer.getData("text/plain"):null}var r_=Hf;var iM=/Mac/i.test(navigator.platform),nM=100,oM=o=>!!(o.key==="ArrowLeft"||o.key==="ArrowRight"||o.key==="ArrowUp"||o.key==="ArrowDown"||o.key==="Home"||iM&&o.key==="a"&&o.ctrlKey===!0),Ff=class extends mt{constructor(t,r){super(t,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof ii)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),G.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&oM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+nM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof ii)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},i_=Ff;G.register({"blots/block":Qe,"blots/block/embed":Qt,"blots/break":Mr,"blots/container":Hi,"blots/cursor":Fo,"blots/embed":Ws,"blots/inline":Lr,"blots/scroll":Hz,"blots/text":Dt,"modules/clipboard":wc,"modules/history":_c,"modules/keyboard":yc,"modules/uploader":e_,"modules/input":r_,"modules/uiNode":i_});var ph=G;var Bf=class extends Bt{add(i,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(i)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(i),!0):super.add(i,r.toString())}canAdd(i,t){return super.canAdd(i,t)||super.canAdd(i,parseInt(t,10))}value(i){return parseInt(super.value(i),10)||void 0}},aM=new Bf("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),n_=aM;var kc=class extends Qe{};V(kc,"blotName","blockquote"),V(kc,"tagName","blockquote");var o_=kc;var Cc=class extends Qe{static formats(i){return this.tagName.indexOf(i.tagName)+1}};V(Cc,"blotName","header"),V(Cc,"tagName",["H1","H2","H3","H4","H5","H6"]);var a_=Cc;var Pa=class extends Hi{};Pa.blotName="list-container";Pa.tagName="OL";var Go=class extends Qe{static create(i){let t=super.create();return t.setAttribute("data-list",i),t}static formats(i){return i.getAttribute("data-list")||void 0}static register(){G.register(Pa)}constructor(i,t){super(i,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!i.isEnabled())return;let s=this.statics.formats(t,i);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(i,t)}};Go.blotName="list";Go.tagName="LI";Pa.allowedChildren=[Go];Go.requiredContainer=Pa;var Sc=class extends Lr{static create(){return super.create()}static formats(){return!0}optimize(i){super.optimize(i),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};V(Sc,"blotName","bold"),V(Sc,"tagName",["STRONG","B"]);var Xs=Sc;var Ec=class extends Xs{};V(Ec,"blotName","italic"),V(Ec,"tagName",["EM","I"]);var s_=Ec;var _i=class extends Lr{static create(i){let t=super.create(i);return t.setAttribute("href",this.sanitize(i)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(i){return i.getAttribute("href")}static sanitize(i){return Vf(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}format(i,t){i!==this.statics.blotName||!t?super.format(i,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};V(_i,"blotName","link"),V(_i,"tagName","A"),V(_i,"SANITIZED_URL","about:blank"),V(_i,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Vf(o,i){let t=document.createElement("a");t.href=o;let r=t.href.slice(0,t.href.indexOf(":"));return i.indexOf(r)>-1}var Tc=class extends Lr{static create(i){return i==="super"?document.createElement("sup"):i==="sub"?document.createElement("sub"):super.create(i)}static formats(i){if(i.tagName==="SUB")return"sub";if(i.tagName==="SUP")return"super"}};V(Tc,"blotName","script"),V(Tc,"tagName",["SUB","SUP"]);var l_=Tc;var $c=class extends Xs{};V($c,"blotName","strike"),V($c,"tagName",["S","STRIKE"]);var c_=$c;var Ac=class extends Lr{};V(Ac,"blotName","underline"),V(Ac,"tagName","U");var d_=Ac;var Js=class extends Ws{static create(i){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(i);return typeof i=="string"&&(window.katex.render(i,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",i)),t}static value(i){return i.getAttribute("data-value")}html(){let{formula:i}=this.value();return`<span>${i}</span>`}};V(Js,"blotName","formula"),V(Js,"className","ql-formula"),V(Js,"tagName","SPAN");var p_=Js;var h_=["alt","height","width"],Mc=class extends wt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("src",this.sanitize(i)),t}static formats(i){return h_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static match(i){return/\.(jpe?g|gif|png)$/.test(i)||/^data:image\/.+;base64/.test(i)}static sanitize(i){return Vf(i,["http","https","data"])?i:"//:0"}static value(i){return i.getAttribute("src")}format(i,t){h_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}};V(Mc,"blotName","image"),V(Mc,"tagName","IMG");var u_=Mc;var m_=["height","width"],Zs=class extends Qt{static create(i){let t=super.create(i);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(i)),t}static formats(i){return m_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static sanitize(i){return _i.sanitize(i)}static value(i){return i.getAttribute("src")}format(i,t){m_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}html(){let{video:i}=this.value();return`<a href="${i}">${i}</a>`}};V(Zs,"blotName","video"),V(Zs,"className","ql-video"),V(Zs,"tagName","IFRAME");var f_=Zs;var hh=_r(ei(),1);var Lc=new Bt("code-token","hljs",{scope:X.INLINE}),so=class o extends Lr{static formats(i,t){for(;i!=null&&i!==t.domNode;){if(i.classList&&i.classList.contains(Rt.className))return super.formats(i,t);i=i.parentNode}}constructor(i,t,r){super(i,t,r),Lc.add(this.domNode,r)}format(i,t){i!==o.blotName?super.format(i,t):t?Lc.add(this.domNode,t):(Lc.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Lc.value(this.domNode)||this.unwrap()}};so.blotName="code-token";so.className="ql-token";var si=class extends Rt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("data-language",i),t}static formats(i){return i.getAttribute("data-language")||"plain"}static register(){}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(i,t)}replaceWith(i,t){return this.formatAt(0,this.length(),so.blotName,!1),super.replaceWith(i,t)}},Ha=class extends Dn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(i,t){i===si.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(i,t)}))}formatAt(i,t,r,n){r===si.blotName&&(this.forceNext=!0),super.formatAt(i,t,r,n)}highlight(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
|
|
2899
|
+
`):t.attributes!=null?Object.keys(t.attributes).some(r=>o.query(r,X.BLOCK)!=null):!1}function eM(o,i){let t=i.reduce((n,a)=>n+(a.delete||0),0),r=i.length()-t;return ZA(o,i)&&(r-=1),r}function Pf(o,i){if(!o)return o;let t=i.transformPosition(o.index),r=i.transformPosition(o.index+o.length);return{index:t,length:r-t}}var Zz=_r(ei(),1);var dh=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&i.selection.normalizeNative(n);if(a){let s=i.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(i,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,i,r)}};dh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(o,i){if(!this.quill.scroll.query("image"))return;let t=i.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new Zz.default().retain(o.index).delete(o.length));this.quill.updateContents(n,J.sources.USER),this.quill.setSelection(o.index+r.length,J.sources.SILENT)})}};var e_=dh;var jo=_r(ei(),1);var t_=_r(ei(),1);var tM=["insertText","insertReplacementText"],Hf=class extends mt{constructor(i,t){super(i,t),i.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||i.on(G.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(i){xc({range:i,quill:this.quill})}replaceText(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(i.length===0)return!1;if(t){let r=this.quill.getFormat(i.index,1);this.deleteRange(i),this.quill.updateContents(new t_.default().retain(i.index).insert(t,r),G.sources.USER)}else this.deleteRange(i);return this.quill.setSelection(i.index+t.length,0,G.sources.SILENT),!0}handleBeforeInput(i){if(this.quill.composition.isComposing||i.defaultPrevented||!tM.includes(i.inputType))return;let t=i.getTargetRanges?i.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=rM(i);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&i.preventDefault()}handleCompositionStart(){let i=this.quill.getSelection();i&&this.replaceText(i)}};function rM(o){return typeof o.data=="string"?o.data:o.dataTransfer?.types.includes("text/plain")?o.dataTransfer.getData("text/plain"):null}var r_=Hf;var iM=/Mac/i.test(navigator.platform),nM=100,oM=o=>!!(o.key==="ArrowLeft"||o.key==="ArrowRight"||o.key==="ArrowUp"||o.key==="ArrowDown"||o.key==="Home"||iM&&o.key==="a"&&o.ctrlKey===!0),Ff=class extends mt{constructor(t,r){super(t,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof ii)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),G.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&oM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+nM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof ii)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},i_=Ff;G.register({"blots/block":Qe,"blots/block/embed":Qt,"blots/break":Mr,"blots/container":Fi,"blots/cursor":Fo,"blots/embed":Ws,"blots/inline":Lr,"blots/scroll":Hz,"blots/text":Dt,"modules/clipboard":wc,"modules/history":_c,"modules/keyboard":yc,"modules/uploader":e_,"modules/input":r_,"modules/uiNode":i_});var ph=G;var Bf=class extends Bt{add(i,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(i)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(i),!0):super.add(i,r.toString())}canAdd(i,t){return super.canAdd(i,t)||super.canAdd(i,parseInt(t,10))}value(i){return parseInt(super.value(i),10)||void 0}},aM=new Bf("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),n_=aM;var kc=class extends Qe{};V(kc,"blotName","blockquote"),V(kc,"tagName","blockquote");var o_=kc;var Cc=class extends Qe{static formats(i){return this.tagName.indexOf(i.tagName)+1}};V(Cc,"blotName","header"),V(Cc,"tagName",["H1","H2","H3","H4","H5","H6"]);var a_=Cc;var Pa=class extends Fi{};Pa.blotName="list-container";Pa.tagName="OL";var Go=class extends Qe{static create(i){let t=super.create();return t.setAttribute("data-list",i),t}static formats(i){return i.getAttribute("data-list")||void 0}static register(){G.register(Pa)}constructor(i,t){super(i,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!i.isEnabled())return;let s=this.statics.formats(t,i);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(i,t)}};Go.blotName="list";Go.tagName="LI";Pa.allowedChildren=[Go];Go.requiredContainer=Pa;var Sc=class extends Lr{static create(){return super.create()}static formats(){return!0}optimize(i){super.optimize(i),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};V(Sc,"blotName","bold"),V(Sc,"tagName",["STRONG","B"]);var Xs=Sc;var Ec=class extends Xs{};V(Ec,"blotName","italic"),V(Ec,"tagName",["EM","I"]);var s_=Ec;var ki=class extends Lr{static create(i){let t=super.create(i);return t.setAttribute("href",this.sanitize(i)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(i){return i.getAttribute("href")}static sanitize(i){return Vf(i,this.PROTOCOL_WHITELIST)?i:this.SANITIZED_URL}format(i,t){i!==this.statics.blotName||!t?super.format(i,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};V(ki,"blotName","link"),V(ki,"tagName","A"),V(ki,"SANITIZED_URL","about:blank"),V(ki,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Vf(o,i){let t=document.createElement("a");t.href=o;let r=t.href.slice(0,t.href.indexOf(":"));return i.indexOf(r)>-1}var Tc=class extends Lr{static create(i){return i==="super"?document.createElement("sup"):i==="sub"?document.createElement("sub"):super.create(i)}static formats(i){if(i.tagName==="SUB")return"sub";if(i.tagName==="SUP")return"super"}};V(Tc,"blotName","script"),V(Tc,"tagName",["SUB","SUP"]);var l_=Tc;var $c=class extends Xs{};V($c,"blotName","strike"),V($c,"tagName",["S","STRIKE"]);var c_=$c;var Ac=class extends Lr{};V(Ac,"blotName","underline"),V(Ac,"tagName","U");var d_=Ac;var Js=class extends Ws{static create(i){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(i);return typeof i=="string"&&(window.katex.render(i,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",i)),t}static value(i){return i.getAttribute("data-value")}html(){let{formula:i}=this.value();return`<span>${i}</span>`}};V(Js,"blotName","formula"),V(Js,"className","ql-formula"),V(Js,"tagName","SPAN");var p_=Js;var h_=["alt","height","width"],Mc=class extends wt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("src",this.sanitize(i)),t}static formats(i){return h_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static match(i){return/\.(jpe?g|gif|png)$/.test(i)||/^data:image\/.+;base64/.test(i)}static sanitize(i){return Vf(i,["http","https","data"])?i:"//:0"}static value(i){return i.getAttribute("src")}format(i,t){h_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}};V(Mc,"blotName","image"),V(Mc,"tagName","IMG");var u_=Mc;var m_=["height","width"],Zs=class extends Qt{static create(i){let t=super.create(i);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(i)),t}static formats(i){return m_.reduce((t,r)=>(i.hasAttribute(r)&&(t[r]=i.getAttribute(r)),t),{})}static sanitize(i){return ki.sanitize(i)}static value(i){return i.getAttribute("src")}format(i,t){m_.indexOf(i)>-1?t?this.domNode.setAttribute(i,t):this.domNode.removeAttribute(i):super.format(i,t)}html(){let{video:i}=this.value();return`<a href="${i}">${i}</a>`}};V(Zs,"blotName","video"),V(Zs,"className","ql-video"),V(Zs,"tagName","IFRAME");var f_=Zs;var hh=_r(ei(),1);var Lc=new Bt("code-token","hljs",{scope:X.INLINE}),so=class o extends Lr{static formats(i,t){for(;i!=null&&i!==t.domNode;){if(i.classList&&i.classList.contains(Rt.className))return super.formats(i,t);i=i.parentNode}}constructor(i,t,r){super(i,t,r),Lc.add(this.domNode,r)}format(i,t){i!==o.blotName?super.format(i,t):t?Lc.add(this.domNode,t):(Lc.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Lc.value(this.domNode)||this.unwrap()}};so.blotName="code-token";so.className="ql-token";var si=class extends Rt{static create(i){let t=super.create(i);return typeof i=="string"&&t.setAttribute("data-language",i),t}static formats(i){return i.getAttribute("data-language")||"plain"}static register(){}format(i,t){i===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(i,t)}replaceWith(i,t){return this.formatAt(0,this.length(),so.blotName,!1),super.replaceWith(i,t)}},Ha=class extends Dn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(i,t){i===si.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(i,t)}))}formatAt(i,t,r,n){r===si.blotName&&(this.forceNext=!0),super.formatAt(i,t,r,n)}highlight(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
|
|
2896
2900
|
`)}
|
|
2897
2901
|
`,a=si.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let s=this.children.reduce((p,h)=>p.concat(cf(h,!1)),new hh.default),l=i(n,a);s.diff(l).reduce((p,h)=>{let{retain:m,attributes:f}=h;return m?(f&&Object.keys(f).forEach(b=>{[si.blotName,so.blotName].includes(b)&&this.formatAt(p,m,b,f[b])}),p+m):p},0)}this.cachedText=n,this.forceNext=!1}}html(i,t){let[r]=this.children.find(i);return`<pre data-language="${r?si.formats(r.domNode):"plain"}">
|
|
2898
2902
|
${Na(this.code(i,t))}
|
|
@@ -2900,9 +2904,9 @@ ${Na(this.code(i,t))}
|
|
|
2900
2904
|
`).reduce((n,a,s)=>(s!==0&&n.insert(`
|
|
2901
2905
|
`,{[Rt.blotName]:t}),n.insert(a)),new hh.default);let r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Rt.className),r.innerHTML=sM(this.options.hljs,t,i),ch(this.quill.scroll,r,[(n,a)=>{let s=Lc.value(n);return s?a.compose(new hh.default().retain(a.length(),{[so.blotName]:s})):a}],[(n,a)=>n.data.split(`
|
|
2902
2906
|
`).reduce((s,l,p)=>(p!==0&&s.insert(`
|
|
2903
|
-
`,{[Rt.blotName]:t}),s.insert(l)),a)],new WeakMap)}};qc.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};var g_=_r(ei(),1);var Ic=class Ic extends Qe{static create(i){let t=super.create();return i?t.setAttribute("data-row",i):t.setAttribute("data-row",uh()),t}static formats(i){if(i.hasAttribute("data-row"))return i.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(i,t){i===Ic.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(i,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};V(Ic,"blotName","table"),V(Ic,"tagName","TD");var
|
|
2904
|
-
`).join("");return a.insert(s,{table:uh()})},new g_.default().retain(r.index));this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(r.index,G.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(G.events.SCROLL_OPTIMIZE,i=>{i.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(G.events.TEXT_CHANGE,(r,n,a)=>{a===G.sources.USER&&this.balanceTables()}),!0):!1)})}},b_=Uf;var x_=_r(ei(),1);var v_=zi("quill:toolbar"),Wo=class extends mt{constructor(i,t){if(super(i,t),Array.isArray(this.options.container)){let r=document.createElement("div");r.setAttribute("role","toolbar"),lM(r,this.options.container),i.container?.parentNode?.insertBefore(r,i.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){v_.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{let n=this.options.handlers?.[r];n&&this.addHandler(r,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(G.events.EDITOR_CHANGE,()=>{let[r]=this.quill.selection.getRange();this.update(r)})}addHandler(i,t){this.handlers[i]=t}attach(i){let t=Array.from(i.classList).find(n=>n.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),i.tagName==="BUTTON"&&i.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){v_.warn("ignoring attaching to nonexistent format",t,i);return}let r=i.tagName==="SELECT"?"change":"click";i.addEventListener(r,n=>{let a;if(i.tagName==="SELECT"){if(i.selectedIndex<0)return;let l=i.options[i.selectedIndex];l.hasAttribute("selected")?a=!1:a=l.value||!1}else i.classList.contains("ql-active")?a=!1:a=i.value||!i.hasAttribute("value"),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof wt){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new x_.default().retain(s.index).delete(s.length).insert({[t]:a}),G.sources.USER)}else this.quill.format(t,a,G.sources.USER);this.update(s)}),this.controls.push([t,i])}update(i){let t=i==null?{}:this.quill.getFormat(i);this.controls.forEach(r=>{let[n,a]=r;if(a.tagName==="SELECT"){let s=null;if(i==null)s=null;else if(t[n]==null)s=a.querySelector("option[selected]");else if(!Array.isArray(t[n])){let l=t[n];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),s=a.querySelector(`option[value="${l}"]`)}s==null?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(i==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){let s=t[n],l=s===a.getAttribute("value")||s!=null&&s.toString()===a.getAttribute("value")||s==null&&!a.getAttribute("value");a.classList.toggle("ql-active",l),a.setAttribute("aria-pressed",l.toString())}else{let s=t[n]!=null;a.classList.toggle("ql-active",s),a.setAttribute("aria-pressed",s.toString())}})}};Wo.DEFAULTS={};function y_(o,i,t){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${i}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${i}: ${t}`)):r.setAttribute("aria-label",i),o.appendChild(r)}function lM(o,i){Array.isArray(i[0])||(i=[i]),i.forEach(t=>{let r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(n=>{if(typeof n=="string")y_(r,n);else{let a=Object.keys(n)[0],s=n[a];Array.isArray(s)?cM(r,a,s):y_(r,a,s)}}),o.appendChild(r)})}function cM(o,i,t){let r=document.createElement("select");r.classList.add(`ql-${i}`),t.forEach(n=>{let a=document.createElement("option");n!==!1?a.setAttribute("value",String(n)):a.setAttribute("selected","selected"),r.appendChild(a)}),o.appendChild(r)}Wo.DEFAULTS={container:null,handlers:{clean(){let o=this.quill.getSelection();if(o!=null)if(o.length===0){let i=this.quill.getFormat();Object.keys(i).forEach(t=>{this.quill.scroll.query(t,X.INLINE)!=null&&this.quill.format(t,!1,G.sources.USER)})}else this.quill.removeFormat(o.index,o.length,G.sources.USER)},direction(o){let{align:i}=this.quill.getFormat();o==="rtl"&&i==null?this.quill.format("align","right",G.sources.USER):!o&&i==="right"&&this.quill.format("align",!1,G.sources.USER),this.quill.format("direction",o,G.sources.USER)},indent(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i),r=parseInt(t.indent||0,10);if(o==="+1"||o==="-1"){let n=o==="+1"?1:-1;t.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,G.sources.USER)}},link(o){o===!0&&(o=prompt("Enter link URL:")),this.quill.format("link",o,G.sources.USER)},list(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i);o==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,G.sources.USER):this.quill.format("list","unchecked",G.sources.USER):this.quill.format("list",o,G.sources.USER)}}};var dM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',pM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',hM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',uM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',mM='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',fM='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',gM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',bM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',w_='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',vM='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',yM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',xM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',wM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',zM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',_M='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',kM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',CM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',SM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',EM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',TM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',$M='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',AM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',MM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',LM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',qM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',IM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',DM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',RM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',NM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',OM='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',PM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',HM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',FM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ko={align:{"":dM,center:pM,right:hM,justify:uM},background:mM,blockquote:fM,bold:gM,clean:bM,code:w_,"code-block":w_,color:vM,direction:{"":yM,rtl:xM},formula:wM,header:{1:zM,2:_M,3:kM,4:CM,5:SM,6:EM},italic:TM,image:$M,indent:{"+1":AM,"-1":MM},link:LM,list:{bullet:qM,check:IM,ordered:DM},script:{sub:RM,super:NM},strike:OM,table:PM,underline:HM,video:FM};var BM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',z_=0;function __(o,i){o.setAttribute(i,`${o.getAttribute(i)!=="true"}`)}var jf=class{constructor(i){this.select=i,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),__(this.label,"aria-expanded"),__(this.options,"aria-hidden")}buildItem(i){let t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");let r=i.getAttribute("value");return r&&t.setAttribute("data-value",r),i.textContent&&t.setAttribute("data-label",i.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(t,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),t}buildLabel(){let i=document.createElement("span");return i.classList.add("ql-picker-label"),i.innerHTML=BM,i.tabIndex="0",i.setAttribute("role","button"),i.setAttribute("aria-expanded","false"),this.container.appendChild(i),i}buildOptions(){let i=document.createElement("span");i.classList.add("ql-picker-options"),i.setAttribute("aria-hidden","true"),i.tabIndex="-1",i.id=`ql-picker-options-${z_}`,z_+=1,this.label.setAttribute("aria-controls",i.id),this.options=i,Array.from(this.select.options).forEach(t=>{let r=this.buildItem(t);i.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(i)}buildPicker(){Array.from(this.select.attributes).forEach(i=>{this.container.setAttribute(i.name,i.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.container.querySelector(".ql-selected");i!==r&&(r?.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=Array.from(i.parentNode.children).indexOf(i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let i;if(this.select.selectedIndex>-1){let r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);let t=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Yo=jf;var Gf=class extends Yo{constructor(i,t){super(i),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(i){let t=super.buildItem(i);return t.style.backgroundColor=i.getAttribute("value")||"",t}selectItem(i,t){super.selectItem(i,t);let r=this.label.querySelector(".ql-color-label"),n=i&&i.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=n:r.style.fill=n)}},mh=Gf;var Wf=class extends Yo{constructor(i,t){super(i),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(i,t){super.selectItem(i,t);let r=i||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}},fh=Wf;var VM=o=>{let{overflowY:i}=getComputedStyle(o,null);return i!=="visible"&&i!=="clip"},Kf=class{constructor(i,t){this.quill=i,this.boundsContainer=t||document.body,this.root=i.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,VM(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(i){let t=i.left+i.width/2-this.root.offsetWidth/2,r=i.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),s=0;if(a.right>n.right&&(s=n.right-a.right,this.root.style.left=`${t+s}px`),a.left<n.left&&(s=n.left-a.left,this.root.style.left=`${t+s}px`),a.bottom>n.bottom){let l=a.bottom-a.top,p=i.bottom-i.top+l;this.root.style.top=`${r-p}px`,this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},gh=Kf;var UM=[!1,"center","right","justify"],jM=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],GM=[!1,"serif","monospace"],WM=["1","2","3",!1],KM=["small",!1,"large","huge"],co=class extends Ks{constructor(i,t){super(i,t);let r=n=>{if(!document.body.contains(i.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(n.target)||a.close()})};i.emitter.listenDOM("click",document.body,r)}addModule(i){let t=super.addModule(i);return i==="toolbar"&&this.extendToolbar(t),t}buildButtons(i,t){Array.from(i).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{let s=r.value||"";s!=null&&t[a][s]&&(r.innerHTML=t[a][s])}})})}buildPickers(i,t){this.pickers=Array.from(i).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&Dc(n,UM),typeof t.align=="object"))return new fh(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let a=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&Dc(n,jM,a==="background"?"#ffffff":"#000000"),new mh(n,t[a])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Dc(n,GM):n.classList.contains("ql-header")?Dc(n,WM):n.classList.contains("ql-size")&&Dc(n,KM)),new Yo(n)});let r=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(J.events.EDITOR_CHANGE,r)}};co.DEFAULTS=ri({},Ks.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let o=this.container.querySelector("input.ql-image[type=file]");o==null&&(o=document.createElement("input"),o.setAttribute("type","file"),o.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),o.classList.add("ql-image"),o.addEventListener("change",()=>{let i=this.quill.getSelection(!0);this.quill.uploader.upload(i,o.files),o.value=""}),this.container.appendChild(o)),o.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var el=class extends gh{constructor(i,t){super(i,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",i=>{i.key==="Enter"?(this.save(),i.preventDefault()):i.key==="Escape"&&(this.cancel(),i.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:i!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${i}`)||""),this.root.setAttribute("data-mode",i)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:i}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",i,J.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",i,J.sources.USER)),this.quill.root.scrollTop=t;break}case"video":i=YM(i);case"formula":{if(!i)break;let t=this.quill.getSelection(!0);if(t!=null){let r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),i,J.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",J.sources.USER),this.quill.setSelection(r+2,J.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function YM(o){let i=o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return i?`${i[1]||"https"}://www.youtube.com/embed/${i[2]}?showinfo=0`:(i=o.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${i[1]||"https"}://player.vimeo.com/video/${i[2]}/`:o}function Dc(o,i){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;i.forEach(r=>{let n=document.createElement("option");r===t?n.setAttribute("selected","selected"):n.setAttribute("value",String(r)),o.appendChild(n)})}var QM=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],bh=class extends el{constructor(i,t){super(i,t),this.quill.on(J.events.EDITOR_CHANGE,(r,n,a,s)=>{if(r===J.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&s===J.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let l=this.quill.getLines(n.index,n.length);if(l.length===1){let p=this.quill.getBounds(n);p!=null&&this.position(p)}else{let p=l[l.length-1],h=this.quill.getIndex(p),m=Math.min(p.length()-1,n.index+n.length-h),f=this.quill.getBounds(new jr(h,m));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(J.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let i=this.quill.getSelection();if(i!=null){let t=this.quill.getBounds(i);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(i){let t=super.position(i),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}};V(bh,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var Rc=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=QM),super(i,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(i){this.tooltip=new bh(this.quill,this.options.bounds),i.container!=null&&(this.tooltip.root.appendChild(i.container),this.buildButtons(i.container.querySelectorAll("button"),Ko),this.buildPickers(i.container.querySelectorAll("select"),Ko))}};Rc.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){o?this.quill.theme.tooltip.edit():this.quill.format("link",!1,G.sources.USER)}}}}});var XM=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],vh=class extends el{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,J.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(J.events.SELECTION_CHANGE,(t,r,n)=>{if(t!=null){if(t.length===0&&n===J.sources.USER){let[a,s]=this.quill.scroll.descendant(_i,t.index);if(a!=null){this.linkRange=new jr(t.index-s,a.length());let l=_i.formats(a.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();let p=this.quill.getBounds(this.linkRange);p!=null&&this.position(p);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};V(vh,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var yh=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=XM),super(i,t),this.quill.container.classList.add("ql-snow")}extendToolbar(i){i.container!=null&&(i.container.classList.add("ql-snow"),this.buildButtons(i.container.querySelectorAll("button"),Ko),this.buildPickers(i.container.querySelectorAll("select"),Ko),this.tooltip=new vh(this.quill,this.options.bounds),i.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{i.handlers.link.call(i,!r.format.link)}))}};yh.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){if(o){let i=this.quill.getSelection();if(i==null||i.length===0)return;let t=this.quill.getText(i);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);let{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,G.sources.USER)}}}}});var k_=yh;ph.register({"attributors/attribute/direction":ih,"attributors/class/align":$f,"attributors/class/background":Vz,"attributors/class/color":Bz,"attributors/class/direction":Mf,"attributors/class/font":qf,"attributors/class/size":If,"attributors/style/align":rh,"attributors/style/background":vc,"attributors/style/color":bc,"attributors/style/direction":nh,"attributors/style/font":oh,"attributors/style/size":ah},!0);ph.register({"formats/align":$f,"formats/direction":Mf,"formats/indent":n_,"formats/background":vc,"formats/color":bc,"formats/font":qf,"formats/size":If,"formats/blockquote":o_,"formats/code-block":Rt,"formats/header":a_,"formats/list":Go,"formats/bold":Xs,"formats/code":Qs,"formats/italic":s_,"formats/link":_i,"formats/script":l_,"formats/strike":c_,"formats/underline":d_,"formats/formula":p_,"formats/image":u_,"formats/video":f_,"modules/syntax":qc,"modules/table":b_,"modules/toolbar":Wo,"themes/bubble":Rc,"themes/snow":k_,"ui/icons":Ko,"ui/picker":Yo,"ui/icon-picker":fh,"ui/color-picker":mh,"ui/tooltip":gh},!0);var ce=ph;var Ci=class extends k{render(){return u`
|
|
2905
|
-
<div style="display: none;"></div>`}};c([d()],
|
|
2907
|
+
`,{[Rt.blotName]:t}),s.insert(l)),a)],new WeakMap)}};qc.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};var g_=_r(ei(),1);var Ic=class Ic extends Qe{static create(i){let t=super.create();return i?t.setAttribute("data-row",i):t.setAttribute("data-row",uh()),t}static formats(i){if(i.hasAttribute("data-row"))return i.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(i,t){i===Ic.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(i,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};V(Ic,"blotName","table"),V(Ic,"tagName","TD");var Vi=Ic,Ui=class extends Fi{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let i=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),n=this.next.children.tail.formats();return i.table===t.table&&i.table===r.table&&i.table===n.table}return!1}optimize(i){super.optimize(i),this.children.forEach(t=>{if(t.next==null)return;let r=t.formats(),n=t.next.formats();if(r.table!==n.table){let a=this.splitAfter(t);a&&a.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}};V(Ui,"blotName","table-row"),V(Ui,"tagName","TR");var Ci=class extends Fi{};V(Ci,"blotName","table-body"),V(Ci,"tagName","TBODY");var lo=class extends Fi{balanceCells(){let i=this.descendants(Ui),t=i.reduce((r,n)=>Math.max(n.children.length,r),0);i.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let n;r.children.head!=null&&(n=Vi.formats(r.children.head.domNode));let a=this.scroll.create(Vi.blotName,n);r.appendChild(a),a.optimize()})})}cells(i){return this.rows().map(t=>t.children.at(i))}deleteColumn(i){let[t]=this.descendant(Ci);t==null||t.children.head==null||t.children.forEach(r=>{let n=r.children.at(i);n?.remove()})}insertColumn(i){let[t]=this.descendant(Ci);t==null||t.children.head==null||t.children.forEach(r=>{let n=r.children.at(i),a=Vi.formats(r.children.head.domNode),s=this.scroll.create(Vi.blotName,a);r.insertBefore(s,n)})}insertRow(i){let[t]=this.descendant(Ci);if(t==null||t.children.head==null)return;let r=uh(),n=this.scroll.create(Ui.blotName);t.children.head.children.forEach(()=>{let s=this.scroll.create(Vi.blotName,r);n.appendChild(s)});let a=t.children.at(i);t.insertBefore(n,a)}rows(){let i=this.children.head;return i==null?[]:i.children.map(t=>t)}};V(lo,"blotName","table-container"),V(lo,"tagName","TABLE");lo.allowedChildren=[Ci];Ci.requiredContainer=lo;Ci.allowedChildren=[Ui];Ui.requiredContainer=Ci;Ui.allowedChildren=[Vi];Vi.requiredContainer=Ui;function uh(){return`row-${Math.random().toString(36).slice(2,6)}`}var Uf=class extends mt{static register(){G.register(Vi),G.register(Ui),G.register(Ci),G.register(lo)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(lo).forEach(i=>{i.balanceCells()})}deleteColumn(){let[i,,t]=this.getTable();t!=null&&(i.deleteColumn(t.cellOffset()),this.quill.update(G.sources.USER))}deleteRow(){let[,i]=this.getTable();i!=null&&(i.remove(),this.quill.update(G.sources.USER))}deleteTable(){let[i]=this.getTable();if(i==null)return;let t=i.offset();i.remove(),this.quill.update(G.sources.USER),this.quill.setSelection(t,G.sources.SILENT)}getTable(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(i==null)return[null,null,null,-1];let[t,r]=this.quill.getLine(i.index);if(t==null||t.statics.blotName!==Vi.blotName)return[null,null,null,-1];let n=t.parent;return[n.parent.parent,n,t,r]}insertColumn(i){let t=this.quill.getSelection();if(!t)return;let[r,n,a]=this.getTable(t);if(a==null)return;let s=a.cellOffset();r.insertColumn(s+i),this.quill.update(G.sources.USER);let l=n.rowOffset();i===0&&(l+=1),this.quill.setSelection(t.index+l,t.length,G.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(i){let t=this.quill.getSelection();if(!t)return;let[r,n,a]=this.getTable(t);if(a==null)return;let s=n.rowOffset();r.insertRow(s+i),this.quill.update(G.sources.USER),i>0?this.quill.setSelection(t,G.sources.SILENT):this.quill.setSelection(t.index+n.children.length,t.length,G.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(i,t){let r=this.quill.getSelection();if(r==null)return;let n=new Array(i).fill(0).reduce(a=>{let s=new Array(t).fill(`
|
|
2908
|
+
`).join("");return a.insert(s,{table:uh()})},new g_.default().retain(r.index));this.quill.updateContents(n,G.sources.USER),this.quill.setSelection(r.index,G.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(G.events.SCROLL_OPTIMIZE,i=>{i.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(G.events.TEXT_CHANGE,(r,n,a)=>{a===G.sources.USER&&this.balanceTables()}),!0):!1)})}},b_=Uf;var x_=_r(ei(),1);var v_=_i("quill:toolbar"),Wo=class extends mt{constructor(i,t){if(super(i,t),Array.isArray(this.options.container)){let r=document.createElement("div");r.setAttribute("role","toolbar"),lM(r,this.options.container),i.container?.parentNode?.insertBefore(r,i.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){v_.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{let n=this.options.handlers?.[r];n&&this.addHandler(r,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(G.events.EDITOR_CHANGE,()=>{let[r]=this.quill.selection.getRange();this.update(r)})}addHandler(i,t){this.handlers[i]=t}attach(i){let t=Array.from(i.classList).find(n=>n.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),i.tagName==="BUTTON"&&i.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){v_.warn("ignoring attaching to nonexistent format",t,i);return}let r=i.tagName==="SELECT"?"change":"click";i.addEventListener(r,n=>{let a;if(i.tagName==="SELECT"){if(i.selectedIndex<0)return;let l=i.options[i.selectedIndex];l.hasAttribute("selected")?a=!1:a=l.value||!1}else i.classList.contains("ql-active")?a=!1:a=i.value||!i.hasAttribute("value"),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof wt){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new x_.default().retain(s.index).delete(s.length).insert({[t]:a}),G.sources.USER)}else this.quill.format(t,a,G.sources.USER);this.update(s)}),this.controls.push([t,i])}update(i){let t=i==null?{}:this.quill.getFormat(i);this.controls.forEach(r=>{let[n,a]=r;if(a.tagName==="SELECT"){let s=null;if(i==null)s=null;else if(t[n]==null)s=a.querySelector("option[selected]");else if(!Array.isArray(t[n])){let l=t[n];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),s=a.querySelector(`option[value="${l}"]`)}s==null?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(i==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){let s=t[n],l=s===a.getAttribute("value")||s!=null&&s.toString()===a.getAttribute("value")||s==null&&!a.getAttribute("value");a.classList.toggle("ql-active",l),a.setAttribute("aria-pressed",l.toString())}else{let s=t[n]!=null;a.classList.toggle("ql-active",s),a.setAttribute("aria-pressed",s.toString())}})}};Wo.DEFAULTS={};function y_(o,i,t){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${i}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${i}: ${t}`)):r.setAttribute("aria-label",i),o.appendChild(r)}function lM(o,i){Array.isArray(i[0])||(i=[i]),i.forEach(t=>{let r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(n=>{if(typeof n=="string")y_(r,n);else{let a=Object.keys(n)[0],s=n[a];Array.isArray(s)?cM(r,a,s):y_(r,a,s)}}),o.appendChild(r)})}function cM(o,i,t){let r=document.createElement("select");r.classList.add(`ql-${i}`),t.forEach(n=>{let a=document.createElement("option");n!==!1?a.setAttribute("value",String(n)):a.setAttribute("selected","selected"),r.appendChild(a)}),o.appendChild(r)}Wo.DEFAULTS={container:null,handlers:{clean(){let o=this.quill.getSelection();if(o!=null)if(o.length===0){let i=this.quill.getFormat();Object.keys(i).forEach(t=>{this.quill.scroll.query(t,X.INLINE)!=null&&this.quill.format(t,!1,G.sources.USER)})}else this.quill.removeFormat(o.index,o.length,G.sources.USER)},direction(o){let{align:i}=this.quill.getFormat();o==="rtl"&&i==null?this.quill.format("align","right",G.sources.USER):!o&&i==="right"&&this.quill.format("align",!1,G.sources.USER),this.quill.format("direction",o,G.sources.USER)},indent(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i),r=parseInt(t.indent||0,10);if(o==="+1"||o==="-1"){let n=o==="+1"?1:-1;t.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,G.sources.USER)}},link(o){o===!0&&(o=prompt("Enter link URL:")),this.quill.format("link",o,G.sources.USER)},list(o){let i=this.quill.getSelection(),t=this.quill.getFormat(i);o==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,G.sources.USER):this.quill.format("list","unchecked",G.sources.USER):this.quill.format("list",o,G.sources.USER)}}};var dM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',pM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',hM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',uM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',mM='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',fM='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',gM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',bM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',w_='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',vM='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',yM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',xM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',wM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',zM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',_M='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',kM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',CM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',SM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',EM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',TM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',$M='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',AM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',MM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',LM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',qM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',IM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',DM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',RM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',NM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',OM='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',PM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',HM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',FM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ko={align:{"":dM,center:pM,right:hM,justify:uM},background:mM,blockquote:fM,bold:gM,clean:bM,code:w_,"code-block":w_,color:vM,direction:{"":yM,rtl:xM},formula:wM,header:{1:zM,2:_M,3:kM,4:CM,5:SM,6:EM},italic:TM,image:$M,indent:{"+1":AM,"-1":MM},link:LM,list:{bullet:qM,check:IM,ordered:DM},script:{sub:RM,super:NM},strike:OM,table:PM,underline:HM,video:FM};var BM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',z_=0;function __(o,i){o.setAttribute(i,`${o.getAttribute(i)!=="true"}`)}var jf=class{constructor(i){this.select=i,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),__(this.label,"aria-expanded"),__(this.options,"aria-hidden")}buildItem(i){let t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");let r=i.getAttribute("value");return r&&t.setAttribute("data-value",r),i.textContent&&t.setAttribute("data-label",i.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(t,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),t}buildLabel(){let i=document.createElement("span");return i.classList.add("ql-picker-label"),i.innerHTML=BM,i.tabIndex="0",i.setAttribute("role","button"),i.setAttribute("aria-expanded","false"),this.container.appendChild(i),i}buildOptions(){let i=document.createElement("span");i.classList.add("ql-picker-options"),i.setAttribute("aria-hidden","true"),i.tabIndex="-1",i.id=`ql-picker-options-${z_}`,z_+=1,this.label.setAttribute("aria-controls",i.id),this.options=i,Array.from(this.select.options).forEach(t=>{let r=this.buildItem(t);i.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(i)}buildPicker(){Array.from(this.select.attributes).forEach(i=>{this.container.setAttribute(i.name,i.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.container.querySelector(".ql-selected");i!==r&&(r?.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=Array.from(i.parentNode.children).indexOf(i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let i;if(this.select.selectedIndex>-1){let r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);let t=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Yo=jf;var Gf=class extends Yo{constructor(i,t){super(i),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(i){let t=super.buildItem(i);return t.style.backgroundColor=i.getAttribute("value")||"",t}selectItem(i,t){super.selectItem(i,t);let r=this.label.querySelector(".ql-color-label"),n=i&&i.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=n:r.style.fill=n)}},mh=Gf;var Wf=class extends Yo{constructor(i,t){super(i),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(i,t){super.selectItem(i,t);let r=i||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}},fh=Wf;var VM=o=>{let{overflowY:i}=getComputedStyle(o,null);return i!=="visible"&&i!=="clip"},Kf=class{constructor(i,t){this.quill=i,this.boundsContainer=t||document.body,this.root=i.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,VM(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(i){let t=i.left+i.width/2-this.root.offsetWidth/2,r=i.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),s=0;if(a.right>n.right&&(s=n.right-a.right,this.root.style.left=`${t+s}px`),a.left<n.left&&(s=n.left-a.left,this.root.style.left=`${t+s}px`),a.bottom>n.bottom){let l=a.bottom-a.top,p=i.bottom-i.top+l;this.root.style.top=`${r-p}px`,this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},gh=Kf;var UM=[!1,"center","right","justify"],jM=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],GM=[!1,"serif","monospace"],WM=["1","2","3",!1],KM=["small",!1,"large","huge"],co=class extends Ks{constructor(i,t){super(i,t);let r=n=>{if(!document.body.contains(i.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(n.target)||a.close()})};i.emitter.listenDOM("click",document.body,r)}addModule(i){let t=super.addModule(i);return i==="toolbar"&&this.extendToolbar(t),t}buildButtons(i,t){Array.from(i).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{let s=r.value||"";s!=null&&t[a][s]&&(r.innerHTML=t[a][s])}})})}buildPickers(i,t){this.pickers=Array.from(i).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&Dc(n,UM),typeof t.align=="object"))return new fh(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let a=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&Dc(n,jM,a==="background"?"#ffffff":"#000000"),new mh(n,t[a])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Dc(n,GM):n.classList.contains("ql-header")?Dc(n,WM):n.classList.contains("ql-size")&&Dc(n,KM)),new Yo(n)});let r=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(J.events.EDITOR_CHANGE,r)}};co.DEFAULTS=ri({},Ks.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let o=this.container.querySelector("input.ql-image[type=file]");o==null&&(o=document.createElement("input"),o.setAttribute("type","file"),o.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),o.classList.add("ql-image"),o.addEventListener("change",()=>{let i=this.quill.getSelection(!0);this.quill.uploader.upload(i,o.files),o.value=""}),this.container.appendChild(o)),o.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var el=class extends gh{constructor(i,t){super(i,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",i=>{i.key==="Enter"?(this.save(),i.preventDefault()):i.key==="Escape"&&(this.cancel(),i.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:i!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${i}`)||""),this.root.setAttribute("data-mode",i)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:i}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",i,J.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",i,J.sources.USER)),this.quill.root.scrollTop=t;break}case"video":i=YM(i);case"formula":{if(!i)break;let t=this.quill.getSelection(!0);if(t!=null){let r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),i,J.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",J.sources.USER),this.quill.setSelection(r+2,J.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function YM(o){let i=o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||o.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return i?`${i[1]||"https"}://www.youtube.com/embed/${i[2]}?showinfo=0`:(i=o.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${i[1]||"https"}://player.vimeo.com/video/${i[2]}/`:o}function Dc(o,i){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;i.forEach(r=>{let n=document.createElement("option");r===t?n.setAttribute("selected","selected"):n.setAttribute("value",String(r)),o.appendChild(n)})}var QM=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],bh=class extends el{constructor(i,t){super(i,t),this.quill.on(J.events.EDITOR_CHANGE,(r,n,a,s)=>{if(r===J.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&s===J.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let l=this.quill.getLines(n.index,n.length);if(l.length===1){let p=this.quill.getBounds(n);p!=null&&this.position(p)}else{let p=l[l.length-1],h=this.quill.getIndex(p),m=Math.min(p.length()-1,n.index+n.length-h),f=this.quill.getBounds(new jr(h,m));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(J.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let i=this.quill.getSelection();if(i!=null){let t=this.quill.getBounds(i);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(i){let t=super.position(i),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}};V(bh,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var Rc=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=QM),super(i,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(i){this.tooltip=new bh(this.quill,this.options.bounds),i.container!=null&&(this.tooltip.root.appendChild(i.container),this.buildButtons(i.container.querySelectorAll("button"),Ko),this.buildPickers(i.container.querySelectorAll("select"),Ko))}};Rc.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){o?this.quill.theme.tooltip.edit():this.quill.format("link",!1,G.sources.USER)}}}}});var XM=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],vh=class extends el{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,J.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(J.events.SELECTION_CHANGE,(t,r,n)=>{if(t!=null){if(t.length===0&&n===J.sources.USER){let[a,s]=this.quill.scroll.descendant(ki,t.index);if(a!=null){this.linkRange=new jr(t.index-s,a.length());let l=ki.formats(a.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();let p=this.quill.getBounds(this.linkRange);p!=null&&this.position(p);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};V(vh,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var yh=class extends co{constructor(i,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=XM),super(i,t),this.quill.container.classList.add("ql-snow")}extendToolbar(i){i.container!=null&&(i.container.classList.add("ql-snow"),this.buildButtons(i.container.querySelectorAll("button"),Ko),this.buildPickers(i.container.querySelectorAll("select"),Ko),this.tooltip=new vh(this.quill,this.options.bounds),i.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{i.handlers.link.call(i,!r.format.link)}))}};yh.DEFAULTS=ri({},co.DEFAULTS,{modules:{toolbar:{handlers:{link(o){if(o){let i=this.quill.getSelection();if(i==null||i.length===0)return;let t=this.quill.getText(i);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);let{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,G.sources.USER)}}}}});var k_=yh;ph.register({"attributors/attribute/direction":ih,"attributors/class/align":$f,"attributors/class/background":Vz,"attributors/class/color":Bz,"attributors/class/direction":Mf,"attributors/class/font":qf,"attributors/class/size":If,"attributors/style/align":rh,"attributors/style/background":vc,"attributors/style/color":bc,"attributors/style/direction":nh,"attributors/style/font":oh,"attributors/style/size":ah},!0);ph.register({"formats/align":$f,"formats/direction":Mf,"formats/indent":n_,"formats/background":vc,"formats/color":bc,"formats/font":qf,"formats/size":If,"formats/blockquote":o_,"formats/code-block":Rt,"formats/header":a_,"formats/list":Go,"formats/bold":Xs,"formats/code":Qs,"formats/italic":s_,"formats/link":ki,"formats/script":l_,"formats/strike":c_,"formats/underline":d_,"formats/formula":p_,"formats/image":u_,"formats/video":f_,"modules/syntax":qc,"modules/table":b_,"modules/toolbar":Wo,"themes/bubble":Rc,"themes/snow":k_,"ui/icons":Ko,"ui/picker":Yo,"ui/icon-picker":fh,"ui/color-picker":mh,"ui/tooltip":gh},!0);var ce=ph;var Si=class extends k{render(){return u`
|
|
2909
|
+
<div style="display: none;"></div>`}};c([d()],Si.prototype,"uri",2),c([d()],Si.prototype,"label",2),c([d()],Si.prototype,"content",2),c([d()],Si.prototype,"key",2),c([d()],Si.prototype,"icon",2),c([d({type:Number})],Si.prototype,"order",2);Si.define("zn-editor-quick-action");var Yf=Si;Si.define("zn-editor-quick-action");var li=class extends k{constructor(){super(...arguments);this.handler="dialog";this.contextMenu=!1}render(){return u`
|
|
2906
2910
|
<zn-button class="tool-action"
|
|
2907
2911
|
color="transparent"
|
|
2908
2912
|
icon="${this.icon}"
|
|
@@ -3068,7 +3072,7 @@ ${Na(this.code(i,t))}
|
|
|
3068
3072
|
</div>
|
|
3069
3073
|
</div>`}};pe.styles=[z(Se),z(N_)],pe.dependencies={"zn-slash-item":Bl,"zn-slash-menu":ka},c([F(".form-control-input")],pe.prototype,"formControl",2),c([F(".textarea__control")],pe.prototype,"input",2),c([F("zn-slash-menu")],pe.prototype,"slashMenuElement",2),c([R()],pe.prototype,"hasFocus",2),c([R()],pe.prototype,"hasSlashMenu",2),c([d()],pe.prototype,"title",2),c([d()],pe.prototype,"name",2),c([d()],pe.prototype,"value",2),c([d({reflect:!0})],pe.prototype,"size",2),c([d()],pe.prototype,"label",2),c([d({attribute:"label-tooltip"})],pe.prototype,"labelTooltip",2),c([d({attribute:"context-note"})],pe.prototype,"contextNote",2),c([d({attribute:"help-text"})],pe.prototype,"helpText",2),c([d()],pe.prototype,"placeholder",2),c([d({attribute:"rows",type:Number})],pe.prototype,"rows",2),c([d()],pe.prototype,"resize",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"readonly",2),c([d({reflect:!0})],pe.prototype,"form",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"flush",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"required",2),c([d({type:Number})],pe.prototype,"minlength",2),c([d({type:Number})],pe.prototype,"maxlength",2),c([d()],pe.prototype,"autocapitalize",2),c([d()],pe.prototype,"autocorrect",2),c([d()],pe.prototype,"autocomplete",2),c([d({type:Boolean})],pe.prototype,"autofocus",2),c([d()],pe.prototype,"enterkeyhint",2),c([d({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],pe.prototype,"spellcheck",2),c([d()],pe.prototype,"inputmode",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],pe.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],pe.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],pe.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],pe.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],pe.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],pe.prototype,"slashRecentKey",2),c([d({attribute:!1})],pe.prototype,"slashItemsProvider",2),c([Ce()],pe.prototype,"defaultValue",2),c([d({type:Boolean})],pe.prototype,"transparent",2),c([K("disabled",{waitUntilFirstUpdate:!0})],pe.prototype,"handleDisabledChange",1),c([K("rows",{waitUntilFirstUpdate:!0})],pe.prototype,"handleRowsChange",1),c([K("value",{waitUntilFirstUpdate:!0})],pe.prototype,"handleValueChange",1);var Xo=pe;pe.define("zn-textarea");var tg=class{constructor(i,t){this._path="";this._selectedText="";this._prompt="";this._aiResponseContent="";this._onEscapeKey=i=>{i.key==="Escape"&&(this._hide(),this._component.remove(),this._initComponent())};this._quill=i,this._path=t.path,this._initComponent(),this._attachEvents()}_initComponent(){this._component=this._createTooltipComponent(),this._component.addEventListener("click",i=>this._replaceTooltip(i)),this._quill.container.ownerDocument.body.appendChild(this._component)}_attachEvents(){this._quill.on(ce.events.SELECTION_CHANGE,i=>this._updateFromEditor(i))}_latestContent(i){if(i==null&&(i=this._component.shadowRoot?.querySelector(".ai-panel")),i){let t=i.querySelector('[name="editor-response-text"]');if(t instanceof HTMLInputElement||t instanceof Xo)return t.value}return this._aiResponseContent}async processAIRequest(){let i=this._selectedText?this._selectedText:this._quill.getText(),t=this._component.shadowRoot?.querySelector(".ai-panel"),r=await fetch(this._path,{method:"POST",headers:{"Content-Type":"application/json","x-kx-fetch-style":"zn-editor","x-kx-editor-id":this._quill?.container?.getAttribute("x-editor-id")||""},body:JSON.stringify({text:i,prompt:this._prompt})});if(r.ok){let n=await r.text();t&&(t.style.width="500px",t.innerHTML=n,this._aiResponseContent=this._latestContent(t))}else{let n=await r.json();if(typeof n=="string"){let a=this._quill.getSelection();a&&(this._quill.deleteText(a.index,a.length),this._quill.insertText(a.index,n),this._quill.setSelection(a.index+n.length,0))}}}_createTooltipComponent(){let i=u`
|
|
3070
3074
|
<zn-ai-tooltip></zn-ai-tooltip>`;return qt(i)}_createPanelComponent(){let i=u`
|
|
3071
|
-
<zn-ai-panel></zn-ai-panel>`;return qt(i)}_replaceTooltip(i){i.preventDefault(),i.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(i){let t=i.composedPath?i.composedPath():[i.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){i.preventDefault(),i.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(i){this._component instanceof fn||(i?.length>25?(this._selectedText=this._quill.getText(i.index,i.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let i=this._quill.getSelection();if(!i)return;if(this._component instanceof Qo){let r=this._quill.container.getBoundingClientRect(),n=i.index+i.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(i.length===this._quill.getLength()-1)n=this._quill.getBounds(i.index,i.length);else{let l=i.index+i.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(i,t){this._component.style.right=`${Math.max(0,window.innerWidth-i)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(i){i.refine=this._enterCustomPrompt.bind(this),i.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(i){if(i instanceof PointerEvent){let t=i.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of i.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(i){this._prompt=i,this.processAIRequest().then(t=>t)}},O_=tg;var Pc=class{constructor(i,t){this._quill=i,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var rg=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],zh={getName:"color",getData:Object.entries(rg).map(([,o])=>({key:o.toLowerCase(),value:o,prefix:u`<div class="color-icon color-icon--${o.toLowerCase()}"></div>`}))};var P_=_`.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var Rn=class extends k{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new ht(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let p=r.slice(s);this.populateOverflowMenu(p),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(y=>v.setAttribute(y,g[y])),f){let y=document.createElement("zn-icon");y.setAttribute("src",f),y.setAttribute("size","18"),y.setAttribute("slot","prefix"),v.appendChild(y)}return b&&v.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},p={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let U in p)if(g.classList.contains(U)){v=p[U];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let y=s(g)||"",S=n(r,v,y);g.classList.contains("toolbar__date-dropdown")&&S.setAttribute("data-overflow-source","date");let T=document.createElement("zn-menu");T.setAttribute("slot","submenu"),T.setAttribute("variant","shell");let N=g.querySelectorAll("zn-menu-item");if(N.length)N.forEach(U=>{let I=a(U);T.appendChild(I)});else{let U=Array.from(g.children).filter(C=>{let $=C.getAttribute("slot")==="trigger"||C instanceof $e,L=C instanceof on||C instanceof yi;return!$&&!L}),I=document.createElement("div");I.className="toolbar__submenu-content",U.forEach(C=>this.moveContentTo(C,I)),T.appendChild(I)}S.appendChild(T)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",y=g.getAttribute("data-format")??"",S=g.getAttribute("data-text")??l[y]??(y?y.charAt(0).toUpperCase()+y.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),T={"data-format":y},N=g.getAttribute("data-format-type")??"";N&&(T["data-format-type"]=N),v&&(T["data-icon"]=v),S&&(T["data-text"]=S),n(r,S,v,void 0,T)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(y=>{if(y instanceof Nc){let S=y.icon,T=y.label,N=y.handler||"dialog",U=y.uri||"",I=y.key||"",C={"data-format":N};U&&(C["data-format-type"]=U),I&&(C["data-toolbar-key"]=I),S&&(C["data-icon"]=S),T&&(C["data-text"]=T),n(r,T,S,void 0,C)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
|
|
3075
|
+
<zn-ai-panel></zn-ai-panel>`;return qt(i)}_replaceTooltip(i){i.preventDefault(),i.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(i){let t=i.composedPath?i.composedPath():[i.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){i.preventDefault(),i.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(i){this._component instanceof fn||(i?.length>25?(this._selectedText=this._quill.getText(i.index,i.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let i=this._quill.getSelection();if(!i)return;if(this._component instanceof Qo){let r=this._quill.container.getBoundingClientRect(),n=i.index+i.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(i.length===this._quill.getLength()-1)n=this._quill.getBounds(i.index,i.length);else{let l=i.index+i.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(i,t){this._component.style.right=`${Math.max(0,window.innerWidth-i)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",i=>this._onDocumentClick(i)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(i){i.refine=this._enterCustomPrompt.bind(this),i.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(i){if(i instanceof PointerEvent){let t=i.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of i.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(i){this._prompt=i,this.processAIRequest().then(t=>t)}},O_=tg;var Pc=class{constructor(i,t){this._quill=i,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var rg=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],zh={getName:"color",getData:Object.entries(rg).map(([,o])=>({key:o.toLowerCase(),value:o,prefix:u`<div class="color-icon color-icon--${o.toLowerCase()}"></div>`}))};var P_=_`.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var Rn=class extends k{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new ht(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let p=r.slice(s);this.populateOverflowMenu(p),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(y=>v.setAttribute(y,g[y])),f){let y=document.createElement("zn-icon");y.setAttribute("src",f),y.setAttribute("size","18"),y.setAttribute("slot","prefix"),v.appendChild(y)}return b&&v.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},p={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let U in p)if(g.classList.contains(U)){v=p[U];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let y=s(g)||"",S=n(r,v,y);g.classList.contains("toolbar__date-dropdown")&&S.setAttribute("data-overflow-source","date");let T=document.createElement("zn-menu");T.setAttribute("slot","submenu"),T.setAttribute("variant","shell");let N=g.querySelectorAll("zn-menu-item");if(N.length)N.forEach(U=>{let I=a(U);T.appendChild(I)});else{let U=Array.from(g.children).filter(C=>{let $=C.getAttribute("slot")==="trigger"||C instanceof $e,L=C instanceof on||C instanceof xi;return!$&&!L}),I=document.createElement("div");I.className="toolbar__submenu-content",U.forEach(C=>this.moveContentTo(C,I)),T.appendChild(I)}S.appendChild(T)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",y=g.getAttribute("data-format")??"",S=g.getAttribute("data-text")??l[y]??(y?y.charAt(0).toUpperCase()+y.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),T={"data-format":y},N=g.getAttribute("data-format-type")??"";N&&(T["data-format-type"]=N),v&&(T["data-icon"]=v),S&&(T["data-text"]=S),n(r,S,v,void 0,T)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(y=>{if(y instanceof Nc){let S=y.icon,T=y.label,N=y.handler||"dialog",U=y.uri||"",I=y.key||"",C={"data-format":N};U&&(C["data-format-type"]=U),I&&(C["data-toolbar-key"]=I),S&&(C["data-icon"]=S),T&&(C["data-text"]=T),n(r,T,S,void 0,C)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
|
|
3072
3076
|
<div class="toolbar">
|
|
3073
3077
|
<div class="toolbar__group">${this._textOptions()}</div>
|
|
3074
3078
|
<div class="toolbar__group">${this._formatOptions()}</div>
|
|
@@ -3347,7 +3351,7 @@ ${Na(this.code(i,t))}
|
|
|
3347
3351
|
<div id="action-container" class="ql-toolbar ql-snow">
|
|
3348
3352
|
<slot name="actions"></slot>
|
|
3349
3353
|
</div>
|
|
3350
|
-
`}};Ve.styles=z(F_),c([F("#editor")],Ve.prototype,"editor",2),c([F("#editorHtml")],Ve.prototype,"editorHtml",2),c([F("#toolbar")],Ve.prototype,"toolbar",2),c([d({reflect:!0})],Ve.prototype,"id",2),c([d()],Ve.prototype,"name",2),c([d()],Ve.prototype,"value",2),c([d({attribute:"interaction-type",type:String})],Ve.prototype,"interactionType",2),c([d({attribute:"attachment-url",type:String})],Ve.prototype,"uploadAttachmentUrl",2),c([d({attribute:"code-blocks",type:Boolean})],Ve.prototype,"codeBlocksEnabled",2),c([d({attribute:"dividers",type:Boolean})],Ve.prototype,"dividersEnabled",2),c([d({attribute:"links",type:Boolean})],Ve.prototype,"linksEnabled",2),c([d({attribute:"attachments",type:Boolean})],Ve.prototype,"attachmentsEnabled",2),c([d({attribute:"images",type:Boolean})],Ve.prototype,"imagesEnabled",2),c([d({attribute:"videos",type:Boolean})],Ve.prototype,"videosEnabled",2),c([d({attribute:"dates",type:Boolean})],Ve.prototype,"datesEnabled",2),c([d({attribute:"emojis",type:Boolean})],Ve.prototype,"emojisEnabled",2),c([d({attribute:"code",type:Boolean})],Ve.prototype,"codeEnabled",2),c([d({attribute:"ai",type:Boolean})],Ve.prototype,"aiEnabled",2),c([d({attribute:"ai-path"})],Ve.prototype,"aiPath",2),c([d({attribute:"store-key",reflect:!0})],Ve.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],Ve.prototype,"storeTtl",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],Ve.prototype,"localStorage",2);var tL=Ve;Ve.define("zn-editor");var B_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;position:absolute;overflow:hidden}::backdrop{background-color:var(--zn-backdrop-color,rgba(128,128,128,0.6))}.editor-dialog{background-color:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);width:100%;max-width:975px;max-height:650px;padding:0}.editor-dialog .loading-wrapper{display:flex;flex-direction:column;height:100%;padding:1rem;gap:10px}.editor-dialog__close{position:absolute;top:0;right:0;margin:var(--zn-spacing-x-small);z-index:10001}.editor-dialog__content{min-height:min(500px,70vh);overflow:auto;box-sizing:border-box}`;var
|
|
3354
|
+
`}};Ve.styles=z(F_),c([F("#editor")],Ve.prototype,"editor",2),c([F("#editorHtml")],Ve.prototype,"editorHtml",2),c([F("#toolbar")],Ve.prototype,"toolbar",2),c([d({reflect:!0})],Ve.prototype,"id",2),c([d()],Ve.prototype,"name",2),c([d()],Ve.prototype,"value",2),c([d({attribute:"interaction-type",type:String})],Ve.prototype,"interactionType",2),c([d({attribute:"attachment-url",type:String})],Ve.prototype,"uploadAttachmentUrl",2),c([d({attribute:"code-blocks",type:Boolean})],Ve.prototype,"codeBlocksEnabled",2),c([d({attribute:"dividers",type:Boolean})],Ve.prototype,"dividersEnabled",2),c([d({attribute:"links",type:Boolean})],Ve.prototype,"linksEnabled",2),c([d({attribute:"attachments",type:Boolean})],Ve.prototype,"attachmentsEnabled",2),c([d({attribute:"images",type:Boolean})],Ve.prototype,"imagesEnabled",2),c([d({attribute:"videos",type:Boolean})],Ve.prototype,"videosEnabled",2),c([d({attribute:"dates",type:Boolean})],Ve.prototype,"datesEnabled",2),c([d({attribute:"emojis",type:Boolean})],Ve.prototype,"emojisEnabled",2),c([d({attribute:"code",type:Boolean})],Ve.prototype,"codeEnabled",2),c([d({attribute:"ai",type:Boolean})],Ve.prototype,"aiEnabled",2),c([d({attribute:"ai-path"})],Ve.prototype,"aiPath",2),c([d({attribute:"store-key",reflect:!0})],Ve.prototype,"storeKey",2),c([d({attribute:"store-ttl",type:Number,reflect:!0})],Ve.prototype,"storeTtl",2),c([d({attribute:"local-storage",type:Boolean,reflect:!0})],Ve.prototype,"localStorage",2);var tL=Ve;Ve.define("zn-editor");var B_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:block;position:absolute;overflow:hidden}::backdrop{background-color:var(--zn-backdrop-color,rgba(128,128,128,0.6))}.editor-dialog{background-color:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);width:100%;max-width:975px;max-height:650px;padding:0}.editor-dialog .loading-wrapper{display:flex;flex-direction:column;height:100%;padding:1rem;gap:10px}.editor-dialog__close{position:absolute;top:0;right:0;margin:var(--zn-spacing-x-small);z-index:10001}.editor-dialog__content{min-height:min(500px,70vh);overflow:auto;box-sizing:border-box}`;var ji=class extends k{constructor(){super(...arguments);this.hasFocus=!1;this.hasContentHeader=!1;this.open=!1;this.uri="";this.handleContentCloserClick=t=>{for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement&&r.hasAttribute("dialog-closer")){this.dialogEl.close();return}}}}set editorId(t){this._editorId=t,this.requestUpdate()}connectedCallback(){super.connectedCallback()}firstUpdated(t){super.firstUpdated(t),this.dialogEl.addEventListener("close",()=>{this.open=!1,this.innerHTML="",this.hasContentHeader=!1}),this.addEventListener("click",this.handleContentCloserClick),this.addEventListener("zn-dialog-header",()=>{this.hasContentHeader=!0})}setContent(t){this.innerHTML=t}handleOpenChange(){this.open?this.addOpenListeners():this.removeOpenListeners()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.dialogEl.close()}_getLoadingState(){return u`
|
|
3351
3355
|
<div class="loading-wrapper">
|
|
3352
3356
|
<zn-skeleton height="55px"></zn-skeleton>
|
|
3353
3357
|
<zn-skeleton height="55px"></zn-skeleton>
|
|
@@ -3370,7 +3374,7 @@ ${Na(this.code(i,t))}
|
|
|
3370
3374
|
<slot>${this._getLoadingState()}</slot>
|
|
3371
3375
|
</div>
|
|
3372
3376
|
</dialog>
|
|
3373
|
-
`}};
|
|
3377
|
+
`}};ji.styles=z(B_),c([R()],ji.prototype,"hasFocus",2),c([R()],ji.prototype,"hasContentHeader",2),c([F("dialog")],ji.prototype,"dialogEl",2),c([d({type:Boolean,reflect:!0})],ji.prototype,"open",2),c([d()],ji.prototype,"uri",2),c([K("open",{waitUntilFirstUpdate:!0})],ji.prototype,"handleOpenChange",1);ji.define("zn-editor-dialog");var V_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--zn-toggle-margin:8px 0;display:block}.switch__wrapper{display:flex;flex-direction:column}.switch__wrapper label{flex:1;display:flex;flex-direction:column;align-items:flex-start;cursor:pointer}.switch__input-wrapper{box-sizing:border-box;text-align:left;position:relative;display:inline-flex;width:42px;height:24px;flex-shrink:0;cursor:pointer;border-radius:12px;align-items:center;background-color:rgb(var(--zn-color-tab));border:0.92px solid rgb(var(--zn-border-color));margin:var(--zn-toggle-margin);transition:color 0.2s ease-in-out,background-color 0.4s ease-in-out,border-color 0.2s ease-in-out}:host(:focus) .switch__input-wrapper{outline:rgb(var(--zn-primary)) solid 1px}:host([checked]) .switch__input-wrapper{background-color:rgb(var(--zn-color-primary));border-color:rgb(var(--zn-color-primary))}:host([checked]) .switch__input-wrapper .switch__control{left:calc(100% - 20.32px - 0.92px);background:rgb(var(--zn-color-on-primary,255,255,255))}.switch{height:100%;width:100%;padding:0;margin:0;cursor:pointer}.switch-label{font-family:var(--zn-font-sans);font-size:var(--zn-text-input-label-font-size);font-weight:var(--zn-text-input-label-font-weight);line-height:var(--zn-text-input-label-line-height);color:var(--zn-text-input-label-color);text-transform:var(--zn-text-input-label-transform);letter-spacing:var(--zn-text-input-label-letter-spacing,normal);margin:0}.switch__wrapper--small .switch-label{font-size:var(--zn-input-label-font-size-small)}.switch__description{display:none;margin-top:var(--zn-spacing-2x-small)}.switch__wrapper--has-description .switch__description{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:block;color:rgb(var(--zn-color-muted-text))}.switch__wrapper--small .switch__description{font-size:var(--zn-font-size-x-small)}.switch__wrapper--large .switch-label{font-size:var(--zn-input-label-font-size-large)}.switch__control{pointer-events:none;position:absolute;top:50%;left:0.92px;width:20.32px;height:20.32px;border-radius:50%;background:#fff;box-shadow:0 2px 4px 0 rgba(var(--zn-color-text),0.1);transform:translateY(-50%);transition:left 0.3s ease-in-out,background-color 0.4s ease-in-out;outline:none}.switch__input{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}.switch__wrapper--small .switch__input-wrapper{height:20px;width:35px}.switch__wrapper--small .switch__control{width:14px;height:14px}:host([checked]) .switch__wrapper--small .switch__input-wrapper .switch__control{left:calc(100% - 14px - 0.92px)}.switch__wrapper--label-left label,.switch__wrapper--label-right label{align-items:center;justify-content:space-between;gap:8px}.switch__wrapper--label-left label{flex-direction:row}.switch__wrapper--label-right label{flex-direction:row-reverse}:host([inline]){display:inline-block}.switch__wrapper--inline label{flex:none;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px}.switch__wrapper--inline label .switch__input{margin-inline:1px;margin-inline-end:1px}.switch__wrapper--inline.switch__wrapper--label-right label{flex-direction:row-reverse}`;var Xe=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"help-text","description");this.formControlController=new re(this,{value:t=>t.checked?t.value||"on":t.fallbackValue,defaultValue:t=>t.defaultChecked,setValue:(t,r)=>t.checked=r});this.hasFocus=!1;this.title="";this.name="";this.fallbackValue="off";this.size="medium";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.helpText="";this.triggerSubmit=!1;this.onText="";this.offText="";this.label="";this.description="";this.labelPosition="top";this.inline=!1}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(t){this.formControlController.updateValidity(),super.firstUpdated(t)}handleBlur(){this.hasFocus=!1}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("zn-input")}handleClick(){this.checked=!this.checked,this.triggerSubmit&&this.formControlController.submit()}handleFocus(){this.hasFocus=!0}handleKeyDown(t){t.key==="ArrowLeft"&&(t.preventDefault(),this.checked=!1),t.key==="ArrowRight"&&(t.preventDefault(),this.checked=!0)}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.checked?this.onText:this.offText,r=!!t,n=this.helpText?!0:this.hasSlotController.test("help-text"),a=this.description?!0:this.hasSlotController.test("description"),s=u`
|
|
3374
3378
|
<div class="switch__input-wrapper" part="base">
|
|
3375
3379
|
<input
|
|
3376
3380
|
class="switch__input"
|
|
@@ -3526,7 +3530,7 @@ ${Na(this.code(i,t))}
|
|
|
3526
3530
|
</zn-button>`:""}
|
|
3527
3531
|
<zn-button part="submit-button" color="primary" icon="${this.submitIcon}" @click="${this.handleSubmit}">
|
|
3528
3532
|
${this.submitText}
|
|
3529
|
-
</zn-button>`}};br.styles=z(j_),br.dependencies={"zn-button":$e},c([d({attribute:"submit-text"})],br.prototype,"submitText",2),c([d({attribute:"submit-icon"})],br.prototype,"submitIcon",2),c([d({attribute:"with-cancel",type:Boolean})],br.prototype,"withCancel",2),c([d({attribute:"cancel-text"})],br.prototype,"cancelText",2),c([d({attribute:"cancel-icon"})],br.prototype,"cancelIcon",2),c([d({attribute:"with-reset",type:Boolean})],br.prototype,"withReset",2),c([d({attribute:"reset-text"})],br.prototype,"resetText",2),c([d({attribute:"reset-icon"})],br.prototype,"resetIcon",2),c([d()],br.prototype,"form",2);var nL=br;br.define("zn-form-actions");var G_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;line-height:var(--zn-line-height-dense);max-width:var(--zn-container-lg);--zn-col-gap:calc(var(--zn-spacing-medium,20px) * 3);--zn-form-group-sticky-top:var(--zn-spacing-medium,20px)}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.form-control--has-label .form-control__label{font-weight:var(--zn-font-weight-bold);font-size:var(--zn-font-size-large)}.form-control__container{--zn-col-basis:200px}@container (min-width:670px){.form-control__text{position:sticky;top:var(--zn-form-group-sticky-top);align-self:flex-start}}.form-control__chip{margin-top:var(--zn-spacing-x-small)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.form-control-input{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-control-input{grid-template-columns:repeat(6,minmax(0,1fr))}}.form-control-input>::slotted(*){grid-column:span 6/span 6}@media (min-width:768px){.form-control-input>::slotted([span="1"]){grid-column:span 1/span 1}}@media (min-width:768px){.form-control-input>::slotted([span="2"]){grid-column:span 2/span 2}}@media (min-width:768px){.form-control-input>::slotted([span="3"]){grid-column:span 3/span 3}}@media (min-width:768px){.form-control-input>::slotted([span="4"]){grid-column:span 4/span 4}}@media (min-width:768px){.form-control-input>::slotted([span="5"]){grid-column:span 5/span 5}}zn-cols::part(base){gap:70px}.form-control--pad .form-control__text{padding-top:var(--zn-base-gap);padding-left:var(--zn-base-gap)}`;var
|
|
3533
|
+
</zn-button>`}};br.styles=z(j_),br.dependencies={"zn-button":$e},c([d({attribute:"submit-text"})],br.prototype,"submitText",2),c([d({attribute:"submit-icon"})],br.prototype,"submitIcon",2),c([d({attribute:"with-cancel",type:Boolean})],br.prototype,"withCancel",2),c([d({attribute:"cancel-text"})],br.prototype,"cancelText",2),c([d({attribute:"cancel-icon"})],br.prototype,"cancelIcon",2),c([d({attribute:"with-reset",type:Boolean})],br.prototype,"withReset",2),c([d({attribute:"reset-text"})],br.prototype,"resetText",2),c([d({attribute:"reset-icon"})],br.prototype,"resetIcon",2),c([d()],br.prototype,"form",2);var nL=br;br.define("zn-form-actions");var G_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;line-height:var(--zn-line-height-dense);max-width:var(--zn-container-lg);--zn-col-gap:calc(var(--zn-spacing-medium,20px) * 3);--zn-form-group-sticky-top:var(--zn-spacing-medium,20px)}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.form-control--has-label .form-control__label{font-weight:var(--zn-font-weight-bold);font-size:var(--zn-font-size-large)}.form-control__container{--zn-col-basis:200px}@container (min-width:670px){.form-control__text{position:sticky;top:var(--zn-form-group-sticky-top);align-self:flex-start}}.form-control__chip{margin-top:var(--zn-spacing-x-small)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.form-control-input{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-control-input{grid-template-columns:repeat(6,minmax(0,1fr))}}.form-control-input>::slotted(*){grid-column:span 6/span 6}@media (min-width:768px){.form-control-input>::slotted([span="1"]){grid-column:span 1/span 1}}@media (min-width:768px){.form-control-input>::slotted([span="2"]){grid-column:span 2/span 2}}@media (min-width:768px){.form-control-input>::slotted([span="3"]){grid-column:span 3/span 3}}@media (min-width:768px){.form-control-input>::slotted([span="4"]){grid-column:span 4/span 4}}@media (min-width:768px){.form-control-input>::slotted([span="5"]){grid-column:span 5/span 5}}zn-cols::part(base){gap:70px}.form-control--pad .form-control__text{padding-top:var(--zn-base-gap);padding-left:var(--zn-base-gap)}`;var Ei=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"help-text","label","chip");this.label="";this.labelTooltip="";this.helpText="";this.forceCols=!1;this.layout="1,2";this.pad=!1;this.tracked=null;this.animation=null;this.stickyTop=0;this.frame=0;this.rebind=!1;this.offset=0;this.resizeObserver=null;this.onScroll=()=>this.schedule();this.onScrollEnd=()=>this.schedule(!0);this.onViewportResize=()=>this.schedule(!0)}connectedCallback(){super.connectedCallback(),this.resizeObserver??(this.resizeObserver=new ResizeObserver(()=>this.schedule(!0))),this.resizeObserver.observe(this),window.addEventListener("resize",this.onViewportResize)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),window.removeEventListener("resize",this.onViewportResize),this.detach(),cancelAnimationFrame(this.frame),this.frame=0}firstUpdated(t){super.firstUpdated(t),this.schedule(!0)}get labelColumn(){return this.shadowRoot?.querySelector(".form-control__text")??null}schedule(t=!1){this.rebind||(this.rebind=t),!this.frame&&(this.frame=requestAnimationFrame(()=>{this.frame=0,this.rebind&&(this.rebind=!1,this.bind()),this.positionLabel()}))}bind(){let t=this.labelColumn;if(!t)return;this.detach(),t.style.top="",this.stickyTop=parseFloat(getComputedStyle(t).top)||0;let r=this.nearestScrollContainer(t);if(!r)return;let n=this.scrollingAncestor(t);if(n!==r&&(t.style.top="0px",!!n)){if(this.tracked=n,this.animation=this.scrollLinkedTravel(n),this.animation){this.animation.play(),this.scrollTarget(n)?.addEventListener("scrollend",this.onScrollEnd,{passive:!0});return}this.scrollTarget(n)?.addEventListener("scroll",this.onScroll,{passive:!0})}}scrollLinkedTravel(t){let r=this.labelColumn,n=this.fieldset;if(!r||!n||typeof ScrollTimeline>"u"||getComputedStyle(r).position!=="sticky")return null;let a=Math.max(0,n.clientHeight-r.offsetHeight),s=t.scrollHeight-t.clientHeight;if(a<1||s<1)return null;let l=t.scrollTop+r.getBoundingClientRect().top-this.visibleTop(t)-this.stickyTop,p=f=>Math.min(Math.max(f-l,0),a),m=[0,...[l,l+a].filter(f=>f>0&&f<s),s].map(f=>({offset:Math.min(Math.max(f/s,0),1),transform:`translateY(${p(f)}px)`}));return new Animation(new KeyframeEffect(r,m,{fill:"both"}),new ScrollTimeline({source:t,axis:"block"}))}detach(){let t=this.scrollTarget(this.tracked);t?.removeEventListener("scroll",this.onScroll),t?.removeEventListener("scrollend",this.onScrollEnd),this.tracked=null,this.animation?.cancel(),this.animation=null;let r=this.labelColumn;r&&(this.offset=0,r.style.transform="")}scrollTarget(t){return t?t===document.scrollingElement?window:t:null}visibleTop(t){return t===document.scrollingElement?0:t.getBoundingClientRect().top}get fieldset(){return this.shadowRoot?.querySelector(".form-control")??null}positionLabel(){if(this.animation)return;let t=this.labelColumn,r=this.fieldset;if(!t||!r)return;let n=0;if(this.tracked&&getComputedStyle(t).position==="sticky"){let a=this.visibleTop(this.tracked),s=t.getBoundingClientRect().top-this.offset,l=Math.max(0,r.clientHeight-t.offsetHeight);n=Math.min(Math.max(a+this.stickyTop-s,0),l)}Math.round(n)!==Math.round(this.offset)&&(this.offset=n,t.style.transform=n?`translateY(${n}px)`:"")}nearestScrollContainer(t){return this.ancestors(t).find(r=>{let n=getComputedStyle(r);return this.isScrollContainer(n.overflowY)||this.isScrollContainer(n.overflowX)})??null}scrollingAncestor(t){let r=this.ancestors(t).find(a=>{let s=getComputedStyle(a).overflowY;return(s==="auto"||s==="scroll"||s==="overlay")&&a.scrollHeight>a.clientHeight+1});if(r)return r;let n=document.scrollingElement;return n&&n.scrollHeight>n.clientHeight+1?n:null}isScrollContainer(t){return t==="auto"||t==="scroll"||t==="hidden"||t==="overlay"}ancestors(t){let r=[],n=t;for(;n;){let a=n instanceof Element&&n.assignedSlot?n.assignedSlot:n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode;a instanceof HTMLElement&&r.push(a),n=a}return r}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:t,s=this.labelTooltip?!0:r,l=this.helpText?!0:n,p=this.hasSlotController.test("chip");return u`
|
|
3530
3534
|
<fieldset
|
|
3531
3535
|
part="form-control"
|
|
3532
3536
|
class="${M({"form-control":!0,"form-control--has-label":a,"form-control--has-label-tooltip":s,"form-control--has-help-text":l,"form-control--pad":this.pad})}"
|
|
@@ -3574,7 +3578,7 @@ ${Na(this.code(i,t))}
|
|
|
3574
3578
|
<slot></slot>
|
|
3575
3579
|
</div>
|
|
3576
3580
|
</zn-cols>
|
|
3577
|
-
</fieldset>`}};
|
|
3581
|
+
</fieldset>`}};Ei.styles=[z(Se),z(G_)],c([d()],Ei.prototype,"label",2),c([d({attribute:"label-tooltip"})],Ei.prototype,"labelTooltip",2),c([d({attribute:"help-text"})],Ei.prototype,"helpText",2),c([d({attribute:"cols",type:Boolean})],Ei.prototype,"forceCols",2),c([d({attribute:"layout",type:String})],Ei.prototype,"layout",2),c([d({attribute:"pad",type:Boolean})],Ei.prototype,"pad",2);var ng=Ei;Ei.define("zn-form-group");var W_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.input-group{display:flex;flex-wrap:nowrap;align-items:center;width:100%;gap:var(--zn-spacing-small)}.input-group--gap-sm{gap:var(--zn-spacing-x-small)}.input-group--gap-md{gap:var(--zn-spacing-small)}.input-group--gap-lg{gap:var(--zn-spacing-medium)}.input-group--gap ::slotted([data-zn-input-group__input]){margin-inline-end:0}.input-group--gap ::slotted([data-zn-input-group__input--first]),.input-group--gap ::slotted([data-zn-input-group__input--inner]),.input-group--gap ::slotted([data-zn-input-group__input--last]){--zn-input-border-radius-x-small:var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius)}::slotted([data-zn-input-group__input]){margin-inline-end:-1px;position:relative;z-index:1;flex:1;min-width:0}@media (min-width:768px){::slotted([data-zn-input-group__input][span="1"]){flex:1}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="2"]){flex:2}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="3"]){flex:3}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="4"]){flex:4}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="5"]){flex:5}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="6"]){flex:6}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="7"]){flex:7}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="8"]){flex:8}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="9"]){flex:9}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="10"]){flex:10}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="11"]){flex:11}}@media (min-width:768px){::slotted([data-zn-input-group__input][span="12"]){flex:12}}::slotted([data-zn-input-group__input]:focus-within){z-index:2}::slotted([data-zn-input-group__input--first]){--zn-input-border-radius-x-small:var(--zn-border-radius) 0 0 var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius) 0 0 var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius) 0 0 var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius) 0 0 var(--zn-border-radius)}::slotted([data-zn-input-group__input--inner]){--zn-input-border-radius-x-small:0;--zn-input-border-radius-small:0;--zn-input-border-radius-medium:0;--zn-input-border-radius-large:0}::slotted([data-zn-input-group__input--last]){--zn-input-border-radius-x-small:0 var(--zn-border-radius) var(--zn-border-radius) 0;--zn-input-border-radius-small:0 var(--zn-border-radius) var(--zn-border-radius) 0;--zn-input-border-radius-medium:0 var(--zn-border-radius) var(--zn-border-radius) 0;--zn-input-border-radius-large:0 var(--zn-border-radius) var(--zn-border-radius) 0;margin-inline-end:0}::slotted(zn-button[data-zn-input-group__input]){flex:0 0 auto;margin-inline-start:0;margin-inline-end:0}::slotted(zn-button[data-zn-input-group__input--first]),::slotted(zn-button[data-zn-input-group__input--inner]),::slotted(zn-button[data-zn-input-group__input--last]){--zn-input-border-radius-x-small:var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius)}`;var Nn=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"label");this.label=""}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})],r=["ZN-INPUT","ZN-SELECT","ZN-BUTTON"],n=t.filter(s=>r.includes(s.tagName)),a=n.filter(s=>s.tagName!=="ZN-BUTTON");n.forEach(s=>{if(s.toggleAttribute("data-zn-input-group__input",!0),s.tagName==="ZN-BUTTON")s.toggleAttribute("data-zn-input-group__input--first",!1),s.toggleAttribute("data-zn-input-group__input--inner",!1),s.toggleAttribute("data-zn-input-group__input--last",!1);else{let l=a.indexOf(s);s.toggleAttribute("data-zn-input-group__input--first",l===0),s.toggleAttribute("data-zn-input-group__input--inner",l>0&&l<a.length-1),s.toggleAttribute("data-zn-input-group__input--last",l===a.length-1)}})}render(){let t=this.hasSlotController.test("label"),r=this.label?!0:t;return u`
|
|
3578
3582
|
<div part="form-control"
|
|
3579
3583
|
class="${M({"form-control":!0,"form-control--has-label":r})}">
|
|
3580
3584
|
|
|
@@ -3795,7 +3799,7 @@ ${Na(this.code(i,t))}
|
|
|
3795
3799
|
<slot name="help-text">${this.helpText}</slot>
|
|
3796
3800
|
</div>
|
|
3797
3801
|
</fieldset>
|
|
3798
|
-
`}};ct.styles=[z(Se),z(X_)],c([F("slot:not([name])")],ct.prototype,"defaultSlot",2),c([F(".radio-group__validation-input")],ct.prototype,"validationInput",2),c([R()],ct.prototype,"errorMessage",2),c([R()],ct.prototype,"defaultValue",2),c([d()],ct.prototype,"label",2),c([d({attribute:"label-tooltip"})],ct.prototype,"labelTooltip",2),c([d({attribute:"help-text"})],ct.prototype,"helpText",2),c([d()],ct.prototype,"name",2),c([d({reflect:!0})],ct.prototype,"value",2),c([d({reflect:!0})],ct.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"horizontal",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"contained",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"square",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"wrap",2),c([d({reflect:!0})],ct.prototype,"form",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],ct.prototype,"handleSizeChange",1),c([K("value")],ct.prototype,"handleValueChange",1);var cL=ct;ct.define("zn-radio-group");var J_=(o,i,t)=>{let r=new Map;for(let n=i;n<=t;n++)r.set(o[n],n);return r},Jo=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,i,t){let r;t===void 0?t=i:i!==void 0&&(r=i);let n=[],a=[],s=0;for(let l of o)n[s]=r?r(l,s):s,a[s]=t(l,s),s++;return{values:a,keys:n}}render(o,i,t){return this.dt(o,i,t).values}update(o,[i,t,r]){let n=Ub(o),{values:a,keys:s}=this.dt(i,t,r);if(!Array.isArray(n))return this.ut=s,a;let l=this.ut??(this.ut=[]),p=[],h,m,f=0,b=n.length-1,g=0,v=a.length-1;for(;f<=b&&g<=v;)if(n[f]===null)f++;else if(n[b]===null)b--;else if(l[f]===s[g])p[g]=bo(n[f],a[g]),f++,g++;else if(l[b]===s[v])p[v]=bo(n[b],a[v]),b--,v--;else if(l[f]===s[v])p[v]=bo(n[f],a[v]),rs(o,p[v+1],n[f]),f++,v--;else if(l[b]===s[g])p[g]=bo(n[b],a[g]),rs(o,n[f],n[b]),b--,g++;else if(h===void 0&&(h=J_(s,g,v),m=J_(l,f,b)),h.has(l[f]))if(h.has(l[b])){let y=m.get(s[g]),S=y!==void 0?n[y]:null;if(S===null){let T=rs(o,n[f]);bo(T,a[g]),p[g]=T}else p[g]=bo(S,a[g]),rs(o,n[f],S),n[y]=null;g++}else yd(n[b]),b--;else yd(n[f]),f++;for(;g<=v;){let y=rs(o,p[v+1]);bo(y,a[g]),p[g++]=y}for(;f<=b;){let y=n[f++];y!==null&&yd(y)}return this.ut=s,is(o,p),vt}});var Z_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.input__control{border:0;clip-path:inset(50%);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.form-control--droparea .input__control{left:50%}.form-control-input{position:relative}.button__wrapper{align-items:center;display:flex;gap:var(--zn-input-spacing-medium)}.form-control--small .button__wrapper{gap:var(--zn-input-spacing-small)}:host([size=large]) .button__wrapper{gap:var(--zn-input-spacing-large)}.input__value{display:inline-flex;justify-content:center;align-items:center;gap:var(--zn-spacing-small);color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__value.input__value--hidden{display:none}.input__delete{cursor:pointer;color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__delete:hover{color:var(--zn-color-primary-600)}.input__value--placeholder{color:var(--zn-input-help-text-color)}.form-control--small .input__value{font-size:var(--zn-input-label-font-size-small)}.form-control--large .input__value{font-size:var(--zn-input-label-font-size-large)}.form-control--user-dragging:not([disabled]) .button::part(base){background:none;border-color:var(--zn-color-primary-900);color:var(--zn-color-primary-900)}.droparea{--highlight-color:var(--zn-color-primary-600);position:relative;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);font:var(--zn-font-size-medium);min-height:180px;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.droparea:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}:host([disabled]) .droparea{--highlight-color:var(--zn-color-neutral-600)}:host([disabled]) .input__value{display:none}.droparea__background{align-items:center;display:flex;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large) var(--zn-spacing-medium);width:100%;height:100%;min-height:inherit;box-sizing:border-box}.droparea__clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.droparea__upload{text-transform:uppercase;letter-spacing:0.02em}.droparea--has-preview .droparea__background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.droparea__preview{display:block;position:relative;z-index:1;width:100%;height:150px;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;text-align:center;font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-color)}.droparea__filename{color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium);font-weight:var(--zn-font-weight-medium);word-break:break-all;text-align:center;padding:0 var(--zn-spacing-3x-large)}.file-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}.form-control--small .droparea{font:var(--zn-font-size-small);min-height:140px}.form-control--small .droparea__preview{height:110px}.form-control--large .droparea{font:var(--zn-font-size-large);min-height:220px}.form-control--large .droparea__preview{height:190px}:host([disabled]) .droparea,:host([disabled]) .input__value{cursor:not-allowed;opacity:0.5}:host(:not([disabled])) .form-control--user-dragging .droparea{background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-600);cursor:pointer}:host(:not([disabled])) .droparea:not(:focus-visible):hover{--highlight-color:var(--zn-color-primary-800);border-color:var(--zn-color-primary-700);cursor:pointer}:host(:not([disabled])) .droparea:hover .droparea__upload::part(base),:host(:not([disabled])) .droparea__upload:hover::part(base),:host(:not([disabled])) .form-control--user-dragging .droparea__upload::part(base){background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-700);color:var(--zn-color-primary-800)}.droparea__upload::part(icon){pointer-events:none}:host([data-user-invalid]:not([disabled])) .droparea{border-color:var(--zn-color-error)}.clear-confirm__text{margin:0;color:var(--zn-input-color)}.form-control__link{display:inline-block;margin-top:var(--zn-spacing-x-small);font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-color-primary-700);word-break:break-all;text-decoration:none;max-width:100%}.form-control__link:hover{color:var(--zn-color-primary-800);text-decoration:underline}`;var be=class extends k{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-change"],value:t=>t.uploadUrl?t.src?t.src:t.clearedByUser?"":void 0:t.files?.length?t.files:t.clearedByUser?"":void 0});this.clearedByUser=!1;this.hasSlotController=new Y(this,"help-text","label");this.localize=new Ht(this);this.userIsDragging=!1;this.fileObjectUrl=null;this.name="";this.defaultValue="";this.size="medium";this.label="";this.clearable=!1;this.helpText="";this.disabled=!1;this.droparea=!1;this.accept="";this.multiple=!1;this.webkitdirectory=!1;this.form="";this.required=!1;this.hideValue=!1;this.src="";this.triggerSubmit=!1;this.showLink=!1;this.uploadUrl="";this.uploading=!1;this.handleInvalid=t=>{this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)};this.handleDragOver=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!0};this.handleDragLeave=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!1};this.handleDrop=async t=>{if(t.preventDefault(),t.stopPropagation(),!t.dataTransfer)return;let r=await this.handleTransferItems(t.dataTransfer.items);if(this.userIsDragging=!1,!r)return;if(!this.multiple&&!this.webkitdirectory&&r.length>1){this.emit("zn-error");return}if(this.hasSlotController.test("trigger"))this.handleFiles(r);else{let a=this.inputChosen,s=this.dropareaIcon;if(this.droparea&&s){let l=Sn(s,"file.iconDrop",{dir:this.localize.dir()});vi(s,l.keyframes,l.options)}if(a){let l=Sn(a,"file.text.disappear",{dir:this.localize.dir()});await vi(a,l.keyframes,l.options)}if(this.handleFiles(r),a){let l=Sn(a,"file.text.appear",{dir:this.localize.dir()});await vi(a,l.keyframes,l.options)}}this.input.dispatchEvent(new Event("change"))};this.removeFile=t=>{t.preventDefault(),t.stopPropagation();let r=Array.from(this.files||[]),n=t.target.closest("[data-file-name]")?.getAttribute("data-file-name"),a=r.findIndex(l=>l.name===n);a!==-1&&r.splice(a,1);let s=new DataTransfer;r.forEach(l=>s.items.add(l)),this.files=s.files,s.files.length||(this.clearedByUser=!0),this.input.dispatchEvent(new Event("change"))};this.handleClearClick=t=>{t.preventDefault(),t.stopPropagation(),this.clearConfirmDialog?.show()};this.confirmClear=()=>{let t=(this.files?.length??0)>0;this.input.value="",this.files=null,t||(this.src=""),this.clearedByUser=!0,this.clearConfirmDialog?.hide(),this.input.dispatchEvent(new Event("change")),this.emit("zn-clear")}}set files(t){this.input&&(this.input.files=t,t?.length&&(this.clearedByUser=!1),this.updatePreview())}get files(){return this.input?.files}set value(t){if(this.uploadUrl){this.src=t??"";return}this.input&&(this.input.value=t)}get value(){return this.uploadUrl?this.src??"":this.input?.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){if(this.droparea){this.dropareaWrapper?.focus(t);return}this.button?.focus(t)}blur(){if(this.droparea){this.dropareaWrapper?.blur();return}this.button?.blur()}handleFiles(t){if(!t){this.value="";return}this.files=t}async handleTransferItems(t){if(!t)return this.value="",new Promise((p,h)=>{h(new Error("No proper items found"))});let n=Array.from(t).map(p=>p.webkitGetAsEntry()).map(p=>this.getFilesFromEntry(p)),s=(await Promise.all(n)).flat(),l=new DataTransfer;return Array.from(s).forEach(p=>l.items.add(p)),l.files}async getFilesFromEntry(t){return t?t.isFile?new Promise((r,n)=>{t.file(a=>r([a]),n)}):t.isDirectory?new Promise((r,n)=>{t.createReader().readEntries(s=>{Promise.all(s.map(l=>this.getFilesFromEntry(l))).then(l=>{r(l.flat())}).catch(n)})}):[]:[]}handleClick(t){t.preventDefault(),this.input.click()}handleChange(t){t.preventDefault(),t.stopPropagation(),this.updatePreview();let r=this.files?.[0];if(this.uploadUrl&&r){this.uploadFile(r);return}this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}async uploadFile(t){this.uploading=!0;try{let r=new FormData;r.append("file",t,t.name);let n=await fetch(this.uploadUrl,{method:"POST",body:r,credentials:"same-origin"});if(!n.ok)throw new Error(`upload failed with status ${n.status}`);let a=await n.json();if(!a.url)throw new Error("upload response missing url");this.src=a.url,this.input.value="",this.files=null,this.clearedByUser=!1,this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}catch(r){console.warn("<zn-file> upload failed",r),this.input.value="",this.files=null,this.emit("zn-error")}finally{this.uploading=!1}}handleFocus(){this.emit("zn-focus")}handleBlur(){this.emit("zn-blur")}clear(){this.input&&(this.input.value=""),this.files=null,this.src="",this.updatePreview(),this.formControlController.updateValidity()}updatePreview(){this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null);let t=this.files?.[0];t&&t.type.startsWith("image/")&&(this.fileObjectUrl=URL.createObjectURL(t))}get previewSrc(){return this.fileObjectUrl??this.src??""}disconnectedCallback(){super.disconnectedCallback(),this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null)}renderFileValueWithDelete(){let t=Array.from(this.files||[]),r=this.clearable,n=this.localize.term("numFilesSelected",0,this.webkitdirectory);return u`
|
|
3802
|
+
`}};ct.styles=[z(Se),z(X_)],c([F("slot:not([name])")],ct.prototype,"defaultSlot",2),c([F(".radio-group__validation-input")],ct.prototype,"validationInput",2),c([R()],ct.prototype,"errorMessage",2),c([R()],ct.prototype,"defaultValue",2),c([d()],ct.prototype,"label",2),c([d({attribute:"label-tooltip"})],ct.prototype,"labelTooltip",2),c([d({attribute:"help-text"})],ct.prototype,"helpText",2),c([d()],ct.prototype,"name",2),c([d({reflect:!0})],ct.prototype,"value",2),c([d({reflect:!0})],ct.prototype,"size",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"horizontal",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"contained",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"square",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"wrap",2),c([d({reflect:!0})],ct.prototype,"form",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],ct.prototype,"handleSizeChange",1),c([K("value")],ct.prototype,"handleValueChange",1);var cL=ct;ct.define("zn-radio-group");var J_=(o,i,t)=>{let r=new Map;for(let n=i;n<=t;n++)r.set(o[n],n);return r},Jo=yt(class extends rr{constructor(o){if(super(o),o.type!==lr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,i,t){let r;t===void 0?t=i:i!==void 0&&(r=i);let n=[],a=[],s=0;for(let l of o)n[s]=r?r(l,s):s,a[s]=t(l,s),s++;return{values:a,keys:n}}render(o,i,t){return this.dt(o,i,t).values}update(o,[i,t,r]){let n=Ub(o),{values:a,keys:s}=this.dt(i,t,r);if(!Array.isArray(n))return this.ut=s,a;let l=this.ut??(this.ut=[]),p=[],h,m,f=0,b=n.length-1,g=0,v=a.length-1;for(;f<=b&&g<=v;)if(n[f]===null)f++;else if(n[b]===null)b--;else if(l[f]===s[g])p[g]=bo(n[f],a[g]),f++,g++;else if(l[b]===s[v])p[v]=bo(n[b],a[v]),b--,v--;else if(l[f]===s[v])p[v]=bo(n[f],a[v]),rs(o,p[v+1],n[f]),f++,v--;else if(l[b]===s[g])p[g]=bo(n[b],a[g]),rs(o,n[f],n[b]),b--,g++;else if(h===void 0&&(h=J_(s,g,v),m=J_(l,f,b)),h.has(l[f]))if(h.has(l[b])){let y=m.get(s[g]),S=y!==void 0?n[y]:null;if(S===null){let T=rs(o,n[f]);bo(T,a[g]),p[g]=T}else p[g]=bo(S,a[g]),rs(o,n[f],S),n[y]=null;g++}else yd(n[b]),b--;else yd(n[f]),f++;for(;g<=v;){let y=rs(o,p[v+1]);bo(y,a[g]),p[g++]=y}for(;f<=b;){let y=n[f++];y!==null&&yd(y)}return this.ut=s,is(o,p),vt}});var Z_=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.input__control{border:0;clip-path:inset(50%);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.form-control--droparea .input__control{left:50%}.form-control-input{position:relative}.button__wrapper{align-items:center;display:flex;gap:var(--zn-input-spacing-medium)}.form-control--small .button__wrapper{gap:var(--zn-input-spacing-small)}:host([size=large]) .button__wrapper{gap:var(--zn-input-spacing-large)}.input__value{display:inline-flex;justify-content:center;align-items:center;gap:var(--zn-spacing-small);color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__value.input__value--hidden{display:none}.input__delete{cursor:pointer;color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__delete:hover{color:var(--zn-color-primary-600)}.input__value--placeholder{color:var(--zn-input-help-text-color)}.form-control--small .input__value{font-size:var(--zn-input-label-font-size-small)}.form-control--large .input__value{font-size:var(--zn-input-label-font-size-large)}.form-control--user-dragging:not([disabled]) .button::part(base){background:none;border-color:var(--zn-color-primary-900);color:var(--zn-color-primary-900)}.droparea{--highlight-color:var(--zn-color-primary-600);position:relative;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);font:var(--zn-font-size-medium);min-height:180px;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.droparea:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}:host([disabled]) .droparea{--highlight-color:var(--zn-color-neutral-600)}:host([disabled]) .input__value{display:none}.droparea__background{align-items:center;display:flex;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large) var(--zn-spacing-medium);width:100%;height:100%;min-height:inherit;box-sizing:border-box}.droparea__clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.droparea__upload{text-transform:uppercase;letter-spacing:0.02em}.droparea--has-preview .droparea__background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.droparea__preview{display:block;position:relative;z-index:1;width:100%;height:150px;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;text-align:center;font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-color)}.droparea__filename{color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium);font-weight:var(--zn-font-weight-medium);word-break:break-all;text-align:center;padding:0 var(--zn-spacing-3x-large)}.file-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}.form-control--small .droparea{font:var(--zn-font-size-small);min-height:140px}.form-control--small .droparea__preview{height:110px}.form-control--large .droparea{font:var(--zn-font-size-large);min-height:220px}.form-control--large .droparea__preview{height:190px}:host([disabled]) .droparea,:host([disabled]) .input__value{cursor:not-allowed;opacity:0.5}:host(:not([disabled])) .form-control--user-dragging .droparea{background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-600);cursor:pointer}:host(:not([disabled])) .droparea:not(:focus-visible):hover{--highlight-color:var(--zn-color-primary-800);border-color:var(--zn-color-primary-700);cursor:pointer}:host(:not([disabled])) .droparea:hover .droparea__upload::part(base),:host(:not([disabled])) .droparea__upload:hover::part(base),:host(:not([disabled])) .form-control--user-dragging .droparea__upload::part(base){background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-700);color:var(--zn-color-primary-800)}.droparea__upload::part(icon){pointer-events:none}:host([data-user-invalid]:not([disabled])) .droparea{border-color:var(--zn-color-error)}.clear-confirm__text{margin:0;color:var(--zn-input-color)}.form-control__link{display:inline-block;margin-top:var(--zn-spacing-x-small);font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-color-primary-700);word-break:break-all;text-decoration:none;max-width:100%}.form-control__link:hover{color:var(--zn-color-primary-800);text-decoration:underline}`;var be=class extends k{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-change"],value:t=>t.uploadUrl?t.src?t.src:t.clearedByUser?"":void 0:t.files?.length?t.files:t.clearedByUser?"":void 0});this.clearedByUser=!1;this.hasSlotController=new Y(this,"help-text","label");this.localize=new Ht(this);this.userIsDragging=!1;this.fileObjectUrl=null;this.name="";this.defaultValue="";this.size="medium";this.label="";this.clearable=!1;this.helpText="";this.disabled=!1;this.droparea=!1;this.accept="";this.multiple=!1;this.webkitdirectory=!1;this.form="";this.required=!1;this.hideValue=!1;this.src="";this.triggerSubmit=!1;this.showLink=!1;this.uploadUrl="";this.uploading=!1;this.handleInvalid=t=>{this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)};this.handleDragOver=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!0};this.handleDragLeave=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!1};this.handleDrop=async t=>{if(t.preventDefault(),t.stopPropagation(),!t.dataTransfer)return;let r=await this.handleTransferItems(t.dataTransfer.items);if(this.userIsDragging=!1,!r)return;if(!this.multiple&&!this.webkitdirectory&&r.length>1){this.emit("zn-error");return}if(this.hasSlotController.test("trigger"))this.handleFiles(r);else{let a=this.inputChosen,s=this.dropareaIcon;if(this.droparea&&s){let l=Sn(s,"file.iconDrop",{dir:this.localize.dir()});yi(s,l.keyframes,l.options)}if(a){let l=Sn(a,"file.text.disappear",{dir:this.localize.dir()});await yi(a,l.keyframes,l.options)}if(this.handleFiles(r),a){let l=Sn(a,"file.text.appear",{dir:this.localize.dir()});await yi(a,l.keyframes,l.options)}}this.input.dispatchEvent(new Event("change"))};this.removeFile=t=>{t.preventDefault(),t.stopPropagation();let r=Array.from(this.files||[]),n=t.target.closest("[data-file-name]")?.getAttribute("data-file-name"),a=r.findIndex(l=>l.name===n);a!==-1&&r.splice(a,1);let s=new DataTransfer;r.forEach(l=>s.items.add(l)),this.files=s.files,s.files.length||(this.clearedByUser=!0),this.input.dispatchEvent(new Event("change"))};this.handleClearClick=t=>{t.preventDefault(),t.stopPropagation(),this.clearConfirmDialog?.show()};this.confirmClear=()=>{let t=(this.files?.length??0)>0;this.input.value="",this.files=null,t||(this.src=""),this.clearedByUser=!0,this.clearConfirmDialog?.hide(),this.input.dispatchEvent(new Event("change")),this.emit("zn-clear")}}set files(t){this.input&&(this.input.files=t,t?.length&&(this.clearedByUser=!1),this.updatePreview())}get files(){return this.input?.files}set value(t){if(this.uploadUrl){this.src=t??"";return}this.input&&(this.input.value=t)}get value(){return this.uploadUrl?this.src??"":this.input?.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){if(this.droparea){this.dropareaWrapper?.focus(t);return}this.button?.focus(t)}blur(){if(this.droparea){this.dropareaWrapper?.blur();return}this.button?.blur()}handleFiles(t){if(!t){this.value="";return}this.files=t}async handleTransferItems(t){if(!t)return this.value="",new Promise((p,h)=>{h(new Error("No proper items found"))});let n=Array.from(t).map(p=>p.webkitGetAsEntry()).map(p=>this.getFilesFromEntry(p)),s=(await Promise.all(n)).flat(),l=new DataTransfer;return Array.from(s).forEach(p=>l.items.add(p)),l.files}async getFilesFromEntry(t){return t?t.isFile?new Promise((r,n)=>{t.file(a=>r([a]),n)}):t.isDirectory?new Promise((r,n)=>{t.createReader().readEntries(s=>{Promise.all(s.map(l=>this.getFilesFromEntry(l))).then(l=>{r(l.flat())}).catch(n)})}):[]:[]}handleClick(t){t.preventDefault(),this.input.click()}handleChange(t){t.preventDefault(),t.stopPropagation(),this.updatePreview();let r=this.files?.[0];if(this.uploadUrl&&r){this.uploadFile(r);return}this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}async uploadFile(t){this.uploading=!0;try{let r=new FormData;r.append("file",t,t.name);let n=await fetch(this.uploadUrl,{method:"POST",body:r,credentials:"same-origin"});if(!n.ok)throw new Error(`upload failed with status ${n.status}`);let a=await n.json();if(!a.url)throw new Error("upload response missing url");this.src=a.url,this.input.value="",this.files=null,this.clearedByUser=!1,this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}catch(r){console.warn("<zn-file> upload failed",r),this.input.value="",this.files=null,this.emit("zn-error")}finally{this.uploading=!1}}handleFocus(){this.emit("zn-focus")}handleBlur(){this.emit("zn-blur")}clear(){this.input&&(this.input.value=""),this.files=null,this.src="",this.updatePreview(),this.formControlController.updateValidity()}updatePreview(){this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null);let t=this.files?.[0];t&&t.type.startsWith("image/")&&(this.fileObjectUrl=URL.createObjectURL(t))}get previewSrc(){return this.fileObjectUrl??this.src??""}disconnectedCallback(){super.disconnectedCallback(),this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null)}renderFileValueWithDelete(){let t=Array.from(this.files||[]),r=this.clearable,n=this.localize.term("numFilesSelected",0,this.webkitdirectory);return u`
|
|
3799
3803
|
${t?u`
|
|
3800
3804
|
<div class="file_wrapper">
|
|
3801
3805
|
${Jo(t,a=>u`
|
|
@@ -4009,7 +4013,7 @@ ${Na(this.code(i,t))}
|
|
|
4009
4013
|
</div>
|
|
4010
4014
|
</div>
|
|
4011
4015
|
</div>
|
|
4012
|
-
`}};Tt.dependencies={"zn-icon":ne,"zn-tooltip":Xi},Tt.styles=z(t2),c([d()],Tt.prototype,"caption",2),c([d()],Tt.prototype,"description",2),c([d({type:Boolean})],Tt.prototype,"stacked",2),c([d({reflect:!0})],Tt.prototype,"size",2),c([d({attribute:"edit-on-hover",type:Boolean})],Tt.prototype,"editOnHover",2),c([d({attribute:"help-tooltip"})],Tt.prototype,"helpTooltip",2),c([d()],Tt.prototype,"icon",2),c([d()],Tt.prototype,"value",2),c([d({type:Boolean})],Tt.prototype,"inline",2),c([d({type:Boolean})],Tt.prototype,"grid",2),c([d({type:Boolean,attribute:"no-padding"})],Tt.prototype,"noPadding",2),c([d({type:Boolean,attribute:"flush"})],Tt.prototype,"flush",2),c([d({type:Boolean,attribute:"align-end"})],Tt.prototype,"alignEnd",2),c([d({type:Boolean,attribute:"align-center"})],Tt.prototype,"alignCenter",2);var hL=Tt;Tt.define("zn-item");var i2={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Aland",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthelemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Bonaire",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"East Timor",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},r2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},uL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],mL=[...Object.keys(i2)].sort((o,i)=>o.localeCompare(i)),fL=[...uL,...mL],gL=Array.from(new Set(fL)),n2={getName:"country",getData:gL.map((o=>({key:o,value:i2[o],prefix:r2[o]?r2[o]:""})))};var a2={ALL:"Albania Lek",AED:"United Arab Emirates Dirham",AFN:"Afghanistan Afghani",ARS:"Argentina Peso",AWG:"Aruba Guilder",AUD:"Australia Dollar",AZN:"Azerbaijan New Manat",BSD:"Bahamas Dollar",BBD:"Barbados Dollar",BDT:"Bangladeshi taka",BYR:"Belarus Ruble",BZD:"Belize Dollar",BMD:"Bermuda Dollar",BOB:"Bolivia Boliviano",BAM:"Bosnia and Herzegovina Convertible Marka",BWP:"Botswana Pula",BGN:"Bulgaria Lev",BRL:"Brazil Real",BND:"Brunei Darussalam Dollar",KHR:"Cambodia Riel",CAD:"Canada Dollar",KYD:"Cayman Islands Dollar",CLP:"Chile Peso",CNY:"China Yuan Renminbi",COP:"Colombia Peso",CRC:"Costa Rica Colon",HRK:"Croatia Kuna",CUP:"Cuba Peso",CZK:"Czech Republic Koruna",DKK:"Denmark Krone",DOP:"Dominican Republic Peso",XCD:"East Caribbean Dollar",EGP:"Egypt Pound",SVC:"El Salvador Colon",EEK:"Estonia Kroon",EUR:"Euro Member Countries",FKP:"Falkland Islands (Malvinas) Pound",FJD:"Fiji Dollar",GHC:"Ghana Cedis",GIP:"Gibraltar Pound",GTQ:"Guatemala Quetzal",GGP:"Guernsey Pound",GYD:"Guyana Dollar",HNL:"Honduras Lempira",HKD:"Hong Kong Dollar",HUF:"Hungary Forint",ISK:"Iceland Krona",INR:"India Rupee",IDR:"Indonesia Rupiah",IRR:"Iran Rial",IMP:"Isle of Man Pound",ILS:"Israel Shekel",JMD:"Jamaica Dollar",JPY:"Japan Yen",JEP:"Jersey Pound",KZT:"Kazakhstan Tenge",KPW:"Korea (North) Won",KRW:"Korea (South) Won",KGS:"Kyrgyzstan Som",LAK:"Laos Kip",LVL:"Latvia Lat",LBP:"Lebanon Pound",LRD:"Liberia Dollar",LTL:"Lithuania Litas",MKD:"Macedonia Denar",MYR:"Malaysia Ringgit",MUR:"Mauritius Rupee",MXN:"Mexico Peso",MNT:"Mongolia Tughrik",MZN:"Mozambique Metical",NAD:"Namibia Dollar",NPR:"Nepal Rupee",ANG:"Netherlands Antilles Guilder",NZD:"New Zealand Dollar",NIO:"Nicaragua Cordoba",NGN:"Nigeria Naira",NOK:"Norway Krone",OMR:"Oman Rial",PKR:"Pakistan Rupee",PAB:"Panama Balboa",PYG:"Paraguay Guarani",PEN:"Peru Nuevo Sol",PHP:"Philippines Peso",PLN:"Poland Zloty",QAR:"Qatar Riyal",RON:"Romania New Leu",RUB:"Russia Ruble",SHP:"Saint Helena Pound",SAR:"Saudi Arabia Riyal",RSD:"Serbia Dinar",SCR:"Seychelles Rupee",SGD:"Singapore Dollar",SBD:"Solomon Islands Dollar",SOS:"Somalia Shilling",ZAR:"South Africa Rand",LKR:"Sri Lanka Rupee",SEK:"Sweden Krona",CHF:"Switzerland Franc",SRD:"Suriname Dollar",SYP:"Syria Pound",TWD:"Taiwan New Dollar",THB:"Thailand Baht",TTD:"Trinidad and Tobago Dollar",TRY:"Turkey Lira",TRL:"Turkey Lira",TVD:"Tuvalu Dollar",UAH:"Ukraine Hryvna",GBP:"Great British Pound",USD:"United States Dollar",UYU:"Uruguay Peso",UZS:"Uzbekistan Som",VEF:"Venezuela Bolivar",VND:"Viet Nam Dong",YER:"Yemen Rial",ZWD:"Zimbabwe Dollar"},o2={AED:"\u062F.\u0625",AFN:"\u060B",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20BC",BAM:"KM",BBD:"$",BDT:"\u09F3",BGN:"\u043B\u0432",BHD:".\u062F.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20BF",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xA5",CNY:"\xA5",COP:"$",COU:"COU",CRC:"\u20A1",CUC:"$",CUP:"\u20B1",CVE:"$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062F\u062C",EEK:"kr",EGP:"\xA3",ERN:"Nfk",ETB:"Br",ETH:"\u039E",EUR:"\u20AC",FJD:"$",FKP:"\xA3",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHC:"\u20B5",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"\u20B9",IQD:"\u0639.\u062F",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u043B\u0432",KHR:"\u17DB",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"$",KZT:"\u20B8",LAK:"\u20AD",LBP:"\xA3",LKR:"\u20A8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043D",MMK:"K",MNT:"\u20AE",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20A8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"\u20A8",NZD:"$",OMR:"\uFDFC",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"\u20A8",PLN:"z\u0142",PYG:"Gs",QAR:"\uFDFC",RMB:"\uFFE5",RON:"lei",RSD:"\u0414\u0438\u043D.",RUB:"\u20BD",RWF:"R\u20A3",SAR:"SAR",SBD:"$",SCR:"\u20A8",SDG:"\u062C.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xA3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xA3",SZL:"E",THB:"\u0E3F",TJS:"SM",TMT:"T",TND:"\u062F.\u062A",TOP:"T$",TRL:"\u20A4",TRY:"\u20BA",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043B\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20AB",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20A3",XSU:"Sucre",XUA:"XUA",YER:"\uFDFC",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"},og=["USD","EUR","GBP","CAD","AUD"],bL=[...Object.keys(a2)].sort((o,i)=>o.localeCompare(i)),s2=(o=!1)=>{let i=bL.filter(n=>!og.includes(n)),r=[...og,...i].map((n=>({key:n,value:n.concat(" - ").concat(a2[n]),prefix:o2[n]?o2[n]:""})));if(o){let n={key:og.join(","),value:"Common - USD, EUR, GBP, CAD & AUD",prefix:""};r.unshift(n)}return{getName:"currency",getData:r}};var c2={AF:"93",AL:"355",DZ:"213",AS:"1-684",AD:"376",AO:"244",AI:"1-264",AQ:"672",AG:"1-268",AR:"54",AM:"374",AW:"297",AU:"61",AT:"43",AZ:"994",BS:"1-242",BH:"973",BD:"880",BB:"1-246",BY:"375",BE:"32",BZ:"501",BJ:"229",BM:"1-441",BT:"975",BO:"591",BA:"387",BW:"267",BR:"55",IO:"246",VG:"1-284",BN:"673",BG:"359",BF:"226",BI:"257",KH:"855",CM:"237",CA:"1",CV:"238",KY:"1-345",CF:"236",TD:"235",CL:"56",CN:"86",CX:"61",CC:"61",CO:"57",KM:"269",CK:"682",CR:"506",HR:"385",CU:"53",CW:"599",CY:"357",CZ:"420",CD:"243",DK:"45",DJ:"253",DM:"1-767",DO:"1-809",TL:"670",EC:"593",EG:"20",SV:"503",GQ:"240",ER:"291",EE:"372",ET:"251",FK:"500",FO:"298",FJ:"679",FI:"358",FR:"33",PF:"689",GA:"241",GM:"220",GE:"995",DE:"49",GH:"233",GI:"350",GR:"30",GL:"299",GD:"1-473",GU:"1-671",GT:"502",GG:"44-1481",GN:"224",GW:"245",GY:"592",HT:"509",HN:"504",HK:"852",HU:"36",IS:"354",IN:"91",ID:"62",IR:"98",IQ:"964",IE:"353",IM:"44-1624",IL:"972",IT:"39",CI:"225",JM:"1-876",JP:"81",JE:"44-1534",JO:"962",KZ:"7",KE:"254",KI:"686",XK:"383",KW:"965",KG:"996",LA:"856",LV:"371",LB:"961",LS:"266",LR:"231",LY:"218",LI:"423",LT:"370",LU:"352",MO:"853",MK:"389",MG:"261",MW:"265",MY:"60",MV:"960",ML:"223",MT:"356",MH:"692",MR:"222",MU:"230",YT:"262",MX:"52",FM:"691",MD:"373",MC:"377",MN:"976",ME:"382",MS:"1-664",MA:"212",MZ:"258",MM:"95",NA:"264",NR:"674",NP:"977",NL:"31",AN:"599",NC:"687",NZ:"64",NI:"505",NE:"227",NG:"234",NU:"683",KP:"850",MP:"1-670",NO:"47",OM:"968",PK:"92",PW:"680",PS:"970",PA:"507",PG:"675",PY:"595",PE:"51",PH:"63",PN:"64",PL:"48",PT:"351",PR:"1-787",QA:"974",CG:"242",RE:"262",RO:"40",RU:"7",RW:"250",BL:"590",SH:"290",KN:"1-869",LC:"1-758",MF:"590",PM:"508",VC:"1-784",WS:"685",SM:"378",ST:"239",SA:"966",SN:"221",RS:"381",SC:"248",SL:"232",SG:"65",SX:"1-721",SK:"421",SI:"386",SB:"677",SO:"252",ZA:"27",KR:"82",SS:"211",ES:"34",LK:"94",SD:"249",SR:"597",SJ:"47",SZ:"268",SE:"46",CH:"41",SY:"963",TW:"886",TJ:"992",TZ:"255",TH:"66",TG:"228",TK:"690",TO:"676",TT:"1-868",TN:"216",TR:"90",TM:"993",TC:"1-649",TV:"688",VI:"1-340",UG:"256",UA:"380",AE:"971",GB:"44",US:"1",UY:"598",UZ:"998",VU:"678",VA:"379",VE:"58",VN:"84",WF:"681",EH:"212",YE:"967",ZM:"260",ZW:"263"},l2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},vL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],yL=[...Object.keys(c2)].sort((o,i)=>o.localeCompare(i)),xL=[...vL,...yL],wL=Array.from(new Set(xL)),d2={getName:"Dial Prefix",getData:wL.map((o=>({key:o,value:`${o} +(${c2[o]})`,prefix:l2[o]?l2[o]:""})))};var zL={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",AS:"American Samoa",GU:"Guam",MP:"Northern Mariana Islands",PR:"Puerto Rico",VI:"U.S. Virgin Islands"},p2={getName:"state",getData:Object.entries(zL).map(([o,i])=>({key:o,value:i}))};var h2={getName:"Empty",getData:[]};var u2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.color-icon{width:var(--zn-spacing-medium);height:var(--zn-spacing-medium);display:block;border-radius:var(--zn-border-radius-circle);flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}zn-select::part(listbox){max-height:300px;padding-block:0}.select__icon{font-size:var(--zn-font-size-x-large);line-height:1;display:inline-flex;align-items:center}.select__icon:empty{display:none}:host([size=small]) .select__icon{padding-inline-start:var(--zn-input-spacing-small);margin-inline-end:var(--zn-input-spacing-small)}:host([size=small]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-small);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([icon-position=start][icon-empty][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([size=medium]) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host([size=medium]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([icon-position=start][icon-empty][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([size=large]) .select__icon{padding-inline-start:var(--zn-input-spacing-large);margin-inline-end:var(--zn-input-spacing-large)}:host([size=large]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-large);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host([icon-position=start][icon-empty][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host(:not([size])) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host(:not([size])) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end]:not([size])) zn-select::part(combobox),:host([icon-position=start][icon-empty]:not([size])) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}`;var qe=class extends k{constructor(){super();this.value="";this.defaultValue="";this.iconPosition="none";this.size="medium";this.allowAll=!1;this.allowCommon=!1;this.label="";this.labelTooltip="";this.contextNote="";this.placement="bottom";this.helpText="";this.required=!1;this.disabled=!1;this.iconOnly=!1;this.multiple=!1;this.selectFirst=!1;this.distinct="";this.conditional="";this.formControlController=new re(this);this.selectObserver=new Oe(this,{target:null,config:{attributes:!0,attributeFilter:["disabled"]},callback:()=>this._syncDisabledState()});this.closeOnTab=t=>{this.select.open&&t.key==="Tab"&&this.select.hide().then()};this.handleInput=t=>{let r=t.target;this.value=r.value??(this.multiple?[]:"")};this.handleClear=()=>{this.value=this.multiple?[]:""};this.blur=()=>{this.select.blur()};this.iconOnly&&this.iconPosition==="none"&&(this.iconPosition="start")}get validationMessage(){return this.select.validationMessage}get validity(){return this.select.validity}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.closeOnTab)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.closeOnTab)}async firstUpdated(t){super.firstUpdated(t),this.select&&(await this.select.updateComplete,this.select.addEventListener("zn-change",()=>{this._updatePrefix()}),this._observeSelectDisabled()),this._updatePrefix()}async updated(t){super.updated(t),(t.has("value")||t.has("multiple"))&&this._normalizeValue(),(t.has("value")||t.has("provider")||t.has("iconPosition"))&&(this.select&&await this.select.updateComplete,this._updatePrefix())}checkValidity(){return this.select.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.select.reportValidity()}setCustomValidity(t){return this.select.setCustomValidity(t)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.select&&(await this.select.updateComplete,await new Promise(t=>setTimeout(t,0))),this._updatePrefix()}getLocalProvider(t){switch(t){case"color":return zh;case"currency":return s2(this.allowCommon);case"country":return n2;case"phone":return d2;case"us-state":return p2;default:return h2}}render(){let t=this.getLocalProvider(this.provider),r=this.filter||[],n=t.getData;if(r.length){let a=r.map(s=>s.toUpperCase());n=t.getData.reduce((s,l)=>{let p=l.key.toUpperCase();if(p.includes(",")){let m=p.split(",").map(f=>f.trim()).filter(f=>a.includes(f));m.length>1&&s.push({...l,key:m.join(","),value:`Common - ${m.join(", ")}`})}else a.includes(p)&&s.push(l);return s},[])}if(this.provider!=="color"&&this.allowAll){let l={key:"",value:{currency:"All Currencies",country:"All Countries",phone:"All Phones","us-state":"All States"}[this.provider]||"All",prefix:""};n=[l,...n.filter(p=>p.key!==l.key)]}return u`
|
|
4016
|
+
`}};Tt.dependencies={"zn-icon":ne,"zn-tooltip":gi},Tt.styles=z(t2),c([d()],Tt.prototype,"caption",2),c([d()],Tt.prototype,"description",2),c([d({type:Boolean})],Tt.prototype,"stacked",2),c([d({reflect:!0})],Tt.prototype,"size",2),c([d({attribute:"edit-on-hover",type:Boolean})],Tt.prototype,"editOnHover",2),c([d({attribute:"help-tooltip"})],Tt.prototype,"helpTooltip",2),c([d()],Tt.prototype,"icon",2),c([d()],Tt.prototype,"value",2),c([d({type:Boolean})],Tt.prototype,"inline",2),c([d({type:Boolean})],Tt.prototype,"grid",2),c([d({type:Boolean,attribute:"no-padding"})],Tt.prototype,"noPadding",2),c([d({type:Boolean,attribute:"flush"})],Tt.prototype,"flush",2),c([d({type:Boolean,attribute:"align-end"})],Tt.prototype,"alignEnd",2),c([d({type:Boolean,attribute:"align-center"})],Tt.prototype,"alignCenter",2);var hL=Tt;Tt.define("zn-item");var i2={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Aland",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthelemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Bonaire",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"East Timor",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},r2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},uL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],mL=[...Object.keys(i2)].sort((o,i)=>o.localeCompare(i)),fL=[...uL,...mL],gL=Array.from(new Set(fL)),n2={getName:"country",getData:gL.map((o=>({key:o,value:i2[o],prefix:r2[o]?r2[o]:""})))};var a2={ALL:"Albania Lek",AED:"United Arab Emirates Dirham",AFN:"Afghanistan Afghani",ARS:"Argentina Peso",AWG:"Aruba Guilder",AUD:"Australia Dollar",AZN:"Azerbaijan New Manat",BSD:"Bahamas Dollar",BBD:"Barbados Dollar",BDT:"Bangladeshi taka",BYR:"Belarus Ruble",BZD:"Belize Dollar",BMD:"Bermuda Dollar",BOB:"Bolivia Boliviano",BAM:"Bosnia and Herzegovina Convertible Marka",BWP:"Botswana Pula",BGN:"Bulgaria Lev",BRL:"Brazil Real",BND:"Brunei Darussalam Dollar",KHR:"Cambodia Riel",CAD:"Canada Dollar",KYD:"Cayman Islands Dollar",CLP:"Chile Peso",CNY:"China Yuan Renminbi",COP:"Colombia Peso",CRC:"Costa Rica Colon",HRK:"Croatia Kuna",CUP:"Cuba Peso",CZK:"Czech Republic Koruna",DKK:"Denmark Krone",DOP:"Dominican Republic Peso",XCD:"East Caribbean Dollar",EGP:"Egypt Pound",SVC:"El Salvador Colon",EEK:"Estonia Kroon",EUR:"Euro Member Countries",FKP:"Falkland Islands (Malvinas) Pound",FJD:"Fiji Dollar",GHC:"Ghana Cedis",GIP:"Gibraltar Pound",GTQ:"Guatemala Quetzal",GGP:"Guernsey Pound",GYD:"Guyana Dollar",HNL:"Honduras Lempira",HKD:"Hong Kong Dollar",HUF:"Hungary Forint",ISK:"Iceland Krona",INR:"India Rupee",IDR:"Indonesia Rupiah",IRR:"Iran Rial",IMP:"Isle of Man Pound",ILS:"Israel Shekel",JMD:"Jamaica Dollar",JPY:"Japan Yen",JEP:"Jersey Pound",KZT:"Kazakhstan Tenge",KPW:"Korea (North) Won",KRW:"Korea (South) Won",KGS:"Kyrgyzstan Som",LAK:"Laos Kip",LVL:"Latvia Lat",LBP:"Lebanon Pound",LRD:"Liberia Dollar",LTL:"Lithuania Litas",MKD:"Macedonia Denar",MYR:"Malaysia Ringgit",MUR:"Mauritius Rupee",MXN:"Mexico Peso",MNT:"Mongolia Tughrik",MZN:"Mozambique Metical",NAD:"Namibia Dollar",NPR:"Nepal Rupee",ANG:"Netherlands Antilles Guilder",NZD:"New Zealand Dollar",NIO:"Nicaragua Cordoba",NGN:"Nigeria Naira",NOK:"Norway Krone",OMR:"Oman Rial",PKR:"Pakistan Rupee",PAB:"Panama Balboa",PYG:"Paraguay Guarani",PEN:"Peru Nuevo Sol",PHP:"Philippines Peso",PLN:"Poland Zloty",QAR:"Qatar Riyal",RON:"Romania New Leu",RUB:"Russia Ruble",SHP:"Saint Helena Pound",SAR:"Saudi Arabia Riyal",RSD:"Serbia Dinar",SCR:"Seychelles Rupee",SGD:"Singapore Dollar",SBD:"Solomon Islands Dollar",SOS:"Somalia Shilling",ZAR:"South Africa Rand",LKR:"Sri Lanka Rupee",SEK:"Sweden Krona",CHF:"Switzerland Franc",SRD:"Suriname Dollar",SYP:"Syria Pound",TWD:"Taiwan New Dollar",THB:"Thailand Baht",TTD:"Trinidad and Tobago Dollar",TRY:"Turkey Lira",TRL:"Turkey Lira",TVD:"Tuvalu Dollar",UAH:"Ukraine Hryvna",GBP:"Great British Pound",USD:"United States Dollar",UYU:"Uruguay Peso",UZS:"Uzbekistan Som",VEF:"Venezuela Bolivar",VND:"Viet Nam Dong",YER:"Yemen Rial",ZWD:"Zimbabwe Dollar"},o2={AED:"\u062F.\u0625",AFN:"\u060B",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20BC",BAM:"KM",BBD:"$",BDT:"\u09F3",BGN:"\u043B\u0432",BHD:".\u062F.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BOV:"BOV",BRL:"R$",BSD:"$",BTC:"\u20BF",BTN:"Nu.",BWP:"P",BYN:"Br",BYR:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHE:"CHE",CHF:"CHF",CHW:"CHW",CLF:"CLF",CLP:"$",CNH:"\xA5",CNY:"\xA5",COP:"$",COU:"COU",CRC:"\u20A1",CUC:"$",CUP:"\u20B1",CVE:"$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"\u062F\u062C",EEK:"kr",EGP:"\xA3",ERN:"Nfk",ETB:"Br",ETH:"\u039E",EUR:"\u20AC",FJD:"$",FKP:"\xA3",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHC:"\u20B5",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"\u20B9",IQD:"\u0639.\u062F",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u043B\u0432",KHR:"\u17DB",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"$",KZT:"\u20B8",LAK:"\u20AD",LBP:"\xA3",LKR:"\u20A8",LRD:"$",LSL:"M",LTC:"\u0141",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"\u0434\u0435\u043D",MMK:"K",MNT:"\u20AE",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"\u20A8",MVR:"Rf",MWK:"MK",MXN:"$",MXV:"MXV",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"\u20A8",NZD:"$",OMR:"\uFDFC",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"\u20A8",PLN:"z\u0142",PYG:"Gs",QAR:"\uFDFC",RMB:"\uFFE5",RON:"lei",RSD:"\u0414\u0438\u043D.",RUB:"\u20BD",RWF:"R\u20A3",SAR:"SAR",SBD:"$",SCR:"\u20A8",SDG:"\u062C.\u0633.",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SOS:"S",SRD:"$",SSP:"\xA3",STD:"Db",STN:"Db",SVC:"$",SYP:"\xA3",SZL:"E",THB:"\u0E3F",TJS:"SM",TMT:"T",TND:"\u062F.\u062A",TOP:"T$",TRL:"\u20A4",TRY:"\u20BA",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYI:"UYI",UYU:"$U",UYW:"UYW",UZS:"\u043B\u0432",VEF:"Bs",VES:"Bs.S",VND:"\u20AB",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"\u0243",XCD:"$",XOF:"CFA",XPF:"\u20A3",XSU:"Sucre",XUA:"XUA",YER:"\uFDFC",ZAR:"R",ZMW:"ZK",ZWD:"Z$",ZWL:"$"},og=["USD","EUR","GBP","CAD","AUD"],bL=[...Object.keys(a2)].sort((o,i)=>o.localeCompare(i)),s2=(o=!1)=>{let i=bL.filter(n=>!og.includes(n)),r=[...og,...i].map((n=>({key:n,value:n.concat(" - ").concat(a2[n]),prefix:o2[n]?o2[n]:""})));if(o){let n={key:og.join(","),value:"Common - USD, EUR, GBP, CAD & AUD",prefix:""};r.unshift(n)}return{getName:"currency",getData:r}};var c2={AF:"93",AL:"355",DZ:"213",AS:"1-684",AD:"376",AO:"244",AI:"1-264",AQ:"672",AG:"1-268",AR:"54",AM:"374",AW:"297",AU:"61",AT:"43",AZ:"994",BS:"1-242",BH:"973",BD:"880",BB:"1-246",BY:"375",BE:"32",BZ:"501",BJ:"229",BM:"1-441",BT:"975",BO:"591",BA:"387",BW:"267",BR:"55",IO:"246",VG:"1-284",BN:"673",BG:"359",BF:"226",BI:"257",KH:"855",CM:"237",CA:"1",CV:"238",KY:"1-345",CF:"236",TD:"235",CL:"56",CN:"86",CX:"61",CC:"61",CO:"57",KM:"269",CK:"682",CR:"506",HR:"385",CU:"53",CW:"599",CY:"357",CZ:"420",CD:"243",DK:"45",DJ:"253",DM:"1-767",DO:"1-809",TL:"670",EC:"593",EG:"20",SV:"503",GQ:"240",ER:"291",EE:"372",ET:"251",FK:"500",FO:"298",FJ:"679",FI:"358",FR:"33",PF:"689",GA:"241",GM:"220",GE:"995",DE:"49",GH:"233",GI:"350",GR:"30",GL:"299",GD:"1-473",GU:"1-671",GT:"502",GG:"44-1481",GN:"224",GW:"245",GY:"592",HT:"509",HN:"504",HK:"852",HU:"36",IS:"354",IN:"91",ID:"62",IR:"98",IQ:"964",IE:"353",IM:"44-1624",IL:"972",IT:"39",CI:"225",JM:"1-876",JP:"81",JE:"44-1534",JO:"962",KZ:"7",KE:"254",KI:"686",XK:"383",KW:"965",KG:"996",LA:"856",LV:"371",LB:"961",LS:"266",LR:"231",LY:"218",LI:"423",LT:"370",LU:"352",MO:"853",MK:"389",MG:"261",MW:"265",MY:"60",MV:"960",ML:"223",MT:"356",MH:"692",MR:"222",MU:"230",YT:"262",MX:"52",FM:"691",MD:"373",MC:"377",MN:"976",ME:"382",MS:"1-664",MA:"212",MZ:"258",MM:"95",NA:"264",NR:"674",NP:"977",NL:"31",AN:"599",NC:"687",NZ:"64",NI:"505",NE:"227",NG:"234",NU:"683",KP:"850",MP:"1-670",NO:"47",OM:"968",PK:"92",PW:"680",PS:"970",PA:"507",PG:"675",PY:"595",PE:"51",PH:"63",PN:"64",PL:"48",PT:"351",PR:"1-787",QA:"974",CG:"242",RE:"262",RO:"40",RU:"7",RW:"250",BL:"590",SH:"290",KN:"1-869",LC:"1-758",MF:"590",PM:"508",VC:"1-784",WS:"685",SM:"378",ST:"239",SA:"966",SN:"221",RS:"381",SC:"248",SL:"232",SG:"65",SX:"1-721",SK:"421",SI:"386",SB:"677",SO:"252",ZA:"27",KR:"82",SS:"211",ES:"34",LK:"94",SD:"249",SR:"597",SJ:"47",SZ:"268",SE:"46",CH:"41",SY:"963",TW:"886",TJ:"992",TZ:"255",TH:"66",TG:"228",TK:"690",TO:"676",TT:"1-868",TN:"216",TR:"90",TM:"993",TC:"1-649",TV:"688",VI:"1-340",UG:"256",UA:"380",AE:"971",GB:"44",US:"1",UY:"598",UZ:"998",VU:"678",VA:"379",VE:"58",VN:"84",WF:"681",EH:"212",YE:"967",ZM:"260",ZW:"263"},l2={AD:"\u{1F1E6}\u{1F1E9}",AE:"\u{1F1E6}\u{1F1EA}",AF:"\u{1F1E6}\u{1F1EB}",AG:"\u{1F1E6}\u{1F1EC}",AI:"\u{1F1E6}\u{1F1EE}",AL:"\u{1F1E6}\u{1F1F1}",AM:"\u{1F1E6}\u{1F1F2}",AO:"\u{1F1E6}\u{1F1F4}",AQ:"\u{1F1E6}\u{1F1F6}",AR:"\u{1F1E6}\u{1F1F7}",AS:"\u{1F1E6}\u{1F1F8}",AT:"\u{1F1E6}\u{1F1F9}",AU:"\u{1F1E6}\u{1F1FA}",AW:"\u{1F1E6}\u{1F1FC}",AX:"\u{1F1E6}\u{1F1FD}",AZ:"\u{1F1E6}\u{1F1FF}",BA:"\u{1F1E7}\u{1F1E6}",BB:"\u{1F1E7}\u{1F1E7}",BD:"\u{1F1E7}\u{1F1E9}",BE:"\u{1F1E7}\u{1F1EA}",BF:"\u{1F1E7}\u{1F1EB}",BG:"\u{1F1E7}\u{1F1EC}",BH:"\u{1F1E7}\u{1F1ED}",BI:"\u{1F1E7}\u{1F1EE}",BJ:"\u{1F1E7}\u{1F1EF}",BL:"\u{1F1E7}\u{1F1F1}",BM:"\u{1F1E7}\u{1F1F2}",BN:"\u{1F1E7}\u{1F1F3}",BO:"\u{1F1E7}\u{1F1F4}",BQ:"\u{1F1E7}\u{1F1F6}",BR:"\u{1F1E7}\u{1F1F7}",BS:"\u{1F1E7}\u{1F1F8}",BT:"\u{1F1E7}\u{1F1F9}",BV:"\u{1F1E7}\u{1F1FB}",BW:"\u{1F1E7}\u{1F1FC}",BY:"\u{1F1E7}\u{1F1FE}",BZ:"\u{1F1E7}\u{1F1FF}",CA:"\u{1F1E8}\u{1F1E6}",CC:"\u{1F1E8}\u{1F1E8}",CD:"\u{1F1E8}\u{1F1E9}",CF:"\u{1F1E8}\u{1F1EB}",CG:"\u{1F1E8}\u{1F1EC}",CH:"\u{1F1E8}\u{1F1ED}",CI:"\u{1F1E8}\u{1F1EE}",CK:"\u{1F1E8}\u{1F1F0}",CL:"\u{1F1E8}\u{1F1F1}",CM:"\u{1F1E8}\u{1F1F2}",CN:"\u{1F1E8}\u{1F1F3}",CO:"\u{1F1E8}\u{1F1F4}",CR:"\u{1F1E8}\u{1F1F7}",CU:"\u{1F1E8}\u{1F1FA}",CV:"\u{1F1E8}\u{1F1FB}",CW:"\u{1F1E8}\u{1F1FC}",CX:"\u{1F1E8}\u{1F1FD}",CY:"\u{1F1E8}\u{1F1FE}",CZ:"\u{1F1E8}\u{1F1FF}",DE:"\u{1F1E9}\u{1F1EA}",DJ:"\u{1F1E9}\u{1F1EF}",DK:"\u{1F1E9}\u{1F1F0}",DM:"\u{1F1E9}\u{1F1F2}",DO:"\u{1F1E9}\u{1F1F4}",DZ:"\u{1F1E9}\u{1F1FF}",EC:"\u{1F1EA}\u{1F1E8}",EE:"\u{1F1EA}\u{1F1EA}",EG:"\u{1F1EA}\u{1F1EC}",EH:"\u{1F1EA}\u{1F1ED}",ER:"\u{1F1EA}\u{1F1F7}",ES:"\u{1F1EA}\u{1F1F8}",ET:"\u{1F1EA}\u{1F1F9}",FI:"\u{1F1EB}\u{1F1EE}",FJ:"\u{1F1EB}\u{1F1EF}",FK:"\u{1F1EB}\u{1F1F0}",FM:"\u{1F1EB}\u{1F1F2}",FO:"\u{1F1EB}\u{1F1F4}",FR:"\u{1F1EB}\u{1F1F7}",GA:"\u{1F1EC}\u{1F1E6}",GB:"\u{1F1EC}\u{1F1E7}",GD:"\u{1F1EC}\u{1F1E9}",GE:"\u{1F1EC}\u{1F1EA}",GF:"\u{1F1EC}\u{1F1EB}",GG:"\u{1F1EC}\u{1F1EC}",GH:"\u{1F1EC}\u{1F1ED}",GI:"\u{1F1EC}\u{1F1EE}",GL:"\u{1F1EC}\u{1F1F1}",GM:"\u{1F1EC}\u{1F1F2}",GN:"\u{1F1EC}\u{1F1F3}",GP:"\u{1F1EC}\u{1F1F5}",GQ:"\u{1F1EC}\u{1F1F6}",GR:"\u{1F1EC}\u{1F1F7}",GS:"\u{1F1EC}\u{1F1F8}",GT:"\u{1F1EC}\u{1F1F9}",GU:"\u{1F1EC}\u{1F1FA}",GW:"\u{1F1EC}\u{1F1FC}",GY:"\u{1F1EC}\u{1F1FE}",HK:"\u{1F1ED}\u{1F1F0}",HM:"\u{1F1ED}\u{1F1F2}",HN:"\u{1F1ED}\u{1F1F3}",HR:"\u{1F1ED}\u{1F1F7}",HT:"\u{1F1ED}\u{1F1F9}",HU:"\u{1F1ED}\u{1F1FA}",ID:"\u{1F1EE}\u{1F1E9}",IE:"\u{1F1EE}\u{1F1EA}",IL:"\u{1F1EE}\u{1F1F1}",IM:"\u{1F1EE}\u{1F1F2}",IN:"\u{1F1EE}\u{1F1F3}",IO:"\u{1F1EE}\u{1F1F4}",IQ:"\u{1F1EE}\u{1F1F6}",IR:"\u{1F1EE}\u{1F1F7}",IS:"\u{1F1EE}\u{1F1F8}",IT:"\u{1F1EE}\u{1F1F9}",JE:"\u{1F1EF}\u{1F1EA}",JM:"\u{1F1EF}\u{1F1F2}",JO:"\u{1F1EF}\u{1F1F4}",JP:"\u{1F1EF}\u{1F1F5}",KE:"\u{1F1F0}\u{1F1EA}",KG:"\u{1F1F0}\u{1F1EC}",KH:"\u{1F1F0}\u{1F1ED}",KI:"\u{1F1F0}\u{1F1EE}",KM:"\u{1F1F0}\u{1F1F2}",KN:"\u{1F1F0}\u{1F1F3}",KP:"\u{1F1F0}\u{1F1F5}",KR:"\u{1F1F0}\u{1F1F7}",KW:"\u{1F1F0}\u{1F1FC}",KY:"\u{1F1F0}\u{1F1FE}",KZ:"\u{1F1F0}\u{1F1FF}",LA:"\u{1F1F1}\u{1F1E6}",LB:"\u{1F1F1}\u{1F1E7}",LC:"\u{1F1F1}\u{1F1E8}",LI:"\u{1F1F1}\u{1F1EE}",LK:"\u{1F1F1}\u{1F1F0}",LR:"\u{1F1F1}\u{1F1F7}",LS:"\u{1F1F1}\u{1F1F8}",LT:"\u{1F1F1}\u{1F1F9}",LU:"\u{1F1F1}\u{1F1FA}",LV:"\u{1F1F1}\u{1F1FB}",LY:"\u{1F1F1}\u{1F1FE}",MA:"\u{1F1F2}\u{1F1E6}",MC:"\u{1F1F2}\u{1F1E8}",MD:"\u{1F1F2}\u{1F1E9}",ME:"\u{1F1F2}\u{1F1EA}",MF:"\u{1F1F2}\u{1F1EB}",MG:"\u{1F1F2}\u{1F1EC}",MH:"\u{1F1F2}\u{1F1ED}",MK:"\u{1F1F2}\u{1F1F0}",ML:"\u{1F1F2}\u{1F1F1}",MM:"\u{1F1F2}\u{1F1F2}",MN:"\u{1F1F2}\u{1F1F3}",MO:"\u{1F1F2}\u{1F1F4}",MP:"\u{1F1F2}\u{1F1F5}",MQ:"\u{1F1F2}\u{1F1F6}",MR:"\u{1F1F2}\u{1F1F7}",MS:"\u{1F1F2}\u{1F1F8}",MT:"\u{1F1F2}\u{1F1F9}",MU:"\u{1F1F2}\u{1F1FA}",MV:"\u{1F1F2}\u{1F1FB}",MW:"\u{1F1F2}\u{1F1FC}",MX:"\u{1F1F2}\u{1F1FD}",MY:"\u{1F1F2}\u{1F1FE}",MZ:"\u{1F1F2}\u{1F1FF}",NA:"\u{1F1F3}\u{1F1E6}",NC:"\u{1F1F3}\u{1F1E8}",NE:"\u{1F1F3}\u{1F1EA}",NF:"\u{1F1F3}\u{1F1EB}",NG:"\u{1F1F3}\u{1F1EC}",NI:"\u{1F1F3}\u{1F1EE}",NL:"\u{1F1F3}\u{1F1F1}",NO:"\u{1F1F3}\u{1F1F4}",NP:"\u{1F1F3}\u{1F1F5}",NR:"\u{1F1F3}\u{1F1F7}",NU:"\u{1F1F3}\u{1F1FA}",NZ:"\u{1F1F3}\u{1F1FF}",OM:"\u{1F1F4}\u{1F1F2}",PA:"\u{1F1F5}\u{1F1E6}",PE:"\u{1F1F5}\u{1F1EA}",PF:"\u{1F1F5}\u{1F1EB}",PG:"\u{1F1F5}\u{1F1EC}",PH:"\u{1F1F5}\u{1F1ED}",PK:"\u{1F1F5}\u{1F1F0}",PL:"\u{1F1F5}\u{1F1F1}",PM:"\u{1F1F5}\u{1F1F2}",PN:"\u{1F1F5}\u{1F1F3}",PR:"\u{1F1F5}\u{1F1F7}",PS:"\u{1F1F5}\u{1F1F8}",PT:"\u{1F1F5}\u{1F1F9}",PW:"\u{1F1F5}\u{1F1FC}",PY:"\u{1F1F5}\u{1F1FE}",QA:"\u{1F1F6}\u{1F1E6}",RE:"\u{1F1F7}\u{1F1EA}",RO:"\u{1F1F7}\u{1F1F4}",RS:"\u{1F1F7}\u{1F1F8}",RU:"\u{1F1F7}\u{1F1FA}",RW:"\u{1F1F7}\u{1F1FC}",SA:"\u{1F1F8}\u{1F1E6}",SB:"\u{1F1F8}\u{1F1E7}",SC:"\u{1F1F8}\u{1F1E8}",SD:"\u{1F1F8}\u{1F1E9}",SE:"\u{1F1F8}\u{1F1EA}",SG:"\u{1F1F8}\u{1F1EC}",SH:"\u{1F1F8}\u{1F1ED}",SI:"\u{1F1F8}\u{1F1EE}",SJ:"\u{1F1F8}\u{1F1EF}",SK:"\u{1F1F8}\u{1F1F0}",SL:"\u{1F1F8}\u{1F1F1}",SM:"\u{1F1F8}\u{1F1F2}",SN:"\u{1F1F8}\u{1F1F3}",SO:"\u{1F1F8}\u{1F1F4}",SR:"\u{1F1F8}\u{1F1F7}",SS:"\u{1F1F8}\u{1F1F8}",ST:"\u{1F1F8}\u{1F1F9}",SV:"\u{1F1F8}\u{1F1FB}",SX:"\u{1F1F8}\u{1F1FD}",SY:"\u{1F1F8}\u{1F1FE}",SZ:"\u{1F1F8}\u{1F1FF}",TC:"\u{1F1F9}\u{1F1E8}",TD:"\u{1F1F9}\u{1F1E9}",TF:"\u{1F1F9}\u{1F1EB}",TG:"\u{1F1F9}\u{1F1EC}",TH:"\u{1F1F9}\u{1F1ED}",TJ:"\u{1F1F9}\u{1F1EF}",TK:"\u{1F1F9}\u{1F1F0}",TL:"\u{1F1F9}\u{1F1F1}",TM:"\u{1F1F9}\u{1F1F2}",TN:"\u{1F1F9}\u{1F1F3}",TO:"\u{1F1F9}\u{1F1F4}",TR:"\u{1F1F9}\u{1F1F7}",TT:"\u{1F1F9}\u{1F1F9}",TV:"\u{1F1F9}\u{1F1FB}",TW:"\u{1F1F9}\u{1F1FC}",TZ:"\u{1F1F9}\u{1F1FF}",UA:"\u{1F1FA}\u{1F1E6}",UG:"\u{1F1FA}\u{1F1EC}",UM:"\u{1F1FA}\u{1F1F2}",US:"\u{1F1FA}\u{1F1F8}",UY:"\u{1F1FA}\u{1F1FE}",UZ:"\u{1F1FA}\u{1F1FF}",VA:"\u{1F1FB}\u{1F1E6}",VC:"\u{1F1FB}\u{1F1E8}",VE:"\u{1F1FB}\u{1F1EA}",VG:"\u{1F1FB}\u{1F1EC}",VI:"\u{1F1FB}\u{1F1EE}",VN:"\u{1F1FB}\u{1F1F3}",VU:"\u{1F1FB}\u{1F1FA}",WF:"\u{1F1FC}\u{1F1EB}",WS:"\u{1F1FC}\u{1F1F8}",XK:"\u{1F1FD}\u{1F1F0}",YE:"\u{1F1FE}\u{1F1EA}",YT:"\u{1F1FE}\u{1F1F9}",ZA:"\u{1F1FF}\u{1F1E6}",ZM:"\u{1F1FF}\u{1F1F2}",ZW:"\u{1F1FF}\u{1F1FC}"},vL=["US","GB","CA","FR","DE","IT","ES","JP","CN","IN","BR","AU","MX","RU","ZA","KR","NL","SE","NO","FI"],yL=[...Object.keys(c2)].sort((o,i)=>o.localeCompare(i)),xL=[...vL,...yL],wL=Array.from(new Set(xL)),d2={getName:"Dial Prefix",getData:wL.map((o=>({key:o,value:`${o} +(${c2[o]})`,prefix:l2[o]?l2[o]:""})))};var zL={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",AS:"American Samoa",GU:"Guam",MP:"Northern Mariana Islands",PR:"Puerto Rico",VI:"U.S. Virgin Islands"},p2={getName:"state",getData:Object.entries(zL).map(([o,i])=>({key:o,value:i}))};var h2={getName:"Empty",getData:[]};var u2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.color-icon{width:var(--zn-spacing-medium);height:var(--zn-spacing-medium);display:block;border-radius:var(--zn-border-radius-circle);flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}zn-select::part(listbox){max-height:300px;padding-block:0}.select__icon{font-size:var(--zn-font-size-x-large);line-height:1;display:inline-flex;align-items:center}.select__icon:empty{display:none}:host([size=small]) .select__icon{padding-inline-start:var(--zn-input-spacing-small);margin-inline-end:var(--zn-input-spacing-small)}:host([size=small]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-small);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([icon-position=start][icon-empty][size=small]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-small) !important}:host([size=medium]) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host([size=medium]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([icon-position=start][icon-empty][size=medium]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}:host([size=large]) .select__icon{padding-inline-start:var(--zn-input-spacing-large);margin-inline-end:var(--zn-input-spacing-large)}:host([size=large]) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-large);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host([icon-position=start][icon-empty][size=large]) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-large) !important}:host(:not([size])) .select__icon{padding-inline-start:var(--zn-input-spacing-medium);margin-inline-end:var(--zn-input-spacing-medium)}:host(:not([size])) .select__icon--end{padding-inline-start:0;padding-inline-end:var(--zn-input-spacing-medium);margin-inline-end:0;margin-inline-start:auto}:host([icon-position=end]:not([size])) zn-select::part(combobox),:host([icon-position=start][icon-empty]:not([size])) zn-select::part(combobox){padding-inline-start:var(--zn-input-spacing-medium) !important}`;var qe=class extends k{constructor(){super();this.value="";this.defaultValue="";this.iconPosition="none";this.size="medium";this.allowAll=!1;this.allowCommon=!1;this.label="";this.labelTooltip="";this.contextNote="";this.placement="bottom";this.helpText="";this.required=!1;this.disabled=!1;this.iconOnly=!1;this.multiple=!1;this.selectFirst=!1;this.distinct="";this.conditional="";this.formControlController=new re(this);this.selectObserver=new Oe(this,{target:null,config:{attributes:!0,attributeFilter:["disabled"]},callback:()=>this._syncDisabledState()});this.closeOnTab=t=>{this.select.open&&t.key==="Tab"&&this.select.hide().then()};this.handleInput=t=>{let r=t.target;this.value=r.value??(this.multiple?[]:"")};this.handleClear=()=>{this.value=this.multiple?[]:""};this.blur=()=>{this.select.blur()};this.iconOnly&&this.iconPosition==="none"&&(this.iconPosition="start")}get validationMessage(){return this.select.validationMessage}get validity(){return this.select.validity}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.closeOnTab)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.closeOnTab)}async firstUpdated(t){super.firstUpdated(t),this.select&&(await this.select.updateComplete,this.select.addEventListener("zn-change",()=>{this._updatePrefix()}),this._observeSelectDisabled()),this._updatePrefix()}async updated(t){super.updated(t),(t.has("value")||t.has("multiple"))&&this._normalizeValue(),(t.has("value")||t.has("provider")||t.has("iconPosition"))&&(this.select&&await this.select.updateComplete,this._updatePrefix())}checkValidity(){return this.select.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.select.reportValidity()}setCustomValidity(t){return this.select.setCustomValidity(t)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.select&&(await this.select.updateComplete,await new Promise(t=>setTimeout(t,0))),this._updatePrefix()}getLocalProvider(t){switch(t){case"color":return zh;case"currency":return s2(this.allowCommon);case"country":return n2;case"phone":return d2;case"us-state":return p2;default:return h2}}render(){let t=this.getLocalProvider(this.provider),r=this.filter||[],n=t.getData;if(r.length){let a=r.map(s=>s.toUpperCase());n=t.getData.reduce((s,l)=>{let p=l.key.toUpperCase();if(p.includes(",")){let m=p.split(",").map(f=>f.trim()).filter(f=>a.includes(f));m.length>1&&s.push({...l,key:m.join(","),value:`Common - ${m.join(", ")}`})}else a.includes(p)&&s.push(l);return s},[])}if(this.provider!=="color"&&this.allowAll){let l={key:"",value:{currency:"All Currencies",country:"All Countries",phone:"All Phones","us-state":"All States"}[this.provider]||"All",prefix:""};n=[l,...n.filter(p=>p.key!==l.key)]}return u`
|
|
4013
4017
|
<zn-select id="select"
|
|
4014
4018
|
clearable=${this.clearable||B}
|
|
4015
4019
|
size="${this.size}"
|
|
@@ -4072,7 +4076,7 @@ ${Na(this.code(i,t))}
|
|
|
4072
4076
|
<zn-menu></zn-menu>
|
|
4073
4077
|
</zn-dropdown>
|
|
4074
4078
|
<slot></slot>
|
|
4075
|
-
</div>`}addButton(t){t&&(t.classList.add("zn-button-menu__added"),this._originalButtons.push({button:t,width:Math.max(t.offsetWidth,150)}),this.calculateVisibleButtons())}setDynamicButtons(t){this.removeAllButtons(),!(!t||t.length===0)&&t.forEach(r=>{this.addButton(r)})}removeButton(t){let r=this.querySelector(`zn-button.${t}`);r&&(this._originalButtons=this._originalButtons.filter(a=>a.button!==r),r.remove());let n=this.querySelector(`zn-menu-item#${t}`);n&&this.shadowRoot?.querySelector("zn-menu")&&n.remove(),this.calculateVisibleButtons()}removeAllButtons(){let t=this.shadowRoot?.querySelectorAll("zn-button.zn-button-menu__added");t&&t.forEach(n=>{n.remove()});let r=this.shadowRoot?.querySelectorAll("zn-menu-item.zn-button-menu__added");r&&r?.forEach(n=>{n.remove()}),this._buttons=[],this._originalButtons=this._originalButtons.filter(n=>!n.button.classList.contains("zn-button-menu__added")),this.calculateVisibleButtons()}};Gr.styles=z(f2),c([d({type:Number,attribute:"max-width"})],Gr.prototype,"maxWidth",2),c([d({type:Number})],Gr.prototype,"containerWidth",2),c([d({type:Number,attribute:"limit"})],Gr.prototype,"limit",2),c([d({type:Number,attribute:"max-level"})],Gr.prototype,"maxLevel",2),c([d({type:Number,attribute:"icon-size",reflect:!0})],Gr.prototype,"iconSize",2),c([d({type:Boolean,attribute:"no-gap"})],Gr.prototype,"noGap",2),c([d({type:Boolean,attribute:"no-padding"})],Gr.prototype,"noPadding",2),c([K("containerWidth",{waitUntilFirstUpdate:!0})],Gr.prototype,"watchContainerMaxWidth",1);var CL=Gr;Gr.define("zn-button-menu");var g2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:min(100vw,46rem);--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-medium) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.slideout{left:unset;top:0;bottom:0;right:0;margin:0;max-height:100%;height:100%;overflow:hidden;overflow-y:auto;flex-direction:column;z-index:2;padding:0;width:1100px;background:rgb(var(--zn-body));box-shadow:0 0 10px 0 rgba(0,0,0,0.1)}.slideout::backdrop{background:var(--zn-overlay-background-color)}.slideout__header{flex:0 0 auto;display:flex;border-bottom:1px solid rgb(var(--zn-border-color));background-color:var(--zn-panel-background-color)}.slideout__title{display:flex;flex:1 1 auto;align-items:center;font:inherit;margin:0;color:rgb(var(--zn-text-panel-title));font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-font-size-x-large);padding:var(--header-spacing)}.slideout__header-actions{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:end;align-items:center;margin-left:auto;gap:var(--zn-spacing-x-small);padding:var(--header-spacing)}.slideout__header-actions zn-button,.slideout__header-actions::slotted(zn-button){flex:0 0 auto;display:flex;align-items:center;font-size:var(--zn-font-size-medium)}.slideout__body{flex:1 1 auto;display:block;padding:var(--body-spacing);overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}.slideout__footer{display:flex;justify-content:space-between;flex:0 0 auto;padding:var(--footer-spacing);border-top:1px solid rgb(var(--zn-border-color))}.slideout__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}`;var ci=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.open=!1;this.closeClickHandler=t=>{if(t.target instanceof HTMLElement&&t.target.hasAttribute("slideout-closer")){this.hide();return}for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement){if(r.hasAttribute("modal-closer")){this.hide();return}if(r.localName==="zn-dialog"||r.localName==="zn-slideout")return}}}}firstUpdated(t){super.firstUpdated(t),this.open&&this.show()}connectedCallback(){if(super.connectedCallback(),this.addEventListener("click",this.closeClickHandler),this.shadowRoot?.addEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentNode?.querySelector(cr(this.trigger));t&&t.addEventListener("click",()=>this.show())}}disconnectedCallback(){if(super.disconnectedCallback(),this.slideout.close(),za(this),this.closeWatcher?.destroy(),this.removeEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentElement?.querySelector(cr(this.trigger));t&&t.removeEventListener("click",()=>this.show())}}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.hide()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}async show(){this.emit("zn-show"),this.addOpenListeners(),this.open=!0,this.slideout.showModal();let{keyframes:t,options:r}=Sn(this,"slideout.show",{dir:this.localize.dir()});await
|
|
4079
|
+
</div>`}addButton(t){t&&(t.classList.add("zn-button-menu__added"),this._originalButtons.push({button:t,width:Math.max(t.offsetWidth,150)}),this.calculateVisibleButtons())}setDynamicButtons(t){this.removeAllButtons(),!(!t||t.length===0)&&t.forEach(r=>{this.addButton(r)})}removeButton(t){let r=this.querySelector(`zn-button.${t}`);r&&(this._originalButtons=this._originalButtons.filter(a=>a.button!==r),r.remove());let n=this.querySelector(`zn-menu-item#${t}`);n&&this.shadowRoot?.querySelector("zn-menu")&&n.remove(),this.calculateVisibleButtons()}removeAllButtons(){let t=this.shadowRoot?.querySelectorAll("zn-button.zn-button-menu__added");t&&t.forEach(n=>{n.remove()});let r=this.shadowRoot?.querySelectorAll("zn-menu-item.zn-button-menu__added");r&&r?.forEach(n=>{n.remove()}),this._buttons=[],this._originalButtons=this._originalButtons.filter(n=>!n.button.classList.contains("zn-button-menu__added")),this.calculateVisibleButtons()}};Gr.styles=z(f2),c([d({type:Number,attribute:"max-width"})],Gr.prototype,"maxWidth",2),c([d({type:Number})],Gr.prototype,"containerWidth",2),c([d({type:Number,attribute:"limit"})],Gr.prototype,"limit",2),c([d({type:Number,attribute:"max-level"})],Gr.prototype,"maxLevel",2),c([d({type:Number,attribute:"icon-size",reflect:!0})],Gr.prototype,"iconSize",2),c([d({type:Boolean,attribute:"no-gap"})],Gr.prototype,"noGap",2),c([d({type:Boolean,attribute:"no-padding"})],Gr.prototype,"noPadding",2),c([K("containerWidth",{waitUntilFirstUpdate:!0})],Gr.prototype,"watchContainerMaxWidth",1);var CL=Gr;Gr.define("zn-button-menu");var g2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--width:min(100vw,46rem);--header-spacing:var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);--body-spacing:var(--zn-spacing-medium) var(--zn-spacing-large);--footer-spacing:var(--zn-spacing-large);--icon-background-color:var(--zn-color-primary-200);--icon-color:var(--zn-color-primary-600);--caption-color:var(--zn-color-primary-600);display:contents}.slideout{left:unset;top:0;bottom:0;right:0;margin:0;max-height:100%;height:100%;overflow:hidden;overflow-y:auto;flex-direction:column;z-index:2;padding:0;width:1100px;background:rgb(var(--zn-body));box-shadow:0 0 10px 0 rgba(0,0,0,0.1)}.slideout::backdrop{background:var(--zn-overlay-background-color)}.slideout__header{flex:0 0 auto;display:flex;border-bottom:1px solid rgb(var(--zn-border-color));background-color:var(--zn-panel-background-color)}.slideout__title{display:flex;flex:1 1 auto;align-items:center;font:inherit;margin:0;color:rgb(var(--zn-text-panel-title));font-size:var(--zn-font-size-x-large);font-weight:var(--zn-font-weight-semibold);letter-spacing:var(--zn-letter-spacing-normal);line-height:var(--zn-font-size-x-large);padding:var(--header-spacing)}.slideout__header-actions{flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:end;align-items:center;margin-left:auto;gap:var(--zn-spacing-x-small);padding:var(--header-spacing)}.slideout__header-actions zn-button,.slideout__header-actions::slotted(zn-button){flex:0 0 auto;display:flex;align-items:center;font-size:var(--zn-font-size-medium)}.slideout__body{flex:1 1 auto;display:block;padding:var(--body-spacing);overflow:auto;-webkit-overflow-scrolling:touch;color:var(--zn-color-text-default);font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);letter-spacing:var(--zn-tracking-normal);line-height:var(--zn-line-height-dense)}.slideout__footer{display:flex;justify-content:space-between;flex:0 0 auto;padding:var(--footer-spacing);border-top:1px solid rgb(var(--zn-border-color))}.slideout__footer ::slotted(zn-button:not(:first-of-type)){margin-inline-start:var(--zn-spacing-x-small)}`;var ci=class extends k{constructor(){super(...arguments);this.localize=new Ht(this);this.open=!1;this.closeClickHandler=t=>{if(t.target instanceof HTMLElement&&t.target.hasAttribute("slideout-closer")){this.hide();return}for(let r of t.composedPath()){if(r===this)return;if(r instanceof HTMLElement){if(r.hasAttribute("modal-closer")){this.hide();return}if(r.localName==="zn-dialog"||r.localName==="zn-slideout")return}}}}firstUpdated(t){super.firstUpdated(t),this.open&&this.show()}connectedCallback(){if(super.connectedCallback(),this.addEventListener("click",this.closeClickHandler),this.shadowRoot?.addEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentNode?.querySelector(cr(this.trigger));t&&t.addEventListener("click",()=>this.show())}}disconnectedCallback(){if(super.disconnectedCallback(),this.slideout.close(),za(this),this.closeWatcher?.destroy(),this.removeEventListener("click",this.closeClickHandler),this.trigger){let t=this.parentElement?.querySelector(cr(this.trigger));t&&t.removeEventListener("click",()=>this.show())}}requestClose(t){this.emit("zn-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented||this.hide()}addOpenListeners(){"CloseWatcher"in window&&(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard"))}removeOpenListeners(){this.closeWatcher?.destroy()}async show(){this.emit("zn-show"),this.addOpenListeners(),this.open=!0,this.slideout.showModal();let{keyframes:t,options:r}=Sn(this,"slideout.show",{dir:this.localize.dir()});await yi(this.slideout,t,r)}async hide(){this.emit("zn-close"),this.removeOpenListeners();let{keyframes:t,options:r}=Sn(this,"slideout.hide",{dir:this.localize.dir()});await yi(this.slideout,t,r),this.open=!1,this.slideout.close()}render(){return u`
|
|
4076
4080
|
<dialog
|
|
4077
4081
|
part="base"
|
|
4078
4082
|
role="alertdialog"
|
|
@@ -4316,7 +4320,7 @@ ${Na(this.code(i,t))}
|
|
|
4316
4320
|
style="margin-bottom: var(--zn-spacing-small)">
|
|
4317
4321
|
<zn-icon src="search" slot="prefix"></zn-icon>
|
|
4318
4322
|
</zn-input>
|
|
4319
|
-
<slot></slot> `}};ea.styles=z(C2),c([d()],ea.prototype,"attr",2);var DL=ea;ea.define("zn-filter-container");var S2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;cursor:pointer}.reveal{display:inline-grid;grid-template-areas:"stack";align-items:center;overflow:hidden}.reveal__text{grid-area:stack;line-height:inherit;transition:opacity 0.2s ease,transform 0.2s ease;will-change:opacity,transform}.reveal__text--initial{opacity:1;transform:translateY(0)}.reveal__text--revealed{opacity:0;transform:translateY(0.5em)}.reveal--revealed .reveal__text--initial{opacity:0;transform:translateY(-0.5em)}.reveal--revealed .reveal__text--revealed{opacity:1;transform:translateY(0)}`;var
|
|
4323
|
+
<slot></slot> `}};ea.styles=z(C2),c([d()],ea.prototype,"attr",2);var DL=ea;ea.define("zn-filter-container");var S2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;cursor:pointer}.reveal{display:inline-grid;grid-template-areas:"stack";align-items:center;overflow:hidden}.reveal__text{grid-area:stack;line-height:inherit;transition:opacity 0.2s ease,transform 0.2s ease;will-change:opacity,transform}.reveal__text--initial{opacity:1;transform:translateY(0)}.reveal__text--revealed{opacity:0;transform:translateY(0.5em)}.reveal--revealed .reveal__text--initial{opacity:0;transform:translateY(-0.5em)}.reveal--revealed .reveal__text--revealed{opacity:1;transform:translateY(0)}`;var Gi=class extends k{constructor(){super(...arguments);this.duration=2e3;this.initial="";this.revealed="";this.hideDelay=150;this.noToggle=!1;this._isRevealed=!1;this._isToggled=!1}disconnectedCallback(){super.disconnectedCallback(),this._clearHideTimer()}_clearHideTimer(){this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=void 0)}handleToggleReveal(){this.noToggle||(this._clearHideTimer(),this.duration?(this._isRevealed=!0,this._isToggled=!0,this.requestUpdate(),setTimeout(()=>{this._isRevealed=!1,this._isToggled=!1,this.requestUpdate()},this.duration)):(this._isRevealed=!this._isRevealed,this._isToggled=!this._isToggled,this.requestUpdate()))}handleMouseEnter(){this._clearHideTimer(),this._isRevealed=!0,this.requestUpdate()}handleMouseLeave(){this._isToggled||(this._clearHideTimer(),this._hideTimer=setTimeout(()=>{this._hideTimer=void 0,this._isRevealed=!1,this.requestUpdate()},this.hideDelay))}render(){return u`
|
|
4320
4324
|
<div part="base"
|
|
4321
4325
|
class=${M({reveal:!0,"reveal--revealed":this._isRevealed,"reveal--toggled":this._isToggled})}
|
|
4322
4326
|
@click="${this.handleToggleReveal}"
|
|
@@ -4325,7 +4329,7 @@ ${Na(this.code(i,t))}
|
|
|
4325
4329
|
<span class="reveal__text reveal__text--initial">${this.initial}</span>
|
|
4326
4330
|
<span class="reveal__text reveal__text--revealed">${this.revealed}</span>
|
|
4327
4331
|
</div>
|
|
4328
|
-
`}};
|
|
4332
|
+
`}};Gi.styles=z(S2),c([d({type:Number})],Gi.prototype,"duration",2),c([d()],Gi.prototype,"initial",2),c([d()],Gi.prototype,"revealed",2),c([d({type:Number,attribute:"hide-delay"})],Gi.prototype,"hideDelay",2),c([d({type:Boolean,attribute:"no-toggle"})],Gi.prototype,"noToggle",2);var RL=Gi;Gi.define("zn-reveal");var E2=_`:host{display:block;width:100%}`;var Wi=class extends k{constructor(){super();this._isPlaying=!1;this.value="";this.label="";this.placeholder="";this.files=[];this._audio=new Audio,this._audio.addEventListener("ended",()=>{this._isPlaying=!1,this._audio.currentTime=0})}disconnectedCallback(){super.disconnectedCallback(),this.stopAudio()}updated(t){super.updated(t),t.has("value")&&(this.stopAudio(),this.value&&(this._audio.src=this.value))}stopAudio(){this._audio&&(this._audio.pause(),this._audio.currentTime=0),this._isPlaying=!1}handleSelectChange(t){t.target===t.currentTarget&&(this.value=t.target.value)}togglePreview(t){if(t.stopPropagation(),!this.value){t.preventDefault(),this._isPlaying=!1,this.requestUpdate();return}this._isPlaying?(this._audio.pause(),this._isPlaying=!1):this._audio.play().then(()=>{this._isPlaying=!0}).catch(r=>{console.error("Audio playback failed:",r),this._isPlaying=!1,this.requestUpdate()})}render(){return u`
|
|
4329
4333
|
<zn-select
|
|
4330
4334
|
label="${this.label}"
|
|
4331
4335
|
value="${this.value}"
|
|
@@ -4345,7 +4349,7 @@ ${Na(this.code(i,t))}
|
|
|
4345
4349
|
<zn-option value="${t.url}">${t.name}</zn-option>
|
|
4346
4350
|
`)}
|
|
4347
4351
|
</zn-select>
|
|
4348
|
-
`}};
|
|
4352
|
+
`}};Wi.styles=z(E2),c([R()],Wi.prototype,"_isPlaying",2),c([d()],Wi.prototype,"value",2),c([d()],Wi.prototype,"label",2),c([d()],Wi.prototype,"placeholder",2),c([d({type:Object})],Wi.prototype,"files",2);var NL=Wi;Wi.define("zn-audio-select");var T2=yt(class extends rr{constructor(){super(...arguments),this.key=B}render(o,i){return this.key=o,i}update(o,[i,t]){return i!==this.key&&(is(o),this.key=i),t}});var $2=_`:host{display:block}.translations{padding:var(--zn-spacing-small) var(--zn-spacing-medium)}.translations__language{margin-bottom:var(--zn-spacing-medium)}.translations__body{display:block}.translations--flush,.translations--grouped{padding:0}`;var He=class extends k{constructor(){super(...arguments);this.formControlController=new re(this);this.hasSlotController=new Y(this,"label","help-text");this.name="";this.value='{"en":""}';this.label="";this.helpText="";this.disabled=!1;this.required=!1;this.flush=!1;this.inputType="text";this.inlineEdit=!1;this.slashItems=[];this.slashPreset="";this.slashTrigger="/";this.slashHeading="Insert";this.slashHideKeys=!1;this.slashRecentKey="";this.grouped=!1;this.languages={en:"EN"};this.values={};this.defaultValue='{"en":""}';this._activeLanguage="en";this.handleLanguageSelect=t=>{t.stopPropagation();let r=t.target.value;typeof r=="string"&&r&&r!==this._activeLanguage&&this.switchLanguage(r)};this.handleLanguageInput=t=>{t.stopPropagation()};this.switchLanguage=t=>{this._activeLanguage=t,this.requestUpdate()};this.handleValueUpdate=t=>{let r=t.target;if(this._activeLanguage){let n=r.value;n!==this.values[this._activeLanguage]&&(this.values={...this.values,[this._activeLanguage]:n},this.updateValue())}};this.handleKeyDown=t=>{if(t.key==="Enter"){if(t.target instanceof ep||t.target instanceof Xo)return;!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()}};this.handleSubmit=()=>{this.formControlController.submit()}}get validity(){return pt}get validationMessage(){return""}checkValidity(){return!0}getForm(){return this.formControlController.getForm()}reportValidity(){return!0}setCustomValidity(){}setActiveLanguage(t){this._activeLanguage=t,this.requestUpdate()}getActiveLanguage(){return this._activeLanguage}addLanguageKey(t){let r=this.pendingValues();Object.prototype.hasOwnProperty.call(r,t)||(this.values={...r,[t]:""},this.updateValue())}getValueLanguages(){return Object.keys(this.pendingValues())}hasTranslation(t){return(this.pendingValues()[t]??"").trim()!==""}languageState(t){return this.hasTranslation(t)?{type:"success",label:"Translated"}:{type:"error",label:t==="en"?"Empty":"English"}}languageLabel(t){return this.languages[t]??t.toUpperCase()}pendingValues(){if(Object.keys(this.values).length>0)return this.values;try{return JSON.parse(this.value||"{}")}catch{return this.values}}firstUpdated(){this.hasAttribute("value")||(this.defaultValue=this.value),this.formControlController.updateValidity()}willUpdate(t){let r=t.has("value"),n=t.has("values");if(r&&n){let a=this.value==='{"en":""}',s=Object.keys(this.values).length===0;a&&!s?r=!1:!a&&s?n=!1:this.hasAttribute("values")&&!this.hasAttribute("value")?r=!1:this.hasAttribute("value")&&!this.hasAttribute("values")&&(n=!1)}if(r)try{let a=JSON.parse(this.value||"{}");JSON.stringify(a)!==JSON.stringify(this.values)&&(this.values=a)}catch{}if(n&&(this.value=JSON.stringify(this.values),!this.grouped)){let a=Object.prototype.hasOwnProperty.call(this.values,this._activeLanguage)||Object.prototype.hasOwnProperty.call(this.languages,this._activeLanguage);if(!this._activeLanguage||!a&&this._activeLanguage!=="en"){let s=Object.keys(this.values);s.length>0?this._activeLanguage=s[0]:this._activeLanguage="en"}}}updateValue(){this.value=JSON.stringify(this.values),this.emit("zn-change"),this.emit("zn-input")}renderField(t,r,n){let a=n?"rtl":"ltr";return this.inlineEdit?u`
|
|
4349
4353
|
<zn-inline-edit
|
|
4350
4354
|
input-type=${this.inputType}
|
|
4351
4355
|
textarea-rows=${P(this.textareaRows)}
|
|
@@ -4440,7 +4444,7 @@ ${Na(this.code(i,t))}
|
|
|
4440
4444
|
</div>
|
|
4441
4445
|
`:B}
|
|
4442
4446
|
</div>
|
|
4443
|
-
`}};He.styles=[z(Se),z($2)],He.dependencies={"zn-chip":Gn,"zn-inline-edit":ep,"zn-input":nt,"zn-option":ot,"zn-select":Be,"zn-textarea":Xo},c([d()],He.prototype,"name",2),c([d()],He.prototype,"value",2),c([d()],He.prototype,"label",2),c([d({attribute:"help-text"})],He.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],He.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],He.prototype,"required",2),c([d({type:Boolean,reflect:!0})],He.prototype,"flush",2),c([d({attribute:"input-type"})],He.prototype,"inputType",2),c([d({attribute:"textarea-rows",type:Number})],He.prototype,"textareaRows",2),c([d({type:Boolean,reflect:!0,attribute:"inline-edit"})],He.prototype,"inlineEdit",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],He.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],He.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],He.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],He.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],He.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],He.prototype,"slashRecentKey",2),c([d({attribute:!1})],He.prototype,"slashItemsProvider",2),c([d({type:Boolean,reflect:!0})],He.prototype,"grouped",2),c([d({type:Object})],He.prototype,"languages",2),c([d({type:Object})],He.prototype,"values",2),c([Ce()],He.prototype,"defaultValue",2),c([R()],He.prototype,"_activeLanguage",2);var OL=He;He.define("zn-translations");var A2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.key{cursor:pointer;display:flex;flex-direction:row;gap:var(--zn-spacing-medium);align-items:center;text-align:left}.key__description{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-body));opacity:0.7;line-height:var(--zn-line-height-normal);-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([active]) .key__label{color:rgb(var(--zn-text-heading));font-weight:600}:host(:not([active])) .key__description{opacity:0.6}:host(:not([active])) zn-chip{--zn-chip-color:rgb(var(--zn-text-body));opacity:0.5}`;var
|
|
4447
|
+
`}};He.styles=[z(Se),z($2)],He.dependencies={"zn-chip":Gn,"zn-inline-edit":ep,"zn-input":nt,"zn-option":ot,"zn-select":Be,"zn-textarea":Xo},c([d()],He.prototype,"name",2),c([d()],He.prototype,"value",2),c([d()],He.prototype,"label",2),c([d({attribute:"help-text"})],He.prototype,"helpText",2),c([d({type:Boolean,reflect:!0})],He.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],He.prototype,"required",2),c([d({type:Boolean,reflect:!0})],He.prototype,"flush",2),c([d({attribute:"input-type"})],He.prototype,"inputType",2),c([d({attribute:"textarea-rows",type:Number})],He.prototype,"textareaRows",2),c([d({type:Boolean,reflect:!0,attribute:"inline-edit"})],He.prototype,"inlineEdit",2),c([d({attribute:"slash-items",converter:{fromAttribute:t=>zo(t),toAttribute:t=>JSON.stringify(t)}})],He.prototype,"slashItems",2),c([d({attribute:"slash-preset"})],He.prototype,"slashPreset",2),c([d({attribute:"slash-trigger"})],He.prototype,"slashTrigger",2),c([d({attribute:"slash-heading"})],He.prototype,"slashHeading",2),c([d({attribute:"slash-hide-keys",type:Boolean})],He.prototype,"slashHideKeys",2),c([d({attribute:"slash-recent-key"})],He.prototype,"slashRecentKey",2),c([d({attribute:!1})],He.prototype,"slashItemsProvider",2),c([d({type:Boolean,reflect:!0})],He.prototype,"grouped",2),c([d({type:Object})],He.prototype,"languages",2),c([d({type:Object})],He.prototype,"values",2),c([Ce()],He.prototype,"defaultValue",2),c([R()],He.prototype,"_activeLanguage",2);var OL=He;He.define("zn-translations");var A2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.key{cursor:pointer;display:flex;flex-direction:row;gap:var(--zn-spacing-medium);align-items:center;text-align:left}.key__description{font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-body));opacity:0.7;line-height:var(--zn-line-height-normal);-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([active]) .key__label{color:rgb(var(--zn-text-heading));font-weight:600}:host(:not([active])) .key__description{opacity:0.6}:host(:not([active])) zn-chip{--zn-chip-color:rgb(var(--zn-text-body));opacity:0.5}`;var Ti=class extends k{constructor(){super(...arguments);this.icon="";this.attribute="";this.value="";this.color="primary";this.active=!1;this.iconSize=24}_handleClick(){this.active=!this.active,this.emit("zn-change")}render(){let t=this.active?this.color:"transparent";return u`
|
|
4444
4448
|
<div class="key" @click="${this._handleClick}">
|
|
4445
4449
|
<zn-chip
|
|
4446
4450
|
.icon="${this.icon}"
|
|
@@ -4452,7 +4456,7 @@ ${Na(this.code(i,t))}
|
|
|
4452
4456
|
<slot></slot>
|
|
4453
4457
|
</div>
|
|
4454
4458
|
</div>
|
|
4455
|
-
`}};
|
|
4459
|
+
`}};Ti.styles=z(A2),c([d()],Ti.prototype,"icon",2),c([d()],Ti.prototype,"attribute",2),c([d()],Ti.prototype,"value",2),c([d()],Ti.prototype,"color",2),c([d({type:Boolean,reflect:!0})],Ti.prototype,"active",2),c([d({attribute:"icon-size",type:Number})],Ti.prototype,"iconSize",2);var PL=Ti;Ti.define("zn-key");var M2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.key-container--scroll{height:100%;width:100%;overflow:hidden;position:relative}.key-container__content{height:100%;width:100%;overflow:auto;box-sizing:border-box}.key-container__keys{display:flex;flex-direction:column;gap:var(--zn-spacing-medium)}::slotted(zn-key){flex:0 0 auto}::slotted([hidden]){display:none !important}`;var pi=class extends k{constructor(){super(...arguments);this.position="bottom-start";this.target="";this.itemSelector="[data-type]";this.filterAttribute="";this.noScroll=!1;this._hiddenElements=new Set;this._targetElement=null}connectedCallback(){super.connectedCallback(),this.updateFilters()}firstUpdated(){if(this.target){let t=this.getRootNode();this._targetElement=t.getElementById?t.getElementById(this.target):document.getElementById(this.target)}this.updateFilters()}_handleKeyChange(){this.updateFilters(),this.emit("zn-change")}getKeys(){let t=[];return this.keysSlot&&t.push(...this.keysSlot.assignedElements({flatten:!0})),this.defaultSlot&&t.push(...this.defaultSlot.assignedElements({flatten:!0})),t.filter(r=>r.tagName.toLowerCase()==="zn-key")}updateFilters(){let t=this.getKeys();if(!t||t.length===0)return;if(this._hiddenElements.forEach(s=>s.removeAttribute("hidden")),this._hiddenElements.clear(),this.target&&!this._targetElement){let s=this.getRootNode();this._targetElement=s.getElementById?.(this.target)??document.getElementById(this.target)}let r=this._targetElement??null;if(r||(r=(this.defaultSlot?.assignedElements({flatten:!0})??[]).some(l=>l.tagName!=="ZN-KEY")?this:this.parentElement??this.parentNode),!r)return;let n=this.filterAttribute?`[${this.filterAttribute}]`:this.itemSelector;Ge(n,r,"").forEach(s=>{if(s===this)return;t.some(p=>!p.active&&this.itemMatchesKey(s,p))&&(s.setAttribute("hidden",""),this._hiddenElements.add(s))})}itemMatchesKey(t,r){if(this.filterAttribute){let n=t.getAttribute(this.filterAttribute);if(!n)return!1;let a=r.attribute;return a?n.split(/\s+/).includes(a):!1}if(r.attribute&&r.value){let n=t.getAttribute(r.attribute);return n?n.split(/\s+/).includes(r.value):!1}return r.attribute?t.hasAttribute(r.attribute):!1}render(){return u`
|
|
4456
4460
|
<div class="${M({"key-container":!0,"key-container--scroll":!this.noScroll})}" @zn-change="${this._handleKeyChange}">
|
|
4457
4461
|
${this.target?"":u`
|
|
4458
4462
|
<div class="key-container__content">
|
|
@@ -4704,7 +4708,7 @@ ${this.parser.parse(o)}</blockquote>
|
|
|
4704
4708
|
${o}</tr>
|
|
4705
4709
|
`}tablecell(o){let i=this.parser.parseInline(o.tokens),t=o.header?"th":"td";return(o.align?`<${t} align="${o.align}">`:`<${t}>`)+i+`</${t}>
|
|
4706
4710
|
`}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${Pn(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:i,tokens:t}){let r=this.parser.parseInline(t),n=O2(o);if(n===null)return r;o=n;let a='<a href="'+o+'"';return i&&(a+=' title="'+Pn(i)+'"'),a+=">"+r+"</a>",a}image({href:o,title:i,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=O2(o);if(n===null)return Pn(t);o=n;let a=`<img src="${o}" alt="${Pn(t)}"`;return i&&(a+=` title="${Pn(i)}"`),a+=">",a}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:Pn(o.text)}},bg=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}checkbox({raw:o}){return o}},bn=class lg{constructor(i){V(this,"options");V(this,"renderer");V(this,"textRenderer");this.options=i||ja,this.options.renderer=this.options.renderer||new Th,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bg}static parse(i,t){return new lg(t).parse(i)}static parseInline(i,t){return new lg(t).parseInline(i)}parse(i){this.renderer.parser=this;let t="";for(let r=0;r<i.length;r++){let n=i[r];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=l||"";continue}}let a=n;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(i,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<i.length;n++){let a=i[n];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":{r+=t.text(s);break}case"html":{r+=t.html(s);break}case"link":{r+=t.link(s);break}case"image":{r+=t.image(s);break}case"checkbox":{r+=t.checkbox(s);break}case"strong":{r+=t.strong(s);break}case"em":{r+=t.em(s);break}case"codespan":{r+=t.codespan(s);break}case"br":{r+=t.br(s);break}case"del":{r+=t.del(s);break}case"text":{r+=t.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Ch,Fc=(Ch=class{constructor(o){V(this,"options");V(this,"block");this.options=o||ja}preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(o=this.block){return o?gn.lex:gn.lexInline}provideParser(o=this.block){return o?bn.parse:bn.parseInline}},V(Ch,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),V(Ch,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ch),qq=class{constructor(...o){V(this,"defaults",cg());V(this,"options",this.setOptions);V(this,"parse",this.parseMarkdown(!0));V(this,"parseInline",this.parseMarkdown(!1));V(this,"Parser",bn);V(this,"Renderer",Th);V(this,"TextRenderer",bg);V(this,"Lexer",gn);V(this,"Tokenizer",Eh);V(this,"Hooks",Fc);this.use(...o)}walkTokens(o,i){let t=[];for(let r of o)switch(t=t.concat(i.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)t=t.concat(this.walkTokens(a.tokens,i));for(let a of n.rows)for(let s of a)t=t.concat(this.walkTokens(s.tokens,i));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,i));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let s=n[a].flat(1/0);t=t.concat(this.walkTokens(s,i))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,i)))}}return t}use(...o){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=i.renderers[n.name];a?i.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=i[n.level];a?a.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&(n.level==="block"?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:n.level==="inline"&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),r.extensions=i),t.renderer){let n=this.defaults.renderer||new Th(this.defaults);for(let a in t.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=t.renderer[s],p=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Eh(this.defaults);for(let a in t.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=t.tokenizer[s],p=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Fc;for(let a in t.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=t.hooks[s],p=n[s];Fc.passThroughHooks.has(a)?n[s]=h=>{if(this.defaults.async&&Fc.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(n,h);return p.call(n,f)})();let m=l.call(n,h);return p.call(n,m)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await p.apply(n,h)),f})();let m=l.apply(n,h);return m===!1&&(m=p.apply(n,h)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,a=t.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,i){return gn.lex(o,i??this.defaults)}parser(o,i){return bn.parse(o,i??this.defaults)}parseMarkdown(o){return(i,t)=>{let r={...t},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=o),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(i):i,l=await(n.hooks?await n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(s,n),p=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(p,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(p,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(a);try{n.hooks&&(i=n.hooks.preprocess(i));let s=(n.hooks?n.hooks.provideLexer(o):o?gn.lex:gn.lexInline)(i,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(o):o?bn.parse:bn.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(o,i){return t=>{if(t.message+=`
|
|
4707
|
-
Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+Pn(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}},Ua=new qq;function Fe(o,i){return Ua.parse(o,i)}Fe.options=Fe.setOptions=function(o){return Ua.setOptions(o),Fe.defaults=Ua.defaults,B2(Fe.defaults),Fe};Fe.getDefaults=cg;Fe.defaults=ja;Fe.use=function(...o){return Ua.use(...o),Fe.defaults=Ua.defaults,B2(Fe.defaults),Fe};Fe.walkTokens=function(o,i){return Ua.walkTokens(o,i)};Fe.parseInline=Ua.parseInline;Fe.Parser=bn;Fe.parser=bn.parse;Fe.Renderer=Th;Fe.TextRenderer=bg;Fe.Lexer=gn;Fe.lexer=gn.lex;Fe.Tokenizer=Eh;Fe.Hooks=Fc;Fe.parse=Fe;var
|
|
4711
|
+
Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+Pn(t.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(t);throw t}}},Ua=new qq;function Fe(o,i){return Ua.parse(o,i)}Fe.options=Fe.setOptions=function(o){return Ua.setOptions(o),Fe.defaults=Ua.defaults,B2(Fe.defaults),Fe};Fe.getDefaults=cg;Fe.defaults=ja;Fe.use=function(...o){return Ua.use(...o),Fe.defaults=Ua.defaults,B2(Fe.defaults),Fe};Fe.walkTokens=function(o,i){return Ua.walkTokens(o,i)};Fe.parseInline=Ua.parseInline;Fe.Parser=bn;Fe.parser=bn.parse;Fe.Renderer=Th;Fe.TextRenderer=bg;Fe.Lexer=gn;Fe.lexer=gn.lex;Fe.Tokenizer=Eh;Fe.Hooks=Fc;Fe.parse=Fe;var h5e=Fe.options,u5e=Fe.setOptions,m5e=Fe.use,f5e=Fe.walkTokens,g5e=Fe.parseInline;var b5e=bn.parse,v5e=gn.lex;var J2=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.panel{border:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-radius:var(--zn-border-radius)}.markdown-editor{display:flex;flex-direction:column;gap:var(--zn-spacing-small);width:100%;height:100%;min-height:0}:host([expanded]){position:absolute;top:10px;bottom:10px;left:var(--zn-sp-padding);right:var(--zn-sp-padding);z-index:var(--zn-z-index-editor-action,1000000)}:host([expanded]) .panel,:host([expanded]) .panel__inner,:host([expanded]) .panel__content,:host([expanded]) .panel__body{height:100%;max-height:100%}:host([expanded]) .markdown-editor{height:100%}.markdown-editor__label{font-size:var(--zn-input-label-font-size-medium);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.markdown-editor__toolbar{display:flex;align-items:end;gap:var(--zn-spacing-small);justify-content:flex-end;flex-wrap:wrap}.markdown-editor__markdown-link{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);margin-right:auto;font-size:var(--zn-input-label-font-size-small);line-height:1;color:var(--zn-color-neutral-500,#656d76);text-decoration:none;cursor:pointer;transition:color 0.15s ease;padding-left:var(--zn-spacing-x-small)}.markdown-editor__markdown-link:hover{color:var(--zn-color-primary-600,#0969da)}.markdown-editor__markdown-link span{white-space:nowrap}.markdown-editor__view-toggle{display:inline-flex}.markdown-editor__body{display:flex;flex:1;min-height:0;gap:var(--zn-spacing-medium)}.markdown-editor__editor,.markdown-editor__preview-wrapper{flex:1;min-width:0;min-height:0;display:flex}.markdown-editor__editor[hidden],.markdown-editor__preview-wrapper[hidden]{display:none}.markdown-editor__editor zn-textarea{flex:1;width:100%}.markdown-editor__preview-wrapper{overflow:hidden}.markdown-editor__preview{flex:1;background:var(--zn-color-neutral-0,white);border:1px solid var(--zn-color-neutral-200);border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-large);overflow-y:auto;font-family:inherit;line-height:1.7;color:var(--zn-color-text,#222)}.markdown-editor__preview h1{font-size:1.8em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.3em}.markdown-editor__preview h2{font-size:1.5em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.2em}.markdown-editor__preview h3{font-size:1.25em;margin:0.7em 0 0.3em}.markdown-editor__preview h4,.markdown-editor__preview h5,.markdown-editor__preview h6{font-size:1.1em;margin:0.6em 0 0.3em}.markdown-editor__preview p{margin:0.6em 0}.markdown-editor__preview ul,.markdown-editor__preview ol{margin:0.6em 0;padding-left:2em;display:block}.markdown-editor__preview ul{list-style-type:disc}.markdown-editor__preview ol{list-style-type:decimal}.markdown-editor__preview ul ul{list-style-type:circle}.markdown-editor__preview ul ul ul{list-style-type:square}.markdown-editor__preview li{margin:0.2em 0;display:list-item}.markdown-editor__preview blockquote{border-left:4px solid var(--zn-color-neutral-300);margin:0.8em 0;padding:0.4em 1em;color:var(--zn-color-neutral-600,#555)}.markdown-editor__preview table{border-collapse:collapse;width:100%;margin:0.8em 0}.markdown-editor__preview th,.markdown-editor__preview td{border:1px solid var(--zn-color-neutral-300);padding:0.4em 0.8em;text-align:left}.markdown-editor__preview th{background:var(--zn-color-neutral-100);font-weight:bold}.markdown-editor__preview code{background:var(--zn-color-neutral-100);padding:0.15em 0.4em;border-radius:3px;font-size:0.9em}.markdown-editor__preview pre{background:var(--zn-color-neutral-100);padding:1em;border-radius:4px;overflow-x:auto}.markdown-editor__preview pre code{background:none;padding:0}.markdown-editor__preview hr{border:none;border-top:1px solid var(--zn-color-neutral-300);margin:1.5em 0}.markdown-editor__preview a{color:var(--zn-color-primary-600)}.markdown-editor__help-text{font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-help-text-color)}`;var Iq=[{mode:"editor",icon:"edit_note",label:"Editor"},{mode:"split",icon:"vertical_split",label:"Split"},{mode:"preview",icon:"visibility",label:"Preview"}],dt=class extends at{constructor(){super(...arguments);this.formControlController=new re(this,{assumeInteractionOn:["zn-input","zn-change"]});this.markdownSlotController=new Y(this,"label","help-text","actions","footer");this.debounceTimer=null;this.name="";this.value="";this.defaultValue="";this.label="";this.helpText="";this.placeholder="Enter markdown content...";this.rows=20;this.viewMode="editor";this.storageKey="zn-markdown-editor-view-mode";this.required=!1;this.readonly=!1;this.disabled=!1;this.expanded=!1;this.handleInput=()=>{this.value=this.textarea.value,this.emit("zn-input"),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.renderPreview(),150)};this.handleChange=()=>{this.value=this.textarea.value,this.emit("zn-change"),this.renderPreview()};this.handleViewToggle=t=>{let n=t.target.closest("[data-mode]")?.dataset.mode;!n||n===this.viewMode||(this.viewMode=n)};this.handleExpandToggle=()=>{this.expanded=!this.expanded}}get validity(){return this.textarea?.validity}get validationMessage(){return this.textarea?.validationMessage??""}checkValidity(){return this.textarea?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.textarea?.reportValidity()??!0}setCustomValidity(t){this.textarea?.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.textarea?.focus(t)}blur(){this.textarea?.blur()}connectedCallback(){if(super.connectedCallback(),!this.hasAttribute("value")&&!this.value){let r=Array.from(this.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE),a=r.map(s=>s.textContent??"").join("").replace(/\r\n/g,`
|
|
4708
4712
|
`).trim();a.length>0&&(this.value=a,this.defaultValue=a,r.forEach(s=>{(s.textContent??"").trim().length>0&&s.parentNode?.removeChild(s)}))}let t=this.readStoredViewMode();t&&(this.viewMode=t),this.addEventListener("toggle",this.handleExpandToggle)}disconnectedCallback(){super.disconnectedCallback(),this.debounceTimer&&clearTimeout(this.debounceTimer),this.removeEventListener("toggle",this.handleExpandToggle)}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity(),this.viewMode!=="editor"&&this.renderPreview()}readStoredViewMode(){if(!this.storageKey)return null;try{let t=localStorage.getItem(this.storageKey);if(t==="editor"||t==="split"||t==="preview")return t}catch{}return null}writeStoredViewMode(t){if(this.storageKey)try{localStorage.setItem(this.storageKey,t)}catch{}}renderPreview(){if(this.viewMode==="editor"||!this.previewEl)return;let t=Fe.parse(this.value||"",{async:!1});this.previewEl.innerHTML=typeof t=="string"?t:""}async handleViewModeChange(){await this.updateComplete,this.writeStoredViewMode(this.viewMode),this.renderPreview(),this.dispatchEvent(new CustomEvent("zn-view-mode-change",{bubbles:!0,composed:!0,detail:{mode:this.viewMode}}))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.renderPreview()}handleMarkedReady(){this.renderPreview()}render(){let t=this.markdownSlotController.test("label"),r=this.markdownSlotController.test("help-text"),n=this.markdownSlotController.test("actions"),a=this.markdownSlotController.test("footer"),s=!!this.label||t,l=!!this.helpText||r,p=!!this.caption||n,h=this.viewMode==="editor"||this.viewMode==="split",m=this.viewMode==="preview"||this.viewMode==="split";return u`
|
|
4709
4713
|
<div part="base" class=${M({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":n,"panel--has-footer":a,"panel--has-header":p,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}>
|
|
4710
4714
|
|
|
@@ -5089,7 +5093,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
5089
5093
|
<zn-button type="button" icon-button="small" plain icon="x@lu"
|
|
5090
5094
|
tooltip="Cancel"
|
|
5091
5095
|
@click=${this.closeImagePicker}></zn-button>
|
|
5092
|
-
</div>`}};me.styles=z(ak),me.dependencies={"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":yi,"zn-slash-menu":ka},c([F(".remarkd-editor__validation")],me.prototype,"validationInput",2),c([F("zn-slash-menu")],me.prototype,"slashMenuElement",2),c([R()],me.prototype,"blocks",2),c([R()],me.prototype,"editingIndex",2),c([d({attribute:"slash-recent-key"})],me.prototype,"slashRecentKey",2),c([R()],me.prototype,"hasSlashMenu",2),c([R()],me.prototype,"imagePickerIndex",2),c([R()],me.prototype,"imageEdit",2),c([R()],me.prototype,"dropIndicator",2),c([R()],me.prototype,"dragIndex",2),c([R()],me.prototype,"editShell",2),c([R()],me.prototype,"rawMode",2),c([R()],me.prototype,"includeOptions",2),c([R()],me.prototype,"includeLoadFailed",2),c([R()],me.prototype,"includePickerIndex",2),c([R()],me.prototype,"includeQuery",2),c([R()],me.prototype,"linkPickerOpen",2),c([R()],me.prototype,"linkQuery",2),c([R()],me.prototype,"linkResults",2),c([R()],me.prototype,"linkSearchFailed",2),c([d()],me.prototype,"name",2),c([d()],me.prototype,"value",2),c([Ce()],me.prototype,"defaultValue",2),c([d()],me.prototype,"placeholder",2),c([d({attribute:"attachment-url"})],me.prototype,"attachmentUrl",2),c([d({attribute:"include-url"})],me.prototype,"includeUrl",2),c([d({attribute:"link-url"})],me.prototype,"linkUrl",2),c([d({type:Boolean,attribute:"allow-raw",reflect:!0})],me.prototype,"allowRaw",2),c([d({type:Boolean,reflect:!0})],me.prototype,"required",2),c([d({type:Boolean,reflect:!0})],me.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],me.prototype,"disabled",2),c([K("value")],me.prototype,"handleValueChange",1),c([K("includeUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleIncludeUrlChange",1),c([K("linkUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleLinkUrlChange",1);var aI=me;me.define("zn-remarkd-editor");var sI={},_g=yt(class extends rr{constructor(){super(...arguments),this.ot=sI}render(o,i){return i()}update(o,[i,t]){if(Array.isArray(i)){if(Array.isArray(this.ot)&&this.ot.length===i.length&&i.every((r,n)=>r===this.ot[n]))return vt}else if(this.ot===i)return vt;return this.ot=Array.isArray(i)?Array.from(i):i,this.render(i,t)}});var lI={eq:"Is Equal To",neq:"Is Not Equal To",gt:"Greater Than",gte:"Greater Than or Equal To",lt:"Less Than",lte:"Less Than or Equal To",is:"Is","is-not":"Is Not",in:"Is One Of","not-in":"Is Not One Of",contains:"Contains","not-contains":"Does Not Contain","starts-with":"Starts With","ends-with":"Ends With",empty:"Is Empty","not-empty":"Is Not Empty",within:"Within the Last",before:"Before the Last",between:"Between",matches:"Matches"};function kg(o){return o.label??lI[o.value]??o.value}var cI=[];function yk(o){let i=o.data?.conditions;return Array.isArray(i)?i:cI}var gk={id:"in"},qh={id:"out"},Wc="__new__",ol="application/x-zn-flow-type",Lh;function Ih(){return Lh||(Lh=new Image,Lh.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),Lh}var bt=240,ar=60,Cg=bt+80,dI=Cg-bt,pI=40,hI=20,Sg=40,uI=40,mI=40,bk=240,fI=20,gI=20,bI=20,vI=240;function Eg(o,i,t,r=!1){let n=o.y+ar,a=n+Sg;if(t&&t.y>=n){if(t.y-n>vI)return a;let s=r?n+bI:a,l=Math.round((n+t.y)/2-i/2);return Math.max(s,Math.min(l,t.y-gI-i))}return a+uI}function Dh(o){let i=o.length*7.2,t=Math.max(1,Math.ceil(i/(bk-36)));return{w:Math.min(bk,Math.round(36+i)),h:mI+(t-1)*fI}}var Jt=20;function Rr(o){return Math.round(o/Jt)*Jt}var xk=10,yI=4,xI=20;function Tg(o,i){let t=o.m+i.m;return o.x<i.x+i.w+t&&i.x<o.x+o.w+t&&o.y<i.y+i.h+t&&i.y<o.y+o.h+t}function vk(o,i){return i?bt/2:o.label?Dh(o.label).w/2:hI}function Kc(o,i,t=[]){let r=Zt(o,i(o.type)),n=o.x+bt/2;if(r.length<2)return r.map(()=>n);let a=r.map(m=>t.some(f=>f.source.node===o.id&&f.source.port===m.id)),s=[0];for(let m=1;m<r.length;m++){let f=a[m-1]&&a[m]?dI:pI,b=vk(r[m-1],a[m-1])+vk(r[m],a[m])+f;s.push(s[m-1]+Rr(b))}let l=s.filter((m,f)=>a[f]),p=l.length?l:s,h=(Math.min(...p)+Math.max(...p))/2;return s.map(m=>Math.round(n+m-h))}function Gc(o,i,t,r){let n=[{x:o.x,y:o.y,w:bt,h:ar,m:xk}],a=Zt(o,i(o.type)),s=Kc(o,i,r);return a.forEach((l,p)=>{if(!l.label)return;let h=Dh(l.label),m=r.find(b=>b.source.node===o.id&&b.source.port===l.id),f=m?t.find(b=>b.id===m.target.node):void 0;n.push({x:s[p]-h.w/2,y:Eg(o,h.h,f,a.length===1),w:h.w,h:h.h+xI,m:yI})}),n}function wk(o,i,t,r,n){let a=Gc(o,t,r,n);return Gc(i,t,r,n).some(s=>a.some(l=>Tg(l,s)))}function Rh(o,i,t,r){let n=Gc(o,i,t,r).slice(1);return n.length?t.some(a=>a.id!==o.id&&Gc(a,i,t,r).some(s=>n.some(l=>Tg(l,s)))):!1}function zk(o,i,t,r,n){let a={x:o.x,y:o.y,w:bt,h:ar,m:xk};return Gc(i,t,r,n).some(s=>Tg(a,s))}var $g=200,Ag=120,_k=120,kk=80;function Ck(o,i,t,r){return{x:o.x+bt*(t+1)/(r+1),y:o.y+(i==="in"?0:ar)}}function Sk(){return{nodes:[],connections:[],notes:[]}}function Nh(o){return o?o.inputs??[gk]:[gk]}function Mg(o){return o?o.outputs??[qh]:[qh]}function ra(o,i){return o.inputs??Nh(i)}function Zt(o,i){return o.outputs??Mg(i)}function Yc(o,i){return ra(o,i)[0]?.id??null}function Ek(o,i){let t=new Set,r=n=>{for(let a of o.connections)a.source.node===n&&!t.has(a.target.node)&&(t.add(a.target.node),r(a.target.node))};return r(i),t}function ia(o,i){let t=new Set(o.map(h=>h.id)),r=new Map(o.map(h=>[h.id,[]])),n=new Set;for(let h of i)!t.has(h.source.node)||!t.has(h.target.node)||(r.get(h.source.node).push(h),n.add(h.target.node));let a=new Set,s=new Set,l=new Set,p=h=>{s.add(h),l.add(h);for(let m of r.get(h)??[])l.has(m.target.node)?a.add(m):s.has(m.target.node)||p(m.target.node);l.delete(h)};return o.filter(h=>!n.has(h.id)).forEach(h=>p(h.id)),o.forEach(h=>{s.has(h.id)||p(h.id)}),a}var Tk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;font-size:0.8125rem}.editor{display:flex;flex-direction:column;gap:14px}.picker{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.picker__head{display:flex;align-items:center;justify-content:space-between;font-weight:600}.picker__back{flex:0 0 auto}.picker__list{display:flex;flex-direction:column}.picker__item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;margin-top:-1px;border:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel));color:rgb(var(--zn-text));font-size:0.8125rem;text-align:left;cursor:pointer}.picker__item:first-child{margin-top:0;border-top-left-radius:8px;border-top-right-radius:8px}.picker__item:last-child{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.picker__item:hover{background:rgb(var(--zn-color-tab))}.picker__item-text{display:flex;flex-direction:column;gap:2px;min-width:0}.picker__item-label{font-weight:500}.picker__item-description{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.picker__empty{margin:0;padding:10px 2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.conditions{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.group{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;padding:14px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.and-rule{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:flex;align-items:center;gap:10px;width:100%;color:rgb(var(--zn-color-success))}.and-rule::after{content:"";flex:1;height:1px;background:color-mix(in srgb,rgb(var(--zn-color-success)) 50%,transparent)}.or-label{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);margin:2px 0;color:rgb(var(--zn-color-error))}.condition{display:flex;flex-direction:column;gap:10px;width:100%}.condition__head{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.condition__name{font-family:var(--zn-font-sans);font-size:var(--zn-text-heading-section-font-size);font-weight:var(--zn-text-heading-section-font-weight);line-height:var(--zn-text-heading-section-line-height);color:var(--zn-text-heading-section-color);text-transform:var(--zn-text-heading-section-transform);letter-spacing:var(--zn-text-heading-section-letter-spacing,normal)}.condition__remove{flex:0 0 auto}.condition__row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.condition__row-label,.condition__suffix{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap}.control{min-width:0}.control--operator{flex:1 1 0;min-width:120px}.control--number{flex:0 0 auto;width:80px}.control--unit{flex:1 1 0}.control--value{flex:1 1 0;min-width:100px}zn-select.control::part(display-input){text-overflow:ellipsis}.actions{display:flex;align-items:center;gap:8px;margin-top:2px;padding-top:16px;border-top:1px solid rgb(var(--zn-border-color))}`;var Wi=class Wi extends k{constructor(){super(...arguments);this.filters=[];this.value=[];this._draft=[];this._picker=null;this._search="";this._valueJson="";this._save=()=>{this._emit("flow-conditions-save",{conditions:JSON.parse(JSON.stringify(this._draft))})};this._cancel=()=>{this._emit("flow-conditions-cancel")}}willUpdate(t){if(super.willUpdate(t),t.has("value")){let r=JSON.stringify(this.value??[]);r!==this._valueJson&&(this._valueJson=r,this._draft=JSON.parse(r),this._picker=null,this._search="")}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_cloneDraft(){return this._draft.map(t=>t.map(r=>({...r,values:{...r.values}})))}_addCondition(t){let r={};t.fields.forEach(s=>{r[s.id]={...s.operators?.length?{operator:s.operators[0].value}:{},...s.value!==void 0?{value:s.value}:{},...s.units?.length?{unit:s.units[0].value}:{}}});let n=this._cloneDraft(),a=Math.min(this._picker??0,n.length);a===n.length&&n.push([]),n[a].push({filter:t.id,values:r}),this._draft=n,this._picker=null,this._search=""}_removeCondition(t,r){let n=this._cloneDraft();n[t].splice(r,1),this._draft=n.filter(a=>a.length)}_setField(t,r,n,a){let s=this._cloneDraft(),l=s[t][r];l.values[n]={...l.values[n],...a},this._draft=s}_renderPicker(){let t=this._search.trim().toLowerCase(),r=this.filters.filter(n=>!t||n.label.toLowerCase().includes(t));return u`
|
|
5096
|
+
</div>`}};me.styles=z(ak),me.dependencies={"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":xi,"zn-slash-menu":ka},c([F(".remarkd-editor__validation")],me.prototype,"validationInput",2),c([F("zn-slash-menu")],me.prototype,"slashMenuElement",2),c([R()],me.prototype,"blocks",2),c([R()],me.prototype,"editingIndex",2),c([d({attribute:"slash-recent-key"})],me.prototype,"slashRecentKey",2),c([R()],me.prototype,"hasSlashMenu",2),c([R()],me.prototype,"imagePickerIndex",2),c([R()],me.prototype,"imageEdit",2),c([R()],me.prototype,"dropIndicator",2),c([R()],me.prototype,"dragIndex",2),c([R()],me.prototype,"editShell",2),c([R()],me.prototype,"rawMode",2),c([R()],me.prototype,"includeOptions",2),c([R()],me.prototype,"includeLoadFailed",2),c([R()],me.prototype,"includePickerIndex",2),c([R()],me.prototype,"includeQuery",2),c([R()],me.prototype,"linkPickerOpen",2),c([R()],me.prototype,"linkQuery",2),c([R()],me.prototype,"linkResults",2),c([R()],me.prototype,"linkSearchFailed",2),c([d()],me.prototype,"name",2),c([d()],me.prototype,"value",2),c([Ce()],me.prototype,"defaultValue",2),c([d()],me.prototype,"placeholder",2),c([d({attribute:"attachment-url"})],me.prototype,"attachmentUrl",2),c([d({attribute:"include-url"})],me.prototype,"includeUrl",2),c([d({attribute:"link-url"})],me.prototype,"linkUrl",2),c([d({type:Boolean,attribute:"allow-raw",reflect:!0})],me.prototype,"allowRaw",2),c([d({type:Boolean,reflect:!0})],me.prototype,"required",2),c([d({type:Boolean,reflect:!0})],me.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],me.prototype,"disabled",2),c([K("value")],me.prototype,"handleValueChange",1),c([K("includeUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleIncludeUrlChange",1),c([K("linkUrl",{waitUntilFirstUpdate:!0})],me.prototype,"handleLinkUrlChange",1);var aI=me;me.define("zn-remarkd-editor");var sI={},_g=yt(class extends rr{constructor(){super(...arguments),this.ot=sI}render(o,i){return i()}update(o,[i,t]){if(Array.isArray(i)){if(Array.isArray(this.ot)&&this.ot.length===i.length&&i.every((r,n)=>r===this.ot[n]))return vt}else if(this.ot===i)return vt;return this.ot=Array.isArray(i)?Array.from(i):i,this.render(i,t)}});var lI={eq:"Is Equal To",neq:"Is Not Equal To",gt:"Greater Than",gte:"Greater Than or Equal To",lt:"Less Than",lte:"Less Than or Equal To",is:"Is","is-not":"Is Not",in:"Is One Of","not-in":"Is Not One Of",contains:"Contains","not-contains":"Does Not Contain","starts-with":"Starts With","ends-with":"Ends With",empty:"Is Empty","not-empty":"Is Not Empty",within:"Within the Last",before:"Before the Last",between:"Between",matches:"Matches"};function kg(o){return o.label??lI[o.value]??o.value}var cI=[];function yk(o){let i=o.data?.conditions;return Array.isArray(i)?i:cI}var gk={id:"in"},qh={id:"out"},Wc="__new__",ol="application/x-zn-flow-type",Lh;function Ih(){return Lh||(Lh=new Image,Lh.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),Lh}var bt=240,ar=60,Cg=bt+80,dI=Cg-bt,pI=40,hI=20,Sg=40,uI=40,mI=40,bk=240,fI=20,gI=20,bI=20,vI=240;function Eg(o,i,t,r=!1){let n=o.y+ar,a=n+Sg;if(t&&t.y>=n){if(t.y-n>vI)return a;let s=r?n+bI:a,l=Math.round((n+t.y)/2-i/2);return Math.max(s,Math.min(l,t.y-gI-i))}return a+uI}function Dh(o){let i=o.length*7.2,t=Math.max(1,Math.ceil(i/(bk-36)));return{w:Math.min(bk,Math.round(36+i)),h:mI+(t-1)*fI}}var Jt=20;function Rr(o){return Math.round(o/Jt)*Jt}var xk=10,yI=4,xI=20;function Tg(o,i){let t=o.m+i.m;return o.x<i.x+i.w+t&&i.x<o.x+o.w+t&&o.y<i.y+i.h+t&&i.y<o.y+o.h+t}function vk(o,i){return i?bt/2:o.label?Dh(o.label).w/2:hI}function Kc(o,i,t=[]){let r=Zt(o,i(o.type)),n=o.x+bt/2;if(r.length<2)return r.map(()=>n);let a=r.map(m=>t.some(f=>f.source.node===o.id&&f.source.port===m.id)),s=[0];for(let m=1;m<r.length;m++){let f=a[m-1]&&a[m]?dI:pI,b=vk(r[m-1],a[m-1])+vk(r[m],a[m])+f;s.push(s[m-1]+Rr(b))}let l=s.filter((m,f)=>a[f]),p=l.length?l:s,h=(Math.min(...p)+Math.max(...p))/2;return s.map(m=>Math.round(n+m-h))}function Gc(o,i,t,r){let n=[{x:o.x,y:o.y,w:bt,h:ar,m:xk}],a=Zt(o,i(o.type)),s=Kc(o,i,r);return a.forEach((l,p)=>{if(!l.label)return;let h=Dh(l.label),m=r.find(b=>b.source.node===o.id&&b.source.port===l.id),f=m?t.find(b=>b.id===m.target.node):void 0;n.push({x:s[p]-h.w/2,y:Eg(o,h.h,f,a.length===1),w:h.w,h:h.h+xI,m:yI})}),n}function wk(o,i,t,r,n){let a=Gc(o,t,r,n);return Gc(i,t,r,n).some(s=>a.some(l=>Tg(l,s)))}function Rh(o,i,t,r){let n=Gc(o,i,t,r).slice(1);return n.length?t.some(a=>a.id!==o.id&&Gc(a,i,t,r).some(s=>n.some(l=>Tg(l,s)))):!1}function zk(o,i,t,r,n){let a={x:o.x,y:o.y,w:bt,h:ar,m:xk};return Gc(i,t,r,n).some(s=>Tg(a,s))}var $g=200,Ag=120,_k=120,kk=80;function Ck(o,i,t,r){return{x:o.x+bt*(t+1)/(r+1),y:o.y+(i==="in"?0:ar)}}function Sk(){return{nodes:[],connections:[],notes:[]}}function Nh(o){return o?o.inputs??[gk]:[gk]}function Mg(o){return o?o.outputs??[qh]:[qh]}function ra(o,i){return o.inputs??Nh(i)}function Zt(o,i){return o.outputs??Mg(i)}function Yc(o,i){return ra(o,i)[0]?.id??null}function Ek(o,i){let t=new Set,r=n=>{for(let a of o.connections)a.source.node===n&&!t.has(a.target.node)&&(t.add(a.target.node),r(a.target.node))};return r(i),t}function ia(o,i){let t=new Set(o.map(h=>h.id)),r=new Map(o.map(h=>[h.id,[]])),n=new Set;for(let h of i)!t.has(h.source.node)||!t.has(h.target.node)||(r.get(h.source.node).push(h),n.add(h.target.node));let a=new Set,s=new Set,l=new Set,p=h=>{s.add(h),l.add(h);for(let m of r.get(h)??[])l.has(m.target.node)?a.add(m):s.has(m.target.node)||p(m.target.node);l.delete(h)};return o.filter(h=>!n.has(h.id)).forEach(h=>p(h.id)),o.forEach(h=>{s.has(h.id)||p(h.id)}),a}var Tk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;font-size:0.8125rem}.editor{display:flex;flex-direction:column;gap:14px}.picker{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.picker__head{display:flex;align-items:center;justify-content:space-between;font-weight:600}.picker__back{flex:0 0 auto}.picker__list{display:flex;flex-direction:column}.picker__item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 12px;margin-top:-1px;border:1px solid rgb(var(--zn-border-color));background:rgb(var(--zn-panel));color:rgb(var(--zn-text));font-size:0.8125rem;text-align:left;cursor:pointer}.picker__item:first-child{margin-top:0;border-top-left-radius:8px;border-top-right-radius:8px}.picker__item:last-child{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.picker__item:hover{background:rgb(var(--zn-color-tab))}.picker__item-text{display:flex;flex-direction:column;gap:2px;min-width:0}.picker__item-label{font-weight:500}.picker__item-description{font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.picker__empty{margin:0;padding:10px 2px;font-size:0.75rem;color:rgb(var(--zn-color-muted-text))}.conditions{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.group{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:100%;padding:14px;border:1px solid rgb(var(--zn-border-color));border-radius:8px;background:rgb(var(--zn-panel))}.and-rule{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);display:flex;align-items:center;gap:10px;width:100%;color:rgb(var(--zn-color-success))}.and-rule::after{content:"";flex:1;height:1px;background:color-mix(in srgb,rgb(var(--zn-color-success)) 50%,transparent)}.or-label{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);letter-spacing:var(--zn-text-paragraph-letter-spacing,normal);margin:2px 0;color:rgb(var(--zn-color-error))}.condition{display:flex;flex-direction:column;gap:10px;width:100%}.condition__head{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}.condition__name{font-family:var(--zn-font-sans);font-size:var(--zn-text-heading-section-font-size);font-weight:var(--zn-text-heading-section-font-weight);line-height:var(--zn-text-heading-section-line-height);color:var(--zn-text-heading-section-color);text-transform:var(--zn-text-heading-section-transform);letter-spacing:var(--zn-text-heading-section-letter-spacing,normal)}.condition__remove{flex:0 0 auto}.condition__row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.condition__row-label,.condition__suffix{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap}.control{min-width:0}.control--operator{flex:1 1 0;min-width:120px}.control--number{flex:0 0 auto;width:80px}.control--unit{flex:1 1 0}.control--value{flex:1 1 0;min-width:100px}zn-select.control::part(display-input){text-overflow:ellipsis}.actions{display:flex;align-items:center;gap:8px;margin-top:2px;padding-top:16px;border-top:1px solid rgb(var(--zn-border-color))}`;var Ki=class Ki extends k{constructor(){super(...arguments);this.filters=[];this.value=[];this._draft=[];this._picker=null;this._search="";this._valueJson="";this._save=()=>{this._emit("flow-conditions-save",{conditions:JSON.parse(JSON.stringify(this._draft))})};this._cancel=()=>{this._emit("flow-conditions-cancel")}}willUpdate(t){if(super.willUpdate(t),t.has("value")){let r=JSON.stringify(this.value??[]);r!==this._valueJson&&(this._valueJson=r,this._draft=JSON.parse(r),this._picker=null,this._search="")}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_cloneDraft(){return this._draft.map(t=>t.map(r=>({...r,values:{...r.values}})))}_addCondition(t){let r={};t.fields.forEach(s=>{r[s.id]={...s.operators?.length?{operator:s.operators[0].value}:{},...s.value!==void 0?{value:s.value}:{},...s.units?.length?{unit:s.units[0].value}:{}}});let n=this._cloneDraft(),a=Math.min(this._picker??0,n.length);a===n.length&&n.push([]),n[a].push({filter:t.id,values:r}),this._draft=n,this._picker=null,this._search=""}_removeCondition(t,r){let n=this._cloneDraft();n[t].splice(r,1),this._draft=n.filter(a=>a.length)}_setField(t,r,n,a){let s=this._cloneDraft(),l=s[t][r];l.values[n]={...l.values[n],...a},this._draft=s}_renderPicker(){let t=this._search.trim().toLowerCase(),r=this.filters.filter(n=>!t||n.label.toLowerCase().includes(t));return u`
|
|
5093
5097
|
<div part="picker" class="picker">
|
|
5094
5098
|
<div class="picker__head">
|
|
5095
5099
|
<span>Add Filters</span>
|
|
@@ -5131,7 +5135,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
5131
5135
|
<zn-select
|
|
5132
5136
|
class="control control--operator"
|
|
5133
5137
|
size="small"
|
|
5134
|
-
style="min-width:${
|
|
5138
|
+
style="min-width:${Ki._selectMinWidth(a.operators.map(h=>kg(h)))}px"
|
|
5135
5139
|
.value="${s.operator??a.operators[0].value}"
|
|
5136
5140
|
@zn-change="${h=>p({operator:String(h.target.value)})}"
|
|
5137
5141
|
>
|
|
@@ -5142,7 +5146,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
5142
5146
|
<zn-select
|
|
5143
5147
|
class="control control--value"
|
|
5144
5148
|
size="small"
|
|
5145
|
-
style="min-width:${
|
|
5149
|
+
style="min-width:${Ki._selectMinWidth((a.options??[]).map(h=>h.label??h.value))}px"
|
|
5146
5150
|
placeholder="${a.placeholder??""}"
|
|
5147
5151
|
.value="${String(s.value??"")}"
|
|
5148
5152
|
@zn-change="${h=>p({value:String(h.target.value)})}"
|
|
@@ -5163,7 +5167,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
5163
5167
|
<zn-select
|
|
5164
5168
|
class="control control--unit"
|
|
5165
5169
|
size="small"
|
|
5166
|
-
style="min-width:${
|
|
5170
|
+
style="min-width:${Ki._selectMinWidth(a.units.map(h=>h.label??h.value))}px"
|
|
5167
5171
|
.value="${s.unit??a.units[0].value}"
|
|
5168
5172
|
@zn-change="${h=>p({unit:String(h.target.value)})}"
|
|
5169
5173
|
>
|
|
@@ -5208,7 +5212,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
5208
5212
|
<zn-button class="actions__cancel" icon="x@lu" @click="${this._cancel}" panel-bg>Cancel</zn-button>
|
|
5209
5213
|
</div>
|
|
5210
5214
|
</div>
|
|
5211
|
-
`}};
|
|
5215
|
+
`}};Ki.styles=z(Tk),Ki.dependencies={"zn-button":$e,"zn-icon":ne,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([d({attribute:!1})],Ki.prototype,"filters",2),c([d({attribute:!1})],Ki.prototype,"value",2),c([R()],Ki.prototype,"_draft",2),c([R()],Ki.prototype,"_picker",2),c([R()],Ki.prototype,"_search",2);var al=Ki;var Lg=al;al.define("zn-flow-branch-conditions");var $k=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--node-accent:rgb(var(--zn-color-primary));--port-size:11px;position:absolute;top:0;left:0;display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none}:host([dragging]) .card{cursor:grabbing}.card{position:relative;display:flex;flex-direction:column;justify-content:center;width:100%;height:100%;padding:0 10px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:10px;box-shadow:0 1px 2px rgba(var(--zn-shadow),0.4);cursor:grab;transition:border-color 0.12s ease,box-shadow 0.12s ease}.card:hover{border-color:rgb(var(--zn-color-border-active))}.card.selected{border-color:var(--node-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--node-accent) 35%,transparent)}.card.link-target{border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 3px color-mix(in srgb,rgb(var(--zn-color-primary)) 30%,transparent)}.card.error{border-color:rgb(var(--zn-color-error));background:color-mix(in srgb,rgb(var(--zn-color-error)) 6%,rgb(var(--zn-panel)))}.body{display:flex;align-items:center;gap:10px}.icon-tile{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 14%,transparent)}.text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.text .title{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text .subtitle{font-size:0.75rem;color:rgb(var(--zn-color-muted-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu{flex:0 0 auto}zn-menu-item.danger{color:rgb(var(--zn-color-error))}.ports{position:absolute;left:0;width:100%;height:0}.ports--in{top:0}.ports--out{bottom:0}.port{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:var(--port-size);height:var(--port-size);border-radius:50%;background:rgb(var(--zn-panel));border:2px solid var(--node-accent);box-sizing:border-box;pointer-events:none}.port--in{transition:transform 0.12s ease,background 0.12s ease,box-shadow 0.12s ease}:host([link-target]) .port--in{transform:translate(-50%,-50%) scale(1.4);background:rgb(var(--zn-color-primary));border-color:rgb(var(--zn-color-primary));box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.port--out{pointer-events:auto;cursor:pointer;transition:transform 0.12s ease,background 0.12s ease,box-shadow 0.12s ease}.port--out:hover{transform:translate(-50%,-50%) scale(1.4);background:var(--node-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--node-accent) 25%,transparent)}.port-wrap{position:absolute}.port-label{position:absolute;top:calc(var(--port-size) / 2 + 3px);left:8px;font-size:0.625rem;font-weight:600;letter-spacing:0.02em;color:rgb(var(--zn-color-muted-text));white-space:nowrap;pointer-events:none}`;var ui=class extends k{constructor(){super(...arguments);this.selected=!1;this.error=!1;this.dragging=!1;this.linkTarget=!1;this._onBodyPointerDown=t=>{if(t.button!==0)return;let r=t.target;r.closest(".port")||r.closest("zn-dropdown")||(t.stopPropagation(),this._emit("flow-node-select",{nodeId:this.node.id}),this._emit("flow-node-grab",{nodeId:this.node.id,clientX:t.clientX,clientY:t.clientY}))}}updated(t){super.updated(t),this.style.width=`${bt}px`,this.style.height=`${ar}px`,this.style.setProperty("--node-accent",this.type?.color??"rgb(var(--zn-color-primary))")}get nodeTitle(){return this.node?.label??this.type?.label??this.node?.type??"Node"}get nodeSubtitle(){let t=this.node?.data?.subtitle??this.node?.data?.description;return typeof t=="string"?t:this.type?.description??""}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}_action(t){this._emit("flow-node-action",{nodeId:this.node.id,action:t})}_renderPorts(t,r){let n=t.length;return u`
|
|
5212
5216
|
<div class="ports ports--${r}">
|
|
5213
5217
|
${t.map((a,s)=>{let l=`${100*(s+1)/(n+1)}%`;return u`
|
|
5214
5218
|
<div class="port-wrap" style="left:${l}">
|
|
@@ -5257,11 +5261,11 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
5257
5261
|
</div>
|
|
5258
5262
|
</div>`:""}
|
|
5259
5263
|
</div>
|
|
5260
|
-
`}};ui.styles=z($k),ui.dependencies={"zn-icon":ne,"zn-button":$e,"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":yi},c([d({attribute:!1})],ui.prototype,"node",2),c([d({attribute:!1})],ui.prototype,"type",2),c([d({type:Boolean,reflect:!0})],ui.prototype,"selected",2),c([d({type:Boolean,reflect:!0})],ui.prototype,"error",2),c([d({type:Boolean,reflect:!0})],ui.prototype,"dragging",2),c([d({type:Boolean,reflect:!0,attribute:"link-target"})],ui.prototype,"linkTarget",2);var Ak=ui;ui.define("zn-flow-node");var Mk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.viewport.linking{cursor:crosshair}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill-port{position:absolute;z-index:1;left:50%;bottom:0;transform:translate(-50%,50%);width:11px;height:11px;box-sizing:border-box;border-radius:50%;background:rgb(var(--zn-panel));border:2px solid rgb(var(--zn-color-primary));cursor:pointer;transition:transform 0.12s ease,box-shadow 0.12s ease}.branch-pill-port:hover{transform:translate(-50%,50%) scale(1.35);box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 20%,transparent)}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.bin{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);transition:background 0.12s ease,color 0.12s ease,transform 0.12s ease}.bin--over{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-error));border-style:solid;border-color:rgb(var(--zn-color-error));transform:scale(1.12)}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var qg=.25,Lk=2,qk=.15,Ig=40,wI=20,zI=48,Dg=20,Ik=10,_I=8,Dk=40,kI=20,Qc=ol,kt=class kt extends k{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._overBin=!1;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(p=>p instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let r=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*r,a=t.deltaY*r;if(t.ctrlKey||t.metaKey){let p=Math.min(Lk,Math.max(qg,this.zoom*Math.exp(-a*.0015)));if(p===this.zoom)return;let h=this.getBoundingClientRect(),m=t.clientX-h.left,f=t.clientY-h.top,b=(m-this.panX)/this.zoom,g=(f-this.panY)/this.zoom;this.zoom=+p.toFixed(3),this.panX=Math.round(m-b*this.zoom),this.panY=Math.round(f-g*this.zoom);return}let s=t.shiftKey&&!n?a:n,l=t.shiftKey&&!n?0:a;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let r=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:r.nodeId,port:r.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let a=this._linking;this._cancelLink(),a.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:a.nodeId,port:a.port,targetId:t.detail.nodeId});return}let r=this.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:r.id,offX:n.x-r.x,offY:n.y-r.y,startX:r.x,startY:r.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{let{nodeId:r}=t.detail;if(this._linking&&this._linking.nodeId!==r){let s=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:s.nodeId,port:s.port,targetId:r});return}let n=this.nodes.find(s=>s.id===r);if(!n)return;let a=Zt(n,this._typeFor(n)).find(s=>!this.connections.some(l=>l.source.node===r&&l.source.port===s.id));!a&&this._typeFor(n)?.fixedOutputs||this._startLink(r,a?.id??Wc)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),r=48,n=14,a=m=>Math.min(n,Math.ceil((r-m)/r*n)),{x:s,y:l}=this._linkClient,p=0,h=0;s<t.left+r?p=a(s-t.left):s>t.right-r&&(p=-a(t.right-s)),l<t.top+r?h=a(l-t.top):l>t.bottom-r&&(h=-a(t.bottom-l)),(p||h)&&(this.panX+=p,this.panY+=h,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let r=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){this._overBin=this._binHit(t.clientX,t.clientY);let n=this.nodes.find(a=>a.id===this.drag.id);if(n){let a={x:Rr(r.x-this.drag.offX),y:Rr(r.y-this.drag.offY)},s=new Set(this.connections.filter(h=>h.target.node===n.id&&h.source.node!==n.id).map(h=>h.source.node)),l=h=>{let m={...n,...h},f=this.nodes.map(g=>g.id===n.id?m:g),b=g=>this.registry?.get(g);return f.some(g=>g!==m&&wk(m,g,b,f,this.connections))?!1:![...s].some(g=>{let v=f.find(y=>y.id===g);return!!v&&Rh(v,b,f,this.connections)})},p=l(a)?a:l({x:a.x,y:n.y})?{x:a.x,y:n.y}:l({x:n.x,y:a.y})?{x:n.x,y:a.y}:null;p&&(p.x!==n.x||p.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=p.x,n.y=p.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=Rr(r.x-this.drag.offX),n.y=Rr(r.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max(_k,Rr(r.x-n.x)),n.height=Math.max(kk,Rr(r.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag,r=this._overBin;if(this.drag=null,this._overBin=!1,this._teardownWindow(),!!t){if(t.kind==="node"&&this._dragMoved&&r){let n=this.nodes.find(a=>a.id===t.id);n&&(n.x=t.startX,n.y=t.startY),this._emit("flow-node-action",{nodeId:t.id,action:"delete"});return}(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")}};this._onViewportDragOver=t=>{if(!t.dataTransfer?.types.includes(Qc))return;this._viewInitialised=!0,t.preventDefault();let r=t.composedPath().some(a=>a instanceof Element&&a.classList.contains("add-point"));t.dataTransfer.dropEffect=r?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:Rr(n.x-bt/2),y:Rr(n.y-ar/2)}};this._onViewportDragLeave=t=>{let r=this.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{t.dataTransfer?.types.includes(Qc)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")};this._onBinDragOver=t=>{t.dataTransfer?.types.includes(Qc)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="move",this._overBin=!0,this._dropGhost=null)};this._onBinDragLeave=()=>{this._overBin=!1};this._onBinDrop=t=>{t.preventDefault(),t.stopPropagation(),this._overBin=!1,this._dropGhost=null}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let r=this.getBoundingClientRect();r.width&&r.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}screenToCanvas(t,r){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(r-n.top-this.panY)/this.zoom}}_typeFor(t){return this.registry?.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_onBranchPortClick(t,r){if(this._linking){let n=this._linking;this._cancelLink(),n.nodeId!==t&&this._emit("flow-link-assign",{nodeId:n.nodeId,port:n.port,targetId:t});return}this._startLink(t,r)}_startLink(t,r){this._linking={nodeId:t,port:r},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,r){let n=this.screenToCanvas(t,r);this._linkPos=n;let a=this._linking;if(!a)return;let s=12,l=this.nodes.find(p=>p.id!==a.nodeId&&n.x>=p.x-s&&n.x<=p.x+bt+s&&n.y>=p.y-s&&n.y<=p.y+ar+s&&ra(p,this._typeFor(p)).length>0);this._linkTarget=l?.id??null}_binHit(t,r){let n=this.shadowRoot?.querySelector(".bin")?.getBoundingClientRect();return!!n&&t>=n.left&&t<=n.right&&r>=n.top&&r<=n.bottom}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let r=Zt(t,this._typeFor(t)),n=t.x+bt/2,a=t.y+ar,s=a+Sg,l=Kc(t,h=>this.registry?.get(h),this.connections),p=r.map((h,m)=>{let f=this.connections.find(T=>T.source.node===t.id&&T.source.port===h.id),b=f?this.nodes.find(T=>T.id===f.target.node):void 0,g=l[m],v=h.label?Dh(h.label).h:0,y=h.label?Eg(t,v,b,r.length===1):null,S=y===null?s:y+v;return{port:h,conn:f,child:b,x:g,pillTop:y,pillH:v,exitY:S}});return{cx:n,by:a,busY:s,branches:p}}_inputAnchor(t,r){let n=ra(t,this._typeFor(t)),a=Math.max(n.findIndex(s=>s.id===r),0);return{x:Ck(t,"in",a,n.length).x,y:t.y}}_elbowMidOffsets(){let t=new Map;for(let n of this.nodes){let{branches:a}=this._outputLayout(n);for(let s of a){if(!s.conn||!s.child)continue;let{x:l,y:p}=this._inputAnchor(s.child,s.conn.target.port);if(l===s.x||p-Dg<s.exitY)continue;let h=Rr((s.exitY+p)/2),m=`${s.conn.target.node}:${s.conn.target.port}`,f=t.get(h)??new Map;t.set(h,f),f.set(m,[...f.get(m)??[],s.conn.id])}}let r=new Map;for(let n of t.values()){if(n.size<2)continue;let a=[...n.keys()].sort();a.forEach((s,l)=>{let p=(l-Math.floor((a.length-1)/2))*kI;n.get(s).forEach(h=>r.set(h,p))})}return r}_segmentBlocked(t,r,n,a=!0){let l=a?zI:8,p=Math.min(t.x,r.x),h=Math.max(t.x,r.x),m=Math.min(t.y,r.y),f=Math.max(t.y,r.y);return this.nodes.some(b=>!n.has(b.id)&&p<b.x+bt+8&&h>b.x-8&&m<b.y+ar+8&&f>b.y-l)}_routeClear(t,r,n=!0){for(let a=0;a<t.length-1;a++)if(this._segmentBlocked(t[a],t[a+1],r,n))return!1;return!0}_routePoints(t,r,n,a=0,s,l=!1){let{x:p,y:h}=this._inputAnchor(r,n),m=new Set(s?[r.id,s]:[r.id]),f=h-Dg>=t.y?this._forwardRoutes(t,p,h,a,m):this._aroundRoutes(t,p,h,m,l);for(let b of[!0,!1])for(let g of f)if(this._routeClear(g,m,b))return g;return f[0]}_forwardRoutes(t,r,n,a,s){let l=[],p=Math.round((t.y+n)/2)+a,h=n-t.y,m=Math.min(n-12,Math.ceil((t.y+h/4)/Jt)*Jt),f=Math.max(m,Math.floor((n-h/4)/Jt)*Jt),b=y=>Math.max(m,Math.min(f,y));if(r===t.x)l.push([t,{x:r,y:n}]);else for(let y=0;y<=20;y++)for(let S of y===0?[p]:[p+y*Jt,p-y*Jt]){let T=b(S);T!==S&&y>0||l.push([t,{x:t.x,y:T},{x:r,y:T},{x:r,y:n}])}l.push(...this._aroundRoutes(t,r,n,s,!1));let g=Math.floor(h/2/10)*10,v=Math.max(10,Math.round(h/4/10)*10);for(let y=0;y<=12;y++)for(let S of y===0?[v]:[v+y*10,v-y*10]){if(S<10||S>g)continue;let T=t.y+S,N=n-S;if(!(N<T))for(let U=1;U<=14;U++)for(let I of[1,-1]){let C=t.x+I*U*Jt;l.push([t,{x:t.x,y:T},{x:C,y:T},{x:C,y:N},{x:r,y:N},{x:r,y:n}])}}return l}_aroundRoutes(t,r,n,a,s){let l=t.y+wI,p=n-Dg,h=this.nodes.filter(y=>!a.has(y.id)&&y.y+ar>Math.min(l,p)-Jt&&y.y<Math.max(l,p)+Jt);if(!h.length)return[];let m=Math.max(...h.map(y=>y.x+bt))+Dk,f=Math.min(...h.map(y=>y.x))-Dk,b=y=>Math.abs(y-t.x)+Math.abs(y-r),g=s?b(m)<=b(f):r>=(f+m)/2,v=[];for(let y of g?[1,-1]:[-1,1]){let S=y>0?m:f;for(let T=0;T<=20;T++){let N=S+y*T*Jt;v.push([t,{x:t.x,y:l},{x:N,y:l},{x:N,y:p},{x:r,y:p},{x:r,y:n}])}}return v}static _pathFrom(t){return t.map((r,n)=>`${n===0?"M":"L"} ${r.x} ${r.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let r of this.nodes){let{branches:n}=this._outputLayout(r);n.forEach(a=>{a.conn||t.push({nodeId:r.id,port:a.port.id,px:a.x,py:a.exitY+Ig})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),r=ia(this.nodes,this.connections),n=[];for(let p of this.nodes){let{branches:h}=this._outputLayout(p);h.forEach(m=>{if(!m.conn||!m.child)return;let f=t.get(m.conn.id)??0,b=this._routePoints({x:m.x,y:m.exitY},m.child,m.conn.target.port,f,p.id,r.has(m.conn)),g=0,v=-1;for(let $=0;$<b.length-1;$++){let L=Math.abs(b[$+1].x-b[$].x)+Math.abs(b[$+1].y-b[$].y);L>v&&(v=L,g=$)}let y=b[g],S=b[g+1],T=Math.abs(S.x-y.x)+Math.abs(S.y-y.y),N=Math.sign(S.x-y.x),U=Math.sign(S.y-y.y),I=$=>({px:y.x+N*$,py:y.y+U*$}),C=Math.max(0,(g===b.length-2?T-_I:T)/2);n.push({connectionId:m.conn.id,at:I,d:C,len:T})})}let a=Ik,s=(p,h)=>this.nodes.some(m=>p>m.x-a&&p<m.x+bt+a&&h>m.y-a&&h<m.y+ar+a),l=[];for(let p of n){let h=f=>s(f.px,f.py)||l.some(b=>Math.hypot(b.px-f.px,b.py-f.py)<Ik*2+6),m=p.at(p.d);if(h(m))e:for(let f=Jt/2;f<=p.len;f+=Jt/2)for(let b of[p.d-f,p.d+f]){if(b<0||b>p.len)continue;let g=p.at(b);if(!h(g)){m=g;break e}}l.push({connectionId:p.connectionId,...m})}return l}_screenFromCanvas(t,r){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+r*this.zoom}}_onAddClick(t,r,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:r,port:n});return}this._startLink(r,n)}_onWireAddClick(t,r,n,a){t.stopPropagation(),this._emit("flow-wire-pick",{connectionId:r,...this._screenFromCanvas(n,a)})}_onAddDrop(t,r,n){let a=t.dataTransfer?.getData(Qc);a&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:r,port:n,type:a}))}_onWireDrop(t,r){let n=t.dataTransfer?.getData(Qc);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:r,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(Lk,Math.max(qg,+(this.zoom+t).toFixed(2)))}_contentBounds(){if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,r=1/0,n=-1/0,a=-1/0;for(let s of this.nodes){t=Math.min(t,s.x),n=Math.max(n,s.x+bt),r=Math.min(r,s.y),a=Math.max(a,s.y+ar);for(let l of this._outputLayout(s).branches)t=Math.min(t,l.x-70),n=Math.max(n,l.x+70),a=Math.max(a,l.exitY+Ig+14)}for(let s of this.notes)t=Math.min(t,s.x),n=Math.max(n,s.x+(s.width??$g)),r=Math.min(r,s.y),a=Math.max(a,s.y+(s.height??Ag));return{x:t,y:r,width:n-t,height:a-r}}_resetView(){let t=this.getBoundingClientRect(),r=this._contentBounds();if(!r||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,a=Math.min(1,(t.width-n*2)/r.width,(t.height-n*2)/r.height);this.zoom=Math.max(qg,+a.toFixed(2)),this.panX=Math.round((t.width-r.width*this.zoom)/2-r.x*this.zoom),this.panY=Math.round((t.height-r.height*this.zoom)/2-r.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,r=this._elbowMidOffsets(),n=ia(this.nodes,this.connections),a=[],s=!!(this.movingNodeId||this.dragType);for(let l of this.nodes){let{cx:p,by:h,busY:m,branches:f}=this._outputLayout(l),b=f.filter(S=>S.conn&&S.child||S.pillTop!==null||s);if(!b.length)continue;a.push(Qi`<path class="wire" d="M ${p} ${h} L ${p} ${m}"></path>`);let g=[p,...b.map(S=>S.x)],v=Math.min(...g),y=Math.max(...g);y-v>.5&&a.push(Qi`<path class="wire" d="M ${v} ${m} L ${y} ${m}"></path>`),b.forEach(S=>{if(S.pillTop!==null&&a.push(Qi`<path class="wire" d="M ${S.x} ${Math.min(m,S.pillTop-10)} L ${S.x} ${S.pillTop}" marker-end="url(#flow-arrow)"></path>`),S.conn&&S.child){let T=r.get(S.conn.id)??0,N=n.has(S.conn),U=this._routePoints({x:S.x,y:S.exitY},S.child,S.conn.target.port,T,l.id,N);a.push(Qi`<path
|
|
5264
|
+
`}};ui.styles=z($k),ui.dependencies={"zn-icon":ne,"zn-button":$e,"zn-dropdown":pr,"zn-menu":on,"zn-menu-item":xi},c([d({attribute:!1})],ui.prototype,"node",2),c([d({attribute:!1})],ui.prototype,"type",2),c([d({type:Boolean,reflect:!0})],ui.prototype,"selected",2),c([d({type:Boolean,reflect:!0})],ui.prototype,"error",2),c([d({type:Boolean,reflect:!0})],ui.prototype,"dragging",2),c([d({type:Boolean,reflect:!0,attribute:"link-target"})],ui.prototype,"linkTarget",2);var Ak=ui;ui.define("zn-flow-node");var Mk=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.viewport.linking{cursor:crosshair}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill-port{position:absolute;z-index:1;left:50%;bottom:0;transform:translate(-50%,50%);width:11px;height:11px;box-sizing:border-box;border-radius:50%;background:rgb(var(--zn-panel));border:2px solid rgb(var(--zn-color-primary));cursor:pointer;transition:transform 0.12s ease,box-shadow 0.12s ease}.branch-pill-port:hover{transform:translate(-50%,50%) scale(1.35);box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 20%,transparent)}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.bin{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);transition:background 0.12s ease,color 0.12s ease,transform 0.12s ease}.bin--over{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-error));border-style:solid;border-color:rgb(var(--zn-color-error));transform:scale(1.12)}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var qg=.25,Lk=2,qk=.15,Ig=40,wI=20,zI=48,Dg=20,Ik=10,_I=8,Dk=40,kI=20,Qc=ol,kt=class kt extends k{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._overBin=!1;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(p=>p instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let r=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*r,a=t.deltaY*r;if(t.ctrlKey||t.metaKey){let p=Math.min(Lk,Math.max(qg,this.zoom*Math.exp(-a*.0015)));if(p===this.zoom)return;let h=this.getBoundingClientRect(),m=t.clientX-h.left,f=t.clientY-h.top,b=(m-this.panX)/this.zoom,g=(f-this.panY)/this.zoom;this.zoom=+p.toFixed(3),this.panX=Math.round(m-b*this.zoom),this.panY=Math.round(f-g*this.zoom);return}let s=t.shiftKey&&!n?a:n,l=t.shiftKey&&!n?0:a;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let r=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:r.nodeId,port:r.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let a=this._linking;this._cancelLink(),a.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:a.nodeId,port:a.port,targetId:t.detail.nodeId});return}let r=this.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:r.id,offX:n.x-r.x,offY:n.y-r.y,startX:r.x,startY:r.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{let{nodeId:r}=t.detail;if(this._linking&&this._linking.nodeId!==r){let s=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:s.nodeId,port:s.port,targetId:r});return}let n=this.nodes.find(s=>s.id===r);if(!n)return;let a=Zt(n,this._typeFor(n)).find(s=>!this.connections.some(l=>l.source.node===r&&l.source.port===s.id));!a&&this._typeFor(n)?.fixedOutputs||this._startLink(r,a?.id??Wc)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),r=48,n=14,a=m=>Math.min(n,Math.ceil((r-m)/r*n)),{x:s,y:l}=this._linkClient,p=0,h=0;s<t.left+r?p=a(s-t.left):s>t.right-r&&(p=-a(t.right-s)),l<t.top+r?h=a(l-t.top):l>t.bottom-r&&(h=-a(t.bottom-l)),(p||h)&&(this.panX+=p,this.panY+=h,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let r=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){this._overBin=this._binHit(t.clientX,t.clientY);let n=this.nodes.find(a=>a.id===this.drag.id);if(n){let a={x:Rr(r.x-this.drag.offX),y:Rr(r.y-this.drag.offY)},s=new Set(this.connections.filter(h=>h.target.node===n.id&&h.source.node!==n.id).map(h=>h.source.node)),l=h=>{let m={...n,...h},f=this.nodes.map(g=>g.id===n.id?m:g),b=g=>this.registry?.get(g);return f.some(g=>g!==m&&wk(m,g,b,f,this.connections))?!1:![...s].some(g=>{let v=f.find(y=>y.id===g);return!!v&&Rh(v,b,f,this.connections)})},p=l(a)?a:l({x:a.x,y:n.y})?{x:a.x,y:n.y}:l({x:n.x,y:a.y})?{x:n.x,y:a.y}:null;p&&(p.x!==n.x||p.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=p.x,n.y=p.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=Rr(r.x-this.drag.offX),n.y=Rr(r.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max(_k,Rr(r.x-n.x)),n.height=Math.max(kk,Rr(r.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag,r=this._overBin;if(this.drag=null,this._overBin=!1,this._teardownWindow(),!!t){if(t.kind==="node"&&this._dragMoved&&r){let n=this.nodes.find(a=>a.id===t.id);n&&(n.x=t.startX,n.y=t.startY),this._emit("flow-node-action",{nodeId:t.id,action:"delete"});return}(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")}};this._onViewportDragOver=t=>{if(!t.dataTransfer?.types.includes(Qc))return;this._viewInitialised=!0,t.preventDefault();let r=t.composedPath().some(a=>a instanceof Element&&a.classList.contains("add-point"));t.dataTransfer.dropEffect=r?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:Rr(n.x-bt/2),y:Rr(n.y-ar/2)}};this._onViewportDragLeave=t=>{let r=this.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{t.dataTransfer?.types.includes(Qc)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")};this._onBinDragOver=t=>{t.dataTransfer?.types.includes(Qc)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="move",this._overBin=!0,this._dropGhost=null)};this._onBinDragLeave=()=>{this._overBin=!1};this._onBinDrop=t=>{t.preventDefault(),t.stopPropagation(),this._overBin=!1,this._dropGhost=null}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let r=this.getBoundingClientRect();r.width&&r.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}screenToCanvas(t,r){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(r-n.top-this.panY)/this.zoom}}_typeFor(t){return this.registry?.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_onBranchPortClick(t,r){if(this._linking){let n=this._linking;this._cancelLink(),n.nodeId!==t&&this._emit("flow-link-assign",{nodeId:n.nodeId,port:n.port,targetId:t});return}this._startLink(t,r)}_startLink(t,r){this._linking={nodeId:t,port:r},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,r){let n=this.screenToCanvas(t,r);this._linkPos=n;let a=this._linking;if(!a)return;let s=12,l=this.nodes.find(p=>p.id!==a.nodeId&&n.x>=p.x-s&&n.x<=p.x+bt+s&&n.y>=p.y-s&&n.y<=p.y+ar+s&&ra(p,this._typeFor(p)).length>0);this._linkTarget=l?.id??null}_binHit(t,r){let n=this.shadowRoot?.querySelector(".bin")?.getBoundingClientRect();return!!n&&t>=n.left&&t<=n.right&&r>=n.top&&r<=n.bottom}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let r=Zt(t,this._typeFor(t)),n=t.x+bt/2,a=t.y+ar,s=a+Sg,l=Kc(t,h=>this.registry?.get(h),this.connections),p=r.map((h,m)=>{let f=this.connections.find(T=>T.source.node===t.id&&T.source.port===h.id),b=f?this.nodes.find(T=>T.id===f.target.node):void 0,g=l[m],v=h.label?Dh(h.label).h:0,y=h.label?Eg(t,v,b,r.length===1):null,S=y===null?s:y+v;return{port:h,conn:f,child:b,x:g,pillTop:y,pillH:v,exitY:S}});return{cx:n,by:a,busY:s,branches:p}}_inputAnchor(t,r){let n=ra(t,this._typeFor(t)),a=Math.max(n.findIndex(s=>s.id===r),0);return{x:Ck(t,"in",a,n.length).x,y:t.y}}_elbowMidOffsets(){let t=new Map;for(let n of this.nodes){let{branches:a}=this._outputLayout(n);for(let s of a){if(!s.conn||!s.child)continue;let{x:l,y:p}=this._inputAnchor(s.child,s.conn.target.port);if(l===s.x||p-Dg<s.exitY)continue;let h=Rr((s.exitY+p)/2),m=`${s.conn.target.node}:${s.conn.target.port}`,f=t.get(h)??new Map;t.set(h,f),f.set(m,[...f.get(m)??[],s.conn.id])}}let r=new Map;for(let n of t.values()){if(n.size<2)continue;let a=[...n.keys()].sort();a.forEach((s,l)=>{let p=(l-Math.floor((a.length-1)/2))*kI;n.get(s).forEach(h=>r.set(h,p))})}return r}_segmentBlocked(t,r,n,a=!0){let l=a?zI:8,p=Math.min(t.x,r.x),h=Math.max(t.x,r.x),m=Math.min(t.y,r.y),f=Math.max(t.y,r.y);return this.nodes.some(b=>!n.has(b.id)&&p<b.x+bt+8&&h>b.x-8&&m<b.y+ar+8&&f>b.y-l)}_routeClear(t,r,n=!0){for(let a=0;a<t.length-1;a++)if(this._segmentBlocked(t[a],t[a+1],r,n))return!1;return!0}_routePoints(t,r,n,a=0,s,l=!1){let{x:p,y:h}=this._inputAnchor(r,n),m=new Set(s?[r.id,s]:[r.id]),f=h-Dg>=t.y?this._forwardRoutes(t,p,h,a,m):this._aroundRoutes(t,p,h,m,l);for(let b of[!0,!1])for(let g of f)if(this._routeClear(g,m,b))return g;return f[0]}_forwardRoutes(t,r,n,a,s){let l=[],p=Math.round((t.y+n)/2)+a,h=n-t.y,m=Math.min(n-12,Math.ceil((t.y+h/4)/Jt)*Jt),f=Math.max(m,Math.floor((n-h/4)/Jt)*Jt),b=y=>Math.max(m,Math.min(f,y));if(r===t.x)l.push([t,{x:r,y:n}]);else for(let y=0;y<=20;y++)for(let S of y===0?[p]:[p+y*Jt,p-y*Jt]){let T=b(S);T!==S&&y>0||l.push([t,{x:t.x,y:T},{x:r,y:T},{x:r,y:n}])}l.push(...this._aroundRoutes(t,r,n,s,!1));let g=Math.floor(h/2/10)*10,v=Math.max(10,Math.round(h/4/10)*10);for(let y=0;y<=12;y++)for(let S of y===0?[v]:[v+y*10,v-y*10]){if(S<10||S>g)continue;let T=t.y+S,N=n-S;if(!(N<T))for(let U=1;U<=14;U++)for(let I of[1,-1]){let C=t.x+I*U*Jt;l.push([t,{x:t.x,y:T},{x:C,y:T},{x:C,y:N},{x:r,y:N},{x:r,y:n}])}}return l}_aroundRoutes(t,r,n,a,s){let l=t.y+wI,p=n-Dg,h=this.nodes.filter(y=>!a.has(y.id)&&y.y+ar>Math.min(l,p)-Jt&&y.y<Math.max(l,p)+Jt);if(!h.length)return[];let m=Math.max(...h.map(y=>y.x+bt))+Dk,f=Math.min(...h.map(y=>y.x))-Dk,b=y=>Math.abs(y-t.x)+Math.abs(y-r),g=s?b(m)<=b(f):r>=(f+m)/2,v=[];for(let y of g?[1,-1]:[-1,1]){let S=y>0?m:f;for(let T=0;T<=20;T++){let N=S+y*T*Jt;v.push([t,{x:t.x,y:l},{x:N,y:l},{x:N,y:p},{x:r,y:p},{x:r,y:n}])}}return v}static _pathFrom(t){return t.map((r,n)=>`${n===0?"M":"L"} ${r.x} ${r.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let r of this.nodes){let{branches:n}=this._outputLayout(r);n.forEach(a=>{a.conn||t.push({nodeId:r.id,port:a.port.id,px:a.x,py:a.exitY+Ig})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),r=ia(this.nodes,this.connections),n=[];for(let p of this.nodes){let{branches:h}=this._outputLayout(p);h.forEach(m=>{if(!m.conn||!m.child)return;let f=t.get(m.conn.id)??0,b=this._routePoints({x:m.x,y:m.exitY},m.child,m.conn.target.port,f,p.id,r.has(m.conn)),g=0,v=-1;for(let $=0;$<b.length-1;$++){let L=Math.abs(b[$+1].x-b[$].x)+Math.abs(b[$+1].y-b[$].y);L>v&&(v=L,g=$)}let y=b[g],S=b[g+1],T=Math.abs(S.x-y.x)+Math.abs(S.y-y.y),N=Math.sign(S.x-y.x),U=Math.sign(S.y-y.y),I=$=>({px:y.x+N*$,py:y.y+U*$}),C=Math.max(0,(g===b.length-2?T-_I:T)/2);n.push({connectionId:m.conn.id,at:I,d:C,len:T})})}let a=Ik,s=(p,h)=>this.nodes.some(m=>p>m.x-a&&p<m.x+bt+a&&h>m.y-a&&h<m.y+ar+a),l=[];for(let p of n){let h=f=>s(f.px,f.py)||l.some(b=>Math.hypot(b.px-f.px,b.py-f.py)<Ik*2+6),m=p.at(p.d);if(h(m))e:for(let f=Jt/2;f<=p.len;f+=Jt/2)for(let b of[p.d-f,p.d+f]){if(b<0||b>p.len)continue;let g=p.at(b);if(!h(g)){m=g;break e}}l.push({connectionId:p.connectionId,...m})}return l}_screenFromCanvas(t,r){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+r*this.zoom}}_onAddClick(t,r,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:r,port:n});return}this._startLink(r,n)}_onWireAddClick(t,r,n,a){t.stopPropagation(),this._emit("flow-wire-pick",{connectionId:r,...this._screenFromCanvas(n,a)})}_onAddDrop(t,r,n){let a=t.dataTransfer?.getData(Qc);a&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:r,port:n,type:a}))}_onWireDrop(t,r){let n=t.dataTransfer?.getData(Qc);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:r,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(Lk,Math.max(qg,+(this.zoom+t).toFixed(2)))}_contentBounds(){if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,r=1/0,n=-1/0,a=-1/0;for(let s of this.nodes){t=Math.min(t,s.x),n=Math.max(n,s.x+bt),r=Math.min(r,s.y),a=Math.max(a,s.y+ar);for(let l of this._outputLayout(s).branches)t=Math.min(t,l.x-70),n=Math.max(n,l.x+70),a=Math.max(a,l.exitY+Ig+14)}for(let s of this.notes)t=Math.min(t,s.x),n=Math.max(n,s.x+(s.width??$g)),r=Math.min(r,s.y),a=Math.max(a,s.y+(s.height??Ag));return{x:t,y:r,width:n-t,height:a-r}}_resetView(){let t=this.getBoundingClientRect(),r=this._contentBounds();if(!r||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,a=Math.min(1,(t.width-n*2)/r.width,(t.height-n*2)/r.height);this.zoom=Math.max(qg,+a.toFixed(2)),this.panX=Math.round((t.width-r.width*this.zoom)/2-r.x*this.zoom),this.panY=Math.round((t.height-r.height*this.zoom)/2-r.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,r=this._elbowMidOffsets(),n=ia(this.nodes,this.connections),a=[],s=!!(this.movingNodeId||this.dragType);for(let l of this.nodes){let{cx:p,by:h,busY:m,branches:f}=this._outputLayout(l),b=f.filter(S=>S.conn&&S.child||S.pillTop!==null||s);if(!b.length)continue;a.push(Xi`<path class="wire" d="M ${p} ${h} L ${p} ${m}"></path>`);let g=[p,...b.map(S=>S.x)],v=Math.min(...g),y=Math.max(...g);y-v>.5&&a.push(Xi`<path class="wire" d="M ${v} ${m} L ${y} ${m}"></path>`),b.forEach(S=>{if(S.pillTop!==null&&a.push(Xi`<path class="wire" d="M ${S.x} ${Math.min(m,S.pillTop-10)} L ${S.x} ${S.pillTop}" marker-end="url(#flow-arrow)"></path>`),S.conn&&S.child){let T=r.get(S.conn.id)??0,N=n.has(S.conn),U=this._routePoints({x:S.x,y:S.exitY},S.child,S.conn.target.port,T,l.id,N);a.push(Xi`<path
|
|
5261
5265
|
class="wire wire--link ${N?"wire--loop":""}"
|
|
5262
5266
|
d="${kt._pathFrom(U)}"
|
|
5263
5267
|
marker-end="url(#${N?"flow-arrow-loop":"flow-arrow"})"
|
|
5264
|
-
></path>`)}else s&&a.push(
|
|
5268
|
+
></path>`)}else s&&a.push(Xi`<path class="wire wire--stub" d="M ${S.x} ${S.exitY} L ${S.x} ${S.exitY+Ig-11}"></path>`)})}if(this._linking&&this._linkPos){let l=this.nodes.find(p=>p.id===this._linking.nodeId);if(l){let p=this._outputLayout(l).branches.find(b=>b.port.id===this._linking.port),h=p&&p.pillTop!==null?{x:p.x,y:p.exitY}:{x:l.x+bt/2,y:l.y+ar},m=this._linkTarget?this.nodes.find(b=>b.id===this._linkTarget):void 0,f=m?this._inputAnchor(m,Yc(m,this._typeFor(m))??""):this._linkPos;a.push(Xi`<path class="wire wire--preview" d="M ${h.x} ${h.y} L ${f.x} ${f.y}" marker-end="url(#flow-arrow)"></path>`)}}return u`
|
|
5265
5269
|
<svg class="connections" part="connections">
|
|
5266
5270
|
<defs>
|
|
5267
5271
|
<marker id="flow-arrow" markerWidth="10" markerHeight="10" refX="7" refY="3" orient="auto"
|
|
@@ -6053,7 +6057,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
6053
6057
|
@zn-error="${this._onFrameError}"></zn-preview-frame>
|
|
6054
6058
|
</div>
|
|
6055
6059
|
</div>
|
|
6056
|
-
</div>`}};Ie.styles=z(Zk),Ie.dependencies={"zn-collapsible":wa,"zn-preview-frame":Vg,"zn-icon":ne,"zn-button":$e,"zn-button-group":Nl,"zn-tabs":ln,"zn-navbar":Ca,"zn-select":Be,"zn-option":ot},c([d()],Ie.prototype,"src",2),c([d({attribute:"frame-origin"})],Ie.prototype,"frameOrigin",2),c([d({attribute:"data-uri"})],Ie.prototype,"dataUri",2),c([d({reflect:!0})],Ie.prototype,"mode",2),c([d({reflect:!0})],Ie.prototype,"device",2),c([d({type:Number,attribute:"min-height"})],Ie.prototype,"minHeight",2),c([d({type:Number})],Ie.prototype,"debounce",2),c([d()],Ie.prototype,"action",2),c([d({type:Number,attribute:"save-debounce"})],Ie.prototype,"saveDebounce",2),c([d({type:Array})],Ie.prototype,"sections",2),c([d({attribute:"section-layout"})],Ie.prototype,"sectionLayout",2),c([d({type:Array})],Ie.prototype,"sources",2),c([d({type:Boolean,reflect:!0,attribute:"controls-collapsed"})],Ie.prototype,"controlsCollapsed",2),c([d({type:Boolean,reflect:!0})],Ie.prototype,"standalone",2),c([d({attribute:"controls-caption"})],Ie.prototype,"controlsCaption",2),c([d({attribute:"preview-caption"})],Ie.prototype,"previewCaption",2),c([d({attribute:"submit-label"})],Ie.prototype,"submitLabel",2),c([d({type:Boolean})],Ie.prototype,"manual",2),c([F("zn-preview-frame")],Ie.prototype,"frame",2),c([F("slot:not([name])")],Ie.prototype,"controlsSlot",2),c([Za(".editor__section-slot")],Ie.prototype,"sectionSlots",2),c([R()],Ie.prototype,"error",2),c([R()],Ie.prototype,"_submitting",2),c([R()],Ie.prototype,"_sourceIndex",2);var BI=Ie;Ie.define("zn-theme-editor");var e3=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--slot-height:18px;--gutter-width:64px;--open-color:rgb(var(--zn-primary));--reduced-color:rgba(var(--zn-primary),0.3);--closed-color:var(--zn-color-neutral-0);--grid-line-color:rgb(var(--zn-border-color));display:block}.schedule-builder{color:rgb(var(--zn-text));font-size:var(--zn-font-size-small)}.schedule-builder--disabled{opacity:0.6;pointer-events:none}.schedule-builder__toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-x-small)}.schedule-builder__hint{flex:1 1 240px;margin:0;color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-small)}.legend{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin:0;padding:0;list-style:none}.legend__item{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:var(--zn-color-neutral-600);font-size:var(--zn-font-size-x-small);white-space:nowrap}.legend__swatch{width:14px;height:14px;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius-small);background-color:var(--closed-color)}.legend__swatch--open{border-color:transparent;background-color:var(--open-color)}.timezone{flex:0 1 auto;width:260px;max-width:100%}.view-toggle{display:inline-flex;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius)}.view-toggle__button{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border:none;background:none;color:var(--zn-color-neutral-500);cursor:pointer}.view-toggle__button:not(:first-child){border-left:1px solid var(--grid-line-color)}.view-toggle__button:hover{background-color:var(--zn-color-neutral-100)}.view-toggle__button:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}.view-toggle__button--active{background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700)}.view-toggle__button--active:hover{background-color:var(--zn-color-primary-100)}.schedule-builder__calendar{display:flex;align-items:flex-start;gap:var(--zn-spacing-medium)}.calendar{flex:1 1 auto;min-width:0;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius);background-color:var(--zn-panel-background-color)}.calendar__head,.calendar__body{display:grid;grid-template-columns:var(--gutter-width) repeat(var(--columns),minmax(0,1fr))}.calendar__head{border-bottom:1px solid var(--grid-line-color);background-color:var(--zn-color-neutral-50)}.calendar__head-cell{display:flex;flex-direction:column;gap:2px;padding:var(--zn-spacing-x-small);border-left:1px solid var(--grid-line-color);overflow:hidden}.calendar__head-day{font-weight:var(--zn-font-weight-semibold,600);white-space:nowrap}.calendar__head-hours{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar__head-cell--closed .calendar__head-day,.calendar__head-cell--closed .calendar__head-hours{color:var(--zn-color-neutral-400)}.calendar__body{padding-top:var(--zn-spacing-x-small);padding-bottom:var(--zn-spacing-x-small)}.calendar__gutter{display:grid;grid-auto-rows:calc(var(--slot-height) * var(--slots-per-hour))}.calendar__hour{position:relative}.calendar__hour span{position:absolute;top:0;right:var(--zn-spacing-x-small);transform:translateY(-50%);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-variant-numeric:tabular-nums;white-space:nowrap}.calendar__canvas{display:grid;grid-column:span var(--columns);grid-template-columns:repeat(var(--columns),minmax(0,1fr));touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.calendar__col{display:grid;grid-auto-rows:var(--slot-height);border-left:1px solid var(--grid-line-color)}.calendar__slot{border-bottom:1px dotted rgba(var(--zn-border-color),0.6);background-color:var(--closed-color)}.calendar__slot--hour{border-top:1px solid rgba(var(--zn-border-color),0.6)}.calendar__slot--open{background-color:var(--open-color);border-bottom-color:rgba(255,255,255,0.25)}.calendar__slot--reduced{background-color:var(--reduced-color);border-bottom-color:rgba(255,255,255,0.4)}.schedule-builder:not(.schedule-builder--readonly):not(.schedule-builder--disabled) .calendar__canvas{cursor:crosshair}.summary{flex:0 0 260px;max-width:260px}.summary__title{margin:0 0 var(--zn-spacing-x-small);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.06em;text-transform:uppercase}.summary__list{margin:0}.summary__row{display:flex;align-items:baseline;justify-content:space-between;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) 0;border-bottom:1px solid var(--grid-line-color)}.summary__row dt{font-weight:var(--zn-font-weight-semibold,600)}.summary__row dd{margin:0;font-variant-numeric:tabular-nums;text-align:right}.summary__closed{color:var(--zn-color-neutral-400)}.summary__row--total{border-bottom:none}.summary__row--total dd{font-weight:var(--zn-font-weight-semibold,600)}.list{display:flex;flex-direction:column}.list__row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-2x-small);border-bottom:1px solid var(--grid-line-color)}.list__row--editing{border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-50)}.list__day{font-weight:var(--zn-font-weight-semibold,600)}.list__day--closed{color:var(--zn-color-neutral-400)}.list__ranges{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small);min-height:32px}.list__closed{color:var(--zn-color-neutral-400)}.list__note{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small)}.list__chip{padding:6px 10px;border:none;border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700);font-family:inherit;font-size:var(--zn-font-size-small);font-variant-numeric:tabular-nums;cursor:pointer}.list__chip:hover:not([disabled]){background-color:var(--zn-color-primary-200)}.list__chip[disabled]{cursor:default}.list__chip:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:1px}.list__chip--reduced{background-color:var(--zn-color-warning-50);color:var(--zn-color-warning-600)}.list__chip--reduced:hover:not([disabled]){background-color:var(--zn-color-warning-50)}.list__editor{display:flex;align-items:center;gap:var(--zn-spacing-2x-small)}.list__editor zn-input{width:130px}.list__editor-separator{color:var(--zn-color-neutral-500)}.list__remove{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;border-radius:var(--zn-border-radius);background:none;color:var(--zn-color-neutral-500);cursor:pointer}.list__remove:hover{background-color:var(--zn-color-neutral-100);color:rgb(var(--zn-text))}.list__add{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);padding:4px var(--zn-spacing-x-small);border:none;border-radius:var(--zn-border-radius);background:none;color:rgb(var(--zn-text));font-family:inherit;font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.04em;text-transform:uppercase;white-space:nowrap;cursor:pointer}.list__add:hover{background-color:var(--zn-color-neutral-100)}.list__add:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}@media (max-width:900px){.schedule-builder__calendar{flex-direction:column}.summary{flex:1 1 auto;max-width:none;width:100%}}`;var sr=["mon","tue","wed","thu","fri","sat","sun"],dl={mon:{short:"Mon",long:"Monday"},tue:{short:"Tue",long:"Tuesday"},wed:{short:"Wed",long:"Wednesday"},thu:{short:"Thu",long:"Thursday"},fri:{short:"Fri",long:"Friday"},sat:{short:"Sat",long:"Saturday"},sun:{short:"Sun",long:"Sunday"}},Ti=1440;function pl(){return{mon:[],tue:[],wed:[],thu:[],fri:[],sat:[],sun:[]}}function fi(o){if(typeof o=="number"&&Number.isFinite(o))return Math.min(Math.max(Math.round(o),0),Ti);if(typeof o!="string")return null;let i=/^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(o.trim());if(!i)return null;let t=Number(i[1]),r=Number(i[2]);if(t>24||r>59)return null;let n=t*60+r;return n>Ti?null:n}function Kr(o){let i=Math.min(Math.max(Math.round(o),0),Ti),t=Math.floor(i/60),r=i%60;return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function hl(o){let i=[];o.forEach(r=>{let n=fi(r?.start),a=fi(r?.end);n===null||a===null||a<=n||i.push([n,a])}),i.sort((r,n)=>r[0]-n[0]);let t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t.map(([r,n])=>({start:Kr(r),end:Kr(n)}))}function Bh(o){if(!Array.isArray(o))return[];let i=[];return o.forEach(t=>{if(typeof t=="string"){let[r,n]=t.split(/\s*[-–—]\s*/);r&&n&&i.push({start:r,end:n});return}if(t&&typeof t=="object"){let r=t;r.start&&r.end&&i.push({start:String(r.start),end:String(r.end)})}}),hl(i)}function VI(o,i,t){return hl([...o,{start:Kr(i),end:Kr(t)}])}function UI(o,i,t){let r=[];return o.forEach(n=>{let a=fi(n.start),s=fi(n.end);if(!(a===null||s===null)){if(s<=i||a>=t){r.push(n);return}a<i&&r.push({start:Kr(a),end:Kr(i)}),s>t&&r.push({start:Kr(t),end:Kr(s)})}}),hl(r)}function jI(o){return o.reduce((i,t)=>{let r=fi(t.start),n=fi(t.end);return r===null||n===null?i:i+(n-r)},0)}function Vh(o){if(!o)return null;let i=/^(\d{4})-(\d{2})-(\d{2})/.exec(o.trim());if(!i)return null;let t=new Date(Number(i[1]),Number(i[2])-1,Number(i[3]));return Number.isNaN(t.getTime())?null:t}function GI(o){return Vh(o.date??o.from)}function WI(o){return Vh(o.to??o.date??o.from)}function t3(o){if(o.days?.length)return o.days.filter(s=>sr.includes(s));let i=GI(o),t=WI(o);if(!i||!t)return[];let r=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n-r)/864e5)>=sr.length-1?[...sr]:[]}function Ug(o){return o.closed?[]:o.ranges?Bh(o.ranges):null}var Wa=7*Ti;function ul(o){let i=o.filter(([r,n])=>n>r).sort((r,n)=>r[0]-n[0]),t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t}function Wg(o){let i=[];return sr.forEach((t,r)=>{let n=r*Ti;o[t].forEach(a=>{let s=fi(a.start),l=fi(a.end);s===null||l===null||l<=s||i.push([n+s,n+l])})}),ul(i)}function KI(o){let i=pl();return ul(o).forEach(([t,r])=>{let n=t;for(;n<r;){let a=Math.min(Math.floor(n/Ti),sr.length-1),s=a*Ti,l=Math.min(r,s+Ti);i[sr[a]].push({start:Kr(n-s),end:Kr(l-s)}),n=l}}),sr.forEach(t=>{i[t]=hl(i[t])}),i}function i3(o,i){if(!i)return o.map(r=>[r[0],r[1]]);let t=[];return o.forEach(([r,n])=>{let a=Math.min(n-r,Wa),s=((r+i)%Wa+Wa)%Wa,l=s+a;if(l<=Wa){t.push([s,l]);return}t.push([s,Wa]),t.push([0,l-Wa])}),ul(t)}function jg(o,i){return i?KI(i3(Wg(o),i)):o}function YI(o,i){let t=ul(o);return ul(i).forEach(([r,n])=>{let a=[];t.forEach(([s,l])=>{if(l<=r||s>=n){a.push([s,l]);return}s<r&&a.push([s,r]),l>n&&a.push([n,l])}),t=a}),t}function Gg(o,i){return o.some(([t,r])=>i>=t&&i<r)}function Ka(o,i){if(!o)return 0;try{let t=new Intl.DateTimeFormat("en-US",{timeZone:o,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(i),r=s=>Number(t.find(l=>l.type===s)?.value),n=r("hour")%24,a=Date.UTC(r("year"),r("month")-1,r("day"),n,r("minute"),r("second"));return Math.round((a-i.getTime())/6e4)}catch{return 0}}function QI(o){let i=o<0?"-":"+",t=Math.abs(o);return`UTC${i}${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}function XI(o,i){return!o.label&&o.zone==="UTC"?"UTC":`${o.label??o.zone.replace(/_/g," ")} (${QI(Ka(o.zone,i))})`}function r3(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}var JI=[{zone:"America/New_York",label:"US Eastern"},{zone:"America/Chicago",label:"US Central"},{zone:"America/Denver",label:"US Mountain"},{zone:"America/Los_Angeles",label:"US Pacific"},{zone:"Europe/London",label:"UK"},{zone:"Australia/Sydney",label:"Australia"}],ZI=["UTC","Pacific/Auckland","Australia/Sydney","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Karachi","Asia/Dubai","Europe/Moscow","Africa/Nairobi","Europe/Istanbul","Europe/Athens","Africa/Johannesburg","Europe/Berlin","Europe/Paris","Europe/Madrid","Europe/Amsterdam","Europe/Dublin","Europe/London","Europe/Lisbon","Atlantic/Reykjavik","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Halifax","America/New_York","America/Toronto","America/Chicago","America/Mexico_City","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","Pacific/Honolulu"],n3=["Pacific/Midway","Pacific/Honolulu","Pacific/Marquesas","America/Anchorage","America/Los_Angeles","America/Vancouver","America/Tijuana","America/Denver","America/Phoenix","America/Edmonton","America/Chicago","America/Mexico_City","America/Winnipeg","America/Guatemala","America/New_York","America/Toronto","America/Bogota","America/Lima","America/Panama","America/Halifax","America/Puerto_Rico","America/Santiago","America/St_Johns","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/Azores","Atlantic/Cape_Verde","UTC","Europe/London","Europe/Dublin","Europe/Lisbon","Atlantic/Reykjavik","Africa/Abidjan","Africa/Casablanca","Africa/Lagos","Africa/Algiers","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Brussels","Europe/Zurich","Europe/Vienna","Europe/Prague","Europe/Warsaw","Europe/Stockholm","Europe/Oslo","Europe/Copenhagen","Europe/Budapest","Europe/Athens","Europe/Helsinki","Europe/Bucharest","Europe/Kyiv","Africa/Cairo","Africa/Johannesburg","Asia/Jerusalem","Europe/Istanbul","Europe/Moscow","Africa/Nairobi","Asia/Riyadh","Asia/Baghdad","Asia/Tehran","Asia/Dubai","Asia/Baku","Asia/Tbilisi","Asia/Kabul","Asia/Karachi","Asia/Tashkent","Asia/Kolkata","Asia/Colombo","Asia/Kathmandu","Asia/Dhaka","Asia/Almaty","Asia/Yangon","Asia/Bangkok","Asia/Jakarta","Asia/Ho_Chi_Minh","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Taipei","Asia/Manila","Asia/Tokyo","Asia/Seoul","Australia/Perth","Australia/Eucla","Australia/Darwin","Australia/Adelaide","Australia/Brisbane","Australia/Sydney","Australia/Melbourne","Australia/Hobart","Pacific/Guam","Pacific/Noumea","Pacific/Auckland","Pacific/Fiji","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"];function eD(){return typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):n3}function tD(o){switch(o.toLowerCase()){case"en":return JI;case"offsets":return ZI.map(i=>({zone:i}));case"common":return n3.map(i=>({zone:i}));case"all":return eD().map(i=>({zone:i}));default:return[{zone:o}]}}var ve=class extends k{constructor(){super();this.formControlController=new re(this,{assumeInteractionOn:["zn-change"]});this.hasSlotController=new Y(this,"help-text","label");this.localize=new Ht(this);this._days=pl();this._exceptions=[];this._dragPreview=null;this._editing=null;this._dragMode="open";this._dragAnchor=null;this._dragPointerId=null;this.value="";this.defaultValue="";this.label="";this.helpText="";this.view="calendar";this.openLabel="Available";this.closedLabel="Closed";this.noToggle=!1;this.hideSummary=!1;this.startHour=6;this.endHour=22;this.interval=30;this.weekStart="mon";this.timeFormat="24";this.displayTimezone="";this.saveTimezone="";this.showTimezone=!1;this.timezones=[];this.referenceDate="";this.disabled=!1;this.readonly=!1;this.required=!1;this._customValidity="";this._handleCanvasPointerDown=t=>{if(!this._isEditable||t.button!==0)return;let r=this._pointerPosition(t);if(!r)return;let n=this._orderedDays[r.col],a=Wg(this._storedAsShown);this._dragMode=Gg(a,this._slotMinute(n,r.row))?"close":"open",this._dragAnchor=r,this._dragPointerId=t.pointerId,this._dragPreview=this._buildDragPreview(r),this.canvas.setPointerCapture(t.pointerId),t.preventDefault()};this._handleCanvasPointerMove=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t);r&&(this._dragPreview=this._buildDragPreview(r))};this._handleCanvasPointerUp=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t)??this._dragAnchor,n=this._buildDragPreview(r);this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null,this.canvas.hasPointerCapture(t.pointerId)&&this.canvas.releasePointerCapture(t.pointerId),this._commitShownDays(n)};this._handleCanvasPointerCancel=()=>{this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null};this.internals=typeof this.attachInternals=="function"?this.attachInternals():null}get schedule(){return{...this._saveZone?{timezone:this._saveZone}:{},days:this._cloneDays(this._days),exceptions:this._exceptions}}set schedule(t){this._applySchedule(t),this._commit(!1)}get exceptions(){return this._exceptions}set exceptions(t){this._exceptions=Array.isArray(t)?t:[],this._commit(!1)}get validity(){return this.internals?.validity??pt}get validationMessage(){return this.internals?.validationMessage??""}get _isZoned(){return!!(this.saveTimezone||this.displayTimezone||this.showTimezone)}get _saveZone(){return this.saveTimezone?this.saveTimezone:this._isZoned?"UTC":""}get _displayZone(){return this.displayTimezone==="auto"?r3():this.displayTimezone||this._saveZone}get _reference(){return Vh(this.referenceDate)??new Date}get _offsetDelta(){let t=this._saveZone,r=this._displayZone;if(!t||!r||t===r)return 0;let n=this._reference;return Ka(r,n)-Ka(t,n)}get _orderedDays(){let t=Math.max(sr.indexOf(this.weekStart),0);return[...sr.slice(t),...sr.slice(0,t)]}get _interval(){let t=Math.round(this.interval);return[5,10,15,20,30,60].includes(t)?t:30}get _startMinute(){return Math.min(Math.max(Math.round(this.startHour),0),23)*60}get _endMinute(){let t=Math.min(Math.max(Math.round(this.endHour),1),24)*60;return t<=this._startMinute?Math.min(this._startMinute+60,Ti):t}get _slotCount(){return Math.ceil((this._endMinute-this._startMinute)/this._interval)}get _slotsPerHour(){return Math.max(Math.round(60/this._interval),1)}get _isEditable(){return!this.disabled&&!this.readonly}get _hasHours(){return sr.some(t=>this._days[t].length>0)}connectedCallback(){super.connectedCallback(),this.value&&this._applySchedule(this.value),this._syncFormValue()}firstUpdated(){this._commit(!1)}handleValueChange(){this.value!==this._serialise()&&(this._applySchedule(this.value),this._syncFormValue())}handleValidationStateChange(){this._syncFormValue()}checkValidity(){return this.internals?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(t){this._customValidity=t,this._syncFormValue(),this.formControlController.updateValidity()}setDay(t,r){sr.includes(t)&&(this._days={...this._days,[t]:Bh(r)},this._commit())}getDay(t){return this._days[t]??[]}get displayedDays(){return this._cloneDays(this._storedAsShown)}setDisplayDay(t,r){sr.includes(t)&&this._commitShownDays({...this._storedAsShown,[t]:Bh(r)})}formResetCallback(){this._applySchedule(this.defaultValue),this._commit(!1)}formStateRestoreCallback(t){this._applySchedule(t),this._commit(!1)}_cloneDays(t){let r=pl();return sr.forEach(n=>{r[n]=t[n].map(a=>({...a}))}),r}_serialise(){return JSON.stringify(this.schedule)}_applySchedule(t){let r=t;if(typeof t=="string"){let p=t.trim();if(!p){this._days=pl(),this._exceptions=[];return}try{r=JSON.parse(p)}catch{return}}if(!r||typeof r!="object"){this._days=pl(),this._exceptions=[];return}let n=r,a=n.days??n,s=pl();sr.forEach(p=>{s[p]=Bh(a?.[p])});let l=typeof n.timezone=="string"?n.timezone:"";if(l&&!this.saveTimezone)this.saveTimezone=l;else if(l&&l!==this.saveTimezone){let p=this._reference,h=Ka(this.saveTimezone,p)-Ka(l,p);this._days=jg(s,h),this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[];return}this._days=s,this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[]}_syncFormValue(){if(!this.internals)return;this.internals.setFormValue(this.value);let t=this.shadowRoot?.querySelector(".schedule-builder")??void 0;if(this._customValidity){this.internals.setValidity({customError:!0},this._customValidity,t);return}if(this.required&&!this._hasHours){this.internals.setValidity({valueMissing:!0},"Please open at least one period.",t);return}this.internals.setValidity({})}_commit(t=!0){let r=this._serialise();r!==this.value&&(this.value=r),this._syncFormValue(),this.formControlController.updateValidity(),t&&this.emit("zn-change")}_formatTime(t){let r=fi(t);if(r===null)return t;if(this.timeFormat==="24")return Kr(r);let n=Math.floor(r/60)%24,a=r%60,s=n<12?"am":"pm",l=n%12===0?12:n%12;return a===0?`${l}${s}`:`${l}:${String(a).padStart(2,"0")}${s}`}_formatRange(t){return`${this._formatTime(t.start)}\u2013${this._formatTime(t.end)}`}_formatDate(t){let r=Vh(t);return r?this.localize.date(r,{day:"numeric",month:"short"}):""}_summariseDay(t,r){let n=r[t];return n.length?n.map(a=>this._formatRange(a)).join(", "):this.closedLabel}get _storedAsShown(){return jg(this._days,this._offsetDelta)}get _shownDays(){return this._dragPreview??this._storedAsShown}_commitShownDays(t){this._days=jg(t,-this._offsetDelta),this._commit()}_exceptionsForDay(t){return this._exceptions.filter(r=>t3(r).includes(t))}get _shownReductionSpans(){let t=[];return this._exceptions.forEach(r=>{let n=Ug(r);n!==null&&t3(r).forEach(a=>{let s=sr.indexOf(a)*Ti;t.push(...YI([[s,s+Ti]],n.reduce((l,p)=>{let h=fi(p.start),m=fi(p.end);return h!==null&&m!==null&&l.push([s+h,s+m]),l},[])))})}),i3(ul(t),this._offsetDelta)}_slotMinute(t,r){return sr.indexOf(t)*Ti+this._startMinute+r*this._interval+this._interval/2}_slotState(t,r,n,a){let s=this._slotMinute(t,r);return Gg(n,s)?Gg(a,s)?"reduced":"open":"closed"}_pointerPosition(t){if(!this.canvas)return null;let r=this.canvas.getBoundingClientRect();if(!r.width||!r.height)return null;let n=this._orderedDays.length,a=Math.floor((t.clientX-r.left)/r.width*n),s=Math.floor((t.clientY-r.top)/r.height*this._slotCount);return{col:Math.min(Math.max(a,0),n-1),row:Math.min(Math.max(s,0),this._slotCount-1)}}_buildDragPreview(t){let r=this._dragAnchor,n=this._cloneDays(this._storedAsShown),a=Math.min(r.col,t.col),s=Math.max(r.col,t.col),l=Math.min(r.row,t.row),p=Math.max(r.row,t.row),h=this._startMinute+l*this._interval,m=Math.min(this._startMinute+(p+1)*this._interval,this._endMinute);return this._orderedDays.slice(a,s+1).forEach(b=>{n[b]=this._dragMode==="open"?VI(n[b],h,m):UI(n[b],h,m)}),n}_handleViewToggle(t){this.view!==t&&(this._editing=null,this.view=t)}_nextFreeRange(t){if(!t.length)return{start:"09:00",end:"17:00"};let r=this._startMinute;for(let a of t){let s=fi(a.start)??0,l=fi(a.end)??0;if(s-r>=60)break;r=Math.max(r,l)}let n=Math.min(r,Ti-60);return{start:Kr(n),end:Kr(n+60)}}_handleAddRange(t){if(!this._isEditable)return;let r=this._storedAsShown,n=this._nextFreeRange(r[t]),a=hl([...r[t],n]);this._commitShownDays({...r,[t]:a}),this._editing={day:t,index:Math.max(a.findIndex(s=>s.start===n.start),0)}}_handleRemoveRange(t,r){if(!this._isEditable)return;let n=this._storedAsShown;this._editing=null,this._commitShownDays({...n,[t]:n[t].filter((a,s)=>s!==r)})}_handleRangeEdit(t,r,n,a){let s=fi(a);if(s===null)return;let l=this._storedAsShown,p=hl(l[t].map((h,m)=>m===r?{...h,[n]:Kr(s)}:h));this._editing&&this._editing.day===t&&this._editing.index>=p.length&&(this._editing=p.length?{day:t,index:p.length-1}:null),this._commitShownDays({...l,[t]:p})}_handleEditorKeyDown(t){(t.key==="Enter"||t.key==="Escape")&&(t.preventDefault(),t.stopPropagation(),this._editing=null)}_handleEditorFocusOut(t){let r=t.currentTarget,n=t.relatedTarget;n&&r.contains(n)||(this._editing=null)}_renderToolbar(){let t=!this.noToggle,r=this.view==="calendar";return!t&&!r&&!this.showTimezone?B:u`
|
|
6060
|
+
</div>`}};Ie.styles=z(Zk),Ie.dependencies={"zn-collapsible":wa,"zn-preview-frame":Vg,"zn-icon":ne,"zn-button":$e,"zn-button-group":Nl,"zn-tabs":ln,"zn-navbar":Ca,"zn-select":Be,"zn-option":ot},c([d()],Ie.prototype,"src",2),c([d({attribute:"frame-origin"})],Ie.prototype,"frameOrigin",2),c([d({attribute:"data-uri"})],Ie.prototype,"dataUri",2),c([d({reflect:!0})],Ie.prototype,"mode",2),c([d({reflect:!0})],Ie.prototype,"device",2),c([d({type:Number,attribute:"min-height"})],Ie.prototype,"minHeight",2),c([d({type:Number})],Ie.prototype,"debounce",2),c([d()],Ie.prototype,"action",2),c([d({type:Number,attribute:"save-debounce"})],Ie.prototype,"saveDebounce",2),c([d({type:Array})],Ie.prototype,"sections",2),c([d({attribute:"section-layout"})],Ie.prototype,"sectionLayout",2),c([d({type:Array})],Ie.prototype,"sources",2),c([d({type:Boolean,reflect:!0,attribute:"controls-collapsed"})],Ie.prototype,"controlsCollapsed",2),c([d({type:Boolean,reflect:!0})],Ie.prototype,"standalone",2),c([d({attribute:"controls-caption"})],Ie.prototype,"controlsCaption",2),c([d({attribute:"preview-caption"})],Ie.prototype,"previewCaption",2),c([d({attribute:"submit-label"})],Ie.prototype,"submitLabel",2),c([d({type:Boolean})],Ie.prototype,"manual",2),c([F("zn-preview-frame")],Ie.prototype,"frame",2),c([F("slot:not([name])")],Ie.prototype,"controlsSlot",2),c([Za(".editor__section-slot")],Ie.prototype,"sectionSlots",2),c([R()],Ie.prototype,"error",2),c([R()],Ie.prototype,"_submitting",2),c([R()],Ie.prototype,"_sourceIndex",2);var BI=Ie;Ie.define("zn-theme-editor");var e3=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--slot-height:18px;--gutter-width:64px;--open-color:rgb(var(--zn-primary));--reduced-color:rgba(var(--zn-primary),0.3);--closed-color:var(--zn-color-neutral-0);--grid-line-color:rgb(var(--zn-border-color));display:block}.schedule-builder{color:rgb(var(--zn-text));font-size:var(--zn-font-size-small)}.schedule-builder--disabled{opacity:0.6;pointer-events:none}.schedule-builder__toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin-bottom:var(--zn-spacing-x-small)}.schedule-builder__hint{flex:1 1 240px;margin:0;color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-small)}.legend{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);margin:0;padding:0;list-style:none}.legend__item{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);color:var(--zn-color-neutral-600);font-size:var(--zn-font-size-x-small);white-space:nowrap}.legend__swatch{width:14px;height:14px;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius-small);background-color:var(--closed-color)}.legend__swatch--open{border-color:transparent;background-color:var(--open-color)}.timezone{flex:0 1 auto;width:260px;max-width:100%}.view-toggle{display:inline-flex;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius)}.view-toggle__button{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border:none;background:none;color:var(--zn-color-neutral-500);cursor:pointer}.view-toggle__button:not(:first-child){border-left:1px solid var(--grid-line-color)}.view-toggle__button:hover{background-color:var(--zn-color-neutral-100)}.view-toggle__button:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}.view-toggle__button--active{background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700)}.view-toggle__button--active:hover{background-color:var(--zn-color-primary-100)}.schedule-builder__calendar{display:flex;align-items:flex-start;gap:var(--zn-spacing-medium)}.calendar{flex:1 1 auto;min-width:0;overflow:hidden;border:1px solid var(--grid-line-color);border-radius:var(--zn-border-radius);background-color:var(--zn-panel-background-color)}.calendar__head,.calendar__body{display:grid;grid-template-columns:var(--gutter-width) repeat(var(--columns),minmax(0,1fr))}.calendar__head{border-bottom:1px solid var(--grid-line-color);background-color:var(--zn-color-neutral-50)}.calendar__head-cell{display:flex;flex-direction:column;gap:2px;padding:var(--zn-spacing-x-small);border-left:1px solid var(--grid-line-color);overflow:hidden}.calendar__head-day{font-weight:var(--zn-font-weight-semibold,600);white-space:nowrap}.calendar__head-hours{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar__head-cell--closed .calendar__head-day,.calendar__head-cell--closed .calendar__head-hours{color:var(--zn-color-neutral-400)}.calendar__body{padding-top:var(--zn-spacing-x-small);padding-bottom:var(--zn-spacing-x-small)}.calendar__gutter{display:grid;grid-auto-rows:calc(var(--slot-height) * var(--slots-per-hour))}.calendar__hour{position:relative}.calendar__hour span{position:absolute;top:0;right:var(--zn-spacing-x-small);transform:translateY(-50%);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-variant-numeric:tabular-nums;white-space:nowrap}.calendar__canvas{display:grid;grid-column:span var(--columns);grid-template-columns:repeat(var(--columns),minmax(0,1fr));touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.calendar__col{display:grid;grid-auto-rows:var(--slot-height);border-left:1px solid var(--grid-line-color)}.calendar__slot{border-bottom:1px dotted rgba(var(--zn-border-color),0.6);background-color:var(--closed-color)}.calendar__slot--hour{border-top:1px solid rgba(var(--zn-border-color),0.6)}.calendar__slot--open{background-color:var(--open-color);border-bottom-color:rgba(255,255,255,0.25)}.calendar__slot--reduced{background-color:var(--reduced-color);border-bottom-color:rgba(255,255,255,0.4)}.schedule-builder:not(.schedule-builder--readonly):not(.schedule-builder--disabled) .calendar__canvas{cursor:crosshair}.summary{flex:0 0 260px;max-width:260px}.summary__title{margin:0 0 var(--zn-spacing-x-small);color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.06em;text-transform:uppercase}.summary__list{margin:0}.summary__row{display:flex;align-items:baseline;justify-content:space-between;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) 0;border-bottom:1px solid var(--grid-line-color)}.summary__row dt{font-weight:var(--zn-font-weight-semibold,600)}.summary__row dd{margin:0;font-variant-numeric:tabular-nums;text-align:right}.summary__closed{color:var(--zn-color-neutral-400)}.summary__row--total{border-bottom:none}.summary__row--total dd{font-weight:var(--zn-font-weight-semibold,600)}.list{display:flex;flex-direction:column}.list__row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small) var(--zn-spacing-2x-small);border-bottom:1px solid var(--grid-line-color)}.list__row--editing{border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-50)}.list__day{font-weight:var(--zn-font-weight-semibold,600)}.list__day--closed{color:var(--zn-color-neutral-400)}.list__ranges{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small);min-height:32px}.list__closed{color:var(--zn-color-neutral-400)}.list__note{color:var(--zn-color-neutral-500);font-size:var(--zn-font-size-x-small)}.list__chip{padding:6px 10px;border:none;border-radius:var(--zn-border-radius);background-color:var(--zn-color-primary-100);color:var(--zn-color-primary-700);font-family:inherit;font-size:var(--zn-font-size-small);font-variant-numeric:tabular-nums;cursor:pointer}.list__chip:hover:not([disabled]){background-color:var(--zn-color-primary-200)}.list__chip[disabled]{cursor:default}.list__chip:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:1px}.list__chip--reduced{background-color:var(--zn-color-warning-50);color:var(--zn-color-warning-600)}.list__chip--reduced:hover:not([disabled]){background-color:var(--zn-color-warning-50)}.list__editor{display:flex;align-items:center;gap:var(--zn-spacing-2x-small)}.list__editor zn-input{width:130px}.list__editor-separator{color:var(--zn-color-neutral-500)}.list__remove{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;border-radius:var(--zn-border-radius);background:none;color:var(--zn-color-neutral-500);cursor:pointer}.list__remove:hover{background-color:var(--zn-color-neutral-100);color:rgb(var(--zn-text))}.list__add{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);padding:4px var(--zn-spacing-x-small);border:none;border-radius:var(--zn-border-radius);background:none;color:rgb(var(--zn-text));font-family:inherit;font-size:var(--zn-font-size-x-small);font-weight:var(--zn-font-weight-semibold,600);letter-spacing:0.04em;text-transform:uppercase;white-space:nowrap;cursor:pointer}.list__add:hover{background-color:var(--zn-color-neutral-100)}.list__add:focus-visible{outline:2px solid var(--zn-focus-ring-color);outline-offset:-2px}@media (max-width:900px){.schedule-builder__calendar{flex-direction:column}.summary{flex:1 1 auto;max-width:none;width:100%}}`;var sr=["mon","tue","wed","thu","fri","sat","sun"],dl={mon:{short:"Mon",long:"Monday"},tue:{short:"Tue",long:"Tuesday"},wed:{short:"Wed",long:"Wednesday"},thu:{short:"Thu",long:"Thursday"},fri:{short:"Fri",long:"Friday"},sat:{short:"Sat",long:"Saturday"},sun:{short:"Sun",long:"Sunday"}},$i=1440;function pl(){return{mon:[],tue:[],wed:[],thu:[],fri:[],sat:[],sun:[]}}function fi(o){if(typeof o=="number"&&Number.isFinite(o))return Math.min(Math.max(Math.round(o),0),$i);if(typeof o!="string")return null;let i=/^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(o.trim());if(!i)return null;let t=Number(i[1]),r=Number(i[2]);if(t>24||r>59)return null;let n=t*60+r;return n>$i?null:n}function Kr(o){let i=Math.min(Math.max(Math.round(o),0),$i),t=Math.floor(i/60),r=i%60;return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function hl(o){let i=[];o.forEach(r=>{let n=fi(r?.start),a=fi(r?.end);n===null||a===null||a<=n||i.push([n,a])}),i.sort((r,n)=>r[0]-n[0]);let t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t.map(([r,n])=>({start:Kr(r),end:Kr(n)}))}function Bh(o){if(!Array.isArray(o))return[];let i=[];return o.forEach(t=>{if(typeof t=="string"){let[r,n]=t.split(/\s*[-–—]\s*/);r&&n&&i.push({start:r,end:n});return}if(t&&typeof t=="object"){let r=t;r.start&&r.end&&i.push({start:String(r.start),end:String(r.end)})}}),hl(i)}function VI(o,i,t){return hl([...o,{start:Kr(i),end:Kr(t)}])}function UI(o,i,t){let r=[];return o.forEach(n=>{let a=fi(n.start),s=fi(n.end);if(!(a===null||s===null)){if(s<=i||a>=t){r.push(n);return}a<i&&r.push({start:Kr(a),end:Kr(i)}),s>t&&r.push({start:Kr(t),end:Kr(s)})}}),hl(r)}function jI(o){return o.reduce((i,t)=>{let r=fi(t.start),n=fi(t.end);return r===null||n===null?i:i+(n-r)},0)}function Vh(o){if(!o)return null;let i=/^(\d{4})-(\d{2})-(\d{2})/.exec(o.trim());if(!i)return null;let t=new Date(Number(i[1]),Number(i[2])-1,Number(i[3]));return Number.isNaN(t.getTime())?null:t}function GI(o){return Vh(o.date??o.from)}function WI(o){return Vh(o.to??o.date??o.from)}function t3(o){if(o.days?.length)return o.days.filter(s=>sr.includes(s));let i=GI(o),t=WI(o);if(!i||!t)return[];let r=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate()),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n-r)/864e5)>=sr.length-1?[...sr]:[]}function Ug(o){return o.closed?[]:o.ranges?Bh(o.ranges):null}var Wa=7*$i;function ul(o){let i=o.filter(([r,n])=>n>r).sort((r,n)=>r[0]-n[0]),t=[];return i.forEach(r=>{let n=t[t.length-1];if(n&&r[0]<=n[1]){n[1]=Math.max(n[1],r[1]);return}t.push([r[0],r[1]])}),t}function Wg(o){let i=[];return sr.forEach((t,r)=>{let n=r*$i;o[t].forEach(a=>{let s=fi(a.start),l=fi(a.end);s===null||l===null||l<=s||i.push([n+s,n+l])})}),ul(i)}function KI(o){let i=pl();return ul(o).forEach(([t,r])=>{let n=t;for(;n<r;){let a=Math.min(Math.floor(n/$i),sr.length-1),s=a*$i,l=Math.min(r,s+$i);i[sr[a]].push({start:Kr(n-s),end:Kr(l-s)}),n=l}}),sr.forEach(t=>{i[t]=hl(i[t])}),i}function i3(o,i){if(!i)return o.map(r=>[r[0],r[1]]);let t=[];return o.forEach(([r,n])=>{let a=Math.min(n-r,Wa),s=((r+i)%Wa+Wa)%Wa,l=s+a;if(l<=Wa){t.push([s,l]);return}t.push([s,Wa]),t.push([0,l-Wa])}),ul(t)}function jg(o,i){return i?KI(i3(Wg(o),i)):o}function YI(o,i){let t=ul(o);return ul(i).forEach(([r,n])=>{let a=[];t.forEach(([s,l])=>{if(l<=r||s>=n){a.push([s,l]);return}s<r&&a.push([s,r]),l>n&&a.push([n,l])}),t=a}),t}function Gg(o,i){return o.some(([t,r])=>i>=t&&i<r)}function Ka(o,i){if(!o)return 0;try{let t=new Intl.DateTimeFormat("en-US",{timeZone:o,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(i),r=s=>Number(t.find(l=>l.type===s)?.value),n=r("hour")%24,a=Date.UTC(r("year"),r("month")-1,r("day"),n,r("minute"),r("second"));return Math.round((a-i.getTime())/6e4)}catch{return 0}}function QI(o){let i=o<0?"-":"+",t=Math.abs(o);return`UTC${i}${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}function XI(o,i){return!o.label&&o.zone==="UTC"?"UTC":`${o.label??o.zone.replace(/_/g," ")} (${QI(Ka(o.zone,i))})`}function r3(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}var JI=[{zone:"America/New_York",label:"US Eastern"},{zone:"America/Chicago",label:"US Central"},{zone:"America/Denver",label:"US Mountain"},{zone:"America/Los_Angeles",label:"US Pacific"},{zone:"Europe/London",label:"UK"},{zone:"Australia/Sydney",label:"Australia"}],ZI=["UTC","Pacific/Auckland","Australia/Sydney","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Karachi","Asia/Dubai","Europe/Moscow","Africa/Nairobi","Europe/Istanbul","Europe/Athens","Africa/Johannesburg","Europe/Berlin","Europe/Paris","Europe/Madrid","Europe/Amsterdam","Europe/Dublin","Europe/London","Europe/Lisbon","Atlantic/Reykjavik","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Halifax","America/New_York","America/Toronto","America/Chicago","America/Mexico_City","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","Pacific/Honolulu"],n3=["Pacific/Midway","Pacific/Honolulu","Pacific/Marquesas","America/Anchorage","America/Los_Angeles","America/Vancouver","America/Tijuana","America/Denver","America/Phoenix","America/Edmonton","America/Chicago","America/Mexico_City","America/Winnipeg","America/Guatemala","America/New_York","America/Toronto","America/Bogota","America/Lima","America/Panama","America/Halifax","America/Puerto_Rico","America/Santiago","America/St_Johns","America/Sao_Paulo","America/Argentina/Buenos_Aires","America/Montevideo","America/Noronha","America/Nuuk","Atlantic/Azores","Atlantic/Cape_Verde","UTC","Europe/London","Europe/Dublin","Europe/Lisbon","Atlantic/Reykjavik","Africa/Abidjan","Africa/Casablanca","Africa/Lagos","Africa/Algiers","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Brussels","Europe/Zurich","Europe/Vienna","Europe/Prague","Europe/Warsaw","Europe/Stockholm","Europe/Oslo","Europe/Copenhagen","Europe/Budapest","Europe/Athens","Europe/Helsinki","Europe/Bucharest","Europe/Kyiv","Africa/Cairo","Africa/Johannesburg","Asia/Jerusalem","Europe/Istanbul","Europe/Moscow","Africa/Nairobi","Asia/Riyadh","Asia/Baghdad","Asia/Tehran","Asia/Dubai","Asia/Baku","Asia/Tbilisi","Asia/Kabul","Asia/Karachi","Asia/Tashkent","Asia/Kolkata","Asia/Colombo","Asia/Kathmandu","Asia/Dhaka","Asia/Almaty","Asia/Yangon","Asia/Bangkok","Asia/Jakarta","Asia/Ho_Chi_Minh","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Taipei","Asia/Manila","Asia/Tokyo","Asia/Seoul","Australia/Perth","Australia/Eucla","Australia/Darwin","Australia/Adelaide","Australia/Brisbane","Australia/Sydney","Australia/Melbourne","Australia/Hobart","Pacific/Guam","Pacific/Noumea","Pacific/Auckland","Pacific/Fiji","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"];function eD(){return typeof Intl.supportedValuesOf=="function"?Intl.supportedValuesOf("timeZone"):n3}function tD(o){switch(o.toLowerCase()){case"en":return JI;case"offsets":return ZI.map(i=>({zone:i}));case"common":return n3.map(i=>({zone:i}));case"all":return eD().map(i=>({zone:i}));default:return[{zone:o}]}}var ve=class extends k{constructor(){super();this.formControlController=new re(this,{assumeInteractionOn:["zn-change"]});this.hasSlotController=new Y(this,"help-text","label");this.localize=new Ht(this);this._days=pl();this._exceptions=[];this._dragPreview=null;this._editing=null;this._dragMode="open";this._dragAnchor=null;this._dragPointerId=null;this.value="";this.defaultValue="";this.label="";this.helpText="";this.view="calendar";this.openLabel="Available";this.closedLabel="Closed";this.noToggle=!1;this.hideSummary=!1;this.startHour=6;this.endHour=22;this.interval=30;this.weekStart="mon";this.timeFormat="24";this.displayTimezone="";this.saveTimezone="";this.showTimezone=!1;this.timezones=[];this.referenceDate="";this.disabled=!1;this.readonly=!1;this.required=!1;this._customValidity="";this._handleCanvasPointerDown=t=>{if(!this._isEditable||t.button!==0)return;let r=this._pointerPosition(t);if(!r)return;let n=this._orderedDays[r.col],a=Wg(this._storedAsShown);this._dragMode=Gg(a,this._slotMinute(n,r.row))?"close":"open",this._dragAnchor=r,this._dragPointerId=t.pointerId,this._dragPreview=this._buildDragPreview(r),this.canvas.setPointerCapture(t.pointerId),t.preventDefault()};this._handleCanvasPointerMove=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t);r&&(this._dragPreview=this._buildDragPreview(r))};this._handleCanvasPointerUp=t=>{if(!this._dragAnchor||t.pointerId!==this._dragPointerId)return;let r=this._pointerPosition(t)??this._dragAnchor,n=this._buildDragPreview(r);this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null,this.canvas.hasPointerCapture(t.pointerId)&&this.canvas.releasePointerCapture(t.pointerId),this._commitShownDays(n)};this._handleCanvasPointerCancel=()=>{this._dragAnchor=null,this._dragPointerId=null,this._dragPreview=null};this.internals=typeof this.attachInternals=="function"?this.attachInternals():null}get schedule(){return{...this._saveZone?{timezone:this._saveZone}:{},days:this._cloneDays(this._days),exceptions:this._exceptions}}set schedule(t){this._applySchedule(t),this._commit(!1)}get exceptions(){return this._exceptions}set exceptions(t){this._exceptions=Array.isArray(t)?t:[],this._commit(!1)}get validity(){return this.internals?.validity??pt}get validationMessage(){return this.internals?.validationMessage??""}get _isZoned(){return!!(this.saveTimezone||this.displayTimezone||this.showTimezone)}get _saveZone(){return this.saveTimezone?this.saveTimezone:this._isZoned?"UTC":""}get _displayZone(){return this.displayTimezone==="auto"?r3():this.displayTimezone||this._saveZone}get _reference(){return Vh(this.referenceDate)??new Date}get _offsetDelta(){let t=this._saveZone,r=this._displayZone;if(!t||!r||t===r)return 0;let n=this._reference;return Ka(r,n)-Ka(t,n)}get _orderedDays(){let t=Math.max(sr.indexOf(this.weekStart),0);return[...sr.slice(t),...sr.slice(0,t)]}get _interval(){let t=Math.round(this.interval);return[5,10,15,20,30,60].includes(t)?t:30}get _startMinute(){return Math.min(Math.max(Math.round(this.startHour),0),23)*60}get _endMinute(){let t=Math.min(Math.max(Math.round(this.endHour),1),24)*60;return t<=this._startMinute?Math.min(this._startMinute+60,$i):t}get _slotCount(){return Math.ceil((this._endMinute-this._startMinute)/this._interval)}get _slotsPerHour(){return Math.max(Math.round(60/this._interval),1)}get _isEditable(){return!this.disabled&&!this.readonly}get _hasHours(){return sr.some(t=>this._days[t].length>0)}connectedCallback(){super.connectedCallback(),this.value&&this._applySchedule(this.value),this._syncFormValue()}firstUpdated(){this._commit(!1)}handleValueChange(){this.value!==this._serialise()&&(this._applySchedule(this.value),this._syncFormValue())}handleValidationStateChange(){this._syncFormValue()}checkValidity(){return this.internals?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.internals?.reportValidity()??!0}setCustomValidity(t){this._customValidity=t,this._syncFormValue(),this.formControlController.updateValidity()}setDay(t,r){sr.includes(t)&&(this._days={...this._days,[t]:Bh(r)},this._commit())}getDay(t){return this._days[t]??[]}get displayedDays(){return this._cloneDays(this._storedAsShown)}setDisplayDay(t,r){sr.includes(t)&&this._commitShownDays({...this._storedAsShown,[t]:Bh(r)})}formResetCallback(){this._applySchedule(this.defaultValue),this._commit(!1)}formStateRestoreCallback(t){this._applySchedule(t),this._commit(!1)}_cloneDays(t){let r=pl();return sr.forEach(n=>{r[n]=t[n].map(a=>({...a}))}),r}_serialise(){return JSON.stringify(this.schedule)}_applySchedule(t){let r=t;if(typeof t=="string"){let p=t.trim();if(!p){this._days=pl(),this._exceptions=[];return}try{r=JSON.parse(p)}catch{return}}if(!r||typeof r!="object"){this._days=pl(),this._exceptions=[];return}let n=r,a=n.days??n,s=pl();sr.forEach(p=>{s[p]=Bh(a?.[p])});let l=typeof n.timezone=="string"?n.timezone:"";if(l&&!this.saveTimezone)this.saveTimezone=l;else if(l&&l!==this.saveTimezone){let p=this._reference,h=Ka(this.saveTimezone,p)-Ka(l,p);this._days=jg(s,h),this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[];return}this._days=s,this._exceptions=Array.isArray(n.exceptions)?n.exceptions:[]}_syncFormValue(){if(!this.internals)return;this.internals.setFormValue(this.value);let t=this.shadowRoot?.querySelector(".schedule-builder")??void 0;if(this._customValidity){this.internals.setValidity({customError:!0},this._customValidity,t);return}if(this.required&&!this._hasHours){this.internals.setValidity({valueMissing:!0},"Please open at least one period.",t);return}this.internals.setValidity({})}_commit(t=!0){let r=this._serialise();r!==this.value&&(this.value=r),this._syncFormValue(),this.formControlController.updateValidity(),t&&this.emit("zn-change")}_formatTime(t){let r=fi(t);if(r===null)return t;if(this.timeFormat==="24")return Kr(r);let n=Math.floor(r/60)%24,a=r%60,s=n<12?"am":"pm",l=n%12===0?12:n%12;return a===0?`${l}${s}`:`${l}:${String(a).padStart(2,"0")}${s}`}_formatRange(t){return`${this._formatTime(t.start)}\u2013${this._formatTime(t.end)}`}_formatDate(t){let r=Vh(t);return r?this.localize.date(r,{day:"numeric",month:"short"}):""}_summariseDay(t,r){let n=r[t];return n.length?n.map(a=>this._formatRange(a)).join(", "):this.closedLabel}get _storedAsShown(){return jg(this._days,this._offsetDelta)}get _shownDays(){return this._dragPreview??this._storedAsShown}_commitShownDays(t){this._days=jg(t,-this._offsetDelta),this._commit()}_exceptionsForDay(t){return this._exceptions.filter(r=>t3(r).includes(t))}get _shownReductionSpans(){let t=[];return this._exceptions.forEach(r=>{let n=Ug(r);n!==null&&t3(r).forEach(a=>{let s=sr.indexOf(a)*$i;t.push(...YI([[s,s+$i]],n.reduce((l,p)=>{let h=fi(p.start),m=fi(p.end);return h!==null&&m!==null&&l.push([s+h,s+m]),l},[])))})}),i3(ul(t),this._offsetDelta)}_slotMinute(t,r){return sr.indexOf(t)*$i+this._startMinute+r*this._interval+this._interval/2}_slotState(t,r,n,a){let s=this._slotMinute(t,r);return Gg(n,s)?Gg(a,s)?"reduced":"open":"closed"}_pointerPosition(t){if(!this.canvas)return null;let r=this.canvas.getBoundingClientRect();if(!r.width||!r.height)return null;let n=this._orderedDays.length,a=Math.floor((t.clientX-r.left)/r.width*n),s=Math.floor((t.clientY-r.top)/r.height*this._slotCount);return{col:Math.min(Math.max(a,0),n-1),row:Math.min(Math.max(s,0),this._slotCount-1)}}_buildDragPreview(t){let r=this._dragAnchor,n=this._cloneDays(this._storedAsShown),a=Math.min(r.col,t.col),s=Math.max(r.col,t.col),l=Math.min(r.row,t.row),p=Math.max(r.row,t.row),h=this._startMinute+l*this._interval,m=Math.min(this._startMinute+(p+1)*this._interval,this._endMinute);return this._orderedDays.slice(a,s+1).forEach(b=>{n[b]=this._dragMode==="open"?VI(n[b],h,m):UI(n[b],h,m)}),n}_handleViewToggle(t){this.view!==t&&(this._editing=null,this.view=t)}_nextFreeRange(t){if(!t.length)return{start:"09:00",end:"17:00"};let r=this._startMinute;for(let a of t){let s=fi(a.start)??0,l=fi(a.end)??0;if(s-r>=60)break;r=Math.max(r,l)}let n=Math.min(r,$i-60);return{start:Kr(n),end:Kr(n+60)}}_handleAddRange(t){if(!this._isEditable)return;let r=this._storedAsShown,n=this._nextFreeRange(r[t]),a=hl([...r[t],n]);this._commitShownDays({...r,[t]:a}),this._editing={day:t,index:Math.max(a.findIndex(s=>s.start===n.start),0)}}_handleRemoveRange(t,r){if(!this._isEditable)return;let n=this._storedAsShown;this._editing=null,this._commitShownDays({...n,[t]:n[t].filter((a,s)=>s!==r)})}_handleRangeEdit(t,r,n,a){let s=fi(a);if(s===null)return;let l=this._storedAsShown,p=hl(l[t].map((h,m)=>m===r?{...h,[n]:Kr(s)}:h));this._editing&&this._editing.day===t&&this._editing.index>=p.length&&(this._editing=p.length?{day:t,index:p.length-1}:null),this._commitShownDays({...l,[t]:p})}_handleEditorKeyDown(t){(t.key==="Enter"||t.key==="Escape")&&(t.preventDefault(),t.stopPropagation(),this._editing=null)}_handleEditorFocusOut(t){let r=t.currentTarget,n=t.relatedTarget;n&&r.contains(n)||(this._editing=null)}_renderToolbar(){let t=!this.noToggle,r=this.view==="calendar";return!t&&!r&&!this.showTimezone?B:u`
|
|
6057
6061
|
<div class="schedule-builder__toolbar" part="toolbar">
|
|
6058
6062
|
${this.view==="calendar"&&this._isEditable?u`<p class="schedule-builder__hint">
|
|
6059
6063
|
Drag across the grid to open hours; drag over open hours to close them.
|
|
@@ -6222,7 +6226,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
6222
6226
|
<slot name="help-text">${this.helpText}</slot>
|
|
6223
6227
|
</div>
|
|
6224
6228
|
</div>
|
|
6225
|
-
`}};ve.styles=[z(Se),z(e3)],ve.formAssociated=!0,ve.dependencies={"zn-icon":ne,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".schedule-builder__canvas")],ve.prototype,"canvas",2),c([R()],ve.prototype,"_days",2),c([R()],ve.prototype,"_exceptions",2),c([R()],ve.prototype,"_dragPreview",2),c([R()],ve.prototype,"_editing",2),c([d({reflect:!0})],ve.prototype,"name",2),c([d()],ve.prototype,"value",2),c([Ce()],ve.prototype,"defaultValue",2),c([d()],ve.prototype,"label",2),c([d({attribute:"help-text"})],ve.prototype,"helpText",2),c([d({reflect:!0})],ve.prototype,"view",2),c([d({attribute:"open-label"})],ve.prototype,"openLabel",2),c([d({attribute:"closed-label"})],ve.prototype,"closedLabel",2),c([d({attribute:"no-toggle",type:Boolean})],ve.prototype,"noToggle",2),c([d({attribute:"hide-summary",type:Boolean})],ve.prototype,"hideSummary",2),c([d({attribute:"start-hour",type:Number})],ve.prototype,"startHour",2),c([d({attribute:"end-hour",type:Number})],ve.prototype,"endHour",2),c([d({type:Number})],ve.prototype,"interval",2),c([d({attribute:"week-start"})],ve.prototype,"weekStart",2),c([d({attribute:"time-format"})],ve.prototype,"timeFormat",2),c([d({attribute:"display-timezone"})],ve.prototype,"displayTimezone",2),c([d({attribute:"save-timezone"})],ve.prototype,"saveTimezone",2),c([d({attribute:"show-timezone",type:Boolean})],ve.prototype,"showTimezone",2),c([d({attribute:"timezones",converter:{fromAttribute:t=>t.split(/[,\s]+/).filter(Boolean),toAttribute:t=>t.join(" ")}})],ve.prototype,"timezones",2),c([d({attribute:"reference-date"})],ve.prototype,"referenceDate",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"required",2),c([d({reflect:!0})],ve.prototype,"form",2),c([K("value")],ve.prototype,"handleValueChange",1),c([K(["required","disabled"])],ve.prototype,"handleValidationStateChange",1);var rD=ve;ve.define("zn-schedule-builder");var o3=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;min-width:0}.thumbnail{position:relative;min-width:0}.thumbnail__link{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);min-width:0;color:inherit;text-decoration:none;outline:none}.thumbnail--interactive .thumbnail__link{cursor:pointer}.thumbnail__media{position:relative;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);width:100%;overflow:hidden;border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));--thumbnail-ring-color:rgb(var(--zn-border-color));--thumbnail-ring-width:1px;--thumbnail-ring-gap:0px}.thumbnail__media::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 var(--thumbnail-ring-width) var(--thumbnail-ring-color),inset 0 0 0 calc(var(--thumbnail-ring-width) + var(--thumbnail-ring-gap)) rgb(var(--zn-body));transition:box-shadow var(--zn-transition-fast) ease-in-out}.thumbnail__image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__slotted-media{display:grid;place-items:center;width:100%;height:100%}.thumbnail__slotted-media::slotted(img),.thumbnail__slotted-media::slotted(video),.thumbnail__slotted-media::slotted(canvas),.thumbnail__slotted-media::slotted(picture),.thumbnail__slotted-media::slotted(div){width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__caption{font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal);min-width:0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.thumbnail__overlay{position:absolute;top:0;left:0;right:0;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));overflow:hidden;pointer-events:none}.thumbnail__badge,.thumbnail__actions,.thumbnail__preview-button{position:absolute;display:flex;align-items:center;gap:var(--zn-thumbnail-chip-gap,var(--zn-spacing-2x-small))}.thumbnail__badge{bottom:var(--zn-spacing-2x-small);left:var(--zn-spacing-2x-small);pointer-events:none}.thumbnail__actions,.thumbnail__preview-button{pointer-events:auto}.thumbnail__actions{bottom:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__preview-button{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-button:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-button{top:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__badge-items,.thumbnail__action-items{display:contents}.thumbnail__badge-icon,.thumbnail__badge-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:default;opacity:var(--zn-thumbnail-badge-opacity,0.65)}.thumbnail__action-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__action-items::slotted(*):hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail:hover:not(.thumbnail--disabled):not(.thumbnail--selected):not(.thumbnail--active) .thumbnail__media{--thumbnail-ring-color:rgb(var(--zn-primary))}.thumbnail--selected .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-selected-color,rgb(var(--zn-primary)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail--active .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-active-color,rgb(var(--zn-color-success)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail__link:focus-visible .thumbnail__media{outline:var(--zn-focus-ring);outline-offset:calc(-1 * var(--zn-focus-ring-width))}.thumbnail__preview-button:focus-visible,.thumbnail__action-items::slotted(*:focus-visible){outline:var(--zn-focus-ring);outline-offset:1px}.thumbnail--disabled .thumbnail__link{cursor:not-allowed}.thumbnail--disabled .thumbnail__media,.thumbnail--disabled .thumbnail__caption{opacity:0.5}.thumbnail__preview{position:fixed;inset:0;display:none;width:100%;max-width:none;height:100%;max-height:none;padding:0;border:none;background:transparent;overflow:hidden}.thumbnail__preview[open]{display:grid;place-items:center}.thumbnail__preview::backdrop{background:transparent}.thumbnail__preview-backdrop{position:fixed;inset:0;background:var(--zn-overlay-background-color)}.thumbnail__preview-frame{--preview-max-width:var(--zn-thumbnail-preview-max-width,70vw);--preview-max-height:var(--zn-thumbnail-preview-max-height,70vh);--preview-ratio:var(--zn-thumbnail-preview-aspect-ratio,var(--zn-thumbnail-preview-measured-ratio,var(--zn-thumbnail-aspect-ratio,16/9)));position:relative;width:min(var(--preview-max-width),var(--preview-max-height) * (var(--preview-ratio)));max-width:var(--preview-max-width);max-height:var(--preview-max-height);aspect-ratio:var(--preview-ratio);overflow:hidden;border-radius:var(--zn-thumbnail-preview-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));box-shadow:var(--zn-shadow-x-large);transform-origin:center center}.thumbnail__preview-image,.thumbnail__preview-placeholder{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-placeholder{position:absolute;inset:0;-o-object-fit:cover;object-fit:cover;filter:blur(12px);transform:scale(1.05)}.thumbnail__preview-media::slotted(*){position:relative;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-image{position:relative}.thumbnail__preview-close{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-close:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-close{position:absolute;top:var(--zn-spacing-x-small);right:var(--zn-spacing-x-small);min-width:28px;min-height:28px}.thumbnail__preview-close:focus-visible{outline:var(--zn-focus-ring);outline-offset:1px}`;var iD=260,nD="cubic-bezier(0.2, 0, 0.2, 1)",Me=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","image","caption","badge","actions","preview");this.caption="";this.aspectRatio="";this.fullUri="";this.previewTrigger="click";this.previewLabel="Preview";this.value="";this.selected=!1;this.active=!1;this.selectable=!1;this.disabled=!1;this.icon="";this.hideCaption=!1;this._previewOpen=!1;this._previewRatio=0;this._origin=null;this._animating=!1;this._handleClick=t=>{let r=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;this._activate(t,!r)};this._handleKeyDown=t=>{t.key!=="Enter"&&t.key!==" "||this._isLink()&&t.key==="Enter"||(t.preventDefault(),this._activate(t,!0))};this._handlePreviewButtonClick=t=>{t.preventDefault(),t.stopPropagation(),this.showPreview()};this._handlePreviewCancel=t=>{t.preventDefault(),this.hidePreview()};this._handleBackdropClick=()=>{this.hidePreview()};this._handlePreviewImageLoad=t=>{let r=t.target;if(!r.naturalWidth||!r.naturalHeight)return;let n=r.naturalWidth/r.naturalHeight;this._previewRatio&&Math.abs(n-this._previewRatio)/this._previewRatio<.01||(this._previewRatio=n)}}disconnectedCallback(){super.disconnectedCallback(),this._previewOpen&&(this._preview?.close(),this._previewOpen=!1),za(this)}_isLink(){return!!this.href&&!this.disabled}get _previewable(){return(!!this.fullUri||this.hasSlotController.test("preview"))&&!this.disabled}get _previewOnActivate(){return this._previewable&&this.previewTrigger==="click"}_resolveRatio(){let t=[this._previewImage,this._image];for(let n of t)if(n?.naturalWidth&&n.naturalHeight)return n.naturalWidth/n.naturalHeight;let r=this._media?.getBoundingClientRect();return r?.width&&r.height?r.width/r.height:0}async showPreview(){!this._previewable||this._previewOpen||this._animating||(this._origin=this._media?.getBoundingClientRect()??null,this._previewRatio=this._resolveRatio(),this.emit("zn-show"),this._previewOpen=!0,await this.updateComplete,this._preview&&(this._preview.showModal(),Gv(this),await this._animatePreview("in"),this._previewClose?.focus()))}async hidePreview(){!this._previewOpen||this._animating||(await this._animatePreview("out"),this._preview?.close(),this._previewOpen=!1,za(this),this.emit("zn-close"))}async _animatePreview(t){let r=this._previewFrame,n=this._previewBackdrop;if(!r||!n)return;this._animating=!0;let a=t==="in"?this._origin:this._media?.getBoundingClientRect()??this._origin,s=[{transform:this._collapsedTransform(a,r.getBoundingClientRect()),opacity:"0.4"},{transform:"none",opacity:"1"}],l=[{opacity:"0"},{opacity:"1"}],p={duration:iD,easing:nD},h=t==="in"?s:[...s].reverse(),m=t==="in"?l:[...l].reverse();await Promise.all([vi(r,h,p),vi(n,m,p)]),this._animating=!1}_collapsedTransform(t,r){if(!t||!r.width||!r.height||Hu())return"scale(0.94)";let n=Math.max(t.width/r.width,.01),a=Math.max(t.height/r.height,.01),s=t.left+t.width/2-(r.left+r.width/2),l=t.top+t.height/2-(r.top+r.height/2);return`translate(${s}px, ${l}px) scale(${n}, ${a})`}_activate(t,r){if(this.disabled){t.preventDefault(),t.stopPropagation();return}if(this.emit("zn-select",{detail:{item:this}}).defaultPrevented){t.preventDefault();return}r&&this._previewOnActivate&&(t.preventDefault(),this.showPreview())}render(){let t=this._isLink(),r=this._previewable,n=r&&this.previewTrigger==="button",a=t||this.selectable||this._previewOnActivate,s=t?$i`a`:$i`div`,l=this.hasSlotController.test("image"),p=this.hasSlotController.test("badge")||!!this.icon,h=this.hasSlotController.test("actions"),m=p||h||n,f=!this.hideCaption&&(!!this.caption||this.hasSlotController.test("caption"));return ke`
|
|
6229
|
+
`}};ve.styles=[z(Se),z(e3)],ve.formAssociated=!0,ve.dependencies={"zn-icon":ne,"zn-input":nt,"zn-option":ot,"zn-select":Be},c([F(".schedule-builder__canvas")],ve.prototype,"canvas",2),c([R()],ve.prototype,"_days",2),c([R()],ve.prototype,"_exceptions",2),c([R()],ve.prototype,"_dragPreview",2),c([R()],ve.prototype,"_editing",2),c([d({reflect:!0})],ve.prototype,"name",2),c([d()],ve.prototype,"value",2),c([Ce()],ve.prototype,"defaultValue",2),c([d()],ve.prototype,"label",2),c([d({attribute:"help-text"})],ve.prototype,"helpText",2),c([d({reflect:!0})],ve.prototype,"view",2),c([d({attribute:"open-label"})],ve.prototype,"openLabel",2),c([d({attribute:"closed-label"})],ve.prototype,"closedLabel",2),c([d({attribute:"no-toggle",type:Boolean})],ve.prototype,"noToggle",2),c([d({attribute:"hide-summary",type:Boolean})],ve.prototype,"hideSummary",2),c([d({attribute:"start-hour",type:Number})],ve.prototype,"startHour",2),c([d({attribute:"end-hour",type:Number})],ve.prototype,"endHour",2),c([d({type:Number})],ve.prototype,"interval",2),c([d({attribute:"week-start"})],ve.prototype,"weekStart",2),c([d({attribute:"time-format"})],ve.prototype,"timeFormat",2),c([d({attribute:"display-timezone"})],ve.prototype,"displayTimezone",2),c([d({attribute:"save-timezone"})],ve.prototype,"saveTimezone",2),c([d({attribute:"show-timezone",type:Boolean})],ve.prototype,"showTimezone",2),c([d({attribute:"timezones",converter:{fromAttribute:t=>t.split(/[,\s]+/).filter(Boolean),toAttribute:t=>t.join(" ")}})],ve.prototype,"timezones",2),c([d({attribute:"reference-date"})],ve.prototype,"referenceDate",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"disabled",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],ve.prototype,"required",2),c([d({reflect:!0})],ve.prototype,"form",2),c([K("value")],ve.prototype,"handleValueChange",1),c([K(["required","disabled"])],ve.prototype,"handleValidationStateChange",1);var rD=ve;ve.define("zn-schedule-builder");var o3=_`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;min-width:0}.thumbnail{position:relative;min-width:0}.thumbnail__link{display:flex;flex-direction:column;gap:var(--zn-spacing-x-small);min-width:0;color:inherit;text-decoration:none;outline:none}.thumbnail--interactive .thumbnail__link{cursor:pointer}.thumbnail__media{position:relative;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);width:100%;overflow:hidden;border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));--thumbnail-ring-color:rgb(var(--zn-border-color));--thumbnail-ring-width:1px;--thumbnail-ring-gap:0px}.thumbnail__media::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 var(--thumbnail-ring-width) var(--thumbnail-ring-color),inset 0 0 0 calc(var(--thumbnail-ring-width) + var(--thumbnail-ring-gap)) rgb(var(--zn-body));transition:box-shadow var(--zn-transition-fast) ease-in-out}.thumbnail__image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__slotted-media{display:grid;place-items:center;width:100%;height:100%}.thumbnail__slotted-media::slotted(img),.thumbnail__slotted-media::slotted(video),.thumbnail__slotted-media::slotted(canvas),.thumbnail__slotted-media::slotted(picture),.thumbnail__slotted-media::slotted(div){width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.thumbnail__caption{font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform);letter-spacing:var(--zn-text-table-content-letter-spacing,normal);min-width:0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.thumbnail__overlay{position:absolute;top:0;left:0;right:0;aspect-ratio:var(--zn-thumbnail-aspect-ratio,16/9);border-radius:var(--zn-thumbnail-radius,var(--zn-border-radius));overflow:hidden;pointer-events:none}.thumbnail__badge,.thumbnail__actions,.thumbnail__preview-button{position:absolute;display:flex;align-items:center;gap:var(--zn-thumbnail-chip-gap,var(--zn-spacing-2x-small))}.thumbnail__badge{bottom:var(--zn-spacing-2x-small);left:var(--zn-spacing-2x-small);pointer-events:none}.thumbnail__actions,.thumbnail__preview-button{pointer-events:auto}.thumbnail__actions{bottom:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__preview-button{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-button:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-button{top:var(--zn-spacing-2x-small);right:var(--zn-spacing-2x-small)}.thumbnail__badge-items,.thumbnail__action-items{display:contents}.thumbnail__badge-icon,.thumbnail__badge-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:default;opacity:var(--zn-thumbnail-badge-opacity,0.65)}.thumbnail__action-items::slotted(*){display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__action-items::slotted(*):hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail:hover:not(.thumbnail--disabled):not(.thumbnail--selected):not(.thumbnail--active) .thumbnail__media{--thumbnail-ring-color:rgb(var(--zn-primary))}.thumbnail--selected .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-selected-color,rgb(var(--zn-primary)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail--active .thumbnail__media{--thumbnail-ring-color:var(--zn-thumbnail-active-color,rgb(var(--zn-color-success)));--thumbnail-ring-width:2px;--thumbnail-ring-gap:1px}.thumbnail__link:focus-visible .thumbnail__media{outline:var(--zn-focus-ring);outline-offset:calc(-1 * var(--zn-focus-ring-width))}.thumbnail__preview-button:focus-visible,.thumbnail__action-items::slotted(*:focus-visible){outline:var(--zn-focus-ring);outline-offset:1px}.thumbnail--disabled .thumbnail__link{cursor:not-allowed}.thumbnail--disabled .thumbnail__media,.thumbnail--disabled .thumbnail__caption{opacity:0.5}.thumbnail__preview{position:fixed;inset:0;display:none;width:100%;max-width:none;height:100%;max-height:none;padding:0;border:none;background:transparent;overflow:hidden}.thumbnail__preview[open]{display:grid;place-items:center}.thumbnail__preview::backdrop{background:transparent}.thumbnail__preview-backdrop{position:fixed;inset:0;background:var(--zn-overlay-background-color)}.thumbnail__preview-frame{--preview-max-width:var(--zn-thumbnail-preview-max-width,70vw);--preview-max-height:var(--zn-thumbnail-preview-max-height,70vh);--preview-ratio:var(--zn-thumbnail-preview-aspect-ratio,var(--zn-thumbnail-preview-measured-ratio,var(--zn-thumbnail-aspect-ratio,16/9)));position:relative;width:min(var(--preview-max-width),var(--preview-max-height) * (var(--preview-ratio)));max-width:var(--preview-max-width);max-height:var(--preview-max-height);aspect-ratio:var(--preview-ratio);overflow:hidden;border-radius:var(--zn-thumbnail-preview-radius,var(--zn-border-radius));background-color:rgb(var(--zn-panel));box-shadow:var(--zn-shadow-x-large);transform-origin:center center}.thumbnail__preview-image,.thumbnail__preview-placeholder{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-placeholder{position:absolute;inset:0;-o-object-fit:cover;object-fit:cover;filter:blur(12px);transform:scale(1.05)}.thumbnail__preview-media::slotted(*){position:relative;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.thumbnail__preview-image{position:relative}.thumbnail__preview-close{display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:20px;padding:2px;border:none;border-radius:var(--zn-thumbnail-chip-radius,var(--zn-border-radius));background-color:var(--zn-thumbnail-chip-background,rgba(0,0,0,0.6));color:var(--zn-thumbnail-chip-color,#fff);line-height:0;transition:background-color var(--zn-transition-fast) ease-in-out;cursor:pointer}.thumbnail__preview-close:hover{background-color:var(--zn-thumbnail-chip-background-hover,rgba(0,0,0,0.8))}.thumbnail__preview-close{position:absolute;top:var(--zn-spacing-x-small);right:var(--zn-spacing-x-small);min-width:28px;min-height:28px}.thumbnail__preview-close:focus-visible{outline:var(--zn-focus-ring);outline-offset:1px}`;var iD=260,nD="cubic-bezier(0.2, 0, 0.2, 1)",Me=class extends k{constructor(){super(...arguments);this.hasSlotController=new Y(this,"[default]","image","caption","badge","actions","preview");this.caption="";this.aspectRatio="";this.fullUri="";this.previewTrigger="click";this.previewLabel="Preview";this.value="";this.selected=!1;this.active=!1;this.selectable=!1;this.disabled=!1;this.icon="";this.hideCaption=!1;this._previewOpen=!1;this._previewRatio=0;this._origin=null;this._animating=!1;this._handleClick=t=>{let r=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;this._activate(t,!r)};this._handleKeyDown=t=>{t.key!=="Enter"&&t.key!==" "||this._isLink()&&t.key==="Enter"||(t.preventDefault(),this._activate(t,!0))};this._handlePreviewButtonClick=t=>{t.preventDefault(),t.stopPropagation(),this.showPreview()};this._handlePreviewCancel=t=>{t.preventDefault(),this.hidePreview()};this._handleBackdropClick=()=>{this.hidePreview()};this._handlePreviewImageLoad=t=>{let r=t.target;if(!r.naturalWidth||!r.naturalHeight)return;let n=r.naturalWidth/r.naturalHeight;this._previewRatio&&Math.abs(n-this._previewRatio)/this._previewRatio<.01||(this._previewRatio=n)}}disconnectedCallback(){super.disconnectedCallback(),this._previewOpen&&(this._preview?.close(),this._previewOpen=!1),za(this)}_isLink(){return!!this.href&&!this.disabled}get _previewable(){return(!!this.fullUri||this.hasSlotController.test("preview"))&&!this.disabled}get _previewOnActivate(){return this._previewable&&this.previewTrigger==="click"}_resolveRatio(){let t=[this._previewImage,this._image];for(let n of t)if(n?.naturalWidth&&n.naturalHeight)return n.naturalWidth/n.naturalHeight;let r=this._media?.getBoundingClientRect();return r?.width&&r.height?r.width/r.height:0}async showPreview(){!this._previewable||this._previewOpen||this._animating||(this._origin=this._media?.getBoundingClientRect()??null,this._previewRatio=this._resolveRatio(),this.emit("zn-show"),this._previewOpen=!0,await this.updateComplete,this._preview&&(this._preview.showModal(),Gv(this),await this._animatePreview("in"),this._previewClose?.focus()))}async hidePreview(){!this._previewOpen||this._animating||(await this._animatePreview("out"),this._preview?.close(),this._previewOpen=!1,za(this),this.emit("zn-close"))}async _animatePreview(t){let r=this._previewFrame,n=this._previewBackdrop;if(!r||!n)return;this._animating=!0;let a=t==="in"?this._origin:this._media?.getBoundingClientRect()??this._origin,s=[{transform:this._collapsedTransform(a,r.getBoundingClientRect()),opacity:"0.4"},{transform:"none",opacity:"1"}],l=[{opacity:"0"},{opacity:"1"}],p={duration:iD,easing:nD},h=t==="in"?s:[...s].reverse(),m=t==="in"?l:[...l].reverse();await Promise.all([yi(r,h,p),yi(n,m,p)]),this._animating=!1}_collapsedTransform(t,r){if(!t||!r.width||!r.height||Hu())return"scale(0.94)";let n=Math.max(t.width/r.width,.01),a=Math.max(t.height/r.height,.01),s=t.left+t.width/2-(r.left+r.width/2),l=t.top+t.height/2-(r.top+r.height/2);return`translate(${s}px, ${l}px) scale(${n}, ${a})`}_activate(t,r){if(this.disabled){t.preventDefault(),t.stopPropagation();return}if(this.emit("zn-select",{detail:{item:this}}).defaultPrevented){t.preventDefault();return}r&&this._previewOnActivate&&(t.preventDefault(),this.showPreview())}render(){let t=this._isLink(),r=this._previewable,n=r&&this.previewTrigger==="button",a=t||this.selectable||this._previewOnActivate,s=t?Ai`a`:Ai`div`,l=this.hasSlotController.test("image"),p=this.hasSlotController.test("badge")||!!this.icon,h=this.hasSlotController.test("actions"),m=p||h||n,f=!this.hideCaption&&(!!this.caption||this.hasSlotController.test("caption"));return ke`
|
|
6226
6230
|
<div
|
|
6227
6231
|
part="base"
|
|
6228
6232
|
style="${xt({"--zn-thumbnail-aspect-ratio":this.aspectRatio||null})}"
|
|
@@ -6370,4 +6374,4 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(i,t){this.index++;let r=[],n=[];for
|
|
|
6370
6374
|
`:""}
|
|
6371
6375
|
<div part="content" class="background__content"><slot></slot></div>
|
|
6372
6376
|
</div>
|
|
6373
|
-
`}};Or.styles=z(s3),Or.dependencies={"zn-icon":ne},c([d()],Or.prototype,"image",2),c([d()],Or.prototype,"color",2),c([d({attribute:"image-strength",reflect:!0})],Or.prototype,"imageStrength",2),c([d({reflect:!0})],Or.prototype,"motion",2),c([d({reflect:!0})],Or.prototype,"overlay",2),c([d({attribute:"overlay-tone",reflect:!0})],Or.prototype,"overlayTone",2),c([d({attribute:"floating-icons"})],Or.prototype,"floatingIcons",2),c([d({type:Boolean,reflect:!0})],Or.prototype,"paused",2);var sD=Or;Or.define("zn-background");export{x5 as AbsoluteContainer,TL as ActionBar,Eu as Alert,FL as AnimatedButton,NL as AudioSelect,sD as Background,p8 as BulkActions,$e as Button,Nl as ButtonGroup,CL as ButtonMenu,q4 as ChannelTile,N4 as Chart,J5 as ChatMessage,Z5 as ChatMessageAttachment,iL as Checkbox,pL as CheckboxGroup,Gn as Chip,wa as Collapsible,kL as ColorSelect,E4 as Cols,Hl as Confirm,LL as ContentBlock,Tu as CopyButton,_L as DataSelect,C4 as DataTable,Bd as DataTableFilter,Wu as DataTableSearch,EL as DataTableSort,Gu as Datepicker,T4 as DefinedLabel,_a as Dialog,pr as Dropdown,tL as Editor,
|
|
6377
|
+
`}};Or.styles=z(s3),Or.dependencies={"zn-icon":ne},c([d()],Or.prototype,"image",2),c([d()],Or.prototype,"color",2),c([d({attribute:"image-strength",reflect:!0})],Or.prototype,"imageStrength",2),c([d({reflect:!0})],Or.prototype,"motion",2),c([d({reflect:!0})],Or.prototype,"overlay",2),c([d({attribute:"overlay-tone",reflect:!0})],Or.prototype,"overlayTone",2),c([d({attribute:"floating-icons"})],Or.prototype,"floatingIcons",2),c([d({type:Boolean,reflect:!0})],Or.prototype,"paused",2);var sD=Or;Or.define("zn-background");export{x5 as AbsoluteContainer,TL as ActionBar,Eu as Alert,FL as AnimatedButton,NL as AudioSelect,sD as Background,p8 as BulkActions,$e as Button,Nl as ButtonGroup,CL as ButtonMenu,q4 as ChannelTile,N4 as Chart,J5 as ChatMessage,Z5 as ChatMessageAttachment,iL as Checkbox,pL as CheckboxGroup,Gn as Chip,wa as Collapsible,kL as ColorSelect,E4 as Cols,Hl as Confirm,LL as ContentBlock,Tu as CopyButton,_L as DataSelect,C4 as DataTable,Bd as DataTableFilter,Wu as DataTableSearch,EL as DataTableSort,Gu as Datepicker,T4 as DefinedLabel,_a as Dialog,pr as Dropdown,tL as Editor,ji as EditorDialog,Yf as EditorQuickAction,Nc as EditorTool,Ku as EmptyState,rm as ExpandingAction,dL as File,DL as FilterContainer,qL as FilterWrapper,Lg as FlowBranchConditions,TI as FlowBuilder,AI as FlowStep,Rg as FlowStepGroup,$I as FlowSteps,nL as FormActions,ng as FormGroup,F4 as Header,Yu as HoverContainer,ne as Icon,K4 as IconPicker,ep as InlineEdit,nt as Input,oL as InputGroup,hL as Item,PL as Key,HL as KeyContainer,aL as LinkedSelect,Dq as MarkdownEditor,on as Menu,xi as MenuItem,Ca as Navbar,$4 as Note,Bu as OptGroup,ot as Option,d8 as OrderTable,W4 as Page,NI as PageBuilder,$L as PageNav,Pg as PagePaletteItem,Hg as PageSectionCard,Y4 as Pagination,Z4 as Pane,Qu as Panel,Rl as Popup,Vg as PreviewFrame,UL as PriorityList,c8 as ProgressBar,l8 as ProgressTile,m4 as QueryBuilder,sL as Radio,cL as RadioGroup,lL as Rating,aI as RemarkdEditor,RL as Reveal,rD as ScheduleBuilder,s8 as ScrollContainer,Be as Select,IL as SettingsContainer,r8 as Sidebar,H4 as SimpleChart,Xu as Skeleton,Bl as SlashItem,ka as SlashMenu,SL as Slideout,n8 as Sp,ML as SplitButton,t8 as SplitPane,a8 as Stat,AL as StatusIndicator,o8 as Stepper,Ju as Style,im as Tab,J4 as Table,ln as Tabs,Xo as Textarea,BI as ThemeEditor,oD as Thumbnail,aD as ThumbnailGroup,A4 as Tile,M4 as TileGroup,L4 as TileProperty,X4 as Timer,rL as Toggle,gi as Tooltip,BL as TranslationGroup,OL as Translations,Q4 as VerticalStepper,e4 as Well,k as ZincElement,Ru as caretRectFrom,D3 as clearFormStoreValues,S3 as deepQuery,E3 as deepQueryAll,Ge as deepQuerySelectorAll,Du as getCaretCoordinates,QB as getCaretRect,cr as idSelector,qt as litToHTML,tp as on};
|