diff --git a/dt-assets/build/components/index.es.js b/dt-assets/build/components/index.es.js index 76b0a3cc5a..5bb4c33273 100644 --- a/dt-assets/build/components/index.es.js +++ b/dt-assets/build/components/index.es.js @@ -1,4 +1,4 @@ -import { E as s, C as e, w as D, B as o, D as i, a as l, b as n, d as r, e as c, f as u, u as p, A as C, g as M, x as T, h as m, i as x, j as S, y as g, k as B, t as d, r as h, l as v, m as A, n as L, o as b, p as f, z as y, q as F, c as j, v as k } from "./index-B5P35fmQ.js"; +import { F as s, E as e, x as D, C as o, D as i, a as l, b as n, d as r, e as c, f as p, u, w as C, B as M, g as T, y as m, h as x, i as S, j as d, z as g, k as B, t as h, r as v, l as A, m as F, n as L, o as b, p as f, A as y, q as U, c as j, v as k } from "./index-CVnwJslV.js"; export { s as ApiService, e as ComponentService, @@ -9,25 +9,26 @@ export { n as DtConnection, r as DtCopyText, c as DtDate, - u as DtDatetime, - p as DtFormBase, - C as DtIcon, - M as DtLabel, - T as DtList, - m as DtLocation, - x as DtLocationMap, - S as DtMapModal, + p as DtDatetime, + u as DtFileUpload, + C as DtFormBase, + M as DtIcon, + T as DtLabel, + m as DtList, + x as DtLocation, + S as DtLocationMap, + d as DtMapModal, g as DtModal, B as DtMultiSelect, - d as DtMultiSelectButtonGroup, - h as DtMultiText, - v as DtNumberField, - A as DtSingleSelect, + h as DtMultiSelectButtonGroup, + v as DtMultiText, + A as DtNumberField, + F as DtSingleSelect, L as DtTags, b as DtText, f as DtTextArea, y as DtTile, - F as DtToggle, + U as DtToggle, j as DtUsersConnection, k as version }; diff --git a/dt-assets/build/components/index.js b/dt-assets/build/components/index.js index a264216fe1..e9e46ded02 100644 --- a/dt-assets/build/components/index.js +++ b/dt-assets/build/components/index.js @@ -1,74 +1,74 @@ -var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr=($,q,W)=>q in $?Pr($,q,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[q]=W;var Xe=($,q,W)=>Mr($,typeof q!="symbol"?q+"":q,W);/** +var DtWebComponents=function($){"use strict";var Mr=Object.defineProperty;var jr=($,N,W)=>N in $?Mr($,N,{enumerable:!0,configurable:!0,writable:!0,value:W}):$[N]=W;var Me=($,N,W)=>jr($,typeof N!="symbol"?N+"":N,W);/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var As;const q=globalThis,W=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vt=Symbol(),Bt=new WeakMap;let qs=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(W&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Bt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Bt.set(t,e))}return e}toString(){return this.cssText}};const Fs=o=>new qs(typeof o=="string"?o:o+"",void 0,Vt),Us=(o,e)=>{if(W)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=q.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},Ht=W?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Fs(t)})(o):o;/** + */var Os;const N=globalThis,W=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Bt=Symbol(),Ht=new WeakMap;let Us=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Bt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(W&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ht.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ht.set(t,e))}return e}toString(){return this.cssText}};const Vs=o=>new Us(typeof o=="string"?o:o+"",void 0,Bt),Bs=(o,e)=>{if(W)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=N.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},Kt=W?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Vs(t)})(o):o;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:Vs,defineProperty:Bs,getOwnPropertyDescriptor:Hs,getOwnPropertyNames:Gs,getOwnPropertySymbols:Ws,getPrototypeOf:Ks}=Object,K=globalThis,Gt=K.trustedTypes,Zs=Gt?Gt.emptyScript:"",et=K.reactiveElementPolyfillSupport,he=(o,e)=>o,tt={toAttribute(o,e){switch(e){case Boolean:o=o?Zs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){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}},Wt=(o,e)=>!Vs(o,e),Kt={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:Wt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),K.litPropertyMetadata??(K.litPropertyMetadata=new WeakMap);let pe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Kt){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Bs(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=Hs(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Kt}static _$Ei(){if(this.hasOwnProperty(he("elementProperties")))return;const e=Ks(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(he("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(he("properties"))){const t=this.properties,i=[...Gs(t),...Ws(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Ht(s))}else e!==void 0&&t.push(Ht(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Us(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:tt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:tt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Wt)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};pe.elementStyles=[],pe.shadowRootOptions={mode:"open"},pe[he("elementProperties")]=new Map,pe[he("finalized")]=new Map,et==null||et({ReactiveElement:pe}),(K.reactiveElementVersions??(K.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:Hs,defineProperty:Ks,getOwnPropertyDescriptor:Ws,getOwnPropertyNames:Gs,getOwnPropertySymbols:Zs,getPrototypeOf:Js}=Object,G=globalThis,Wt=G.trustedTypes,Qs=Wt?Wt.emptyScript:"",tt=G.reactiveElementPolyfillSupport,fe=(o,e)=>o,it={toAttribute(o,e){switch(e){case Boolean:o=o?Qs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){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}},Gt=(o,e)=>!Hs(o,e),Zt={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:Gt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),G.litPropertyMetadata??(G.litPropertyMetadata=new WeakMap);let be=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Zt){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&Ks(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=Ws(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Zt}static _$Ei(){if(this.hasOwnProperty(fe("elementProperties")))return;const e=Js(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(fe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(fe("properties"))){const t=this.properties,i=[...Gs(t),...Zs(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Kt(s))}else e!==void 0&&t.push(Kt(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bs(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:it).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:it;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Gt)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[fe("elementProperties")]=new Map,be[fe("finalized")]=new Map,tt==null||tt({ReactiveElement:be}),(G.reactiveElementVersions??(G.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const fe=globalThis,Pe=fe.trustedTypes,Zt=Pe?Pe.createPolicy("lit-html",{createHTML:o=>o}):void 0,Jt="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,Qt="?"+Z,Js=`<${Qt}>`,te=document,be=()=>te.createComment(""),ge=o=>o===null||typeof o!="object"&&typeof o!="function",it=Array.isArray,Qs=o=>it(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",st=`[ -\f\r]`,me=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yt=/-->/g,Xt=/>/g,ie=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),ei=/'/g,ti=/"/g,ii=/^(?:script|style|textarea|title)$/i,Ys=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),f=Ys(1),U=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),si=new WeakMap,se=te.createTreeWalker(te,129);function oi(o,e){if(!it(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zt!==void 0?Zt.createHTML(e):e}const Xs=(o,e)=>{const t=o.length-1,i=[];let s,a=e===2?"":e===3?"":"",n=me;for(let r=0;r"?(n=s??me,g=-1):b[1]===void 0?g=-2:(g=n.lastIndex-b[2].length,c=b[1],n=b[3]===void 0?ie:b[3]==='"'?ti:ei):n===ti||n===ei?n=ie:n===Yt||n===Xt?n=me:(n=ie,s=void 0);const y=n===ie&&o[r+1].startsWith("/>")?" ":"";a+=n===me?l+Js:g>=0?(i.push(c),l.slice(0,g)+Jt+l.slice(g)+Z+y):l+Z+(g===-2?r:y)}return[oi(o,a+(o[t]||"")+(e===2?"":e===3?"":"")),i]};class ve{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let a=0,n=0;const r=e.length-1,l=this.parts,[c,b]=Xs(e,t);if(this.el=ve.createElement(c,i),se.currentNode=this.el.content,t===2||t===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(s=se.nextNode())!==null&&l.length0){s.textContent=Pe?Pe.emptyScript:"";for(let y=0;y2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}_$AI(e,t=this,i,s){const a=this.strings;let n=!1;if(a===void 0)e=de(this,e,t,0),n=!ge(e)||e!==this._$AH&&e!==U,n&&(this._$AH=e);else{const r=e;let l,c;for(e=a[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const a=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new ce(e.insertBefore(be(),a),a,void 0,t??{})}return s._$AI(o),s};/** + */const ge=globalThis,je=ge.trustedTypes,Jt=je?je.createPolicy("lit-html",{createHTML:o=>o}):void 0,Qt="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,Xt="?"+Z,Xs=`<${Xt}>`,ie=document,me=()=>ie.createComment(""),ve=o=>o===null||typeof o!="object"&&typeof o!="function",st=Array.isArray,Ys=o=>st(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",ot=`[ +\f\r]`,ye=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yt=/-->/g,ei=/>/g,se=RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),ti=/'/g,ii=/"/g,si=/^(?:script|style|textarea|title)$/i,eo=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),u=eo(1),V=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),oi=new WeakMap,oe=ie.createTreeWalker(ie,129);function ai(o,e){if(!st(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(e):e}const to=(o,e)=>{const t=o.length-1,i=[];let s,a=e===2?"":e===3?"":"",n=ye;for(let r=0;r"?(n=s??ye,g=-1):h[1]===void 0?g=-2:(g=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?se:h[3]==='"'?ii:ti):n===ii||n===ti?n=se:n===Yt||n===ei?n=ye:(n=se,s=void 0);const y=n===se&&o[r+1].startsWith("/>")?" ":"";a+=n===ye?l+Xs:g>=0?(i.push(d),l.slice(0,g)+Qt+l.slice(g)+Z+y):l+Z+(g===-2?r:y)}return[ai(o,a+(o[t]||"")+(e===2?"":e===3?"":"")),i]};class we{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let a=0,n=0;const r=e.length-1,l=this.parts,[d,h]=to(e,t);if(this.el=we.createElement(d,i),oe.currentNode=this.el.content,t===2||t===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(s=oe.nextNode())!==null&&l.length0){s.textContent=je?je.emptyScript:"";for(let y=0;y2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=A}_$AI(e,t=this,i,s){const a=this.strings;let n=!1;if(a===void 0)e=ue(this,e,t,0),n=!ve(e)||e!==this._$AH&&e!==V,n&&(this._$AH=e);else{const r=e;let l,d;for(e=a[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const a=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new he(e.insertBefore(me(),a),a,void 0,t??{})}return s._$AI(o),s};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const je=globalThis,at=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),ai=new WeakMap;let ni=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(at&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=ai.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ai.set(t,e))}return e}toString(){return this.cssText}};const ro=o=>new ni(typeof o=="string"?o:o+"",void 0,nt),x=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,s,a)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[a+1],o[0]);return new ni(t,o,nt)},lo=(o,e)=>{if(at)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=je.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},ri=at?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return ro(t)})(o):o;/** + */const Fe=globalThis,nt=Fe.ShadowRoot&&(Fe.ShadyCSS===void 0||Fe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),ni=new WeakMap;let ri=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(nt&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=ni.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ni.set(t,e))}return e}toString(){return this.cssText}};const co=o=>new ri(typeof o=="string"?o:o+"",void 0,rt),x=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,s,a)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[a+1],o[0]);return new ri(t,o,rt)},uo=(o,e)=>{if(nt)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=Fe.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},li=nt?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return co(t)})(o):o;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:co,defineProperty:uo,getOwnPropertyDescriptor:ho,getOwnPropertyNames:po,getOwnPropertySymbols:fo,getPrototypeOf:bo}=Object,J=globalThis,li=J.trustedTypes,go=li?li.emptyScript:"",rt=J.reactiveElementPolyfillSupport,ye=(o,e)=>o,lt={toAttribute(o,e){switch(e){case Boolean:o=o?go:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){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}},di=(o,e)=>!co(o,e),ci={attribute:!0,type:String,converter:lt,reflect:!1,hasChanged:di};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);class ue extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ci){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&uo(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=ho(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ci}static _$Ei(){if(this.hasOwnProperty(ye("elementProperties")))return;const e=bo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ye("properties"))){const t=this.properties,i=[...po(t),...fo(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(ri(s))}else e!==void 0&&t.push(ri(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:lt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:lt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??di)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},ue[ye("elementProperties")]=new Map,ue[ye("finalized")]=new Map,rt==null||rt({ReactiveElement:ue}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:ho,defineProperty:po,getOwnPropertyDescriptor:fo,getOwnPropertyNames:bo,getOwnPropertySymbols:go,getPrototypeOf:mo}=Object,J=globalThis,di=J.trustedTypes,vo=di?di.emptyScript:"",lt=J.reactiveElementPolyfillSupport,_e=(o,e)=>o,dt={toAttribute(o,e){switch(e){case Boolean:o=o?vo:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){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}},ci=(o,e)=>!ho(o,e),ui={attribute:!0,type:String,converter:dt,reflect:!1,hasChanged:ci};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),J.litPropertyMetadata??(J.litPropertyMetadata=new WeakMap);class pe extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ui){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&po(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:a}=fo(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get(){return s==null?void 0:s.call(this)},set(n){const r=s==null?void 0:s.call(this);a.call(this,n),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ui}static _$Ei(){if(this.hasOwnProperty(_e("elementProperties")))return;const e=mo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(_e("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_e("properties"))){const t=this.properties,i=[...bo(t),...go(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(li(s))}else e!==void 0&&t.push(li(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return uo(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var a;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:dt).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var a;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:((a=n.converter)==null?void 0:a.fromAttribute)!==void 0?n.converter:dt;this._$Em=s,this[s]=r.fromAttribute(t,n.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??ci)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,n]of s)n.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],n)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(t)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}pe.elementStyles=[],pe.shadowRootOptions={mode:"open"},pe[_e("elementProperties")]=new Map,pe[_e("finalized")]=new Map,lt==null||lt({ReactiveElement:pe}),(J.reactiveElementVersions??(J.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */let oe=class extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=no(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return U}};oe._$litElement$=!0,oe.finalized=!0,(As=globalThis.litElementHydrateSupport)==null||As.call(globalThis,{LitElement:oe});const dt=globalThis.litElementPolyfillSupport;dt==null||dt({LitElement:oe}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** + */let ae=class extends pe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=lo(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return V}};ae._$litElement$=!0,ae.finalized=!0,(Os=globalThis.litElementHydrateSupport)==null||Os.call(globalThis,{LitElement:ae});const ct=globalThis.litElementPolyfillSupport;ct==null||ct({LitElement:ae}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const ct={ATTRIBUTE:1,CHILD:2},ut=o=>(...e)=>({_$litDirective$:o,values:e});let ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + */const ut={ATTRIBUTE:1,CHILD:2},ht=o=>(...e)=>({_$litDirective$:o,values:e});let pt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const A=ut(class extends ht{constructor(o){var e;if(super(o),o.type!==ct.ATTRIBUTE||o.name!=="class"||((e=o.strings)==null?void 0:e.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(e=>o[e]).join(" ")+" "}update(o,[e]){var i,s;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!((i=this.nt)!=null&&i.has(a))&&this.st.add(a);return this.render(e)}const t=o.element.classList;for(const a of this.st)a in e||(t.remove(a),this.st.delete(a));for(const a in e){const n=!!e[a];n===this.st.has(a)||(s=this.nt)!=null&&s.has(a)||(n?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return U}});/** + */const T=ht(class extends pt{constructor(o){var e;if(super(o),o.type!==ut.ATTRIBUTE||o.name!=="class"||((e=o.strings)==null?void 0:e.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(e=>o[e]).join(" ")+" "}update(o,[e]){var i,s;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in e)e[a]&&!((i=this.nt)!=null&&i.has(a))&&this.st.add(a);return this.render(e)}const t=o.element.classList;for(const a of this.st)a in e||(t.remove(a),this.st.delete(a));for(const a in e){const n=!!e[a];n===this.st.has(a)||(s=this.nt)!=null&&s.has(a)||(n?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return V}});/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const pt="lit-localize-status";/** + */const ft="lit-localize-status";/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const u=(o,...e)=>({strTag:!0,strings:o,values:e}),mo=o=>typeof o!="string"&&"strTag"in o,ui=(o,e,t)=>{let i=o[0];for(let s=1;s({strTag:!0,strings:o,values:e}),yo=o=>typeof o!="string"&&"strTag"in o,hi=(o,e,t)=>{let i=o[0];for(let s=1;smo(o)?ui(o.strings,o.values):o;let O=hi,pi=!1;function vo(o){if(pi)throw new Error("lit-localize can only be configured once");O=o,pi=!0}/** + */const pi=o=>yo(o)?hi(o.strings,o.values):o;let O=pi,fi=!1;function wo(o){if(fi)throw new Error("lit-localize can only be configured once");O=o,fi=!0}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class yo{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(pt,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(pt,this.__litLocalizeEventHandler)}}const wo=o=>o.addController(new yo(o));/** + */class _o{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(ft,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(ft,this.__litLocalizeEventHandler)}}const $o=o=>o.addController(new _o(o));/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */class fi{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/** + */class bi{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}/** * @license * Copyright 2014 Travis Webb * SPDX-License-Identifier: MIT - */const V=[];for(let o=0;o<256;o++)V[o]=(o>>4&15).toString(16)+(o&15).toString(16);function _o(o){let e=0,t=8997,i=0,s=33826,a=0,n=40164,r=0,l=52210;for(let c=0;c>>16,t=e&65535,a+=i>>>16,s=i&65535,l=r+(a>>>16)&65535,n=a&65535;return V[l>>8]+V[l&255]+V[n>>8]+V[n&255]+V[s>>8]+V[s&255]+V[t>>8]+V[t&255]}/** + */const B=[];for(let o=0;o<256;o++)B[o]=(o>>4&15).toString(16)+(o&15).toString(16);function xo(o){let e=0,t=8997,i=0,s=33826,a=0,n=40164,r=0,l=52210;for(let d=0;d>>16,t=e&65535,a+=i>>>16,s=i&65535,l=r+(a>>>16)&65535,n=a&65535;return B[l>>8]+B[l&255]+B[n>>8]+B[n&255]+B[s>>8]+B[s&255]+B[t>>8]+B[t&255]}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const $o="",xo="h",ko="s";function So(o,e){return(e?xo:ko)+_o(typeof o=="string"?o:o.join($o))}/** + */const ko="",So="h",Eo="s";function To(o,e){return(e?So:Eo)+xo(typeof o=="string"?o:o.join(ko))}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const bi=new WeakMap,gi=new Map;function To(o,e,t){if(o){const i=(t==null?void 0:t.id)??Ao(e),s=o[i];if(s){if(typeof s=="string")return s;if("strTag"in s)return ui(s.strings,e.values,s.values);{let a=bi.get(s);return a===void 0&&(a=s.values,bi.set(s,a)),{...s,values:a.map(n=>e.values[n])}}}}return hi(e)}function Ao(o){const e=typeof o=="string"?o:o.strings;let t=gi.get(e);return t===void 0&&(t=So(e,typeof o!="string"&&!("strTag"in o)),gi.set(e,t)),t}/** + */const gi=new WeakMap,mi=new Map;function Ao(o,e,t){if(o){const i=(t==null?void 0:t.id)??Oo(e),s=o[i];if(s){if(typeof s=="string")return s;if("strTag"in s)return hi(s.strings,e.values,s.values);{let a=gi.get(s);return a===void 0&&(a=s.values,gi.set(s,a)),{...s,values:a.map(n=>e.values[n])}}}}return pi(e)}function Oo(o){const e=typeof o=="string"?o:o.strings;let t=mi.get(e);return t===void 0&&(t=To(e,typeof o!="string"&&!("strTag"in o)),mi.set(e,t)),t}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function ft(o){window.dispatchEvent(new CustomEvent(pt,{detail:o}))}let De="",bt,mi,ze,gt,vi,ae=new fi;ae.resolve();let Re=0;const Eo=o=>(vo((e,t)=>To(vi,e,t)),De=mi=o.sourceLocale,ze=new Set(o.targetLocales),ze.add(o.sourceLocale),gt=o.loadLocale,{getLocale:Oo,setLocale:Co}),Oo=()=>De,Co=o=>{if(o===(bt??De))return ae.promise;if(!ze||!gt)throw new Error("Internal error");if(!ze.has(o))throw new Error("Invalid locale code");Re++;const e=Re;return bt=o,ae.settled&&(ae=new fi),ft({status:"loading",loadingLocale:o}),(o===mi?Promise.resolve({templates:void 0}):gt(o)).then(i=>{Re===e&&(De=o,bt=void 0,vi=i.templates,ft({status:"ready",readyLocale:o}),ae.resolve())},i=>{Re===e&&(ft({status:"error",errorLocale:o,errorMessage:i.toString()}),ae.reject(i))}),ae.promise},Lo=(o,e,t)=>{const i=o[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Io="en",Po=["am_ET","ar","ar_MA","bg_BG","bn_BD","bs_BA","cs","de_DE","el","en_US","es_419","es_ES","fa_IR","fr_FR","hi_IN","hr","hu_HU","id_ID","it_IT","ja","ko_KR","mk_MK","mr","my_MM","ne_NP","nl_NL","pa_IN","pl","pt_BR","ro_RO","ru_RU","sl_SI","sr_BA","sw","th","tl","tr_TR","uk","vi","zh_CN","zh_TW"],{setLocale:Mo}=Eo({sourceLocale:Io,targetLocales:Po,loadLocale:o=>Lo(Object.assign({"./generated/am_ET.js":()=>Promise.resolve().then(()=>Ba),"./generated/ar.js":()=>Promise.resolve().then(()=>Ga),"./generated/ar_MA.js":()=>Promise.resolve().then(()=>Ka),"./generated/bg_BG.js":()=>Promise.resolve().then(()=>Ja),"./generated/bn_BD.js":()=>Promise.resolve().then(()=>Ya),"./generated/bs_BA.js":()=>Promise.resolve().then(()=>en),"./generated/cs.js":()=>Promise.resolve().then(()=>sn),"./generated/de_DE.js":()=>Promise.resolve().then(()=>an),"./generated/el.js":()=>Promise.resolve().then(()=>rn),"./generated/en_US.js":()=>Promise.resolve().then(()=>dn),"./generated/es-419.js":()=>Promise.resolve().then(()=>un),"./generated/es_419.js":()=>Promise.resolve().then(()=>pn),"./generated/es_ES.js":()=>Promise.resolve().then(()=>bn),"./generated/fa_IR.js":()=>Promise.resolve().then(()=>mn),"./generated/fr_FR.js":()=>Promise.resolve().then(()=>yn),"./generated/hi_IN.js":()=>Promise.resolve().then(()=>_n),"./generated/hr.js":()=>Promise.resolve().then(()=>xn),"./generated/hu_HU.js":()=>Promise.resolve().then(()=>Sn),"./generated/id_ID.js":()=>Promise.resolve().then(()=>An),"./generated/it_IT.js":()=>Promise.resolve().then(()=>On),"./generated/ja.js":()=>Promise.resolve().then(()=>Ln),"./generated/ko_KR.js":()=>Promise.resolve().then(()=>Pn),"./generated/mk_MK.js":()=>Promise.resolve().then(()=>jn),"./generated/mr.js":()=>Promise.resolve().then(()=>zn),"./generated/my_MM.js":()=>Promise.resolve().then(()=>Nn),"./generated/ne_NP.js":()=>Promise.resolve().then(()=>Fn),"./generated/nl_NL.js":()=>Promise.resolve().then(()=>Vn),"./generated/pa_IN.js":()=>Promise.resolve().then(()=>Hn),"./generated/pl.js":()=>Promise.resolve().then(()=>Wn),"./generated/pt_BR.js":()=>Promise.resolve().then(()=>Zn),"./generated/ro_RO.js":()=>Promise.resolve().then(()=>Qn),"./generated/ru_RU.js":()=>Promise.resolve().then(()=>Xn),"./generated/sl_SI.js":()=>Promise.resolve().then(()=>tr),"./generated/sr_BA.js":()=>Promise.resolve().then(()=>sr),"./generated/sw.js":()=>Promise.resolve().then(()=>ar),"./generated/th.js":()=>Promise.resolve().then(()=>rr),"./generated/tl.js":()=>Promise.resolve().then(()=>dr),"./generated/tr_TR.js":()=>Promise.resolve().then(()=>ur),"./generated/uk.js":()=>Promise.resolve().then(()=>pr),"./generated/vi.js":()=>Promise.resolve().then(()=>br),"./generated/zh_CN.js":()=>Promise.resolve().then(()=>mr),"./generated/zh_TW.js":()=>Promise.resolve().then(()=>yr)}),`./generated/${o}.js`,3)});class mt{constructor(e,t="/wp-json"){this.nonce=e;let i=t;i.match("^http")&&(i=i.replace(/^http[s]?:\/\/.*?\//,"")),i=`/${i}/`.replace(/\/\//g,"/"),this.apiRoot=i}async makeRequest(e,t,i,s="dt/v1/"){let a=s;!a.endsWith("/")&&!t.startsWith("/")&&(a+="/");const n=t.startsWith("http")?t:`${this.apiRoot}${a}${t}`,r={method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce}};e!=="GET"&&(r.body=JSON.stringify(i));const l=await fetch(n,r),c=await l.json();if(!l.ok){const b=new Error((c==null?void 0:c.message)||c.toString());throw b.args={status:l.status,statusText:l.statusText,body:c},b}return c}async makeRequestOnPosts(e,t,i={}){return this.makeRequest(e,t,i,"dt-posts/v2/")}async getPost(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}`)}async createPost(e,t){return this.makeRequestOnPosts("POST",e,t)}async fetchPostsList(e,t){return this.makeRequestOnPosts("POST",`${e}/list`,t)}async updatePost(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}`,i)}async deletePost(e,t){return this.makeRequestOnPosts("DELETE",`${e}/${t}`)}async listPostsCompact(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequestOnPosts("GET",`${e}/compact?${i}`)}async getPostDuplicates(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/all_duplicates`,i)}async checkFieldValueExists(e,t){return this.makeRequestOnPosts("POST",`${e}/check_field_value_exists`,t)}async getMultiSelectValues(e,t,i=""){const s=new URLSearchParams({s:i,field:t});return this.makeRequestOnPosts("GET",`${e}/multi-select-values?${s}`)}async getLocations(e,t,i,s=""){const a=new URLSearchParams({s,field:t,filter:i});return this.makeRequest("GET",`mapping_module/search_location_grid_by_name?${a}`)}async transferContact(e,t){return this.makeRequestOnPosts("POST","contacts/transfer",{contact_id:e,site_post_id:t})}async transferContactSummaryUpdate(e,t){return this.makeRequestOnPosts("POST","contacts/transfer/summary/send-update",{contact_id:e,update:t})}async requestRecordAccess(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/request_record_access`,{user_id:i})}async createComment(e,t,i,s="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments`,{comment:i,comment_type:s})}async updateComment(e,t,i,s,a="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}`,{comment:s,comment_type:a})}async deleteComment(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/comments/${i}`)}async getComments(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/comments`)}async toggle_comment_reaction(e,t,i,s,a){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}/react`,{user_id:s,reaction:a})}async getPostActivity(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/activity`)}async getSingleActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/activity/${i}`)}async revertActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/revert/${i}`)}async getPostShares(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/shares`)}async addPostShare(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/shares`,{user_id:i})}async removePostShare(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/shares`,{user_id:i})}async getFilters(){return this.makeRequest("GET","users/get_filters")}async saveFilters(e,t){return this.makeRequest("POST","users/save_filters",{filter:t,postType:e})}async deleteFilter(e,t){return this.makeRequest("DELETE","users/save_filters",{id:t,postType:e})}async searchUsers(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequest("GET",`users/get_users?${i}&post_type=${e}`)}async checkDuplicateUsers(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/duplicates`)}async getContactInfo(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/`)}async createUser(e){return this.makeRequest("POST","users/create",e)}async advanced_search(e,t,i,s){return this.makeRequest("GET","advanced_search",{query:e,postType:t,offset:i,post:s.post,comment:s.comment,meta:s.meta,status:s.status},"dt-posts/v2/posts/search/")}}(function(){(function(o){const e=new WeakMap,t=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,c=new WeakMap,b=new WeakMap,g=new WeakMap,v=new WeakMap,y=new WeakMap,w=new WeakMap,L=new WeakMap,N={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},M=(h,d)=>{for(let p in N){d[p]=null;let m=null;const _=N[p];Object.defineProperty(d,p,{get(){return m},set(k){m=k,h.isConnected?P(h,_,k):b.set(h,d)}})}};function I(h){const d=s.get(h),{form:p}=d;Ls(h,p,d),Cs(h,d.labels)}const Le=(h,d=!1)=>{const p=document.createTreeWalker(h,NodeFilter.SHOW_ELEMENT,{acceptNode(k){return s.has(k)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let m=p.nextNode();const _=!d||h.disabled;for(;m;)m.formDisabledCallback&&_&&Rt(m,h.disabled),m=p.nextNode()},Ze={attributes:!0,attributeFilter:["disabled","name"]},X=Ye()?new MutationObserver(h=>{for(const d of h){const p=d.target;if(d.attributeName==="disabled"&&(p.constructor.formAssociated?Rt(p,p.hasAttribute("disabled")):p.localName==="fieldset"&&Le(p)),d.attributeName==="name"&&p.constructor.formAssociated){const m=s.get(p),_=c.get(p);m.setFormValue(_)}}}):{};function T(h){h.forEach(d=>{const{addedNodes:p,removedNodes:m}=d,_=Array.from(p),k=Array.from(m);_.forEach(S=>{var j;if(s.has(S)&&S.constructor.formAssociated&&I(S),b.has(S)){const C=b.get(S);Object.keys(N).filter(F=>C[F]!==null).forEach(F=>{P(S,N[F],C[F])}),b.delete(S)}if(L.has(S)){const C=L.get(S);P(S,"internals-valid",C.validity.valid.toString()),P(S,"internals-invalid",(!C.validity.valid).toString()),P(S,"aria-invalid",(!C.validity.valid).toString()),L.delete(S)}if(S.localName==="form"){const C=l.get(S),G=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT,{acceptNode(Ut){return s.has(Ut)&&Ut.constructor.formAssociated&&!(C&&C.has(Ut))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let F=G.nextNode();for(;F;)I(F),F=G.nextNode()}S.localName==="fieldset"&&((j=X.observe)===null||j===void 0||j.call(X,S,Ze),Le(S,!0))}),k.forEach(S=>{const j=s.get(S);j&&i.get(j)&&Es(j),r.has(S)&&r.get(S).disconnect()})})}function z(h){h.forEach(d=>{const{removedNodes:p}=d;p.forEach(m=>{const _=y.get(d.target);s.has(m)&&Ps(m),_.disconnect()})})}const le=h=>{var d,p;const m=new MutationObserver(z);!((d=window==null?void 0:window.ShadyDOM)===null||d===void 0)&&d.inUse&&h.mode&&h.host&&(h=h.host),(p=m.observe)===null||p===void 0||p.call(m,h,{childList:!0}),y.set(h,m)};Ye()&&new MutationObserver(T);const ee={childList:!0,subtree:!0},P=(h,d,p)=>{h.getAttribute(d)!==p&&h.setAttribute(d,p)},Rt=(h,d)=>{h.toggleAttribute("internals-disabled",d),d?P(h,"aria-disabled","true"):h.removeAttribute("aria-disabled"),h.formDisabledCallback&&h.formDisabledCallback.apply(h,[d])},Es=h=>{i.get(h).forEach(p=>{p.remove()}),i.set(h,[])},Os=(h,d)=>{const p=document.createElement("input");return p.type="hidden",p.name=h.getAttribute("name"),h.after(p),i.get(d).push(p),p},wr=(h,d)=>{var p;i.set(d,[]),(p=X.observe)===null||p===void 0||p.call(X,h,Ze)},Cs=(h,d)=>{if(d.length){Array.from(d).forEach(m=>m.addEventListener("click",h.click.bind(h)));let p=d[0].id;d[0].id||(p=`${d[0].htmlFor}_Label`,d[0].id=p),P(h,"aria-labelledby",p)}},Je=h=>{const d=Array.from(h.elements).filter(k=>!k.tagName.includes("-")&&k.validity).map(k=>k.validity.valid),p=l.get(h)||[],m=Array.from(p).filter(k=>k.isConnected).map(k=>s.get(k).validity.valid),_=[...d,...m].includes(!1);h.toggleAttribute("internals-invalid",_),h.toggleAttribute("internals-valid",!_)},_r=h=>{Je(Qe(h.target))},$r=h=>{Je(Qe(h.target))},xr=h=>{const d=["button[type=submit]","input[type=submit]","button:not([type])"].map(p=>`${p}:not([disabled])`).map(p=>`${p}:not([form])${h.id?`,${p}[form='${h.id}']`:""}`).join(",");h.addEventListener("click",p=>{if(p.target.closest(d)){const _=l.get(h);if(h.noValidate)return;_.size&&Array.from(_).reverse().map(j=>s.get(j).reportValidity()).includes(!1)&&p.preventDefault()}})},kr=h=>{const d=l.get(h.target);d&&d.size&&d.forEach(p=>{p.constructor.formAssociated&&p.formResetCallback&&p.formResetCallback.apply(p)})},Ls=(h,d,p)=>{if(d){const m=l.get(d);if(m)m.add(h);else{const _=new Set;_.add(h),l.set(d,_),xr(d),d.addEventListener("reset",kr),d.addEventListener("input",_r),d.addEventListener("change",$r)}n.set(d,{ref:h,internals:p}),h.constructor.formAssociated&&h.formAssociatedCallback&&setTimeout(()=>{h.formAssociatedCallback.apply(h,[d])},0),Je(d)}},Qe=h=>{let d=h.parentNode;return d&&d.tagName!=="FORM"&&(d=Qe(d)),d},H=(h,d,p=DOMException)=>{if(!h.constructor.formAssociated)throw new p(d)},Is=(h,d,p)=>{const m=l.get(h);return m&&m.size&&m.forEach(_=>{s.get(_)[p]()||(d=!1)}),d},Ps=h=>{if(h.constructor.formAssociated){const d=s.get(h),{labels:p,form:m}=d;Cs(h,p),Ls(h,m,d)}};function Ye(){return typeof MutationObserver<"u"}class Sr{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Tr=h=>(h.badInput=!1,h.customError=!1,h.patternMismatch=!1,h.rangeOverflow=!1,h.rangeUnderflow=!1,h.stepMismatch=!1,h.tooLong=!1,h.tooShort=!1,h.typeMismatch=!1,h.valid=!0,h.valueMissing=!1,h),Ar=(h,d,p)=>(h.valid=Er(d),Object.keys(d).forEach(m=>h[m]=d[m]),p&&Je(p),h),Er=h=>{let d=!0;for(let p in h)p!=="valid"&&h[p]!==!1&&(d=!1);return d},Nt=new WeakMap;function Ms(h,d){h.toggleAttribute(d,!0),h.part&&h.part.add(d)}class qt extends Set{static get isPolyfilled(){return!0}constructor(d){if(super(),!d||!d.tagName||d.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Nt.set(this,d)}add(d){if(!/^--/.test(d)||typeof d!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${d} must start with '--'.`);const p=super.add(d),m=Nt.get(this),_=`state${d}`;return m.isConnected?Ms(m,_):setTimeout(()=>{Ms(m,_)}),p}clear(){for(let[d]of this.entries())this.delete(d);super.clear()}delete(d){const p=super.delete(d),m=Nt.get(this);return m.isConnected?(m.toggleAttribute(`state${d}`,!1),m.part&&m.part.remove(`state${d}`)):setTimeout(()=>{m.toggleAttribute(`state${d}`,!1),m.part&&m.part.remove(`state${d}`)}),p}}function js(h,d,p,m){if(typeof d=="function"?h!==d||!0:!d.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return p==="m"?m:p==="a"?m.call(h):m?m.value:d.get(h)}function Or(h,d,p,m,_){if(typeof d=="function"?h!==d||!0:!d.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d.set(h,p),p}var Ie;class Cr{constructor(d){Ie.set(this,void 0),Or(this,Ie,d);for(let p=0;pG.compareDocumentPosition?G.compareDocumentPosition(F)&2?1:-1:0);return new Cr(C)}})}class Ds{static get isPolyfilled(){return!0}constructor(d){if(!d||!d.tagName||d.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const p=d.getRootNode(),m=new Sr;this.states=new qt(d),e.set(this,d),t.set(this,m),s.set(d,this),M(d,this),wr(d,this),Object.seal(this),p instanceof DocumentFragment&&le(p)}checkValidity(){const d=e.get(this);if(H(d,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const p=t.get(this);if(!p.valid){const m=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});d.dispatchEvent(m)}return p.valid}get form(){const d=e.get(this);H(d,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let p;return d.constructor.formAssociated===!0&&(p=Qe(d)),p}get labels(){const d=e.get(this);H(d,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const p=d.getAttribute("id"),m=d.getRootNode();return m&&p?m.querySelectorAll(`[for="${p}"]`):[]}reportValidity(){const d=e.get(this);if(H(d,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const p=this.checkValidity(),m=v.get(this);if(m&&!d.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!p&&m&&(d.focus(),m.focus()),p}setFormValue(d){const p=e.get(this);if(H(p,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Es(this),d!=null&&!(d instanceof FormData)){if(p.getAttribute("name")){const m=Os(p,this);m.value=d}}else d!=null&&d instanceof FormData&&Array.from(d).reverse().forEach(([m,_])=>{if(typeof _=="string"){const k=Os(p,this);k.name=m,k.value=_}});c.set(p,d)}setValidity(d,p,m){const _=e.get(this);if(H(_,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!d)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");v.set(this,m);const k=t.get(this),S={};for(const G in d)S[G]=d[G];Object.keys(S).length===0&&Tr(k);const j=Object.assign(Object.assign({},k),S);delete j.valid;const{valid:C}=Ar(k,j,this.form);if(!C&&!p)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");a.set(this,C?"":p),_.isConnected?(_.toggleAttribute("internals-invalid",!C),_.toggleAttribute("internals-valid",C),P(_,"aria-invalid",`${!C}`)):L.set(_,this)}get shadowRoot(){const d=e.get(this),p=g.get(d);return p||null}get validationMessage(){const d=e.get(this);return H(d,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get validity(){const d=e.get(this);return H(d,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),t.get(this)}get willValidate(){const d=e.get(this);return H(d,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(d.disabled||d.hasAttribute("disabled")||d.hasAttribute("readonly"))}}function Ir(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class h extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const d=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(d,h);const p=new h;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(m=>m in p.internals)}let zs=!1,Rs=!1;function Ft(h){Rs||(Rs=!0,window.CustomStateSet=qt,h&&(HTMLElement.prototype.attachInternals=function(...d){const p=h.call(this,d);return p.states=new qt(this),p}))}function Ns(h=!0){if(!zs){if(zs=!0,typeof window<"u"&&(window.ElementInternals=Ds),typeof CustomElementRegistry<"u"){const d=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(p,m,_){if(m.formAssociated){const k=m.prototype.connectedCallback;m.prototype.connectedCallback=function(){w.has(this)||(w.set(this,!0),this.hasAttribute("disabled")&&Rt(this,!0)),k!=null&&k.apply(this),Ps(this)}}d.call(this,p,m,_)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(s.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Ds(this)}),typeof Element<"u"){let d=function(...m){const _=p.apply(this,m);if(g.set(this,_),Ye()){const k=new MutationObserver(T);window.ShadyDOM?k.observe(this,ee):k.observe(_,ee),r.set(this,k)}return _};const p=Element.prototype.attachShadow;Element.prototype.attachShadow=d}Ye()&&typeof document<"u"&&new MutationObserver(T).observe(document.documentElement,ee),typeof HTMLFormElement<"u"&&Lr(),(h||typeof window<"u"&&!window.CustomStateSet)&&Ft()}}return!!customElements.polyfillWrapFlushCallback||(Ir()?typeof window<"u"&&!window.CustomStateSet&&Ft(HTMLElement.prototype.attachInternals):Ns(!1)),o.forceCustomStateSetPolyfill=Ft,o.forceElementInternalsPolyfill=Ns,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})();class R extends oe{static get properties(){return{RTL:{type:Boolean},locale:{type:String},apiRoot:{type:String,reflect:!1},postType:{type:String,reflect:!1},postID:{type:String,reflect:!1}}}get _focusTarget(){return this.shadowRoot.children[0]instanceof Element?this.shadowRoot.children[0]:null}constructor(){super(),wo(this),this.addEventListener("click",this._proxyClick.bind(this)),this.addEventListener("focus",this._proxyFocus.bind(this))}connectedCallback(){super.connectedCallback(),this.apiRoot=this.apiRoot?`${this.apiRoot}/`.replace("//","/"):"/",this.api=new mt(this.nonce,this.apiRoot)}willUpdate(e){if(this.RTL===void 0){const t=this.closest("[dir]");if(t){const i=t.getAttribute("dir");i&&(this.RTL=i.toLowerCase()==="rtl")}}if(!this.locale){const t=this.closest("[lang]");if(t){const i=t.getAttribute("lang");i&&(this.locale=i)}}if(!this.locale){const t=this.getRootNode();if(t instanceof ShadowRoot&&t.host){const i=t.host;i.locale&&(this.locale=i.locale)}}if(e&&e.has("locale")&&this.locale)try{Mo(this.locale)}catch(t){console.error(t)}}_proxyClick(){this.clicked=!0}_proxyFocus(){if(this._focusTarget){if(this.clicked){this.clicked=!1;return}this._focusTarget.focus()}}focus(){this._proxyFocus()}}class yi extends R{static get formAssociated(){return!0}static get styles(){return x` + */function bt(o){window.dispatchEvent(new CustomEvent(ft,{detail:o}))}let De="",gt,vi,Re,mt,yi,ne=new bi;ne.resolve();let Ne=0;const Co=o=>(wo((e,t)=>Ao(yi,e,t)),De=vi=o.sourceLocale,Re=new Set(o.targetLocales),Re.add(o.sourceLocale),mt=o.loadLocale,{getLocale:Lo,setLocale:Io}),Lo=()=>De,Io=o=>{if(o===(gt??De))return ne.promise;if(!Re||!mt)throw new Error("Internal error");if(!Re.has(o))throw new Error("Invalid locale code");Ne++;const e=Ne;return gt=o,ne.settled&&(ne=new bi),bt({status:"loading",loadingLocale:o}),(o===vi?Promise.resolve({templates:void 0}):mt(o)).then(i=>{Ne===e&&(De=o,gt=void 0,yi=i.templates,bt({status:"ready",readyLocale:o}),ne.resolve())},i=>{Ne===e&&(bt({status:"error",errorLocale:o,errorMessage:i.toString()}),ne.reject(i))}),ne.promise},Po=(o,e,t)=>{const i=o[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},Mo="en",jo=["am_ET","ar","ar_MA","bg_BG","bn_BD","bs_BA","cs","de_DE","el","en_US","es_419","es_ES","fa_IR","fr_FR","hi_IN","hr","hu_HU","id_ID","it_IT","ja","ko_KR","mk_MK","mr","my_MM","ne_NP","nl_NL","pa_IN","pl","pt_BR","ro_RO","ru_RU","sl_SI","sr_BA","sw","th","tl","tr_TR","uk","vi","zh_CN","zh_TW"],{setLocale:zo}=Co({sourceLocale:Mo,targetLocales:jo,loadLocale:o=>Po(Object.assign({"./generated/am_ET.js":()=>Promise.resolve().then(()=>Ha),"./generated/ar.js":()=>Promise.resolve().then(()=>Wa),"./generated/ar_MA.js":()=>Promise.resolve().then(()=>Za),"./generated/bg_BG.js":()=>Promise.resolve().then(()=>Qa),"./generated/bn_BD.js":()=>Promise.resolve().then(()=>Ya),"./generated/bs_BA.js":()=>Promise.resolve().then(()=>tn),"./generated/cs.js":()=>Promise.resolve().then(()=>on),"./generated/de_DE.js":()=>Promise.resolve().then(()=>nn),"./generated/el.js":()=>Promise.resolve().then(()=>ln),"./generated/en_US.js":()=>Promise.resolve().then(()=>cn),"./generated/es-419.js":()=>Promise.resolve().then(()=>hn),"./generated/es_419.js":()=>Promise.resolve().then(()=>fn),"./generated/es_ES.js":()=>Promise.resolve().then(()=>gn),"./generated/fa_IR.js":()=>Promise.resolve().then(()=>vn),"./generated/fr_FR.js":()=>Promise.resolve().then(()=>wn),"./generated/hi_IN.js":()=>Promise.resolve().then(()=>$n),"./generated/hr.js":()=>Promise.resolve().then(()=>kn),"./generated/hu_HU.js":()=>Promise.resolve().then(()=>En),"./generated/id_ID.js":()=>Promise.resolve().then(()=>An),"./generated/it_IT.js":()=>Promise.resolve().then(()=>Cn),"./generated/ja.js":()=>Promise.resolve().then(()=>In),"./generated/ko_KR.js":()=>Promise.resolve().then(()=>Mn),"./generated/mk_MK.js":()=>Promise.resolve().then(()=>zn),"./generated/mr.js":()=>Promise.resolve().then(()=>Dn),"./generated/my_MM.js":()=>Promise.resolve().then(()=>Nn),"./generated/ne_NP.js":()=>Promise.resolve().then(()=>Un),"./generated/nl_NL.js":()=>Promise.resolve().then(()=>Bn),"./generated/pa_IN.js":()=>Promise.resolve().then(()=>Kn),"./generated/pl.js":()=>Promise.resolve().then(()=>Gn),"./generated/pt_BR.js":()=>Promise.resolve().then(()=>Jn),"./generated/ro_RO.js":()=>Promise.resolve().then(()=>Xn),"./generated/ru_RU.js":()=>Promise.resolve().then(()=>er),"./generated/sl_SI.js":()=>Promise.resolve().then(()=>ir),"./generated/sr_BA.js":()=>Promise.resolve().then(()=>or),"./generated/sw.js":()=>Promise.resolve().then(()=>nr),"./generated/th.js":()=>Promise.resolve().then(()=>lr),"./generated/tl.js":()=>Promise.resolve().then(()=>cr),"./generated/tr_TR.js":()=>Promise.resolve().then(()=>hr),"./generated/uk.js":()=>Promise.resolve().then(()=>fr),"./generated/vi.js":()=>Promise.resolve().then(()=>gr),"./generated/zh_CN.js":()=>Promise.resolve().then(()=>vr),"./generated/zh_TW.js":()=>Promise.resolve().then(()=>wr)}),`./generated/${o}.js`,3)});class vt{constructor(e,t="/wp-json"){this.nonce=e;let i=t;i.match("^http")&&(i=i.replace(/^http[s]?:\/\/.*?\//,"")),i=`/${i}/`.replace(/\/\//g,"/"),this.apiRoot=i}async makeRequest(e,t,i,s="dt/v1/"){let a=s;!a.endsWith("/")&&!t.startsWith("/")&&(a+="/");const n=t.startsWith("http")?t:`${this.apiRoot}${a}${t}`,r={method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce}};e!=="GET"&&(r.body=JSON.stringify(i));const l=await fetch(n,r),d=await l.json();if(!l.ok){const h=new Error((d==null?void 0:d.message)||d.toString());throw h.args={status:l.status,statusText:l.statusText,body:d},h}return d}async makeRequestOnPosts(e,t,i={}){return this.makeRequest(e,t,i,"dt-posts/v2/")}async getPost(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}`)}async createPost(e,t){return this.makeRequestOnPosts("POST",e,t)}async fetchPostsList(e,t){return this.makeRequestOnPosts("POST",`${e}/list`,t)}async updatePost(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}`,i)}async deletePost(e,t){return this.makeRequestOnPosts("DELETE",`${e}/${t}`)}async listPostsCompact(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequestOnPosts("GET",`${e}/compact?${i}`)}async getPostDuplicates(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/all_duplicates`,i)}async checkFieldValueExists(e,t){return this.makeRequestOnPosts("POST",`${e}/check_field_value_exists`,t)}async getMultiSelectValues(e,t,i=""){const s=new URLSearchParams({s:i,field:t});return this.makeRequestOnPosts("GET",`${e}/multi-select-values?${s}`)}async getLocations(e,t,i,s=""){const a=new URLSearchParams({s,field:t,filter:i});return this.makeRequest("GET",`mapping_module/search_location_grid_by_name?${a}`)}async transferContact(e,t){return this.makeRequestOnPosts("POST","contacts/transfer",{contact_id:e,site_post_id:t})}async transferContactSummaryUpdate(e,t){return this.makeRequestOnPosts("POST","contacts/transfer/summary/send-update",{contact_id:e,update:t})}async requestRecordAccess(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/request_record_access`,{user_id:i})}async createComment(e,t,i,s="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments`,{comment:i,comment_type:s})}async updateComment(e,t,i,s,a="comment"){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}`,{comment:s,comment_type:a})}async deleteComment(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/comments/${i}`)}async getComments(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/comments`)}async toggle_comment_reaction(e,t,i,s,a){return this.makeRequestOnPosts("POST",`${e}/${t}/comments/${i}/react`,{user_id:s,reaction:a})}async getPostActivity(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/activity`)}async getSingleActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/activity/${i}`)}async revertActivity(e,t,i){return this.makeRequestOnPosts("GET",`${e}/${t}/revert/${i}`)}async getPostShares(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/shares`)}async addPostShare(e,t,i){return this.makeRequestOnPosts("POST",`${e}/${t}/shares`,{user_id:i})}async removePostShare(e,t,i){return this.makeRequestOnPosts("DELETE",`${e}/${t}/shares`,{user_id:i})}async getFilters(){return this.makeRequest("GET","users/get_filters")}async saveFilters(e,t){return this.makeRequest("POST","users/save_filters",{filter:t,postType:e})}async deleteFilter(e,t){return this.makeRequest("DELETE","users/save_filters",{id:t,postType:e})}async searchUsers(e,t=""){const i=new URLSearchParams({s:t});return this.makeRequest("GET",`users/get_users?${i}&post_type=${e}`)}async checkDuplicateUsers(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/duplicates`)}async getContactInfo(e,t){return this.makeRequestOnPosts("GET",`${e}/${t}/`)}async createUser(e){return this.makeRequest("POST","users/create",e)}async advanced_search(e,t,i,s){return this.makeRequest("GET","advanced_search",{query:e,postType:t,offset:i,post:s.post,comment:s.comment,meta:s.meta,status:s.status},"dt-posts/v2/posts/search/")}async uploadFiles(e,t,i,s,a=""){const n=new FormData;i.forEach(h=>n.append("storage_upload_files[]",h)),n.append("meta_key",s),n.append("key_prefix",a),n.append("upload_type","post"),n.append("is_multi_file","true"),n.append("storage_s3_url_duration","+7 days");const r=`${this.apiRoot}dt-posts/v2/${e}/${t}/storage_upload`,l=await fetch(r,{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":this.nonce},body:n}),d=await l.json();if(!l.ok){const h=new Error((d==null?void 0:d.uploaded_msg)||(d==null?void 0:d.message)||"Upload failed");throw h.args={status:l.status,statusText:l.statusText,body:d},h}return d}async deleteFile(e,t,i,s){return this.makeRequestOnPosts("POST",`${e}/${t}/storage_delete_single`,{meta_key:i,file_key:s})}async renameFile(e,t,i,s,a){return this.makeRequestOnPosts("POST",`${e}/${t}/storage_rename_single`,{meta_key:i,file_key:s,new_name:a})}async downloadFile(e,t,i,s){const a=`${this.apiRoot}dt-posts/v2/${e}/${t}/storage_download`,n=await fetch(a,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":this.nonce},body:JSON.stringify({meta_key:i,file_key:s})});if(!n.ok){const r=await n.json().catch(()=>({message:"Download failed"}));throw new Error(r.message||"Download failed")}return await n.blob()}}(function(){(function(o){const e=new WeakMap,t=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,n=new WeakMap,r=new WeakMap,l=new WeakMap,d=new WeakMap,h=new WeakMap,g=new WeakMap,m=new WeakMap,y=new WeakMap,w=new WeakMap,L=new WeakMap,R={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},j=(f,c)=>{for(let b in R){c[b]=null;let v=null;const _=R[b];Object.defineProperty(c,b,{get(){return v},set(k){v=k,f.isConnected?P(f,_,k):h.set(f,c)}})}};function I(f){const c=s.get(f),{form:b}=c;Ps(f,b,c),Is(f,c.labels)}const Ie=(f,c=!1)=>{const b=document.createTreeWalker(f,NodeFilter.SHOW_ELEMENT,{acceptNode(k){return s.has(k)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let v=b.nextNode();const _=!c||f.disabled;for(;v;)v.formDisabledCallback&&_&&Rt(v,f.disabled),v=b.nextNode()},Qe={attributes:!0,attributeFilter:["disabled","name"]},ee=et()?new MutationObserver(f=>{for(const c of f){const b=c.target;if(c.attributeName==="disabled"&&(b.constructor.formAssociated?Rt(b,b.hasAttribute("disabled")):b.localName==="fieldset"&&Ie(b)),c.attributeName==="name"&&b.constructor.formAssociated){const v=s.get(b),_=d.get(b);v.setFormValue(_)}}}):{};function E(f){f.forEach(c=>{const{addedNodes:b,removedNodes:v}=c,_=Array.from(b),k=Array.from(v);_.forEach(S=>{var z;if(s.has(S)&&S.constructor.formAssociated&&I(S),h.has(S)){const C=h.get(S);Object.keys(R).filter(U=>C[U]!==null).forEach(U=>{P(S,R[U],C[U])}),h.delete(S)}if(L.has(S)){const C=L.get(S);P(S,"internals-valid",C.validity.valid.toString()),P(S,"internals-invalid",(!C.validity.valid).toString()),P(S,"aria-invalid",(!C.validity.valid).toString()),L.delete(S)}if(S.localName==="form"){const C=l.get(S),K=document.createTreeWalker(S,NodeFilter.SHOW_ELEMENT,{acceptNode(Vt){return s.has(Vt)&&Vt.constructor.formAssociated&&!(C&&C.has(Vt))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let U=K.nextNode();for(;U;)I(U),U=K.nextNode()}S.localName==="fieldset"&&((z=ee.observe)===null||z===void 0||z.call(ee,S,Qe),Ie(S,!0))}),k.forEach(S=>{const z=s.get(S);z&&i.get(z)&&Cs(z),r.has(S)&&r.get(S).disconnect()})})}function F(f){f.forEach(c=>{const{removedNodes:b}=c;b.forEach(v=>{const _=y.get(c.target);s.has(v)&&js(v),_.disconnect()})})}const ce=f=>{var c,b;const v=new MutationObserver(F);!((c=window==null?void 0:window.ShadyDOM)===null||c===void 0)&&c.inUse&&f.mode&&f.host&&(f=f.host),(b=v.observe)===null||b===void 0||b.call(v,f,{childList:!0}),y.set(f,v)};et()&&new MutationObserver(E);const te={childList:!0,subtree:!0},P=(f,c,b)=>{f.getAttribute(c)!==b&&f.setAttribute(c,b)},Rt=(f,c)=>{f.toggleAttribute("internals-disabled",c),c?P(f,"aria-disabled","true"):f.removeAttribute("aria-disabled"),f.formDisabledCallback&&f.formDisabledCallback.apply(f,[c])},Cs=f=>{i.get(f).forEach(b=>{b.remove()}),i.set(f,[])},Ls=(f,c)=>{const b=document.createElement("input");return b.type="hidden",b.name=f.getAttribute("name"),f.after(b),i.get(c).push(b),b},_r=(f,c)=>{var b;i.set(c,[]),(b=ee.observe)===null||b===void 0||b.call(ee,f,Qe)},Is=(f,c)=>{if(c.length){Array.from(c).forEach(v=>v.addEventListener("click",f.click.bind(f)));let b=c[0].id;c[0].id||(b=`${c[0].htmlFor}_Label`,c[0].id=b),P(f,"aria-labelledby",b)}},Xe=f=>{const c=Array.from(f.elements).filter(k=>!k.tagName.includes("-")&&k.validity).map(k=>k.validity.valid),b=l.get(f)||[],v=Array.from(b).filter(k=>k.isConnected).map(k=>s.get(k).validity.valid),_=[...c,...v].includes(!1);f.toggleAttribute("internals-invalid",_),f.toggleAttribute("internals-valid",!_)},$r=f=>{Xe(Ye(f.target))},xr=f=>{Xe(Ye(f.target))},kr=f=>{const c=["button[type=submit]","input[type=submit]","button:not([type])"].map(b=>`${b}:not([disabled])`).map(b=>`${b}:not([form])${f.id?`,${b}[form='${f.id}']`:""}`).join(",");f.addEventListener("click",b=>{if(b.target.closest(c)){const _=l.get(f);if(f.noValidate)return;_.size&&Array.from(_).reverse().map(z=>s.get(z).reportValidity()).includes(!1)&&b.preventDefault()}})},Sr=f=>{const c=l.get(f.target);c&&c.size&&c.forEach(b=>{b.constructor.formAssociated&&b.formResetCallback&&b.formResetCallback.apply(b)})},Ps=(f,c,b)=>{if(c){const v=l.get(c);if(v)v.add(f);else{const _=new Set;_.add(f),l.set(c,_),kr(c),c.addEventListener("reset",Sr),c.addEventListener("input",$r),c.addEventListener("change",xr)}n.set(c,{ref:f,internals:b}),f.constructor.formAssociated&&f.formAssociatedCallback&&setTimeout(()=>{f.formAssociatedCallback.apply(f,[c])},0),Xe(c)}},Ye=f=>{let c=f.parentNode;return c&&c.tagName!=="FORM"&&(c=Ye(c)),c},H=(f,c,b=DOMException)=>{if(!f.constructor.formAssociated)throw new b(c)},Ms=(f,c,b)=>{const v=l.get(f);return v&&v.size&&v.forEach(_=>{s.get(_)[b]()||(c=!1)}),c},js=f=>{if(f.constructor.formAssociated){const c=s.get(f),{labels:b,form:v}=c;Is(f,b),Ps(f,v,c)}};function et(){return typeof MutationObserver<"u"}class Er{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Tr=f=>(f.badInput=!1,f.customError=!1,f.patternMismatch=!1,f.rangeOverflow=!1,f.rangeUnderflow=!1,f.stepMismatch=!1,f.tooLong=!1,f.tooShort=!1,f.typeMismatch=!1,f.valid=!0,f.valueMissing=!1,f),Ar=(f,c,b)=>(f.valid=Or(c),Object.keys(c).forEach(v=>f[v]=c[v]),b&&Xe(b),f),Or=f=>{let c=!0;for(let b in f)b!=="valid"&&f[b]!==!1&&(c=!1);return c},Nt=new WeakMap;function zs(f,c){f.toggleAttribute(c,!0),f.part&&f.part.add(c)}class qt extends Set{static get isPolyfilled(){return!0}constructor(c){if(super(),!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Nt.set(this,c)}add(c){if(!/^--/.test(c)||typeof c!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${c} must start with '--'.`);const b=super.add(c),v=Nt.get(this),_=`state${c}`;return v.isConnected?zs(v,_):setTimeout(()=>{zs(v,_)}),b}clear(){for(let[c]of this.entries())this.delete(c);super.clear()}delete(c){const b=super.delete(c),v=Nt.get(this);return v.isConnected?(v.toggleAttribute(`state${c}`,!1),v.part&&v.part.remove(`state${c}`)):setTimeout(()=>{v.toggleAttribute(`state${c}`,!1),v.part&&v.part.remove(`state${c}`)}),b}}function Fs(f,c,b,v){if(typeof c=="function"?f!==c||!0:!c.has(f))throw new TypeError("Cannot read private member from an object whose class did not declare it");return b==="m"?v:b==="a"?v.call(f):v?v.value:c.get(f)}function Cr(f,c,b,v,_){if(typeof c=="function"?f!==c||!0:!c.has(f))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c.set(f,b),b}var Pe;class Lr{constructor(c){Pe.set(this,void 0),Cr(this,Pe,c);for(let b=0;bK.compareDocumentPosition?K.compareDocumentPosition(U)&2?1:-1:0);return new Lr(C)}})}class Ds{static get isPolyfilled(){return!0}constructor(c){if(!c||!c.tagName||c.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const b=c.getRootNode(),v=new Er;this.states=new qt(c),e.set(this,c),t.set(this,v),s.set(c,this),j(c,this),_r(c,this),Object.seal(this),b instanceof DocumentFragment&&ce(b)}checkValidity(){const c=e.get(this);if(H(c,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const b=t.get(this);if(!b.valid){const v=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});c.dispatchEvent(v)}return b.valid}get form(){const c=e.get(this);H(c,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let b;return c.constructor.formAssociated===!0&&(b=Ye(c)),b}get labels(){const c=e.get(this);H(c,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const b=c.getAttribute("id"),v=c.getRootNode();return v&&b?v.querySelectorAll(`[for="${b}"]`):[]}reportValidity(){const c=e.get(this);if(H(c,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const b=this.checkValidity(),v=m.get(this);if(v&&!c.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!b&&v&&(c.focus(),v.focus()),b}setFormValue(c){const b=e.get(this);if(H(b,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Cs(this),c!=null&&!(c instanceof FormData)){if(b.getAttribute("name")){const v=Ls(b,this);v.value=c}}else c!=null&&c instanceof FormData&&Array.from(c).reverse().forEach(([v,_])=>{if(typeof _=="string"){const k=Ls(b,this);k.name=v,k.value=_}});d.set(b,c)}setValidity(c,b,v){const _=e.get(this);if(H(_,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!c)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");m.set(this,v);const k=t.get(this),S={};for(const K in c)S[K]=c[K];Object.keys(S).length===0&&Tr(k);const z=Object.assign(Object.assign({},k),S);delete z.valid;const{valid:C}=Ar(k,z,this.form);if(!C&&!b)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");a.set(this,C?"":b),_.isConnected?(_.toggleAttribute("internals-invalid",!C),_.toggleAttribute("internals-valid",C),P(_,"aria-invalid",`${!C}`)):L.set(_,this)}get shadowRoot(){const c=e.get(this),b=g.get(c);return b||null}get validationMessage(){const c=e.get(this);return H(c,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get validity(){const c=e.get(this);return H(c,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),t.get(this)}get willValidate(){const c=e.get(this);return H(c,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(c.disabled||c.hasAttribute("disabled")||c.hasAttribute("readonly"))}}function Pr(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class f extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const c=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(c,f);const b=new f;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(v=>v in b.internals)}let Rs=!1,Ns=!1;function Ut(f){Ns||(Ns=!0,window.CustomStateSet=qt,f&&(HTMLElement.prototype.attachInternals=function(...c){const b=f.call(this,c);return b.states=new qt(this),b}))}function qs(f=!0){if(!Rs){if(Rs=!0,typeof window<"u"&&(window.ElementInternals=Ds),typeof CustomElementRegistry<"u"){const c=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(b,v,_){if(v.formAssociated){const k=v.prototype.connectedCallback;v.prototype.connectedCallback=function(){w.has(this)||(w.set(this,!0),this.hasAttribute("disabled")&&Rt(this,!0)),k!=null&&k.apply(this),js(this)}}c.call(this,b,v,_)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(s.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Ds(this)}),typeof Element<"u"){let c=function(...v){const _=b.apply(this,v);if(g.set(this,_),et()){const k=new MutationObserver(E);window.ShadyDOM?k.observe(this,te):k.observe(_,te),r.set(this,k)}return _};const b=Element.prototype.attachShadow;Element.prototype.attachShadow=c}et()&&typeof document<"u"&&new MutationObserver(E).observe(document.documentElement,te),typeof HTMLFormElement<"u"&&Ir(),(f||typeof window<"u"&&!window.CustomStateSet)&&Ut()}}return!!customElements.polyfillWrapFlushCallback||(Pr()?typeof window<"u"&&!window.CustomStateSet&&Ut(HTMLElement.prototype.attachInternals):qs(!1)),o.forceCustomStateSetPolyfill=Ut,o.forceElementInternalsPolyfill=qs,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})();class D extends ae{static get properties(){return{RTL:{type:Boolean},locale:{type:String},apiRoot:{type:String,reflect:!1},postType:{type:String,reflect:!1},postID:{type:String,reflect:!1}}}get _focusTarget(){return this.shadowRoot.children[0]instanceof Element?this.shadowRoot.children[0]:null}constructor(){super(),$o(this),this.addEventListener("click",this._proxyClick.bind(this)),this.addEventListener("focus",this._proxyFocus.bind(this))}connectedCallback(){super.connectedCallback(),this.apiRoot=this.apiRoot?`${this.apiRoot}/`.replace("//","/"):"/",this.api=new vt(this.nonce,this.apiRoot)}willUpdate(e){if(this.RTL===void 0){const t=this.closest("[dir]");if(t){const i=t.getAttribute("dir");i&&(this.RTL=i.toLowerCase()==="rtl")}}if(!this.locale){const t=this.closest("[lang]");if(t){const i=t.getAttribute("lang");i&&(this.locale=i)}}if(!this.locale){const t=this.getRootNode();if(t instanceof ShadowRoot&&t.host){const i=t.host;i.locale&&(this.locale=i.locale)}}if(e&&e.has("locale")&&this.locale)try{zo(this.locale)}catch(t){console.error(t)}}_proxyClick(){this.clicked=!0}_proxyFocus(){if(this._focusTarget){if(this.clicked){this.clicked=!1;return}this._focusTarget.focus()}}focus(){this._proxyFocus()}}class wi extends D{static get formAssociated(){return!0}static get styles(){return x` :host { display: inline-flex; width: fit-content; @@ -205,10 +205,10 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr cursor: not-allowed; } } - `}static get properties(){return{label:{type:String},context:{type:String},type:{type:String},title:{type:String},outline:{type:Boolean},round:{type:Boolean},disabled:{type:Boolean}}}get classes(){const e={"dt-button":!0,"dt-button--outline":this.outline,"dt-button--round":this.round},t=`dt-button--${this.context}`;return e[t]=!0,e}get _field(){return this.shadowRoot.querySelector("button")}get _focusTarget(){return this._field}constructor(){super(),this.context="default",this.internals=this.attachInternals()}handleClick(e){e.preventDefault(),this.type==="submit"&&this.internals.form&&this.internals.form.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}render(){const e={...this.classes};return f` + `}static get properties(){return{label:{type:String},context:{type:String},type:{type:String},title:{type:String},outline:{type:Boolean},round:{type:Boolean},disabled:{type:Boolean}}}get classes(){const e={"dt-button":!0,"dt-button--outline":this.outline,"dt-button--round":this.round},t=`dt-button--${this.context}`;return e[t]=!0,e}get _field(){return this.shadowRoot.querySelector("button")}get _focusTarget(){return this._field}constructor(){super(),this.context="default",this.internals=this.attachInternals()}handleClick(e){e.preventDefault(),this.type==="submit"&&this.internals.form&&this.internals.form.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}render(){const e={...this.classes};return u` - `}}window.customElements.define("dt-button",yi);/** + `}}window.customElements.define("dt-button",wi);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const wi="important",jo=" !"+wi,Q=ut(class extends ht{constructor(o){var e;if(super(o),o.type!==ct.ATTRIBUTE||o.name!=="style"||((e=o.strings)==null?void 0:e.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((e,t)=>{const i=o[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[e]){const{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(const i in e){const s=e[i];if(s!=null){this.ft.add(i);const a=typeof s=="string"&&s.endsWith(jo);i.includes("-")||a?t.setProperty(i,a?s.slice(0,-11):s,a?wi:""):t[i]=s}}return U}});class _i extends R{static get styles(){return x` + */const _i="important",Fo=" !"+_i,Q=ht(class extends pt{constructor(o){var e;if(super(o),o.type!==ut.ATTRIBUTE||o.name!=="style"||((e=o.strings)==null?void 0:e.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((e,t)=>{const i=o[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[e]){const{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(const i in e){const s=e[i];if(s!=null){this.ft.add(i);const a=typeof s=="string"&&s.endsWith(Fo);i.includes("-")||a?t.setProperty(i,a?s.slice(0,-11):s,a?_i:""):t[i]=s}}return V}});class $i extends D{static get styles(){return x` :host { font-family: var(--font-family); font-size: var(--dt-label-font-size, 14px); @@ -290,16 +290,16 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr border-inline-start: 0.5rem solid transparent; border-inline-end: 0.5rem solid transparent; } - `}static get properties(){return{icon:{type:String},iconAltText:{type:String},private:{type:Boolean},privateLabel:{type:String}}}firstUpdated(){const e=this.shadowRoot.querySelectorAll("slot");if(e&&e.length)for(const n of e)n.addEventListener("slotchange",r=>{const l=r.target.assignedNodes();let c=!1;l.length&&(l[0].tagName==="SLOT"?c=l[0].assignedNodes().length||l[0].children.length:c=!0),c&&r.target.classList.add("slotted")});const i=this.shadowRoot.querySelector("slot[name=icon-start]").assignedElements({flatten:!0});for(const n of i)n.style.height="100%",n.style.width="auto";const s=this.shadowRoot.querySelector("slot:not([name])"),a=this.shadowRoot.querySelector(".label");if(s&&a){const n=s.assignedNodes().map(r=>{var l;return(l=r.textContent)==null?void 0:l.trim()}).filter(r=>r).join(" ");n&&a.setAttribute("title",n)}}get _slottedChildren(){return this.shadowRoot.querySelector("slot").assignedElements({flatten:!0})}render(){const e=f``;return f` + `}static get properties(){return{icon:{type:String},iconAltText:{type:String},private:{type:Boolean},privateLabel:{type:String}}}firstUpdated(){const e=this.shadowRoot.querySelectorAll("slot");if(e&&e.length)for(const n of e)n.addEventListener("slotchange",r=>{const l=r.target.assignedNodes();let d=!1;l.length&&(l[0].tagName==="SLOT"?d=l[0].assignedNodes().length||l[0].children.length:d=!0),d&&r.target.classList.add("slotted")});const i=this.shadowRoot.querySelector("slot[name=icon-start]").assignedElements({flatten:!0});for(const n of i)n.style.height="100%",n.style.width="auto";const s=this.shadowRoot.querySelector("slot:not([name])"),a=this.shadowRoot.querySelector(".label");if(s&&a){const n=s.assignedNodes().map(r=>{var l;return(l=r.textContent)==null?void 0:l.trim()}).filter(r=>r).join(" ");n&&a.setAttribute("title",n)}}get _slottedChildren(){return this.shadowRoot.querySelector("slot").assignedElements({flatten:!0})}render(){const e=u``;return u`
${this.icon?f`${this.iconAltText}`:null}${this.icon?u`${this.iconAltText}`:null} - ${this.private?f` + ${this.private?u` ${e} ${this.privateLabel||O("Private Field: Only I can see its content")}
- `}}window.customElements.define("dt-label",_i);class Do extends oe{static get styles(){return x` + `}}window.customElements.define("dt-label",$i);class Do extends ae{static get styles(){return x` @keyframes spin { 0% { transform: rotate(0deg); @@ -341,7 +341,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr * * @license MIT * @version 1.0.2 -*/const $i=Object.freeze({left:0,top:0,width:16,height:16}),Ne=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),we=Object.freeze({...$i,...Ne}),vt=Object.freeze({...we,body:"",hidden:!1}),zo=Object.freeze({width:null,height:null}),xi=Object.freeze({...zo,...Ne});function Ro(o,e=0){const t=o.replace(/^-?[0-9.]*/,"");function i(s){for(;s<0;)s+=4;return s%4}if(t===""){const s=parseInt(o);return isNaN(s)?0:i(s)}else if(t!==o){let s=0;switch(t){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(o.slice(0,o.length-t.length));return isNaN(a)?0:(a=a/s,a%1===0?i(a):0)}}return e}const No=/[\s,]+/;function qo(o,e){e.split(No).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0;break}})}const ki={...xi,preserveAspectRatio:""};function Si(o){const e={...ki},t=(i,s)=>o.getAttribute(i)||s;return e.width=t("width",null),e.height=t("height",null),e.rotate=Ro(t("rotate","")),qo(e,t("flip","")),e.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),e}function Fo(o,e){for(const t in ki)if(o[t]!==e[t])return!0;return!1}const _e=/^[a-z0-9]+(-[a-z0-9]+)*$/,$e=(o,e,t,i="")=>{const s=o.split(":");if(o.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const r=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:r};return e&&!qe(c)?null:c}const a=s[0],n=a.split("-");if(n.length>1){const r={provider:i,prefix:n.shift(),name:n.join("-")};return e&&!qe(r)?null:r}if(t&&i===""){const r={provider:i,prefix:"",name:a};return e&&!qe(r,t)?null:r}return null},qe=(o,e)=>o?!!((o.provider===""||o.provider.match(_e))&&(e&&o.prefix===""||o.prefix.match(_e))&&o.name.match(_e)):!1;function Uo(o,e){const t={};!o.hFlip!=!e.hFlip&&(t.hFlip=!0),!o.vFlip!=!e.vFlip&&(t.vFlip=!0);const i=((o.rotate||0)+(e.rotate||0))%4;return i&&(t.rotate=i),t}function Ti(o,e){const t=Uo(o,e);for(const i in vt)i in Ne?i in o&&!(i in t)&&(t[i]=Ne[i]):i in e?t[i]=e[i]:i in o&&(t[i]=o[i]);return t}function Vo(o,e){const t=o.icons,i=o.aliases||Object.create(null),s=Object.create(null);function a(n){if(t[n])return s[n]=[];if(!(n in s)){s[n]=null;const r=i[n]&&i[n].parent,l=r&&a(r);l&&(s[n]=[r].concat(l))}return s[n]}return Object.keys(t).concat(Object.keys(i)).forEach(a),s}function Bo(o,e,t){const i=o.icons,s=o.aliases||Object.create(null);let a={};function n(r){a=Ti(i[r]||s[r],a)}return n(e),t.forEach(n),Ti(o,a)}function Ai(o,e){const t=[];if(typeof o!="object"||typeof o.icons!="object")return t;o.not_found instanceof Array&&o.not_found.forEach(s=>{e(s,null),t.push(s)});const i=Vo(o);for(const s in i){const a=i[s];a&&(e(s,Bo(o,s,a)),t.push(s))}return t}const Ho={provider:"",aliases:{},not_found:{},...$i};function yt(o,e){for(const t in e)if(t in o&&typeof o[t]!=typeof e[t])return!1;return!0}function Ei(o){if(typeof o!="object"||o===null)return null;const e=o;if(typeof e.prefix!="string"||!o.icons||typeof o.icons!="object"||!yt(o,Ho))return null;const t=e.icons;for(const s in t){const a=t[s];if(!s.match(_e)||typeof a.body!="string"||!yt(a,vt))return null}const i=e.aliases||Object.create(null);for(const s in i){const a=i[s],n=a.parent;if(!s.match(_e)||typeof n!="string"||!t[n]&&!i[n]||!yt(a,vt))return null}return e}const Fe=Object.create(null);function Go(o,e){return{provider:o,prefix:e,icons:Object.create(null),missing:new Set}}function Y(o,e){const t=Fe[o]||(Fe[o]=Object.create(null));return t[e]||(t[e]=Go(o,e))}function wt(o,e){return Ei(e)?Ai(e,(t,i)=>{i?o.icons[t]=i:o.missing.add(t)}):[]}function Wo(o,e,t){try{if(typeof t.body=="string")return o.icons[e]={...t},!0}catch{}return!1}function Ko(o,e){let t=[];return(typeof o=="string"?[o]:Object.keys(Fe)).forEach(s=>{(typeof s=="string"&&typeof e=="string"?[e]:Object.keys(Fe[s]||{})).forEach(n=>{const r=Y(s,n);t=t.concat(Object.keys(r.icons).map(l=>(s!==""?"@"+s+":":"")+n+":"+l))})}),t}let xe=!1;function Oi(o){return typeof o=="boolean"&&(xe=o),xe}function ke(o){const e=typeof o=="string"?$e(o,!0,xe):o;if(e){const t=Y(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function Ci(o,e){const t=$e(o,!0,xe);if(!t)return!1;const i=Y(t.provider,t.prefix);return Wo(i,t.name,e)}function Li(o,e){if(typeof o!="object")return!1;if(typeof e!="string"&&(e=o.provider||""),xe&&!e&&!o.prefix){let s=!1;return Ei(o)&&(o.prefix="",Ai(o,(a,n)=>{n&&Ci(a,n)&&(s=!0)})),s}const t=o.prefix;if(!qe({provider:e,prefix:t,name:"a"}))return!1;const i=Y(e,t);return!!wt(i,o)}function Zo(o){return!!ke(o)}function Jo(o){const e=ke(o);return e?{...we,...e}:null}function Qo(o){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);o.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let i={provider:"",prefix:"",name:""};return o.forEach(s=>{if(i.name===s.name&&i.prefix===s.prefix&&i.provider===s.provider)return;i=s;const a=s.provider,n=s.prefix,r=s.name,l=t[a]||(t[a]=Object.create(null)),c=l[n]||(l[n]=Y(a,n));let b;r in c.icons?b=e.loaded:n===""||c.missing.has(r)?b=e.missing:b=e.pending;const g={provider:a,prefix:n,name:r};b.push(g)}),e}function Ii(o,e){o.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(s=>s.id!==e))})}function Yo(o){o.pendingCallbacksFlag||(o.pendingCallbacksFlag=!0,setTimeout(()=>{o.pendingCallbacksFlag=!1;const e=o.loaderCallbacks?o.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const i=o.provider,s=o.prefix;e.forEach(a=>{const n=a.icons,r=n.pending.length;n.pending=n.pending.filter(l=>{if(l.prefix!==s)return!0;const c=l.name;if(o.icons[c])n.loaded.push({provider:i,prefix:s,name:c});else if(o.missing.has(c))n.missing.push({provider:i,prefix:s,name:c});else return t=!0,!0;return!1}),n.pending.length!==r&&(t||Ii([o],a.id),a.callback(n.loaded.slice(0),n.missing.slice(0),n.pending.slice(0),a.abort))})}))}let Xo=0;function ea(o,e,t){const i=Xo++,s=Ii.bind(null,t,i);if(!e.pending.length)return s;const a={id:i,icons:e,callback:o,abort:s};return t.forEach(n=>{(n.loaderCallbacks||(n.loaderCallbacks=[])).push(a)}),s}const _t=Object.create(null);function Pi(o,e){_t[o]=e}function $t(o){return _t[o]||_t[""]}function ta(o,e=!0,t=!1){const i=[];return o.forEach(s=>{const a=typeof s=="string"?$e(s,e,t):s;a&&i.push(a)}),i}var ia={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sa(o,e,t,i){const s=o.resources.length,a=o.random?Math.floor(Math.random()*s):o.index;let n;if(o.random){let T=o.resources.slice(0);for(n=[];T.length>1;){const z=Math.floor(Math.random()*T.length);n.push(T[z]),T=T.slice(0,z).concat(T.slice(z+1))}n=n.concat(T)}else n=o.resources.slice(a).concat(o.resources.slice(0,a));const r=Date.now();let l="pending",c=0,b,g=null,v=[],y=[];typeof i=="function"&&y.push(i);function w(){g&&(clearTimeout(g),g=null)}function L(){l==="pending"&&(l="aborted"),w(),v.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),v=[]}function N(T,z){z&&(y=[]),typeof T=="function"&&y.push(T)}function M(){return{startTime:r,payload:e,status:l,queriesSent:c,queriesPending:v.length,subscribe:N,abort:L}}function I(){l="failed",y.forEach(T=>{T(void 0,b)})}function Le(){v.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),v=[]}function Ze(T,z,le){const ee=z!=="success";switch(v=v.filter(P=>P!==T),l){case"pending":break;case"failed":if(ee||!o.dataAfterTimeout)return;break;default:return}if(z==="abort"){b=le,I();return}if(ee){b=le,v.length||(n.length?X():I());return}if(w(),Le(),!o.random){const P=o.resources.indexOf(T.resource);P!==-1&&P!==o.index&&(o.index=P)}l="completed",y.forEach(P=>{P(le)})}function X(){if(l!=="pending")return;w();const T=n.shift();if(T===void 0){if(v.length){g=setTimeout(()=>{w(),l==="pending"&&(Le(),I())},o.timeout);return}I();return}const z={status:"pending",resource:T,callback:(le,ee)=>{Ze(z,le,ee)}};v.push(z),c++,g=setTimeout(X,o.rotate),t(T,e,z.callback)}return setTimeout(X),M}function Mi(o){const e={...ia,...o};let t=[];function i(){t=t.filter(r=>r().status==="pending")}function s(r,l,c){const b=sa(e,r,l,(g,v)=>{i(),c&&c(g,v)});return t.push(b),b}function a(r){return t.find(l=>r(l))||null}return{query:s,find:a,setIndex:r=>{e.index=r},getIndex:()=>e.index,cleanup:i}}function xt(o){let e;if(typeof o.resources=="string")e=[o.resources];else if(e=o.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:o.path||"/",maxURL:o.maxURL||500,rotate:o.rotate||750,timeout:o.timeout||5e3,random:o.random===!0,index:o.index||0,dataAfterTimeout:o.dataAfterTimeout!==!1}}const Ue=Object.create(null),Se=["https://api.simplesvg.com","https://api.unisvg.com"],Ve=[];for(;Se.length>0;)Se.length===1||Math.random()>.5?Ve.push(Se.shift()):Ve.push(Se.pop());Ue[""]=xt({resources:["https://api.iconify.design"].concat(Ve)});function ji(o,e){const t=xt(e);return t===null?!1:(Ue[o]=t,!0)}function Be(o){return Ue[o]}function oa(){return Object.keys(Ue)}function Di(){}const kt=Object.create(null);function aa(o){if(!kt[o]){const e=Be(o);if(!e)return;const t=Mi(e),i={config:e,redundancy:t};kt[o]=i}return kt[o]}function zi(o,e,t){let i,s;if(typeof o=="string"){const a=$t(o);if(!a)return t(void 0,424),Di;s=a.send;const n=aa(o);n&&(i=n.redundancy)}else{const a=xt(o);if(a){i=Mi(a);const n=o.resources?o.resources[0]:"",r=$t(n);r&&(s=r.send)}}return!i||!s?(t(void 0,424),Di):i.query(e,s,t)().abort}const Ri="iconify2",Te="iconify",Ni=Te+"-count",qi=Te+"-version",Fi=36e5,na=168;function St(o,e){try{return o.getItem(e)}catch{}}function Tt(o,e,t){try{return o.setItem(e,t),!0}catch{}}function Ui(o,e){try{o.removeItem(e)}catch{}}function At(o,e){return Tt(o,Ni,e.toString())}function Et(o){return parseInt(St(o,Ni))||0}const ne={local:!0,session:!0},Vi={local:new Set,session:new Set};let Ot=!1;function ra(o){Ot=o}let He=typeof window>"u"?{}:window;function Bi(o){const e=o+"Storage";try{if(He&&He[e]&&typeof He[e].length=="number")return He[e]}catch{}ne[o]=!1}function Hi(o,e){const t=Bi(o);if(!t)return;const i=St(t,qi);if(i!==Ri){if(i){const r=Et(t);for(let l=0;l{const l=Te+r.toString(),c=St(t,l);if(typeof c=="string"){try{const b=JSON.parse(c);if(typeof b=="object"&&typeof b.cached=="number"&&b.cached>s&&typeof b.provider=="string"&&typeof b.data=="object"&&typeof b.data.prefix=="string"&&e(b,r))return!0}catch{}Ui(t,l)}};let n=Et(t);for(let r=n-1;r>=0;r--)a(r)||(r===n-1?(n--,At(t,n)):Vi[o].add(r))}function Gi(){if(!Ot){ra(!0);for(const o in ne)Hi(o,e=>{const t=e.data,i=e.provider,s=t.prefix,a=Y(i,s);if(!wt(a,t).length)return!1;const n=t.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,n):n,!0})}}function la(o,e){const t=o.lastModifiedCached;if(t&&t>=e)return t===e;if(o.lastModifiedCached=e,t)for(const i in ne)Hi(i,s=>{const a=s.data;return s.provider!==o.provider||a.prefix!==o.prefix||a.lastModified===e});return!0}function da(o,e){Ot||Gi();function t(i){let s;if(!ne[i]||!(s=Bi(i)))return;const a=Vi[i];let n;if(a.size)a.delete(n=Array.from(a).shift());else if(n=Et(s),!At(s,n+1))return;const r={cached:Math.floor(Date.now()/Fi),provider:o.provider,data:e};return Tt(s,Te+n.toString(),JSON.stringify(r))}e.lastModified&&!la(o,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),t("local")||t("session"))}function Wi(){}function ca(o){o.iconsLoaderFlag||(o.iconsLoaderFlag=!0,setTimeout(()=>{o.iconsLoaderFlag=!1,Yo(o)}))}function ua(o,e){o.iconsToLoad?o.iconsToLoad=o.iconsToLoad.concat(e).sort():o.iconsToLoad=e,o.iconsQueueFlag||(o.iconsQueueFlag=!0,setTimeout(()=>{o.iconsQueueFlag=!1;const{provider:t,prefix:i}=o,s=o.iconsToLoad;delete o.iconsToLoad;let a;if(!s||!(a=$t(t)))return;a.prepare(t,i,s).forEach(r=>{zi(t,r,l=>{if(typeof l!="object")r.icons.forEach(c=>{o.missing.add(c)});else try{const c=wt(o,l);if(!c.length)return;const b=o.pendingIcons;b&&c.forEach(g=>{b.delete(g)}),da(o,l)}catch(c){console.error(c)}ca(o)})})}))}const Ct=(o,e)=>{const t=ta(o,!0,Oi()),i=Qo(t);if(!i.pending.length){let l=!0;return e&&setTimeout(()=>{l&&e(i.loaded,i.missing,i.pending,Wi)}),()=>{l=!1}}const s=Object.create(null),a=[];let n,r;return i.pending.forEach(l=>{const{provider:c,prefix:b}=l;if(b===r&&c===n)return;n=c,r=b,a.push(Y(c,b));const g=s[c]||(s[c]=Object.create(null));g[b]||(g[b]=[])}),i.pending.forEach(l=>{const{provider:c,prefix:b,name:g}=l,v=Y(c,b),y=v.pendingIcons||(v.pendingIcons=new Set);y.has(g)||(y.add(g),s[c][b].push(g))}),a.forEach(l=>{const{provider:c,prefix:b}=l;s[c][b].length&&ua(l,s[c][b])}),e?ea(e,i,a):Wi},ha=o=>new Promise((e,t)=>{const i=typeof o=="string"?$e(o,!0):o;if(!i){t(o);return}Ct([i||o],s=>{if(s.length&&i){const a=ke(i);if(a){e({...we,...a});return}}t(o)})});function pa(o){try{const e=typeof o=="string"?JSON.parse(o):o;if(typeof e.body=="string")return{...e}}catch{}}function fa(o,e){const t=typeof o=="string"?$e(o,!0,!0):null;if(!t){const a=pa(o);return{value:o,data:a}}const i=ke(t);if(i!==void 0||!t.prefix)return{value:o,name:t,data:i};const s=Ct([t],()=>e(o,t,ke(t)));return{value:o,name:t,loading:s}}function Lt(o){return o.hasAttribute("inline")}let Ki=!1;try{Ki=navigator.vendor.indexOf("Apple")===0}catch{}function ba(o,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(Ki||o.indexOf("{const w=[],L=y.hFlip,N=y.vFlip;let M=y.rotate;L?N?M+=2:(w.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),w.push("scale(-1 1)"),s.top=s.left=0):N&&(w.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),w.push("scale(1 -1)"),s.top=s.left=0);let I;switch(M<0&&(M-=Math.floor(M/4)*4),M=M%4,M){case 1:I=s.height/2+s.top,w.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:w.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:I=s.width/2+s.left,w.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}M%2===1&&(s.left!==s.top&&(I=s.left,s.left=s.top,s.top=I),s.width!==s.height&&(I=s.width,s.width=s.height,s.height=I)),w.length&&(a=''+a+"")});const n=i.width,r=i.height,l=s.width,c=s.height;let b,g;return n===null?(g=r===null?"1em":r==="auto"?c:r,b=It(g,l/c)):(b=n==="auto"?l:n,g=r===null?It(b,c/l):r==="auto"?c:r),{attributes:{width:b.toString(),height:g.toString(),viewBox:s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+c.toString()},body:a}}let Ge=(()=>{let o;try{if(o=fetch,typeof o=="function")return o}catch{}})();function va(o){Ge=o}function ya(){return Ge}function wa(o,e){const t=Be(o);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let s=0;t.resources.forEach(n=>{s=Math.max(s,n.length)});const a=e+".json?icons=";i=t.maxURL-s-t.path.length-a.length}return i}function _a(o){return o===404}const $a=(o,e,t)=>{const i=[],s=wa(o,e),a="icons";let n={type:a,provider:o,prefix:e,icons:[]},r=0;return t.forEach((l,c)=>{r+=l.length+1,r>=s&&c>0&&(i.push(n),n={type:a,provider:o,prefix:e,icons:[]},r=l.length),n.icons.push(l)}),i.push(n),i};function xa(o){if(typeof o=="string"){const e=Be(o);if(e)return e.path}return"/"}const ka={prepare:$a,send:(o,e,t)=>{if(!Ge){t("abort",424);return}let i=xa(e.provider);switch(e.type){case"icons":{const a=e.prefix,r=e.icons.join(","),l=new URLSearchParams({icons:r});i+=a+".json?"+l.toString();break}case"custom":{const a=e.uri;i+=a.slice(0,1)==="/"?a.slice(1):a;break}default:t("abort",400);return}let s=503;Ge(o+i).then(a=>{const n=a.status;if(n!==200){setTimeout(()=>{t(_a(n)?"abort":"next",n)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?t("abort",a):t("next",s)});return}setTimeout(()=>{t("success",a)})}).catch(()=>{t("next",s)})}};function Ji(o,e){switch(o){case"local":case"session":ne[o]=e;break;case"all":for(const t in ne)ne[t]=e;break}}function Qi(){Pi("",ka),Oi(!0);let o;try{o=window}catch{}if(o){if(Gi(),o.IconifyPreload!==void 0){const t=o.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!Li(s))&&console.error(i)}catch{console.error(i)}})}if(o.IconifyProviders!==void 0){const t=o.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const s="IconifyProviders["+i+"] is invalid.";try{const a=t[i];if(typeof a!="object"||!a||a.resources===void 0)continue;ji(i,a)||console.error(s)}catch{console.error(s)}}}}return{enableCache:t=>Ji(t,!0),disableCache:t=>Ji(t,!1),iconExists:Zo,getIcon:Jo,listIcons:Ko,addIcon:Ci,addCollection:Li,calculateSize:It,buildIcon:Zi,loadIcons:Ct,loadIcon:ha,addAPIProvider:ji,_api:{getAPIConfig:Be,setAPIModule:Pi,sendAPIQuery:zi,setFetch:va,getFetch:ya,listAPIProviders:oa}}}function Yi(o,e){let t=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)t+=" "+i+'="'+e[i]+'"';return'"+o+""}function Sa(o){return o.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Ta(o){return'url("data:image/svg+xml,'+Sa(o)+'")'}const Pt={"background-color":"currentColor"},Xi={"background-color":"transparent"},es={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ts={"-webkit-mask":Pt,mask:Pt,background:Xi};for(const o in ts){const e=ts[o];for(const t in es)e[o+"-"+t]=es[t]}function is(o){return o+(o.match(/^[-0-9.]+$/)?"px":"")}function Aa(o,e,t){const i=document.createElement("span");let s=o.body;s.indexOf("");const a=o.attributes,n=Yi(s,{...a,width:e.width+"",height:e.height+""}),r=Ta(n),l=i.style,c={"--svg":r,width:is(a.width),height:is(a.height),...t?Pt:Xi};for(const b in c)l.setProperty(b,c[b]);return i}function Ea(o){const e=document.createElement("span");return e.innerHTML=Yi(o.body,o.attributes),e.firstChild}function ss(o,e){const t=e.icon.data,i=e.customisations,s=Zi(t,i);i.preserveAspectRatio&&(s.attributes.preserveAspectRatio=i.preserveAspectRatio);const a=e.renderedMode;let n;switch(a){case"svg":n=Ea(s);break;default:n=Aa(s,{...we,...t},a==="mask")}const r=Array.from(o.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});r?n.tagName==="SPAN"&&r.tagName===n.tagName?r.setAttribute("style",n.getAttribute("style")):o.replaceChild(n,r):o.appendChild(n)}const Mt="data-style";function os(o,e){let t=Array.from(o.childNodes).find(i=>i.hasAttribute&&i.hasAttribute(Mt));t||(t=document.createElement("style"),t.setAttribute(Mt,Mt),o.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"}function as(o,e,t){const i=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:e,icon:o,lastRender:i}}function Oa(o="iconify-icon"){let e,t;try{e=window.customElements,t=window.HTMLElement}catch{return}if(!e||!t)return;const i=e.get(o);if(i)return i;const s=["icon","mode","inline","width","height","rotate","flip"],a=class extends t{constructor(){super();Xe(this,"_shadowRoot");Xe(this,"_state");Xe(this,"_checkQueued",!1);const l=this._shadowRoot=this.attachShadow({mode:"open"}),c=Lt(this);os(l,c),this._state=as({value:""},c),this._queueCheck()}static get observedAttributes(){return s.slice(0)}attributeChangedCallback(l){if(l==="inline"){const c=Lt(this),b=this._state;c!==b.inline&&(b.inline=c,os(this._shadowRoot,c))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Lt(this)}set inline(l){this.setAttribute("inline",l?"true":null)}restartAnimation(){const l=this._state;if(l.rendered){const c=this._shadowRoot;if(l.renderedMode==="svg")try{c.lastChild.setCurrentTime(0);return}catch{}ss(c,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,c=this.getAttribute("icon");if(c!==l.icon.value){this._iconChanged(c);return}if(!l.rendered)return;const b=this.getAttribute("mode"),g=Si(this);(l.attrMode!==b||Fo(l.customisations,g))&&this._renderIcon(l.icon,g,b)}_iconChanged(l){const c=fa(l,(b,g,v)=>{const y=this._state;if(y.rendered||this.getAttribute("icon")!==b)return;const w={value:b,name:g,data:v};w.data?this._gotIconData(w):y.icon=w});c.data?this._gotIconData(c):this._state=as(c,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Si(this),this.getAttribute("mode"))}_renderIcon(l,c,b){const g=ba(l.data.body,b),v=this._state.inline;ss(this._shadowRoot,this._state={rendered:!0,icon:l,inline:v,customisations:c,attrMode:b,renderedMode:g})}};s.forEach(r=>{r in a.prototype||Object.defineProperty(a.prototype,r,{get:function(){return this.getAttribute(r)},set:function(l){this.setAttribute(r,l)}})});const n=Qi();for(const r in n)a[r]=a.prototype[r]=n[r];return e.define(o,a),a}const Ca=Oa()||Qi(),{enableCache:Nr,disableCache:qr,iconExists:Fr,getIcon:Ur,listIcons:Vr,addIcon:Br,addCollection:Hr,calculateSize:Gr,buildIcon:Wr,loadIcons:Kr,loadIcon:Zr,addAPIProvider:Jr,_api:Qr}=Ca;class ns extends R{static get styles(){return x` +*/const xi=Object.freeze({left:0,top:0,width:16,height:16}),qe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$e=Object.freeze({...xi,...qe}),yt=Object.freeze({...$e,body:"",hidden:!1}),Ro=Object.freeze({width:null,height:null}),ki=Object.freeze({...Ro,...qe});function No(o,e=0){const t=o.replace(/^-?[0-9.]*/,"");function i(s){for(;s<0;)s+=4;return s%4}if(t===""){const s=parseInt(o);return isNaN(s)?0:i(s)}else if(t!==o){let s=0;switch(t){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(o.slice(0,o.length-t.length));return isNaN(a)?0:(a=a/s,a%1===0?i(a):0)}}return e}const qo=/[\s,]+/;function Uo(o,e){e.split(qo).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0;break}})}const Si={...ki,preserveAspectRatio:""};function Ei(o){const e={...Si},t=(i,s)=>o.getAttribute(i)||s;return e.width=t("width",null),e.height=t("height",null),e.rotate=No(t("rotate","")),Uo(e,t("flip","")),e.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),e}function Vo(o,e){for(const t in Si)if(o[t]!==e[t])return!0;return!1}const xe=/^[a-z0-9]+(-[a-z0-9]+)*$/,ke=(o,e,t,i="")=>{const s=o.split(":");if(o.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const r=s.pop(),l=s.pop(),d={provider:s.length>0?s[0]:i,prefix:l,name:r};return e&&!Ue(d)?null:d}const a=s[0],n=a.split("-");if(n.length>1){const r={provider:i,prefix:n.shift(),name:n.join("-")};return e&&!Ue(r)?null:r}if(t&&i===""){const r={provider:i,prefix:"",name:a};return e&&!Ue(r,t)?null:r}return null},Ue=(o,e)=>o?!!((o.provider===""||o.provider.match(xe))&&(e&&o.prefix===""||o.prefix.match(xe))&&o.name.match(xe)):!1;function Bo(o,e){const t={};!o.hFlip!=!e.hFlip&&(t.hFlip=!0),!o.vFlip!=!e.vFlip&&(t.vFlip=!0);const i=((o.rotate||0)+(e.rotate||0))%4;return i&&(t.rotate=i),t}function Ti(o,e){const t=Bo(o,e);for(const i in yt)i in qe?i in o&&!(i in t)&&(t[i]=qe[i]):i in e?t[i]=e[i]:i in o&&(t[i]=o[i]);return t}function Ho(o,e){const t=o.icons,i=o.aliases||Object.create(null),s=Object.create(null);function a(n){if(t[n])return s[n]=[];if(!(n in s)){s[n]=null;const r=i[n]&&i[n].parent,l=r&&a(r);l&&(s[n]=[r].concat(l))}return s[n]}return Object.keys(t).concat(Object.keys(i)).forEach(a),s}function Ko(o,e,t){const i=o.icons,s=o.aliases||Object.create(null);let a={};function n(r){a=Ti(i[r]||s[r],a)}return n(e),t.forEach(n),Ti(o,a)}function Ai(o,e){const t=[];if(typeof o!="object"||typeof o.icons!="object")return t;o.not_found instanceof Array&&o.not_found.forEach(s=>{e(s,null),t.push(s)});const i=Ho(o);for(const s in i){const a=i[s];a&&(e(s,Ko(o,s,a)),t.push(s))}return t}const Wo={provider:"",aliases:{},not_found:{},...xi};function wt(o,e){for(const t in e)if(t in o&&typeof o[t]!=typeof e[t])return!1;return!0}function Oi(o){if(typeof o!="object"||o===null)return null;const e=o;if(typeof e.prefix!="string"||!o.icons||typeof o.icons!="object"||!wt(o,Wo))return null;const t=e.icons;for(const s in t){const a=t[s];if(!s.match(xe)||typeof a.body!="string"||!wt(a,yt))return null}const i=e.aliases||Object.create(null);for(const s in i){const a=i[s],n=a.parent;if(!s.match(xe)||typeof n!="string"||!t[n]&&!i[n]||!wt(a,yt))return null}return e}const Ve=Object.create(null);function Go(o,e){return{provider:o,prefix:e,icons:Object.create(null),missing:new Set}}function X(o,e){const t=Ve[o]||(Ve[o]=Object.create(null));return t[e]||(t[e]=Go(o,e))}function _t(o,e){return Oi(e)?Ai(e,(t,i)=>{i?o.icons[t]=i:o.missing.add(t)}):[]}function Zo(o,e,t){try{if(typeof t.body=="string")return o.icons[e]={...t},!0}catch{}return!1}function Jo(o,e){let t=[];return(typeof o=="string"?[o]:Object.keys(Ve)).forEach(s=>{(typeof s=="string"&&typeof e=="string"?[e]:Object.keys(Ve[s]||{})).forEach(n=>{const r=X(s,n);t=t.concat(Object.keys(r.icons).map(l=>(s!==""?"@"+s+":":"")+n+":"+l))})}),t}let Se=!1;function Ci(o){return typeof o=="boolean"&&(Se=o),Se}function Ee(o){const e=typeof o=="string"?ke(o,!0,Se):o;if(e){const t=X(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function Li(o,e){const t=ke(o,!0,Se);if(!t)return!1;const i=X(t.provider,t.prefix);return Zo(i,t.name,e)}function Ii(o,e){if(typeof o!="object")return!1;if(typeof e!="string"&&(e=o.provider||""),Se&&!e&&!o.prefix){let s=!1;return Oi(o)&&(o.prefix="",Ai(o,(a,n)=>{n&&Li(a,n)&&(s=!0)})),s}const t=o.prefix;if(!Ue({provider:e,prefix:t,name:"a"}))return!1;const i=X(e,t);return!!_t(i,o)}function Qo(o){return!!Ee(o)}function Xo(o){const e=Ee(o);return e?{...$e,...e}:null}function Yo(o){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);o.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let i={provider:"",prefix:"",name:""};return o.forEach(s=>{if(i.name===s.name&&i.prefix===s.prefix&&i.provider===s.provider)return;i=s;const a=s.provider,n=s.prefix,r=s.name,l=t[a]||(t[a]=Object.create(null)),d=l[n]||(l[n]=X(a,n));let h;r in d.icons?h=e.loaded:n===""||d.missing.has(r)?h=e.missing:h=e.pending;const g={provider:a,prefix:n,name:r};h.push(g)}),e}function Pi(o,e){o.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(s=>s.id!==e))})}function ea(o){o.pendingCallbacksFlag||(o.pendingCallbacksFlag=!0,setTimeout(()=>{o.pendingCallbacksFlag=!1;const e=o.loaderCallbacks?o.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const i=o.provider,s=o.prefix;e.forEach(a=>{const n=a.icons,r=n.pending.length;n.pending=n.pending.filter(l=>{if(l.prefix!==s)return!0;const d=l.name;if(o.icons[d])n.loaded.push({provider:i,prefix:s,name:d});else if(o.missing.has(d))n.missing.push({provider:i,prefix:s,name:d});else return t=!0,!0;return!1}),n.pending.length!==r&&(t||Pi([o],a.id),a.callback(n.loaded.slice(0),n.missing.slice(0),n.pending.slice(0),a.abort))})}))}let ta=0;function ia(o,e,t){const i=ta++,s=Pi.bind(null,t,i);if(!e.pending.length)return s;const a={id:i,icons:e,callback:o,abort:s};return t.forEach(n=>{(n.loaderCallbacks||(n.loaderCallbacks=[])).push(a)}),s}const $t=Object.create(null);function Mi(o,e){$t[o]=e}function xt(o){return $t[o]||$t[""]}function sa(o,e=!0,t=!1){const i=[];return o.forEach(s=>{const a=typeof s=="string"?ke(s,e,t):s;a&&i.push(a)}),i}var oa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function aa(o,e,t,i){const s=o.resources.length,a=o.random?Math.floor(Math.random()*s):o.index;let n;if(o.random){let E=o.resources.slice(0);for(n=[];E.length>1;){const F=Math.floor(Math.random()*E.length);n.push(E[F]),E=E.slice(0,F).concat(E.slice(F+1))}n=n.concat(E)}else n=o.resources.slice(a).concat(o.resources.slice(0,a));const r=Date.now();let l="pending",d=0,h,g=null,m=[],y=[];typeof i=="function"&&y.push(i);function w(){g&&(clearTimeout(g),g=null)}function L(){l==="pending"&&(l="aborted"),w(),m.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),m=[]}function R(E,F){F&&(y=[]),typeof E=="function"&&y.push(E)}function j(){return{startTime:r,payload:e,status:l,queriesSent:d,queriesPending:m.length,subscribe:R,abort:L}}function I(){l="failed",y.forEach(E=>{E(void 0,h)})}function Ie(){m.forEach(E=>{E.status==="pending"&&(E.status="aborted")}),m=[]}function Qe(E,F,ce){const te=F!=="success";switch(m=m.filter(P=>P!==E),l){case"pending":break;case"failed":if(te||!o.dataAfterTimeout)return;break;default:return}if(F==="abort"){h=ce,I();return}if(te){h=ce,m.length||(n.length?ee():I());return}if(w(),Ie(),!o.random){const P=o.resources.indexOf(E.resource);P!==-1&&P!==o.index&&(o.index=P)}l="completed",y.forEach(P=>{P(ce)})}function ee(){if(l!=="pending")return;w();const E=n.shift();if(E===void 0){if(m.length){g=setTimeout(()=>{w(),l==="pending"&&(Ie(),I())},o.timeout);return}I();return}const F={status:"pending",resource:E,callback:(ce,te)=>{Qe(F,ce,te)}};m.push(F),d++,g=setTimeout(ee,o.rotate),t(E,e,F.callback)}return setTimeout(ee),j}function ji(o){const e={...oa,...o};let t=[];function i(){t=t.filter(r=>r().status==="pending")}function s(r,l,d){const h=aa(e,r,l,(g,m)=>{i(),d&&d(g,m)});return t.push(h),h}function a(r){return t.find(l=>r(l))||null}return{query:s,find:a,setIndex:r=>{e.index=r},getIndex:()=>e.index,cleanup:i}}function kt(o){let e;if(typeof o.resources=="string")e=[o.resources];else if(e=o.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:o.path||"/",maxURL:o.maxURL||500,rotate:o.rotate||750,timeout:o.timeout||5e3,random:o.random===!0,index:o.index||0,dataAfterTimeout:o.dataAfterTimeout!==!1}}const Be=Object.create(null),Te=["https://api.simplesvg.com","https://api.unisvg.com"],He=[];for(;Te.length>0;)Te.length===1||Math.random()>.5?He.push(Te.shift()):He.push(Te.pop());Be[""]=kt({resources:["https://api.iconify.design"].concat(He)});function zi(o,e){const t=kt(e);return t===null?!1:(Be[o]=t,!0)}function Ke(o){return Be[o]}function na(){return Object.keys(Be)}function Fi(){}const St=Object.create(null);function ra(o){if(!St[o]){const e=Ke(o);if(!e)return;const t=ji(e),i={config:e,redundancy:t};St[o]=i}return St[o]}function Di(o,e,t){let i,s;if(typeof o=="string"){const a=xt(o);if(!a)return t(void 0,424),Fi;s=a.send;const n=ra(o);n&&(i=n.redundancy)}else{const a=kt(o);if(a){i=ji(a);const n=o.resources?o.resources[0]:"",r=xt(n);r&&(s=r.send)}}return!i||!s?(t(void 0,424),Fi):i.query(e,s,t)().abort}const Ri="iconify2",Ae="iconify",Ni=Ae+"-count",qi=Ae+"-version",Ui=36e5,la=168;function Et(o,e){try{return o.getItem(e)}catch{}}function Tt(o,e,t){try{return o.setItem(e,t),!0}catch{}}function Vi(o,e){try{o.removeItem(e)}catch{}}function At(o,e){return Tt(o,Ni,e.toString())}function Ot(o){return parseInt(Et(o,Ni))||0}const re={local:!0,session:!0},Bi={local:new Set,session:new Set};let Ct=!1;function da(o){Ct=o}let We=typeof window>"u"?{}:window;function Hi(o){const e=o+"Storage";try{if(We&&We[e]&&typeof We[e].length=="number")return We[e]}catch{}re[o]=!1}function Ki(o,e){const t=Hi(o);if(!t)return;const i=Et(t,qi);if(i!==Ri){if(i){const r=Ot(t);for(let l=0;l{const l=Ae+r.toString(),d=Et(t,l);if(typeof d=="string"){try{const h=JSON.parse(d);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>s&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&e(h,r))return!0}catch{}Vi(t,l)}};let n=Ot(t);for(let r=n-1;r>=0;r--)a(r)||(r===n-1?(n--,At(t,n)):Bi[o].add(r))}function Wi(){if(!Ct){da(!0);for(const o in re)Ki(o,e=>{const t=e.data,i=e.provider,s=t.prefix,a=X(i,s);if(!_t(a,t).length)return!1;const n=t.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,n):n,!0})}}function ca(o,e){const t=o.lastModifiedCached;if(t&&t>=e)return t===e;if(o.lastModifiedCached=e,t)for(const i in re)Ki(i,s=>{const a=s.data;return s.provider!==o.provider||a.prefix!==o.prefix||a.lastModified===e});return!0}function ua(o,e){Ct||Wi();function t(i){let s;if(!re[i]||!(s=Hi(i)))return;const a=Bi[i];let n;if(a.size)a.delete(n=Array.from(a).shift());else if(n=Ot(s),!At(s,n+1))return;const r={cached:Math.floor(Date.now()/Ui),provider:o.provider,data:e};return Tt(s,Ae+n.toString(),JSON.stringify(r))}e.lastModified&&!ca(o,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),t("local")||t("session"))}function Gi(){}function ha(o){o.iconsLoaderFlag||(o.iconsLoaderFlag=!0,setTimeout(()=>{o.iconsLoaderFlag=!1,ea(o)}))}function pa(o,e){o.iconsToLoad?o.iconsToLoad=o.iconsToLoad.concat(e).sort():o.iconsToLoad=e,o.iconsQueueFlag||(o.iconsQueueFlag=!0,setTimeout(()=>{o.iconsQueueFlag=!1;const{provider:t,prefix:i}=o,s=o.iconsToLoad;delete o.iconsToLoad;let a;if(!s||!(a=xt(t)))return;a.prepare(t,i,s).forEach(r=>{Di(t,r,l=>{if(typeof l!="object")r.icons.forEach(d=>{o.missing.add(d)});else try{const d=_t(o,l);if(!d.length)return;const h=o.pendingIcons;h&&d.forEach(g=>{h.delete(g)}),ua(o,l)}catch(d){console.error(d)}ha(o)})})}))}const Lt=(o,e)=>{const t=sa(o,!0,Ci()),i=Yo(t);if(!i.pending.length){let l=!0;return e&&setTimeout(()=>{l&&e(i.loaded,i.missing,i.pending,Gi)}),()=>{l=!1}}const s=Object.create(null),a=[];let n,r;return i.pending.forEach(l=>{const{provider:d,prefix:h}=l;if(h===r&&d===n)return;n=d,r=h,a.push(X(d,h));const g=s[d]||(s[d]=Object.create(null));g[h]||(g[h]=[])}),i.pending.forEach(l=>{const{provider:d,prefix:h,name:g}=l,m=X(d,h),y=m.pendingIcons||(m.pendingIcons=new Set);y.has(g)||(y.add(g),s[d][h].push(g))}),a.forEach(l=>{const{provider:d,prefix:h}=l;s[d][h].length&&pa(l,s[d][h])}),e?ia(e,i,a):Gi},fa=o=>new Promise((e,t)=>{const i=typeof o=="string"?ke(o,!0):o;if(!i){t(o);return}Lt([i||o],s=>{if(s.length&&i){const a=Ee(i);if(a){e({...$e,...a});return}}t(o)})});function ba(o){try{const e=typeof o=="string"?JSON.parse(o):o;if(typeof e.body=="string")return{...e}}catch{}}function ga(o,e){const t=typeof o=="string"?ke(o,!0,!0):null;if(!t){const a=ba(o);return{value:o,data:a}}const i=Ee(t);if(i!==void 0||!t.prefix)return{value:o,name:t,data:i};const s=Lt([t],()=>e(o,t,Ee(t)));return{value:o,name:t,loading:s}}function It(o){return o.hasAttribute("inline")}let Zi=!1;try{Zi=navigator.vendor.indexOf("Apple")===0}catch{}function ma(o,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(Zi||o.indexOf("{const w=[],L=y.hFlip,R=y.vFlip;let j=y.rotate;L?R?j+=2:(w.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),w.push("scale(-1 1)"),s.top=s.left=0):R&&(w.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),w.push("scale(1 -1)"),s.top=s.left=0);let I;switch(j<0&&(j-=Math.floor(j/4)*4),j=j%4,j){case 1:I=s.height/2+s.top,w.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:w.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:I=s.width/2+s.left,w.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}j%2===1&&(s.left!==s.top&&(I=s.left,s.left=s.top,s.top=I),s.width!==s.height&&(I=s.width,s.width=s.height,s.height=I)),w.length&&(a=''+a+"")});const n=i.width,r=i.height,l=s.width,d=s.height;let h,g;return n===null?(g=r===null?"1em":r==="auto"?d:r,h=Pt(g,l/d)):(h=n==="auto"?l:n,g=r===null?Pt(h,d/l):r==="auto"?d:r),{attributes:{width:h.toString(),height:g.toString(),viewBox:s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+d.toString()},body:a}}let Ge=(()=>{let o;try{if(o=fetch,typeof o=="function")return o}catch{}})();function wa(o){Ge=o}function _a(){return Ge}function $a(o,e){const t=Ke(o);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let s=0;t.resources.forEach(n=>{s=Math.max(s,n.length)});const a=e+".json?icons=";i=t.maxURL-s-t.path.length-a.length}return i}function xa(o){return o===404}const ka=(o,e,t)=>{const i=[],s=$a(o,e),a="icons";let n={type:a,provider:o,prefix:e,icons:[]},r=0;return t.forEach((l,d)=>{r+=l.length+1,r>=s&&d>0&&(i.push(n),n={type:a,provider:o,prefix:e,icons:[]},r=l.length),n.icons.push(l)}),i.push(n),i};function Sa(o){if(typeof o=="string"){const e=Ke(o);if(e)return e.path}return"/"}const Ea={prepare:ka,send:(o,e,t)=>{if(!Ge){t("abort",424);return}let i=Sa(e.provider);switch(e.type){case"icons":{const a=e.prefix,r=e.icons.join(","),l=new URLSearchParams({icons:r});i+=a+".json?"+l.toString();break}case"custom":{const a=e.uri;i+=a.slice(0,1)==="/"?a.slice(1):a;break}default:t("abort",400);return}let s=503;Ge(o+i).then(a=>{const n=a.status;if(n!==200){setTimeout(()=>{t(xa(n)?"abort":"next",n)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?t("abort",a):t("next",s)});return}setTimeout(()=>{t("success",a)})}).catch(()=>{t("next",s)})}};function Qi(o,e){switch(o){case"local":case"session":re[o]=e;break;case"all":for(const t in re)re[t]=e;break}}function Xi(){Mi("",Ea),Ci(!0);let o;try{o=window}catch{}if(o){if(Wi(),o.IconifyPreload!==void 0){const t=o.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!Ii(s))&&console.error(i)}catch{console.error(i)}})}if(o.IconifyProviders!==void 0){const t=o.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const s="IconifyProviders["+i+"] is invalid.";try{const a=t[i];if(typeof a!="object"||!a||a.resources===void 0)continue;zi(i,a)||console.error(s)}catch{console.error(s)}}}}return{enableCache:t=>Qi(t,!0),disableCache:t=>Qi(t,!1),iconExists:Qo,getIcon:Xo,listIcons:Jo,addIcon:Li,addCollection:Ii,calculateSize:Pt,buildIcon:Ji,loadIcons:Lt,loadIcon:fa,addAPIProvider:zi,_api:{getAPIConfig:Ke,setAPIModule:Mi,sendAPIQuery:Di,setFetch:wa,getFetch:_a,listAPIProviders:na}}}function Yi(o,e){let t=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)t+=" "+i+'="'+e[i]+'"';return'"+o+""}function Ta(o){return o.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Aa(o){return'url("data:image/svg+xml,'+Ta(o)+'")'}const Mt={"background-color":"currentColor"},es={"background-color":"transparent"},ts={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},is={"-webkit-mask":Mt,mask:Mt,background:es};for(const o in is){const e=is[o];for(const t in ts)e[o+"-"+t]=ts[t]}function ss(o){return o+(o.match(/^[-0-9.]+$/)?"px":"")}function Oa(o,e,t){const i=document.createElement("span");let s=o.body;s.indexOf("");const a=o.attributes,n=Yi(s,{...a,width:e.width+"",height:e.height+""}),r=Aa(n),l=i.style,d={"--svg":r,width:ss(a.width),height:ss(a.height),...t?Mt:es};for(const h in d)l.setProperty(h,d[h]);return i}function Ca(o){const e=document.createElement("span");return e.innerHTML=Yi(o.body,o.attributes),e.firstChild}function os(o,e){const t=e.icon.data,i=e.customisations,s=Ji(t,i);i.preserveAspectRatio&&(s.attributes.preserveAspectRatio=i.preserveAspectRatio);const a=e.renderedMode;let n;switch(a){case"svg":n=Ca(s);break;default:n=Oa(s,{...$e,...t},a==="mask")}const r=Array.from(o.childNodes).find(l=>{const d=l.tagName&&l.tagName.toUpperCase();return d==="SPAN"||d==="SVG"});r?n.tagName==="SPAN"&&r.tagName===n.tagName?r.setAttribute("style",n.getAttribute("style")):o.replaceChild(n,r):o.appendChild(n)}const jt="data-style";function as(o,e){let t=Array.from(o.childNodes).find(i=>i.hasAttribute&&i.hasAttribute(jt));t||(t=document.createElement("style"),t.setAttribute(jt,jt),o.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"}function ns(o,e,t){const i=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:e,icon:o,lastRender:i}}function La(o="iconify-icon"){let e,t;try{e=window.customElements,t=window.HTMLElement}catch{return}if(!e||!t)return;const i=e.get(o);if(i)return i;const s=["icon","mode","inline","width","height","rotate","flip"],a=class extends t{constructor(){super();Me(this,"_shadowRoot");Me(this,"_state");Me(this,"_checkQueued",!1);const l=this._shadowRoot=this.attachShadow({mode:"open"}),d=It(this);as(l,d),this._state=ns({value:""},d),this._queueCheck()}static get observedAttributes(){return s.slice(0)}attributeChangedCallback(l){if(l==="inline"){const d=It(this),h=this._state;d!==h.inline&&(h.inline=d,as(this._shadowRoot,d))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return It(this)}set inline(l){this.setAttribute("inline",l?"true":null)}restartAnimation(){const l=this._state;if(l.rendered){const d=this._shadowRoot;if(l.renderedMode==="svg")try{d.lastChild.setCurrentTime(0);return}catch{}os(d,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,d=this.getAttribute("icon");if(d!==l.icon.value){this._iconChanged(d);return}if(!l.rendered)return;const h=this.getAttribute("mode"),g=Ei(this);(l.attrMode!==h||Vo(l.customisations,g))&&this._renderIcon(l.icon,g,h)}_iconChanged(l){const d=ga(l,(h,g,m)=>{const y=this._state;if(y.rendered||this.getAttribute("icon")!==h)return;const w={value:h,name:g,data:m};w.data?this._gotIconData(w):y.icon=w});d.data?this._gotIconData(d):this._state=ns(d,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Ei(this),this.getAttribute("mode"))}_renderIcon(l,d,h){const g=ma(l.data.body,h),m=this._state.inline;os(this._shadowRoot,this._state={rendered:!0,icon:l,inline:m,customisations:d,attrMode:h,renderedMode:g})}};s.forEach(r=>{r in a.prototype||Object.defineProperty(a.prototype,r,{get:function(){return this.getAttribute(r)},set:function(l){this.setAttribute(r,l)}})});const n=Xi();for(const r in n)a[r]=a.prototype[r]=n[r];return e.define(o,a),a}const Ia=La()||Xi(),{enableCache:Nr,disableCache:qr,iconExists:Ur,getIcon:Vr,listIcons:Br,addIcon:Hr,addCollection:Kr,calculateSize:Wr,buildIcon:Gr,loadIcons:Zr,loadIcon:Jr,addAPIProvider:Qr,_api:Xr}=Ia;class rs extends D{static get styles(){return x` :root { pointer-events: none; } @@ -393,14 +393,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .tooltip:hover { opacity: 0.25; } - `}static get properties(){return{...super.properties,icon:{type:String},tooltip:{type:String},tooltip_open:{type:Boolean},size:{type:String},slotted:{type:Boolean,attribute:!1}}}firstUpdated(){const e=this.shadowRoot.querySelector("slot[name=tooltip]");e&&e.addEventListener("slotchange",t=>{const s=t.target.assignedNodes();let a=!1;s.length>0&&(s[0].tagName==="SLOT"?a=s[0].assignedNodes().length>0:a=!0),this.slotted=a})}_toggleTooltip(){this.tooltip_open?this.tooltip_open=!1:this.tooltip_open=!0}tooltipClasses(){return{tooltip:!0,slotted:this.slotted}}render(){const e=this.tooltip?f`
{const s=t.target.assignedNodes();let a=!1;s.length>0&&(s[0].tagName==="SLOT"?a=s[0].assignedNodes().length>0:a=!0),this.slotted=a})}_toggleTooltip(){this.tooltip_open?this.tooltip_open=!1:this.tooltip_open=!0}tooltipClasses(){return{tooltip:!0,slotted:this.slotted}}render(){const e=this.tooltip?u`
${this.tooltip} -
`:null;return f` +
`:null;return u`
${e}
- `}}window.customElements.define("dt-icon",ns);class La extends oe{static get styles(){return x` + `}}window.customElements.define("dt-icon",rs);class Pa extends ae{static get styles(){return x` :host { margin-top: -0.25rem; width: 2rem; @@ -423,11 +423,11 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr border-bottom: var(--dt-checkmark-width) solid currentcolor; border-right: var(--dt-checkmark-width) solid currentcolor; } - `}}window.customElements.define("dt-checkmark",La);/** + `}}window.customElements.define("dt-checkmark",Pa);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const B=o=>o??E;class D extends R{static get formAssociated(){return!0}static get styles(){return[x` + */const q=o=>o??A;class M extends D{static get formAssociated(){return!0}static get styles(){return[x` .input-group { position: relative; } @@ -494,47 +494,47 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .invalid ~ .error-container { border-top-width: 0; } - `]}static get properties(){return{...super.properties,name:{type:String},label:{type:String},icon:{type:String},iconAltText:{type:String},private:{type:Boolean},privateLabel:{type:String},disabled:{type:Boolean},required:{type:Boolean},requiredMessage:{type:String},touched:{type:Boolean,state:!0},invalid:{type:Boolean,state:!0},error:{type:String},loading:{type:Boolean},saved:{type:Boolean},errorSlotted:{type:Boolean,attribute:!1}}}get _field(){return this.shadowRoot.querySelector("input, textarea, select")}get _focusTarget(){return this._field}constructor(){super(),this.savedTimeout=null,this.touched=!1,this.invalid=!1,this.internals=this.attachInternals(),this.addEventListener("invalid",e=>{e&&e.preventDefault(),this.touched=!0,this._validateRequired()})}firstUpdated(...e){super.firstUpdated(...e);const t=this.shadowRoot.querySelector("slot[name=error]");t&&t.addEventListener("slotchange",s=>{const n=s.target.assignedNodes();let r=!1;n.length>0&&(n[0].tagName==="SLOT"?r=n[0].assignedNodes().length>0:r=!0),this.errorSlotted=r});const i=D._jsonToFormData(this.value,this.name);this.internals.setFormValue(i),this._validateRequired()}static _buildFormData(e,t,i){if(t&&typeof t=="object"&&!(t instanceof Date)&&!(t instanceof File))Object.keys(t).forEach(s=>{this._buildFormData(e,t[s],i?`${i}[${s}]`:s)});else{const s=t??"";e.append(i,s)}}static _jsonToFormData(e,t){const i=new FormData;return D._buildFormData(i,e,t),i}_setFormValue(e){const t=D._jsonToFormData(e,this.name);this.internals.setFormValue(t,e),this._validateRequired(),this.touched=!0}_validateRequired(){}labelTemplate(){return this.label?f` + `]}static get properties(){return{...super.properties,name:{type:String},label:{type:String},icon:{type:String},iconAltText:{type:String},private:{type:Boolean},privateLabel:{type:String},disabled:{type:Boolean},required:{type:Boolean},requiredMessage:{type:String},touched:{type:Boolean,state:!0},invalid:{type:Boolean,state:!0},error:{type:String},loading:{type:Boolean},saved:{type:Boolean},errorSlotted:{type:Boolean,attribute:!1}}}get _field(){return this.shadowRoot.querySelector("input, textarea, select")}get _focusTarget(){return this._field}constructor(){super(),this.savedTimeout=null,this.touched=!1,this.invalid=!1,this.internals=this.attachInternals(),this.addEventListener("invalid",e=>{e&&e.preventDefault(),this.touched=!0,this._validateRequired()})}firstUpdated(...e){super.firstUpdated(...e);const t=this.shadowRoot.querySelector("slot[name=error]");t&&t.addEventListener("slotchange",s=>{const n=s.target.assignedNodes();let r=!1;n.length>0&&(n[0].tagName==="SLOT"?r=n[0].assignedNodes().length>0:r=!0),this.errorSlotted=r});const i=M._jsonToFormData(this.value,this.name);this.internals.setFormValue(i),this._validateRequired()}static _buildFormData(e,t,i){if(t&&typeof t=="object"&&!(t instanceof Date)&&!(t instanceof File))Object.keys(t).forEach(s=>{this._buildFormData(e,t[s],i?`${i}[${s}]`:s)});else{const s=t??"";e.append(i,s)}}static _jsonToFormData(e,t){const i=new FormData;return M._buildFormData(i,e,t),i}_setFormValue(e){const t=M._jsonToFormData(e,this.name);this.internals.setFormValue(t,e),this._validateRequired(),this.touched=!0}_validateRequired(){}labelTemplate(){return this.label?u` - ${this.icon?null:f``} + ${this.icon?null:u``} ${this.label} - `:""}_errorClasses(){return{"error-container":!0,slotted:this.errorSlotted}}renderIcons(){return f` + `:""}_errorClasses(){return{"error-container":!0,slotted:this.errorSlotted}}renderIcons(){return u` ${this.renderIconInvalid()} ${this.renderError()} ${this.renderIconLoading()} ${this.renderIconSaved()} - `}renderIconInvalid(){return this.touched&&this.invalid?f`
+ `}renderIconInvalid(){return this.touched&&this.invalid?u`
${this.internals.validationMessage} -
`:null}renderIconLoading(){return this.loading?f``:null}renderIconSaved(){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?f` `:null}renderIconLoading(){return this.loading?u``:null}renderIconSaved(){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?u``:null}renderError(){return this.error?f`
+ >`:null}renderError(){return this.error?u`
${this.error} -
`:null}render(){return f` +
`:null}render(){return u` ${this.labelTemplate()} `}reset(){var e;(e=this._field)!=null&&e.reset&&this._field.reset(),this.value="",this._setFormValue("")}}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{I:Ia}=ao,rs=()=>document.createComment(""),Ae=(o,e,t)=>{var a;const i=o._$AA.parentNode,s=e===void 0?o._$AB:e._$AA;if(t===void 0){const n=i.insertBefore(rs(),s),r=i.insertBefore(rs(),s);t=new Ia(n,r,o,o.options)}else{const n=t._$AB.nextSibling,r=t._$AM,l=r!==o;if(l){let c;(a=t._$AQ)==null||a.call(t,o),t._$AM=o,t._$AP!==void 0&&(c=o._$AU)!==r._$AU&&t._$AP(c)}if(n!==s||l){let c=t._$AA;for(;c!==n;){const b=c.nextSibling;i.insertBefore(c,s),c=b}}}return t},re=(o,e,t=o)=>(o._$AI(e,t),o),Pa={},Ma=(o,e=Pa)=>o._$AH=e,ja=o=>o._$AH,jt=o=>{var i;(i=o._$AP)==null||i.call(o,!1,!0);let e=o._$AA;const t=o._$AB.nextSibling;for(;e!==t;){const s=e.nextSibling;e.remove(),e=s}};/** + */const{I:Ma}=ro,ls=()=>document.createComment(""),Oe=(o,e,t)=>{var a;const i=o._$AA.parentNode,s=e===void 0?o._$AB:e._$AA;if(t===void 0){const n=i.insertBefore(ls(),s),r=i.insertBefore(ls(),s);t=new Ma(n,r,o,o.options)}else{const n=t._$AB.nextSibling,r=t._$AM,l=r!==o;if(l){let d;(a=t._$AQ)==null||a.call(t,o),t._$AM=o,t._$AP!==void 0&&(d=o._$AU)!==r._$AU&&t._$AP(d)}if(n!==s||l){let d=t._$AA;for(;d!==n;){const h=d.nextSibling;i.insertBefore(d,s),d=h}}}return t},le=(o,e,t=o)=>(o._$AI(e,t),o),ja={},za=(o,e=ja)=>o._$AH=e,Fa=o=>o._$AH,zt=o=>{var i;(i=o._$AP)==null||i.call(o,!1,!0);let e=o._$AA;const t=o._$AB.nextSibling;for(;e!==t;){const s=e.nextSibling;e.remove(),e=s}};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const ls=(o,e,t)=>{const i=new Map;for(let s=e;s<=t;s++)i.set(o[s],s);return i},Ee=ut(class extends ht{constructor(o){if(super(o),o.type!==ct.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const s=[],a=[];let n=0;for(const r of o)s[n]=i?i(r,n):n,a[n]=t(r,n),n++;return{values:a,keys:s}}render(o,e,t){return this.dt(o,e,t).values}update(o,[e,t,i]){const s=ja(o),{values:a,keys:n}=this.dt(e,t,i);if(!Array.isArray(s))return this.ut=n,a;const r=this.ut??(this.ut=[]),l=[];let c,b,g=0,v=s.length-1,y=0,w=a.length-1;for(;g<=v&&y<=w;)if(s[g]===null)g++;else if(s[v]===null)v--;else if(r[g]===n[y])l[y]=re(s[g],a[y]),g++,y++;else if(r[v]===n[w])l[w]=re(s[v],a[w]),v--,w--;else if(r[g]===n[w])l[w]=re(s[g],a[w]),Ae(o,l[w+1],s[g]),g++,w--;else if(r[v]===n[y])l[y]=re(s[v],a[y]),Ae(o,s[g],s[v]),v--,y++;else if(c===void 0&&(c=ls(n,y,w),b=ls(r,g,v)),c.has(r[g]))if(c.has(r[v])){const L=b.get(n[y]),N=L!==void 0?s[L]:null;if(N===null){const M=Ae(o,s[g]);re(M,a[y]),l[y]=M}else l[y]=re(N,a[y]),Ae(o,s[g],N),s[L]=null;y++}else jt(s[v]),v--;else jt(s[g]),g++;for(;y<=w;){const L=Ae(o,l[w+1]);re(L,a[y]),l[y++]=L}for(;g<=v;){const L=s[g++];L!==null&&jt(L)}return this.ut=n,Ma(o,l),U}}),Da=o=>class extends o{constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1}static get properties(){return{...super.properties,value:{type:Array,reflect:!0},query:{type:String,state:!0},options:{type:Array},filteredOptions:{type:Array,state:!0},open:{type:Boolean,state:!0},canUpdate:{type:Boolean,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean}}}willUpdate(e){if(super.willUpdate(e),e&&!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length){const t=this.shadowRoot.querySelector(".input-group");t&&(this.containerHeight=t.offsetHeight)}}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");!e.style.getPropertyValue("--container-width")&&e.clientWidth>0&&e.style.setProperty("--container-width",`${e.clientWidth}px`)}_select(){console.error("Must implement `_select(value)` function"),this._clearSearch()}static _focusInput(e){e.target===e.currentTarget&&e.target.getElementsByTagName("input")[0].focus()}_inputFocusIn(e){(!e.relatedTarget||!["BUTTON","LI"].includes(e.relatedTarget.nodeName))&&(this.open=!0,this.activeIndex=-1)}_inputFocusOut(e){(!e.relatedTarget||!["BUTTON","LI"].includes(e.relatedTarget.nodeName))&&(this.open=!1,this.canUpdate=!0)}_inputKeyDown(e){}_inputKeyUp(e){switch(e.keyCode||e.which){case 38:this.open=!0,this._listHighlightPrevious();break;case 40:this.open=!0,this._listHighlightNext();break;case 9:this.activeIndex<0?this.open=!1:e.preventDefault(),this._keyboardSelectOption();break;case 13:this._keyboardSelectOption();break;case 27:this.open=!1,this.activeIndex=-1;break;default:this.open=!0,this.query=e.target.value;break}}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,s=t.offsetTop+t.clientHeight,a=e.scrollTop,n=e.scrollTop+e.clientHeight;s>n?e.scrollTo({top:s-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex+1>this.filteredOptions.length?this._select(this.query):this._select(this.filteredOptions[this.activeIndex].id))}_clickOption(e){e.target&&e.target.value&&this._select(e.target.value)}_clickAddNew(e){var t;e.target&&this._select((t=e.target.dataset)==null?void 0:t.label)}_clearSearch(){const e=this.shadowRoot.querySelector("input");e&&(e.value="")}_listHighlightNext(){this.allowAdd?this.activeIndex=Math.min(this.filteredOptions.length,this.activeIndex+1):this.activeIndex=Math.min(this.filteredOptions.length-1,this.activeIndex+1)}_listHighlightPrevious(){this.activeIndex=Math.max(0,this.activeIndex-1)}_renderOption(e,t){return f` + */const ds=(o,e,t)=>{const i=new Map;for(let s=e;s<=t;s++)i.set(o[s],s);return i},de=ht(class extends pt{constructor(o){if(super(o),o.type!==ut.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const s=[],a=[];let n=0;for(const r of o)s[n]=i?i(r,n):n,a[n]=t(r,n),n++;return{values:a,keys:s}}render(o,e,t){return this.dt(o,e,t).values}update(o,[e,t,i]){const s=Fa(o),{values:a,keys:n}=this.dt(e,t,i);if(!Array.isArray(s))return this.ut=n,a;const r=this.ut??(this.ut=[]),l=[];let d,h,g=0,m=s.length-1,y=0,w=a.length-1;for(;g<=m&&y<=w;)if(s[g]===null)g++;else if(s[m]===null)m--;else if(r[g]===n[y])l[y]=le(s[g],a[y]),g++,y++;else if(r[m]===n[w])l[w]=le(s[m],a[w]),m--,w--;else if(r[g]===n[w])l[w]=le(s[g],a[w]),Oe(o,l[w+1],s[g]),g++,w--;else if(r[m]===n[y])l[y]=le(s[m],a[y]),Oe(o,s[g],s[m]),m--,y++;else if(d===void 0&&(d=ds(n,y,w),h=ds(r,g,m)),d.has(r[g]))if(d.has(r[m])){const L=h.get(n[y]),R=L!==void 0?s[L]:null;if(R===null){const j=Oe(o,s[g]);le(j,a[y]),l[y]=j}else l[y]=le(R,a[y]),Oe(o,s[g],R),s[L]=null;y++}else zt(s[m]),m--;else zt(s[g]),g++;for(;y<=w;){const L=Oe(o,l[w+1]);le(L,a[y]),l[y++]=L}for(;g<=m;){const L=s[g++];L!==null&&zt(L)}return this.ut=n,za(o,l),V}}),Da=o=>class extends o{constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1}static get properties(){return{...super.properties,value:{type:Array,reflect:!0},query:{type:String,state:!0},options:{type:Array},filteredOptions:{type:Array,state:!0},open:{type:Boolean,state:!0},canUpdate:{type:Boolean,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean}}}willUpdate(e){if(super.willUpdate(e),e&&!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length){const t=this.shadowRoot.querySelector(".input-group");t&&(this.containerHeight=t.offsetHeight)}}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");!e.style.getPropertyValue("--container-width")&&e.clientWidth>0&&e.style.setProperty("--container-width",`${e.clientWidth}px`)}_select(){console.error("Must implement `_select(value)` function"),this._clearSearch()}static _focusInput(e){e.target===e.currentTarget&&e.target.getElementsByTagName("input")[0].focus()}_inputFocusIn(e){(!e.relatedTarget||!["BUTTON","LI"].includes(e.relatedTarget.nodeName))&&(this.open=!0,this.activeIndex=-1)}_inputFocusOut(e){(!e.relatedTarget||!["BUTTON","LI"].includes(e.relatedTarget.nodeName))&&(this.open=!1,this.canUpdate=!0)}_inputKeyDown(e){}_inputKeyUp(e){switch(e.keyCode||e.which){case 38:this.open=!0,this._listHighlightPrevious();break;case 40:this.open=!0,this._listHighlightNext();break;case 9:this.activeIndex<0?this.open=!1:e.preventDefault(),this._keyboardSelectOption();break;case 13:this._keyboardSelectOption();break;case 27:this.open=!1,this.activeIndex=-1;break;default:this.open=!0,this.query=e.target.value;break}}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,s=t.offsetTop+t.clientHeight,a=e.scrollTop,n=e.scrollTop+e.clientHeight;s>n?e.scrollTo({top:s-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex+1>this.filteredOptions.length?this._select(this.query):this._select(this.filteredOptions[this.activeIndex].id))}_clickOption(e){e.target&&e.target.value&&this._select(e.target.value)}_clickAddNew(e){var t;e.target&&this._select((t=e.target.dataset)==null?void 0:t.label)}_clearSearch(){const e=this.shadowRoot.querySelector("input");e&&(e.value="")}_listHighlightNext(){this.allowAdd?this.activeIndex=Math.min(this.filteredOptions.length,this.activeIndex+1):this.activeIndex=Math.min(this.filteredOptions.length-1,this.activeIndex+1)}_listHighlightPrevious(){this.activeIndex=Math.max(0,this.activeIndex-1)}_renderOption(e,t){return u`
  • - `}_baseRenderOptions(){return this.filteredOptions.length?Ee(this.filteredOptions,e=>e.id,(e,t)=>this._renderOption(e,t)):this.loading?f`
  • ${O("Loading options...")}
  • `:f`
  • ${O("No Data Available")}
  • `}_renderOptions(){let e=this._baseRenderOptions();return this.allowAdd&&this.query&&(Array.isArray(e)||(e=[e]),e.push(f`
  • + `}_baseRenderOptions(){return this.filteredOptions.length?de(this.filteredOptions,e=>e.id,(e,t)=>this._renderOption(e,t)):this.loading?u`
  • ${O("Loading options...")}
  • `:u`
  • ${O("No Data Available")}
  • `}_renderOptions(){let e=this._baseRenderOptions();return this.allowAdd&&this.query&&(Array.isArray(e)||(e=[e]),e.push(u`
  • -
  • `)),e}};class We extends Da(D){static get styles(){return[...super.styles,x` + `)),e}};class Ze extends Da(M){static get styles(){return[...super.styles,x` :host { position: relative; font-family: Helvetica, Arial, sans-serif; @@ -723,7 +723,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .field-container.invalid { border: 1px solid var(--dt-text-border-color-alert, var(--alert-color)); } - `]}static get properties(){return{...super.properties,placeholder:{type:String},containerHeight:{type:Number,state:!0}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length)if(typeof this.value[0]=="string")this.value=[...this.value.filter(i=>i!==`-${e}`),e];else{let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete&&(delete n.delete,i=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._setFormValue(this.value),this.query&&(this.query=""),this._clearSearch()}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>i===e.target.dataset.value?`-${i}`:i),t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value),this.open&&this.shadowRoot.querySelector("input").focus()}document.activeElement.blur()}updated(){super.updated(),this._updateContainerHeight()}_updateContainerHeight(){const e=this.shadowRoot.querySelector(".field-container");if(e){const t=e.offsetHeight;this.containerHeight!==t&&(this.containerHeight=t,this.requestUpdate())}}_filterOptions(){return this.filteredOptions=(this.options||[]).filter(e=>!(this.value||[]).includes(e.id)&&(!this.query||e.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase()))),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("query"),s=e.has("options");(t||i||s)&&this._filterOptions()}}_handleDivClick(){const e=this.renderRoot.querySelector("input");e&&e.focus()}_handleItemClick(e){e.stopPropagation(),document.activeElement.blur()}_renderSelectedOptions(){return this.options&&this.value&&this.value.filter(e=>e.charAt(0)!=="-").map(e=>f` + `]}static get properties(){return{...super.properties,placeholder:{type:String},containerHeight:{type:Number,state:!0}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length)if(typeof this.value[0]=="string")this.value=[...this.value.filter(i=>i!==`-${e}`),e];else{let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete&&(delete n.delete,i=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._setFormValue(this.value),this.query&&(this.query=""),this._clearSearch()}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>i===e.target.dataset.value?`-${i}`:i),t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value),this.open&&this.shadowRoot.querySelector("input").focus()}document.activeElement.blur()}updated(){super.updated(),this._updateContainerHeight()}_updateContainerHeight(){const e=this.shadowRoot.querySelector(".field-container");if(e){const t=e.offsetHeight;this.containerHeight!==t&&(this.containerHeight=t,this.requestUpdate())}}_filterOptions(){return this.filteredOptions=(this.options||[]).filter(e=>!(this.value||[]).includes(e.id)&&(!this.query||e.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase()))),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("query"),s=e.has("options");(t||i||s)&&this._filterOptions()}}_handleDivClick(){const e=this.renderRoot.querySelector("input");e&&e.focus()}_handleItemClick(e){e.stopPropagation(),document.activeElement.blur()}_renderSelectedOptions(){return this.options&&this.value&&this.value.filter(e=>e.charAt(0)!=="-").map(e=>u`
    @@ -736,14 +736,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr x
    - `)}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `)}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return u` ${this.labelTemplate()}
    @@ -766,7 +766,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-select",We);class za extends R{static get styles(){return x` + `}}window.customElements.define("dt-multi-select",Ze);class Ra extends D{static get styles(){return x` root { display: block; } @@ -795,16 +795,16 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr } } } - `}static get properties(){return{key:{type:String},metric:{type:Object},active:{type:Boolean,reflect:!0},disabled:{type:Boolean},missingIcon:{type:String}}}renderIcon(){var s;const e=(s=window==null?void 0:window.wpApiShare)==null?void 0:s.template_dir,{metric:t,missingIcon:i=`${e}/dt-assets/images/groups/missing.svg`}=this;if(t["font-icon"]){const a=t["font-icon"].replace("mdi mdi-","mdi:");return f``}return f``}return u`${t}`}render(){const{metric:e,active:t,disabled:i}=this;return f`
    `}render(){const{metric:e,active:t,disabled:i}=this;return u`
    ${this.renderIcon()} -
    `}async _handleClick(e){if(this.disabled)return;const t=!this.active;this.active=t;const i=new CustomEvent("change",{detail:{key:this.key,active:t}});this.dispatchEvent(i)}}window.customElements.define("dt-church-health-icon",za);class ds extends D{static get styles(){return[...super.styles,x` +
    `}async _handleClick(e){if(this.disabled)return;const t=!this.active;this.active=t;const i=new CustomEvent("change",{detail:{key:this.key,active:t}});this.dispatchEvent(i)}}window.customElements.define("dt-church-health-icon",Ra);class cs extends M{static get styles(){return[...super.styles,x` .root { display: block; } @@ -937,7 +937,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr font-size: 0.65em; color: var(--success-color); } - `]}static get properties(){return{...super.properties,id:{type:String},checked:{type:Boolean,reflect:!0},icons:{type:Boolean,default:!1}}}constructor(){super(),this.icons=!1}firstUpdated(){this.checked===void 0&&(this.checked=!1);const e=this.checked?"1":"0";this._setFormValue(e),this.value=this.checked}onChange(e){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.checked,newValue:e.target.checked}});this.checked=e.target.checked,this.value=e.target.checked,this._setFormValue(this.checked?"1":"0"),this.dispatchEvent(t)}onClickToggle(e){e.preventDefault(),e.target.closest("label").querySelector("input").click()}render(){const e=f``,t=f``;return f` + `]}static get properties(){return{...super.properties,id:{type:String},checked:{type:Boolean,reflect:!0},icons:{type:Boolean,default:!1}}}constructor(){super(),this.icons=!1}firstUpdated(){this.checked===void 0&&(this.checked=!1);const e=this.checked?"1":"0";this._setFormValue(e),this.value=this.checked}onChange(e){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.checked,newValue:e.target.checked}});this.checked=e.target.checked,this.value=e.target.checked,this._setFormValue(this.checked?"1":"0"),this.dispatchEvent(t)}onClickToggle(e){e.preventDefault(),e.target.closest("label").querySelector("input").click()}render(){const e=u``,t=u``;return u`
    ${this.labelTemplate()} @@ -958,13 +958,13 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ?disabled=${this.disabled} /> - ${this.icons?f` ${e} ${t} `:f``} + ${this.icons?u` ${e} ${t} `:u``} ${this.renderIcons()}
    - `}}window.customElements.define("dt-toggle",ds);class cs extends We{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-toggle",cs);class us extends Ze{static get styles(){return[...super.styles,x` .health-circle__container { --icon-count: 9; /* Updated circle size based on dynamic width */ @@ -1054,17 +1054,17 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .error-container { margin-block-start: 0.5rem; } - `]}static get properties(){const e={...super.properties,settings:{type:Object,reflect:!1},missingIcon:{type:String}};return delete e.placeholder,delete e.containerHeight,e}_filterOptions(){const e=this.options||[];if(!Object.values(e).length)return[];const t=Object.entries(e);return this.filteredOptions=t.filter(([i,s])=>i!=="church_commitment"),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("options");(t||i)&&this._filterOptions()}}get isCommited(){return this.value?this.value.includes("church_commitment"):!1}render(){return f` + `]}static get properties(){const e={...super.properties,settings:{type:Object,reflect:!1},missingIcon:{type:String}};return delete e.placeholder,delete e.containerHeight,e}_filterOptions(){const e=this.options||[];if(!Object.values(e).length)return[];const t=Object.entries(e);return this.filteredOptions=t.filter(([i,s])=>i!=="church_commitment"),this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e){const t=e.has("value"),i=e.has("options");(t||i)&&this._filterOptions()}}get isCommited(){return this.value?this.value.includes("church_commitment"):!1}render(){return u`
    - ${this.filteredOptions.map(([e,t],i)=>f`u` ${this.renderError()}
    - `}handleIconClick(e){const{key:t,active:i}=e.detail;i?this._select(t):this._remove(e)}async handleToggleChange(e){const{field:t,newValue:i}=e.detail;i?this._select(t):this._remove(e)}}window.customElements.define("dt-church-health-circle",cs);class Oe extends We{static get properties(){return{...super.properties,allowAdd:{type:Boolean}}}static get styles(){return[...super.styles,x` + `}handleIconClick(e){const{key:t,active:i}=e.detail;i?this._select(t):this._remove(e)}async handleToggleChange(e){const{field:t,newValue:i}=e.detail;i?this._select(t):this._remove(e)}}window.customElements.define("dt-church-health-circle",us);class Ce extends Ze{static get properties(){return{...super.properties,allowAdd:{type:Boolean}}}static get styles(){return[...super.styles,x` .selected-option a, .selected-option a:active, .selected-option a:visited { @@ -1135,7 +1135,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .input-group.allowAdd .icon-overlay { inset-inline-end: 3rem; } - `]}_addRecord(){const e=new CustomEvent("dt:add-new",{detail:{field:this.name,value:this.query}});this.dispatchEvent(e)}willUpdate(e){super.willUpdate(e),e&&e.has("open")&&this.open&&(!this.filteredOptions||!this.filteredOptions.length)&&this._filterOptions()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.startsWith("-"));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.id.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1;let n=a;n.length&&typeof n[0]=="string"&&(n=n.map(r=>({id:r}))),i.allOptions=n,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderOption(e,t){return f` + `]}_addRecord(){const e=new CustomEvent("dt:add-new",{detail:{field:this.name,value:this.query}});this.dispatchEvent(e)}willUpdate(e){super.willUpdate(e),e&&e.has("open")&&this.open&&(!this.filteredOptions||!this.filteredOptions.length)&&this._filterOptions()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.startsWith("-"));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.id.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1;let n=a;n.length&&typeof n[0]=="string"&&(n=n.map(r=>({id:r}))),i.allOptions=n,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderOption(e,t){return u`
  • - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||typeof t=="string"&&t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){const e=this.options||this.allOptions;return(this.value||[]).filter(t=>!t.startsWith("-")).map(t=>{var a;let i=t;if(e){const n=e.filter(r=>r===t||r.id===t);n.length&&(i=n[0].label||n[0].id||t)}let s;if(!s&&((a=window==null?void 0:window.SHAREDFUNCTIONS)!=null&&a.createCustomFilter)){const n=window.SHAREDFUNCTIONS.createCustomFilter(this.name,[t]),r=this.label||this.name,l=[{id:`${this.name}_${t}`,name:`${r}: ${t}`}];s=window.SHAREDFUNCTIONS.create_url_for_list_query(this.postType,n,l)}return f` + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||typeof t=="string"&&t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){const e=this.options||this.allOptions;return(this.value||[]).filter(t=>!t.startsWith("-")).map(t=>{var a;let i=t;if(e){const n=e.filter(r=>r===t||r.id===t);n.length&&(i=n[0].label||n[0].id||t)}let s;if(!s&&((a=window==null?void 0:window.SHAREDFUNCTIONS)!=null&&a.createCustomFilter)){const n=window.SHAREDFUNCTIONS.createCustomFilter(this.name,[t]),r=this.label||this.name,l=[{id:`${this.name}_${t}`,name:`${r}: ${t}`}];s=window.SHAREDFUNCTIONS.create_url_for_list_query(this.postType,n,l)}return u`
    - `})}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `})}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return u` ${this.labelTemplate()}
    @@ -1195,7 +1195,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ?required=${this.required} />
    - ${this.allowAdd?f``:null}
      @@ -1203,7 +1203,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-tags",Oe);class us extends Oe{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-tags",Ce);class hs extends Ce{static get styles(){return[...super.styles,x` .selected-option a { border-inline-start: solid 3px transparent; } @@ -1240,7 +1240,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .invalid { border-color: var(--dt-text-border-color-alert, var(--alert-color)); } - `]}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){let t=e.target.dataset.value;const i=Number.parseInt(t);Number.isNaN(i)||(t=i);const s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(a=>{const n={...a};return a.id===t&&(n.delete=!0),n}),s.detail.newValue=this.value,this.dispatchEvent(s),this.open&&this.shadowRoot.querySelector("input").focus(),this._validateRequired()}document.activeElement.blur()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id);if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.delete))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `]}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.stopPropagation(),e.target&&e.target.dataset&&e.target.dataset.value){let t=e.target.dataset.value;const i=Number.parseInt(t);Number.isNaN(i)||(t=i);const s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(a=>{const n={...a};return a.id===t&&(n.delete=!0),n}),s.detail.newValue=this.value,this.dispatchEvent(s),this.open&&this.shadowRoot.querySelector("input").focus(),this._validateRequired()}document.activeElement.blur()}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id);if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.delete))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>u`
    - `)}_renderOption(e,t){const i=f`circle-08 2Created using Figma`,s=e.status||{label:"",color:""};return f` + `)}_renderOption(e,t){const i=u`circle-08 2Created using Figma`,s=e.status||{label:"",color:""};return u`
  • - `}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return f` + `}render(){const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"};return u` ${this.labelTemplate()}
    @@ -1308,7 +1308,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ?required=${this.required} />
    - ${this.allowAdd?f``:null}
      @@ -1316,7 +1316,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-connection",us);class hs extends Oe{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-connection",hs);class ps extends Ce{static get styles(){return[...super.styles,x` .selected-option a { border-inline-start: solid 3px transparent; } @@ -1350,7 +1350,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr li button svg use { fill: var(--dt-connection-icon-fill, var(--primary-color)); } - `]}static get properties(){return{...super.properties,single:{type:Boolean}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length&&!this.single){let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete?(delete n.delete,i=!0):this.single&&!a.delete&&(n.delete=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._clearSearch()}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i),this.query=""}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="",this.query="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]),this.query="")}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value,remove:!0}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>Number(i==null?void 0:i.id));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `]}static get properties(){return{...super.properties,single:{type:Boolean}}}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length&&!this.single){let i=!1;const s=this.value.map(a=>{const n={...a};return a.id===e.id&&a.delete?(delete n.delete,i=!0):this.single&&!a.delete&&(n.delete=!0),n});i||s.push(e),this.value=s}else this.value=[e];t.detail.newValue=this.value,this.open=!1,this.activeIndex=-1,this.canUpdate=!0,this.dispatchEvent(t),this._clearSearch()}_clickOption(e){if(e.target&&e.target.value){const t=parseInt(e.target.value,10),i=this.filteredOptions.reduce((s,a)=>!s&&a.id==t?a:s,null);i&&this._select(i),this.query=""}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="",this.query="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]),this.query="")}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value,remove:!0}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>Number(i==null?void 0:i.id));if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,postType:this.postType,query:this.query,onSuccess:a=>{i.loading=!1,i.filteredOptions=a.filter(n=>!e.includes(n.id))},onError:a=>{console.warn(a),i.loading=!1,this.canUpdate=!1}}});this.dispatchEvent(s)}return this.filteredOptions}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>u` - `)}_renderOption(e,t){return f` + `)}_renderOption(e,t){return u`
  • - `}}window.customElements.define("dt-users-connection",hs);class ps extends R{static get styles(){return x` + `}}window.customElements.define("dt-users-connection",ps);class fs extends D{static get styles(){return x` :root { font-size: inherit; --dt-copy-text-color: #575757; @@ -1414,7 +1414,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr :host([dir='rtl']) .copy_icon { transform: translate(1.5em, -0.3125em); } - `}static get properties(){return{value:{type:String},success:{type:Boolean},error:{type:Boolean}}}get inputStyles(){return this.success?{"--dt-text-border-color":"var(--copy-text-success-color, var(--success-color))","--dt-form-text-color":"var( --copy-text-success-color, var(--success-color))",color:"var( --copy-text-success-color, var(--success-color))"}:this.error?{"---dt-text-border-color":"var(--copy-text-alert-color, var(--alert-color))","--dt-form-text-color":"var(--copy-text-alert-color, var(--alert-color))"}:{}}get icon(){return this.success?"ic:round-check":"ic:round-content-copy"}async copy(){try{this.success=!1,this.error=!1,await navigator.clipboard.writeText(this.value),this.success=!0,this.error=!1}catch(e){console.log(e),this.success=!1,this.error=!0}}render(){return f` + `}static get properties(){return{value:{type:String},success:{type:Boolean},error:{type:Boolean}}}get inputStyles(){return this.success?{"--dt-text-border-color":"var(--copy-text-success-color, var(--success-color))","--dt-form-text-color":"var( --copy-text-success-color, var(--success-color))",color:"var( --copy-text-success-color, var(--success-color))"}:this.error?{"---dt-text-border-color":"var(--copy-text-alert-color, var(--alert-color))","--dt-form-text-color":"var(--copy-text-alert-color, var(--alert-color))"}:{}}get icon(){return this.success?"ic:round-check":"ic:round-content-copy"}async copy(){try{this.success=!1,this.error=!1,await navigator.clipboard.writeText(this.value),this.success=!0,this.error=!1}catch(e){console.log(e),this.success=!1,this.error=!0}}render(){return u`
    - `}}window.customElements.define("dt-copy-text",ps);class Dt extends D{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-copy-text",fs);class Ft extends M{static get styles(){return[...super.styles,x` input { color: var(--dt-form-text-color, #000); appearance: none; @@ -1542,14 +1542,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .icon-overlay { inset-inline-end: 5rem; } - `]}static get properties(){return{...super.properties,value:{type:String,reflect:!0},timestamp:{converter:e=>{let t=Number(e);if(t<1e12&&(t*=1e3),t)return t},reflect:!0}}}updateTimestamp(e){const t=new Date(e).getTime(),i=t/1e3,s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.timestamp,newValue:i}});this.timestamp=t,this.value=e,this._setFormValue(e),this.dispatchEvent(s)}_change(e){this.updateTimestamp(e.target.value)}clearInput(){this.updateTimestamp("")}showDatePicker(){this.shadowRoot.querySelector("input").showPicker()}_validateRequired(){const{value:e}=this;this.required&&!e?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid,disabled:this.disabled}}get fieldContainerClasses(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){return this.timestamp?this.value=new Date(this.timestamp).toISOString().substring(0,10):this.value&&(this.timestamp=new Date(this.value).getTime()),f` + `]}static get properties(){return{...super.properties,value:{type:String,reflect:!0},timestamp:{converter:e=>{let t=Number(e);if(t<1e12&&(t*=1e3),t)return t},reflect:!0}}}updateTimestamp(e){const t=new Date(e).getTime(),i=t/1e3,s=new CustomEvent("change",{detail:{field:this.name,oldValue:this.timestamp,newValue:i}});this.timestamp=t,this.value=e,this._setFormValue(e),this.dispatchEvent(s)}_change(e){this.updateTimestamp(e.target.value)}clearInput(){this.updateTimestamp("")}showDatePicker(){this.shadowRoot.querySelector("input").showPicker()}_validateRequired(){const{value:e}=this;this.required&&!e?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid,disabled:this.disabled}}get fieldContainerClasses(){return{"field-container":!0,invalid:this.touched&&this.invalid}}render(){return this.timestamp?this.value=new Date(this.timestamp).toISOString().substring(0,10):this.value&&(this.timestamp=new Date(this.value).getTime()),u` ${this.labelTemplate()}
    -
    +
    - `}reset(){this.updateTimestamp(""),super.reset()}}window.customElements.define("dt-date",Dt);class fs extends Dt{static get styles(){return[...super.styles,x` + `}reset(){this.updateTimestamp(""),super.reset()}}window.customElements.define("dt-date",Ft);class bs extends Ft{static get styles(){return[...super.styles,x` input[type='datetime-local'] { max-width: calc(100% - 22px - 1rem); } - `]}static get properties(){return{...super.properties,tzoffset:{type:Number}}}constructor(){super(),this.tzoffset=new Date().getTimezoneOffset()*6e4}render(){return this.timestamp?this.value=new Date(this.timestamp-this.tzoffset).toISOString().substring(0,16):this.value&&(this.timestamp=new Date(this.value).getTime()),f` + `]}static get properties(){return{...super.properties,tzoffset:{type:Number}}}constructor(){super(),this.tzoffset=new Date().getTimezoneOffset()*6e4}render(){return this.timestamp?this.value=new Date(this.timestamp-this.tzoffset).toISOString().substring(0,16):this.value&&(this.timestamp=new Date(this.value).getTime()),u` ${this.labelTemplate()}
    -
    +
    - `}}window.customElements.define("dt-datetime",fs);/** + `}}window.customElements.define("dt-datetime",bs);/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function*Ke(o,e){if(o!==void 0){let t=0;for(const i of o)yield e(i,t++)}}class bs extends Oe{static get properties(){return{...super.properties,filters:{type:Array}}}static get styles(){return[...super.styles,x` + */function*Je(o,e){if(o!==void 0){let t=0;for(const i of o)yield e(i,t++)}}class gs extends Ce{static get properties(){return{...super.properties,filters:{type:Array}}}static get styles(){return[...super.styles,x` .input-group { display: flex; } @@ -1638,7 +1638,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr 8px ); } - `]}_clickOption(e){if(e.target&&e.target.value){const t=e.target.value,i=this.filteredOptions.reduce((s,a)=>!s&&a.id===t?a:s,null);this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}updated(){super.updated();const e=this.shadowRoot.querySelector(".input-group"),t=e.style.getPropertyValue("--select-width"),i=this.shadowRoot.querySelector("select");!t&&(i==null?void 0:i.clientWidth)>0&&e.style.setProperty("--select-width",`${i.clientWidth}px`)}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id.toString());if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=this.shadowRoot.querySelector("select"),a=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,query:this.query,filter:s==null?void 0:s.value,onSuccess:n=>{i.loading=!1,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:n=>{console.warn(n),i.loading=!1}}});this.dispatchEvent(a)}return this.filteredOptions}_renderOption(e,t){return f` + `]}_clickOption(e){if(e.target&&e.target.value){const t=e.target.value,i=this.filteredOptions.reduce((s,a)=>!s&&a.id===t?a:s,null);this._select(i)}}_clickAddNew(e){var t,i;if(e.target){this._select({id:(t=e.target.dataset)==null?void 0:t.label,label:(i=e.target.dataset)==null?void 0:i.label,isNew:!0});const s=this.shadowRoot.querySelector("input");s&&(s.value="")}}_keyboardSelectOption(){this.activeIndex>-1&&(this.activeIndex+1>this.filteredOptions.length?this._select({id:this.query,label:this.query,isNew:!0}):this._select(this.filteredOptions[this.activeIndex]))}_remove(e){if(e.target&&e.target.dataset&&e.target.dataset.value){const t=new CustomEvent("change",{detail:{field:this.name,oldValue:this.value}});this.value=(this.value||[]).map(i=>{const s={...i};return i.id.toString()===e.target.dataset.value&&(s.delete=!0),s}),t.detail.newValue=this.value,this.dispatchEvent(t),this.open&&this.shadowRoot.querySelector("input").focus()}}updated(){super.updated();const e=this.shadowRoot.querySelector(".input-group"),t=e.style.getPropertyValue("--select-width"),i=this.shadowRoot.querySelector("select");!t&&(i==null?void 0:i.clientWidth)>0&&e.style.setProperty("--select-width",`${i.clientWidth}px`)}_filterOptions(){var t;const e=(this.value||[]).filter(i=>!i.delete).map(i=>i==null?void 0:i.id.toString());if((t=this.options)!=null&&t.length)this.filteredOptions=(this.options||[]).filter(i=>!e.includes(i.id)&&(!this.query||i.label.toLocaleLowerCase().includes(this.query.toLocaleLowerCase())));else if(this.open||this.canUpdate){this.loading=!0,this.filteredOptions=[];const i=this,s=this.shadowRoot.querySelector("select"),a=new CustomEvent("dt:get-data",{bubbles:!0,detail:{field:this.name,query:this.query,filter:s==null?void 0:s.value,onSuccess:n=>{i.loading=!1,i.filteredOptions=n.filter(r=>!e.includes(r.id))},onError:n=>{console.warn(n),i.loading=!1}}});this.dispatchEvent(a)}return this.filteredOptions}_renderOption(e,t){return u`
  • - `}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>f` + `}_renderSelectedOptions(){return(this.value||[]).filter(e=>!e.delete).map(e=>u`
    - `)}render(){const e={display:this.open?"block":"none",top:`${this.containerHeight}px`};return f` + `)}render(){const e={display:this.open?"block":"none",top:`${this.containerHeight}px`};return u` ${this.labelTemplate()}
    @@ -1697,14 +1697,14 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr ?disabled="${this.disabled}" @change="${this._filterOptions}" > - ${Ke(this.filters,t=>f``)} + ${Je(this.filters,t=>u``)}
      ${this._renderOptions()}
    ${this.renderIconInvalid()} ${this.renderError()}
    - `}}window.customElements.define("dt-location",bs);class Ra{constructor(e){this.token=e}async searchPlaces(e,t="en"){const i=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],limit:6,access_token:this.token,language:t}),s={method:"GET",headers:{"Content-Type":"application/json"}},a=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)}.json?${i}`,r=await(await fetch(a,s)).json();return r==null?void 0:r.features}async reverseGeocode(e,t,i="en"){const s=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],access_token:this.token,language:i}),a={method:"GET",headers:{"Content-Type":"application/json"}},n=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)},${encodeURI(t)}.json?${s}`,l=await(await fetch(n,a)).json();return l==null?void 0:l.features}}class Na{constructor(e,t,i){var s,a,n;if(this.token=e,this.window=t,!((n=(a=(s=t.google)==null?void 0:s.maps)==null?void 0:a.places)!=null&&n.AutocompleteService)){const r=i.createElement("script");r.src=`https://maps.googleapis.com/maps/api/js?libraries=places&key=${e}`,i.body.appendChild(r)}}async getPlacePredictions(e,t="en"){try{return await this._getPlacePredictionsLegacy(e,t)}catch(i){const s=await this._getPlaceSuggestionsRest(e,t);if(s)return s;throw{message:i}}}async _getPlacePredictionsLegacy(e,t="en"){return this.window.google?new Promise((i,s)=>{const a=new this.window.google.maps.places.AutocompleteService;window.gm_authFailure=function(){s("Google Maps API Key authentication failed")},a.getPlacePredictions({input:e,language:t},(n,r)=>{r!=="OK"?s(r):i(n)})}):null}async _getPlaceSuggestionsRest(e,t="en"){const i="https://places.googleapis.com/v1/places:autocomplete?key="+encodeURIComponent(this.token),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),n=await a.json();if(!a.ok&&n.error)throw n.error;return(Array.isArray(n&&n.suggestions)?n.suggestions:[]).map(b=>b&&b.placePrediction?b.placePrediction:null).filter(Boolean).map(b=>{const g=b.placeId||(b.place?String(b.place).replace("places/",""):null),v=b.text&&b.text.text||[b.structuredFormat&&b.structuredFormat.mainText&&b.structuredFormat.mainText.text,b.structuredFormat&&b.structuredFormat.secondaryText&&b.structuredFormat.secondaryText.text].filter(Boolean).join(", ");return g&&v?{description:v,place_id:g}:null}).filter(Boolean)}async getPlaceDetails(e,t="en"){let i=null;if(this.window.google){const s=new window.google.maps.Geocoder;try{const{results:a}=await s.geocode({placeId:e.place_id,language:t}),n=a[0];i={lng:n.geometry.location.lng(),lat:n.geometry.location.lat(),level:this.convert_level(n.types[0]),label:e.description||n.formatted_address}}catch(a){i={error:a}}}return i}async reverseGeocode(e,t,i="en"){const a=`https://maps.googleapis.com/maps/api/geocode/json?${new URLSearchParams({key:this.token,latlng:`${t},${e}`,language:i,result_type:["point_of_interest","establishment","premise","street_address","neighborhood","sublocality","locality","colloquial_area","political","country"].join("|")})}`,r=await(await fetch(a,{method:"GET"})).json();return r==null?void 0:r.results}convert_level(e){switch(e){case"administrative_area_level_0":e="admin0";break;case"administrative_area_level_1":e="admin1";break;case"administrative_area_level_2":e="admin2";break;case"administrative_area_level_3":e="admin3";break;case"administrative_area_level_4":e="admin4";break;case"administrative_area_level_5":e="admin5";break}return e}}class gs extends R{static get styles(){return x` + `}}window.customElements.define("dt-location",gs);class Na{constructor(e){this.token=e}async searchPlaces(e,t="en"){const i=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],limit:6,access_token:this.token,language:t}),s={method:"GET",headers:{"Content-Type":"application/json"}},a=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)}.json?${i}`,r=await(await fetch(a,s)).json();return r==null?void 0:r.features}async reverseGeocode(e,t,i="en"){const s=new URLSearchParams({types:["country","region","postcode","district","place","locality","neighborhood","address"],access_token:this.token,language:i}),a={method:"GET",headers:{"Content-Type":"application/json"}},n=`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(e)},${encodeURI(t)}.json?${s}`,l=await(await fetch(n,a)).json();return l==null?void 0:l.features}}class qa{constructor(e,t,i){var s,a,n;if(this.token=e,this.window=t,!((n=(a=(s=t.google)==null?void 0:s.maps)==null?void 0:a.places)!=null&&n.AutocompleteService)){const r=i.createElement("script");r.src=`https://maps.googleapis.com/maps/api/js?libraries=places&key=${e}`,i.body.appendChild(r)}}async getPlacePredictions(e,t="en"){try{return await this._getPlacePredictionsLegacy(e,t)}catch(i){const s=await this._getPlaceSuggestionsRest(e,t);if(s)return s;throw{message:i}}}async _getPlacePredictionsLegacy(e,t="en"){return this.window.google?new Promise((i,s)=>{const a=new this.window.google.maps.places.AutocompleteService;window.gm_authFailure=function(){s("Google Maps API Key authentication failed")},a.getPlacePredictions({input:e,language:t},(n,r)=>{r!=="OK"?s(r):i(n)})}):null}async _getPlaceSuggestionsRest(e,t="en"){const i="https://places.googleapis.com/v1/places:autocomplete?key="+encodeURIComponent(this.token),a=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),n=await a.json();if(!a.ok&&n.error)throw n.error;return(Array.isArray(n&&n.suggestions)?n.suggestions:[]).map(h=>h&&h.placePrediction?h.placePrediction:null).filter(Boolean).map(h=>{const g=h.placeId||(h.place?String(h.place).replace("places/",""):null),m=h.text&&h.text.text||[h.structuredFormat&&h.structuredFormat.mainText&&h.structuredFormat.mainText.text,h.structuredFormat&&h.structuredFormat.secondaryText&&h.structuredFormat.secondaryText.text].filter(Boolean).join(", ");return g&&m?{description:m,place_id:g}:null}).filter(Boolean)}async getPlaceDetails(e,t="en"){let i=null;if(this.window.google){const s=new window.google.maps.Geocoder;try{const{results:a}=await s.geocode({placeId:e.place_id,language:t}),n=a[0];i={lng:n.geometry.location.lng(),lat:n.geometry.location.lat(),level:this.convert_level(n.types[0]),label:e.description||n.formatted_address}}catch(a){i={error:a}}}return i}async reverseGeocode(e,t,i="en"){const a=`https://maps.googleapis.com/maps/api/geocode/json?${new URLSearchParams({key:this.token,latlng:`${t},${e}`,language:i,result_type:["point_of_interest","establishment","premise","street_address","neighborhood","sublocality","locality","colloquial_area","political","country"].join("|")})}`,r=await(await fetch(a,{method:"GET"})).json();return r==null?void 0:r.results}convert_level(e){switch(e){case"administrative_area_level_0":e="admin0";break;case"administrative_area_level_1":e="admin1";break;case"administrative_area_level_2":e="admin2";break;case"administrative_area_level_3":e="admin3";break;case"administrative_area_level_4":e="admin4";break;case"administrative_area_level_5":e="admin5";break}return e}}class ms extends D{static get styles(){return x` :host { display: block; font-family: var(--font-family); @@ -1922,12 +1922,12 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr /* Styles for the content inside the named slot */ font-size: 15px;; } - `}static get properties(){return{title:{type:String},context:{type:String},isHelp:{type:Boolean},isOpen:{type:Boolean},hideHeader:{type:Boolean},hideButton:{type:Boolean},buttonClass:{type:Object},buttonStyle:{type:Object},headerClass:{type:Object},imageSrc:{type:String},imageStyle:{type:Object},tileLabel:{type:String},buttonLabel:{type:String},dropdownListImg:{type:String},submitButton:{type:Boolean},closeButton:{type:Boolean},bottom:{type:Boolean}}}constructor(){super(),this.context="default",this.addEventListener("open",()=>this._openModal()),this.addEventListener("close",()=>this._closeModal())}_openModal(){this.isOpen=!0,this.shadowRoot.querySelector("dialog").showModal(),document.querySelector("body").style.overflow="hidden"}get formattedTitle(){if(!this.title)return"";const e=this.title.replace(/_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}_dialogHeader(e){return this.hideHeader?f``:f` + `}static get properties(){return{title:{type:String},context:{type:String},isHelp:{type:Boolean},isOpen:{type:Boolean},hideHeader:{type:Boolean},hideButton:{type:Boolean},buttonClass:{type:Object},buttonStyle:{type:Object},headerClass:{type:Object},imageSrc:{type:String},imageStyle:{type:Object},tileLabel:{type:String},buttonLabel:{type:String},dropdownListImg:{type:String},submitButton:{type:Boolean},closeButton:{type:Boolean},bottom:{type:Boolean}}}constructor(){super(),this.context="default",this.addEventListener("open",()=>this._openModal()),this.addEventListener("close",()=>this._closeModal())}_openModal(){this.isOpen=!0,this.shadowRoot.querySelector("dialog").showModal(),document.querySelector("body").style.overflow="hidden"}get formattedTitle(){if(!this.title)return"";const e=this.title.replace(/_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}_dialogHeader(e){return this.hideHeader?u``:u`

    ${this.formattedTitle}

    - `}_closeModal(){this.isOpen=!1,this.shadowRoot.querySelector("dialog").close(),document.querySelector("body").style.overflow="initial"}_cancelModal(){this._triggerClose("cancel")}_triggerClose(e){this.dispatchEvent(new CustomEvent("close",{detail:{action:e}}))}_dialogClick(e){if(e.target.tagName!=="DIALOG")return;const t=e.target.getBoundingClientRect();(t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width)===!1&&this._cancelModal()}_dialogKeypress(e){e.key==="Escape"&&this._cancelModal()}_helpMore(){return this.isHelp?f` + `}_closeModal(){this.isOpen=!1,this.shadowRoot.querySelector("dialog").close(),document.querySelector("body").style.overflow="initial"}_cancelModal(){this._triggerClose("cancel")}_triggerClose(e){this.dispatchEvent(new CustomEvent("close",{detail:{action:e}}))}_dialogClick(e){if(e.target.tagName!=="DIALOG")return;const t=e.target.getBoundingClientRect();(t.top<=e.clientY&&e.clientY<=t.top+t.height&&t.left<=e.clientX&&e.clientX<=t.left+t.width)===!1&&this._cancelModal()}_dialogKeypress(e){e.key==="Escape"&&this._cancelModal()}_helpMore(){return this.isHelp?u`
    - `:null}firstUpdated(){this.isOpen&&this._openModal()}_onButtonClick(){this._triggerClose("button")}get classes(){return{...this.headerClass,"no-header":this.hideHeader,bottom:this.bottom}}render(){const e=f` + `:null}firstUpdated(){this.isOpen&&this._openModal()}_onButtonClick(){this._triggerClose("button")}get classes(){return{...this.headerClass,"no-header":this.hideHeader,bottom:this.bottom}}render(){const e=u` xmlns="http://www.w3.org/2000/svg"> - `;return f` + `;return u` @@ -1964,7 +1964,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr
    - ${this.hideButton?null:f` + ${this.hideButton?null:u` `} - `}}window.customElements.define("dt-modal",gs);class ms extends R{static get properties(){return{...super.properties,title:{type:String},isOpen:{type:Boolean},canEdit:{type:Boolean,state:!0},metadata:{type:Object},center:{type:Array},mapboxToken:{type:String,attribute:"mapbox-token"}}}static get styles(){return[x` + `}}window.customElements.define("dt-modal",ms);class vs extends D{static get properties(){return{...super.properties,title:{type:String},isOpen:{type:Boolean},canEdit:{type:Boolean,state:!0},metadata:{type:Object},center:{type:Array},mapboxToken:{type:String,attribute:"mapbox-token"}}}static get styles(){return[x` .map { width: 100%; min-width: 50vw; min-height: 50dvb; } - `]}constructor(){super(),this.addEventListener("open",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("open")),this.isOpen=!0}),this.addEventListener("close",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("close")),this.isOpen=!1})}connectedCallback(){if(super.connectedCallback(),this.canEdit=!this.metadata,window.mapboxgl)this.initMap();else{const e=document.createElement("script");e.src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js",e.onload=this.initMap.bind(this),document.body.appendChild(e)}}initMap(){if(!this.isOpen||!window.mapboxgl||!this.mapboxToken)return;const e=this.shadowRoot.querySelector("#map");if(e&&!this.map){this.map=new window.mapboxgl.Map({accessToken:this.mapboxToken,container:e,style:"mapbox://styles/mapbox/streets-v12",minZoom:1}),this.map.on("load",()=>this.map.resize()),this.center&&this.center.length&&(this.map.setCenter(this.center),this.map.setZoom(15));const t=new mapboxgl.NavigationControl;this.map.addControl(t,"bottom-right"),this.addPinFromMetadata(),this.map.on("click",i=>{this.canEdit&&(this.marker?this.marker.setLngLat(i.lngLat):this.marker=new mapboxgl.Marker().setLngLat(i.lngLat).addTo(this.map))})}}addPinFromMetadata(){if(this.metadata){const{lng:e,lat:t,level:i}=this.metadata;let s=15;i==="admin0"?s=3:i==="admin1"?s=6:i==="admin2"&&(s=10),this.map&&(this.map.setCenter([e,t]),this.map.setZoom(s),this.marker=new mapboxgl.Marker().setLngLat([e,t]).addTo(this.map))}}updated(e){window.mapboxgl&&(e.has("metadata")&&this.metadata&&this.metadata.lat&&this.addPinFromMetadata(),e.has("isOpen")&&this.isOpen&&this.initMap())}onClose(e){var t;((t=e==null?void 0:e.detail)==null?void 0:t.action)==="button"&&this.marker&&this.dispatchEvent(new CustomEvent("submit",{detail:{location:this.marker.getLngLat()}}))}render(){var e;return f` + `]}constructor(){super(),this.addEventListener("open",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("open")),this.isOpen=!0}),this.addEventListener("close",e=>{this.shadowRoot.querySelector("dt-modal").dispatchEvent(new Event("close")),this.isOpen=!1})}connectedCallback(){if(super.connectedCallback(),this.canEdit=!this.metadata,window.mapboxgl)this.initMap();else{const e=document.createElement("script");e.src="https://api.mapbox.com/mapbox-gl-js/v2.11.0/mapbox-gl.js",e.onload=this.initMap.bind(this),document.body.appendChild(e)}}initMap(){if(!this.isOpen||!window.mapboxgl||!this.mapboxToken)return;const e=this.shadowRoot.querySelector("#map");if(e&&!this.map){this.map=new window.mapboxgl.Map({accessToken:this.mapboxToken,container:e,style:"mapbox://styles/mapbox/streets-v12",minZoom:1}),this.map.on("load",()=>this.map.resize()),this.center&&this.center.length&&(this.map.setCenter(this.center),this.map.setZoom(15));const t=new mapboxgl.NavigationControl;this.map.addControl(t,"bottom-right"),this.addPinFromMetadata(),this.map.on("click",i=>{this.canEdit&&(this.marker?this.marker.setLngLat(i.lngLat):this.marker=new mapboxgl.Marker().setLngLat(i.lngLat).addTo(this.map))})}}addPinFromMetadata(){if(this.metadata){const{lng:e,lat:t,level:i}=this.metadata;let s=15;i==="admin0"?s=3:i==="admin1"?s=6:i==="admin2"&&(s=10),this.map&&(this.map.setCenter([e,t]),this.map.setZoom(s),this.marker=new mapboxgl.Marker().setLngLat([e,t]).addTo(this.map))}}updated(e){window.mapboxgl&&(e.has("metadata")&&this.metadata&&this.metadata.lat&&this.addPinFromMetadata(),e.has("isOpen")&&this.isOpen&&this.initMap())}onClose(e){var t;((t=e==null?void 0:e.detail)==null?void 0:t.action)==="button"&&this.marker&&this.dispatchEvent(new CustomEvent("submit",{detail:{location:this.marker.getLngLat()}}))}render(){var e;return u`
    - ${this.canEdit?f`
    ${O("Save")}
    `:null} + ${this.canEdit?u`
    ${O("Save")}
    `:null} - `}}window.customElements.define("dt-map-modal",ms);class qa extends R{static get properties(){return{id:{type:String,reflect:!0},placeholder:{type:String},mapboxToken:{type:String,attribute:"mapbox-token"},googleToken:{type:String,attribute:"google-token"},metadata:{type:Object},disabled:{type:Boolean},open:{type:Boolean,state:!0},query:{type:String,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean},saved:{type:Boolean},invalid:{type:Boolean},filteredOptions:{type:Array,state:!0}}}static get styles(){return[x` + `}}window.customElements.define("dt-map-modal",vs);class Ua extends D{static get properties(){return{id:{type:String,reflect:!0},placeholder:{type:String},mapboxToken:{type:String,attribute:"mapbox-token"},googleToken:{type:String,attribute:"google-token"},metadata:{type:Object},disabled:{type:Boolean},open:{type:Boolean,state:!0},query:{type:String,state:!0},activeIndex:{type:Number,state:!0},containerHeight:{type:Number,state:!0},loading:{type:Boolean},saved:{type:Boolean},invalid:{type:Boolean},filteredOptions:{type:Array,state:!0}}}static get styles(){return[x` :host { --dt-location-map-border-color: var(--dt-form-border-color, #fefefe); position: relative; @@ -2247,7 +2247,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr opacity: 0; animation: fadeOut 4s; } - `]}constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1,this.debounceTimer=null}connectedCallback(){super.connectedCallback(),this.addEventListener("autofocus",async()=>{await this.updateComplete;const e=this.shadowRoot.querySelector("input");e&&e.focus()}),this.mapboxToken&&(this.mapboxService=new Ra(this.mapboxToken))}firstUpdated(){var e;this.googleToken&&!((e=this.metadata)!=null&&e.lat)&&(this.googleGeocodeService=new Na(this.googleToken,window,document))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("autofocus",this.handleAutofocus)}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");e.style.getPropertyValue("--container-width")||e.style.setProperty("--container-width",`${e.clientWidth}px`)}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,s=t.offsetTop+t.clientHeight,a=e.scrollTop,n=e.scrollTop+e.clientHeight;s>n?e.scrollTo({top:s-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex({label:t.description,place_id:t.place_id,source:"user",raw:t})),this.loading=!1}catch(e){console.error(e),this.error=e.message||"An error occurred while searching for locations.",this.loading=!1;return}}else if(this.mapboxToken&&this.mapboxService){this.saved=!1,this.loading=!0;const e=await this.mapboxService.searchPlaces(this.query,this.locale);this.filteredOptions=e.map(t=>({lng:t.center[0],lat:t.center[1],level:t.place_type[0],label:t.place_name,source:"user"})),this.loading=!1}}return this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e&&(e.has("query")&&(this.error=!1,clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this._filterOptions(),300)),!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length)){const i=this.shadowRoot.querySelector(".input-group");i&&(this.containerHeight=i.offsetHeight)}}_change(){}_delete(){const e={detail:{metadata:this.metadata},bubbles:!1};this.dispatchEvent(new CustomEvent("delete",e))}_openMapModal(){this.shadowRoot.querySelector("dt-map-modal").dispatchEvent(new Event("open"))}async _onMapModalSubmit(e){var t,i;if((i=(t=e==null?void 0:e.detail)==null?void 0:t.location)!=null&&i.lat){const{location:s}=e==null?void 0:e.detail,{lat:a,lng:n}=s;if(this.googleGeocodeService){const r=await this.googleGeocodeService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.geometry.location.lng,lat:l.geometry.location.lat,level:l.types&&l.types.length?l.types[0]:null,label:l.formatted_address,source:"user"})}}else if(this.mapboxService){const r=await this.mapboxService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.center[0],lat:l.center[1],level:l.place_type[0],label:l.place_name,source:"user"})}}}}_renderOption(e,t,i){return f` + `]}constructor(){super(),this.activeIndex=-1,this.filteredOptions=[],this.detectTap=!1,this.debounceTimer=null}connectedCallback(){super.connectedCallback(),this.addEventListener("autofocus",async()=>{await this.updateComplete;const e=this.shadowRoot.querySelector("input");e&&e.focus()}),this.mapboxToken&&(this.mapboxService=new Na(this.mapboxToken))}firstUpdated(){var e;this.googleToken&&!((e=this.metadata)!=null&&e.lat)&&(this.googleGeocodeService=new qa(this.googleToken,window,document))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("autofocus",this.handleAutofocus)}updated(){this._scrollOptionListToActive();const e=this.shadowRoot.querySelector(".input-group");e.style.getPropertyValue("--container-width")||e.style.setProperty("--container-width",`${e.clientWidth}px`)}_scrollOptionListToActive(){const e=this.shadowRoot.querySelector(".option-list"),t=this.shadowRoot.querySelector("button.active");if(e&&t){const i=t.offsetTop,s=t.offsetTop+t.clientHeight,a=e.scrollTop,n=e.scrollTop+e.clientHeight;s>n?e.scrollTo({top:s-e.clientHeight,behavior:"smooth"}):i-1&&(this.activeIndex({label:t.description,place_id:t.place_id,source:"user",raw:t})),this.loading=!1}catch(e){console.error(e),this.error=e.message||"An error occurred while searching for locations.",this.loading=!1;return}}else if(this.mapboxToken&&this.mapboxService){this.saved=!1,this.loading=!0;const e=await this.mapboxService.searchPlaces(this.query,this.locale);this.filteredOptions=e.map(t=>({lng:t.center[0],lat:t.center[1],level:t.place_type[0],label:t.place_name,source:"user"})),this.loading=!1}}return this.filteredOptions}willUpdate(e){if(super.willUpdate(e),e&&(e.has("query")&&(this.error=!1,clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this._filterOptions(),300)),!this.containerHeight&&this.shadowRoot.children&&this.shadowRoot.children.length)){const i=this.shadowRoot.querySelector(".input-group");i&&(this.containerHeight=i.offsetHeight)}}_change(){}_delete(){const e={detail:{metadata:this.metadata},bubbles:!1};this.dispatchEvent(new CustomEvent("delete",e))}_openMapModal(){this.shadowRoot.querySelector("dt-map-modal").dispatchEvent(new Event("open"))}async _onMapModalSubmit(e){var t,i;if((i=(t=e==null?void 0:e.detail)==null?void 0:t.location)!=null&&i.lat){const{location:s}=e==null?void 0:e.detail,{lat:a,lng:n}=s;if(this.googleGeocodeService){const r=await this.googleGeocodeService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.geometry.location.lng,lat:l.geometry.location.lat,level:l.types&&l.types.length?l.types[0]:null,label:l.formatted_address,source:"user"})}}else if(this.mapboxService){const r=await this.mapboxService.reverseGeocode(n,a,this.locale);if(r&&r.length){const l=r[0];this._select({lng:l.center[0],lat:l.center[1],level:l.place_type[0],label:l.place_name,source:"user"})}}}}_renderOption(e,t,i){return u`
  • - `}_renderOptions(){const e=[];return this.filteredOptions.length?e.push(...this.filteredOptions.map((t,i)=>this._renderOption(t,i))):this.loading?e.push(f`
  • ${O("Loading...")}
  • `):e.push(f`
  • ${O("No Data Available")}
  • `),e.push(this._renderOption({value:this.query,label:this.query},(this.filteredOptions||[]).length,f`${O("Use")}: "${this.query}"`)),e}get classes(){return{"field-container":!0,invalid:this.invalid}}render(){var s,a,n,r;const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"},t=!!((s=this.metadata)!=null&&s.label),i=((a=this.metadata)==null?void 0:a.lat)&&((n=this.metadata)==null?void 0:n.lng);return f` + `}_renderOptions(){const e=[];return this.filteredOptions.length?e.push(...this.filteredOptions.map((t,i)=>this._renderOption(t,i))):this.loading?e.push(u`
  • ${O("Loading...")}
  • `):e.push(u`
  • ${O("No Data Available")}
  • `),e.push(this._renderOption({value:this.query,label:this.query},(this.filteredOptions||[]).length,u`${O("Use")}: "${this.query}"`)),e}get classes(){return{"field-container":!0,invalid:this.invalid}}render(){var s,a,n,r;const e={display:this.open?"block":"none",top:this.containerHeight?`${this.containerHeight}px`:"2.5rem"},t=!!((s=this.metadata)!=null&&s.label),i=((a=this.metadata)==null?void 0:a.lat)&&((n=this.metadata)==null?void 0:n.lng);return u`
    -
    +
    - ${t&&i?f` + ${t&&i?u` `:null} - ${t?f` + ${t?u` - `:f` + `:u` - `,()=>f``)} + `,()=>u``)}
    - `}renderIcons(){let e=0,t=!1;for(const[a,n]of(this.value||[]).entries())!n.value&&a!==0?e+=1:n.delete&&!t&&(t=!0);let i=.5;t===!1&&(i+=3*e);const s=`padding-block-end: ${i.toString()}rem`;return f` + `}renderIcons(){let e=0,t=!1;for(const[a,n]of(this.value||[]).entries())!n.value&&a!==0?e+=1:n.delete&&!t&&(t=!0);let i=.5;t===!1&&(i+=3*e);const s=`padding-block-end: ${i.toString()}rem`;return u` ${this.renderIconInvalid()} ${this.renderError()} ${this.renderIconLoading(s)} ${this.renderIconSaved(s)} - `}renderIconLoading(e){return this.loading?f``:null}renderIconSaved(e){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?f``:null}renderIconSaved(e){return this.saved&&(this.savedTimeout&&clearTimeout(this.savedTimeout),this.savedTimeout=setTimeout(()=>{this.savedTimeout=null,this.saved=!1},5e3)),this.saved?u``:null}_renderInputFields(){return(!this.value||!this.value.length)&&(this.value=[{verified:!1,value:"",tempKey:Date.now().toString()}]),f` - ${Ee((this.value??[]).filter(e=>!e.delete),e=>e.id,e=>this._inputFieldTemplate(e,this.value.length))} - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t.value))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid}}render(){return f` + >`:null}_renderInputFields(){return(!this.value||!this.value.length)&&(this.value=[{verified:!1,value:"",tempKey:Date.now().toString()}]),u` + ${de((this.value??[]).filter(e=>!e.delete),e=>e.id,e=>this._inputFieldTemplate(e,this.value.length))} + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t.value))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"text-input":!0,invalid:this.touched&&this.invalid}}render(){return u` ${this.labelTemplate()}
    ${this._renderInputFields()} ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-text",$s);class xs extends D{static get styles(){return[...super.styles,x` + `}}window.customElements.define("dt-multi-text",xs);class ks extends M{static get styles(){return[...super.styles,x` :host { margin-bottom: 5px; --dt-button-font-size: 0.75rem; @@ -2932,7 +2932,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr .invalid ~ .error-container { border-top-width: 1px; } - `]}constructor(){super(),this.options=[]}static get properties(){return{value:{type:Array,reflect:!0},context:{type:String},options:{type:Array},outline:{type:Boolean}}}get _field(){return this.shadowRoot.querySelector(".input-group")}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length){const i=this.value.includes(e);this.value=[...this.value.filter(s=>s!==e&&s!==`-${e}`),i?`-${e}`:e]}else this.value=[e];t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value)}_clickOption(e){var t;(t=e==null?void 0:e.currentTarget)!=null&&t.value&&this._select(e.currentTarget.value)}_inputKeyUp(e){switch(e.keyCode||e.which){case 13:this._clickOption(e);break}}_renderButton(e){const i=(this.value??[]).includes(e.id)?"success":this.touched&&this.invalid?"alert":"inactive",s=this.outline??(this.touched&&this.invalid);return f` + `]}constructor(){super(),this.options=[]}static get properties(){return{value:{type:Array,reflect:!0},context:{type:String},options:{type:Array},outline:{type:Boolean}}}get _field(){return this.shadowRoot.querySelector(".input-group")}_select(e){const t=new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value}});if(this.value&&this.value.length){const i=this.value.includes(e);this.value=[...this.value.filter(s=>s!==e&&s!==`-${e}`),i?`-${e}`:e]}else this.value=[e];t.detail.newValue=this.value,this.dispatchEvent(t),this._setFormValue(this.value)}_clickOption(e){var t;(t=e==null?void 0:e.currentTarget)!=null&&t.value&&this._select(e.currentTarget.value)}_inputKeyUp(e){switch(e.keyCode||e.which){case 13:this._clickOption(e);break}}_renderButton(e){const i=(this.value??[]).includes(e.id)?"success":this.touched&&this.invalid?"alert":"inactive",s=this.outline??(this.touched&&this.invalid);return u` - ${e.icon?f`${this.iconAltText}`:null} ${e.label} - `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"button-group":!0,invalid:this.touched&&this.invalid}}render(){return f` + `}_validateRequired(){const{value:e}=this;this.required&&(!e||e.every(t=>!t||t.charAt(0)==="-"))?(this.invalid=!0,this.internals.setValidity({valueMissing:!0},this.requiredMessage||"This field is required",this._field)):(this.invalid=!1,this.internals.setValidity({}))}get classes(){return{"button-group":!0,invalid:this.touched&&this.invalid}}render(){return u` ${this.labelTemplate()}
    -
    - ${Ee(this.options??[],e=>e.id,e=>this._renderButton(e))} +
    + ${de(this.options??[],e=>e.id,e=>this._renderButton(e))}
    ${this.renderIcons()}
    - `}}window.customElements.define("dt-multi-select-button-group",xs);class ks extends R{static get styles(){return x` + `}}window.customElements.define("dt-multi-select-button-group",ks);class Ss extends M{constructor(){super();Me(this,"_handleUploadStagedEvent",()=>{this.uploadStagedFiles()});this.value=[],this.acceptedFileTypes=["image/*","application/pdf"],this.maxFileSize=null,this.maxFiles=null,this.deleteEnabled=!0,this.downloadEnabled=!0,this.renameEnabled=!0,this.displayLayout="grid",this.fileTypeIcon="",this.autoUpload=!0,this.postType="",this.postId="",this.metaKey="",this.keyPrefix="",this.uploading=!1,this.stagedFiles=[],this._uploadZoneExpanded=!1,this._dragOver=!1,this._editingFileKey="",this._editingFileName="",this._dragLeaveTimeout=null,this._resizeObserver=null,this._keydownAttached=!1}static get styles(){return[...super.styles,x` + :host { + display: block; + } + + .upload-zone { + border: 2px dashed var(--dt-upload-border-color, #ccc); + border-radius: 4px; + text-align: center; + background-color: var(--dt-upload-background-color, #fafafa); + transition: padding 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; + cursor: pointer; + position: relative; + width: 100%; + box-sizing: border-box; + } + + .upload-zone.compact { + padding: 0.75rem; + } + + .upload-zone.expanded { + padding: 2rem; + } + + .upload-zone:hover:not(.disabled):not(.uploading) { + border-color: var(--dt-upload-border-color-hover, #999); + background-color: var(--dt-upload-background-color-hover, #f0f0f0); + } + + .upload-zone.drag-over { + border-color: var(--primary-color, #0073aa); + background-color: var(--dt-upload-background-color-drag, #e8f4f8); + } + + .upload-zone.disabled { + opacity: 0.6; + cursor: not-allowed; + } + + .upload-zone.uploading { + pointer-events: none; + } + + .upload-zone-content { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + } + + .upload-zone-content .expandable { + transition: opacity 0.2s ease; + } + + .upload-zone.compact .upload-zone-content .expandable { + display: none; + } + + .upload-zone.expanded .upload-zone-content .expandable { + display: block; + } + + .upload-icon { + color: var(--dt-upload-icon-color, #999); + flex-shrink: 0; + transition: font-size 0.2s ease; + } + + .upload-zone.compact .upload-icon { + font-size: 1.75rem; + } + + .upload-zone.expanded .upload-icon { + font-size: 3rem; + } + + .upload-text { + font-size: 1rem; + color: var(--dt-upload-text-color, #666); + } + + .upload-hint { + font-size: 0.875rem; + color: var(--dt-upload-hint-color, #999); + } + + input[type='file'] { + position: absolute; + width: 0; + height: 0; + opacity: 0; + overflow: hidden; + } + + .files-container { + margin-top: 1rem; + } + + .files-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + gap: 1rem; + } + + .files-list { + display: flex; + flex-direction: column; + gap: 0.5rem; + } + + .file-item { + position: relative; + border: 1px solid var(--dt-file-upload-border-color, #ddd); + border-radius: 4px; + overflow: hidden; + background-color: var(--dt-file-upload-background-color, #fff); + } + + .file-item-grid { + aspect-ratio: 1; + display: flex; + flex-direction: column; + } + + .file-item-list { + display: grid; + grid-template-columns: 40px 1fr auto; + grid-template-rows: auto auto; + align-items: center; + padding: 0.5rem; + gap: 0 0.75rem; + row-gap: 0.125rem; + } + + .file-item-list .file-preview-link, + .file-item-list .file-icon-area { + grid-column: 1; + grid-row: 1 / -1; + width: 40px; + height: 40px; + min-width: 40px; + min-height: 40px; + border-radius: 6px; + overflow: hidden; + } + + .file-item-list .file-name, + .file-item-list .file-name-edit, + .file-item-list input.file-name-edit { + grid-column: 2; + grid-row: 1; + min-width: 0; + } + + .file-item-list .file-size { + grid-column: 2; + grid-row: 2; + } + + .file-item-list .file-actions { + grid-column: 3; + grid-row: 1 / -1; + position: relative; + } + + .file-item-list .file-icon-area dt-icon { + font-size: 1.25rem; + } + + .file-preview-link { + display: block; + cursor: pointer; + flex: 1; + min-height: 0; + height: calc(100% - 1.5rem); + } + + .file-preview-link img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + + .file-icon-area { + display: flex; + align-items: center; + justify-content: center; + background-color: var(--dt-file-upload-icon-background, #f5f5f5); + color: var(--dt-file-upload-icon-color, #999); + flex: 1; + min-height: 0; + height: calc(100% - 1.5rem); + } + + .file-icon-area dt-icon { + font-size: 2rem; + } + + .file-icon-area img { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } + + .file-name { + font-size: 0.75rem; + color: var(--dt-file-upload-name-color, #333); + padding: 0.25rem 0.5rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .file-name-editable { + cursor: pointer; + position: relative; + z-index: 2; + } + + .file-name-editable:hover { + text-decoration: underline; + } + + .file-name-edit { + font-size: 0.75rem; + color: var(--dt-file-upload-name-color, #333); + padding: 0.25rem 0.5rem; + width: 100%; + box-sizing: border-box; + border: 1px solid var(--primary-color, #0073aa); + border-radius: 2px; + background: var(--dt-file-upload-background-color, #fff); + } + + .file-name-edit:focus { + outline: none; + border-color: var(--primary-color, #0073aa); + } + + .file-size { + font-size: 0.7rem; + color: var(--dt-file-upload-size-color, #999); + padding: 0 0.5rem 0.25rem; + } + + .file-actions { + position: absolute; + top: 0.25rem; + inset-inline-end: 0.25rem; + display: flex; + gap: 0.25rem; + z-index: 1; + pointer-events: none; + } + + .file-actions button { + pointer-events: auto; + background: rgba(255, 255, 255, 0.9); + border: none; + border-radius: 4px; + padding: 0.25rem; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + } + + .file-actions button:hover { + background: #fff; + } + + .file-actions button dt-icon { + font-size: 1rem; + } + + .file-actions button.download { + color: var(--primary-color, #0073aa); + } + + .file-actions button.delete { + color: var(--alert-color, #dc3545); + } + + .staged-files { + margin-top: 1rem; + padding: 1rem; + border: 1px dashed var(--dt-upload-border-color, #ccc); + border-radius: 4px; + background: var(--dt-upload-background-color, #fafafa); + } + + .staged-files-title { + font-size: 0.875rem; + font-weight: 600; + margin-bottom: 0.5rem; + } + + .staged-file-item { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.25rem 0; + font-size: 0.875rem; + } + + .staged-file-item span { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + + .staged-file-item button.remove { + flex-shrink: 0; + margin-inline-start: auto; + padding: 0.25rem; + background: transparent; + border: none; + color: var(--alert-color, #dc3545); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + } + + .staged-file-item button.remove:hover { + opacity: 0.8; + } + + .upload-staged-btn { + margin-top: 0.5rem; + padding: 0.5rem 1rem; + background: var(--primary-color, #0073aa); + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 0.875rem; + } + + .upload-staged-btn:hover:not(:disabled) { + opacity: 0.9; + } + + .upload-staged-btn:disabled { + opacity: 0.6; + cursor: not-allowed; + } + + .error-container { + margin-top: 1rem; + max-width: 100%; + overflow: hidden; + } + + .error-container .error-text { + flex: 1; + min-width: 0; + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-word; + } + `]}static get properties(){return{...super.properties,value:{type:Array,reflect:!0},acceptedFileTypes:{type:Array,attribute:"accepted-file-types"},maxFileSize:{type:Number,attribute:"max-file-size"},maxFiles:{type:Number,attribute:"max-files"},deleteEnabled:{type:Boolean,attribute:"delete-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},downloadEnabled:{type:Boolean,attribute:"download-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},renameEnabled:{type:Boolean,attribute:"rename-enabled",converter:{fromAttribute:t=>t==null||t===""?!0:t!=="false"&&t!==!1}},displayLayout:{type:String,attribute:"display-layout"},fileTypeIcon:{type:String,attribute:"file-type-icon"},autoUpload:{type:Boolean,attribute:"auto-upload",converter:{fromAttribute:t=>{if(t==null)return!0;const i=String(t).toLowerCase().trim();return i!=="false"&&i!=="0"&&t!==!1}}},postType:{type:String,attribute:"post-type"},postId:{type:String,attribute:"post-id"},metaKey:{type:String,attribute:"meta-key"},keyPrefix:{type:String,attribute:"key-prefix"},uploading:{type:Boolean,state:!0},stagedFiles:{type:Array,state:!0},_uploadZoneExpanded:{type:Boolean,state:!0},_dragOver:{type:Boolean,state:!0},_editingFileKey:{type:String,state:!0},_editingFileName:{type:String,state:!0}}}connectedCallback(){super.connectedCallback(),this.addEventListener("dt:upload-files",this._handleUploadStagedEvent),this._boundKeydown=this._handleHostKeydown.bind(this)}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("dt:upload-files",this._handleUploadStagedEvent),this._removeKeydownListener(),this._cancelScheduledCollapse(),(t=this._resizeObserver)==null||t.disconnect()}_addKeydownListener(){this._keydownAttached||(this._keydownAttached=!0,this.addEventListener("keydown",this._boundKeydown,{capture:!0}))}_removeKeydownListener(){this._keydownAttached&&(this._keydownAttached=!1,this.removeEventListener("keydown",this._boundKeydown,{capture:!0}))}_handleHostKeydown(t){var s;if(!this._editingFileKey)return;const i=(s=this.shadowRoot)==null?void 0:s.querySelector(".file-name-edit");i&&(t.key==="Enter"||t.keyCode===13?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._commitRename(this._editingFileKey,i.value)):(t.key==="Escape"||t.keyCode===27)&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._cancelRename()))}firstUpdated(t){super.firstUpdated(t),this._setupResizeObserver()}updated(t){super.updated(t),(t.has("value")||t.has("stagedFiles")||t.has("error"))&&this.updateComplete.then(()=>this._refreshMasonry()),t.has("_editingFileKey")&&(this._editingFileKey?(this._addKeydownListener(),this.updateComplete.then(()=>{var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector(".file-name-edit");i&&(i.focus(),i.select())})):this._removeKeydownListener())}_setupResizeObserver(){typeof ResizeObserver>"u"||(this._resizeObserver=new ResizeObserver(()=>{this._refreshMasonry()}),this._resizeObserver.observe(this))}_refreshMasonry(){if(typeof window<"u"&&window.jQuery){const t=this;requestAnimationFrame(()=>{let i=null;window.masonGrid&&window.masonGrid.length&&window.masonGrid.masonry?i=window.masonGrid:i=window.jQuery(t).closest(".grid, .masonry-container, .masonry, [data-masonry]"),i&&i.length&&i.masonry&&i.masonry("layout")})}}_expandUploadZone(){this._uploadZoneExpanded=!0}_scheduleCollapse(){this._cancelScheduledCollapse(),this._dragLeaveTimeout=setTimeout(()=>{this._uploadZoneExpanded=!1,this._dragLeaveTimeout=null},300)}_cancelScheduledCollapse(){this._dragLeaveTimeout&&(clearTimeout(this._dragLeaveTimeout),this._dragLeaveTimeout=null)}uploadStagedFiles(){this.stagedFiles.length>0&&this._uploadFiles(this.stagedFiles)}_removeStagedFile(t){t>=0&&ts!==t),this.requestUpdate())}_parseValue(t){if(Array.isArray(t))return t;if(typeof t=="string")try{const i=JSON.parse(t);return Array.isArray(i)?i:[]}catch{return[]}return[]}_formatFileSize(t){return t<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1048576).toFixed(1)} MB`}_isImage(t){return(t.type||"").toLowerCase().startsWith("image/")}_mdiToIconify(t){if(!t||typeof t!="string")return"";const i=t.trim();return i.startsWith("mdi:")?i:i.includes("mdi-")?`mdi:${i.replace(/.*mdi-/,"").replace(/\s/g,"-")}`:i.startsWith("mdi ")?`mdi:${i.replace(/^mdi\s+/,"").replace(/\s/g,"-")}`:i}_getFileTypeIconMapping(){return{"application/pdf":"mdi:file-pdf-box","text/plain":"mdi:text-box-edit-outline","application/rtf":"mdi:text-box-edit-outline","text/rtf":"mdi:text-box-edit-outline","text/csv":"mdi:text-box-edit-outline","text/html":"mdi:language-html5","application/msword":"mdi:microsoft-word","application/json":"mdi:code-json","application/xml":"mdi:file-xml-box",".pdf":"mdi:file-pdf-box",".txt":"mdi:text-box-edit-outline",".rtf":"mdi:text-box-edit-outline",".csv":"mdi:text-box-edit-outline",".html":"mdi:language-html5",".htm":"mdi:language-html5",".docx":"mdi:microsoft-word",".doc":"mdi:microsoft-word",".json":"mdi:code-json",".xml":"mdi:file-xml-box"}}_getFileTypeIcon(t){if(this.fileTypeIcon&&this.fileTypeIcon.trim())return this.fileTypeIcon.trim();const i=(t.type||"").toLowerCase(),s=this._getFileTypeIconMapping();if(i&&s[i])return s[i];if(t.name){const a=t.name.split(".");if(a.length>1){const n="."+a.pop().toLowerCase();if(s[n])return s[n]}}return null}_renderFileTypeIcon(t){const i=this._getFileTypeIcon(t);if(!i)return null;if(/^(https?:|\/|data:)/.test(i))return u``;const a=this._mdiToIconify(i);return a?u``:null}_getFilePreviewUrl(t){const i=t.thumbnail_key||t.large_thumbnail_key;if(this._isImage(t)){if(t.large_thumbnail_url)return t.large_thumbnail_url;if(t.thumbnail_url)return t.thumbnail_url;if(t.url)return t.url;if(i)return null}return null}_handleFileSelect(t){const i=Array.from(t.target.files||[]);i.length!==0&&(t.target.value="",this._processFiles(i))}_handleDrop(t){if(t.preventDefault(),t.stopPropagation(),this._dragOver=!1,t.currentTarget.classList.remove("drag-over"),this.disabled||this.uploading)return;const i=Array.from(t.dataTransfer.files||[]);i.length!==0&&this._processFiles(i)}_handleDragOver(t){t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.uploading&&(this._dragOver=!0,this._expandUploadZone(),this._cancelScheduledCollapse(),t.currentTarget.classList.add("drag-over"))}_handleDragLeave(t){t.preventDefault(),t.stopPropagation(),this._dragOver=!1,t.currentTarget.classList.remove("drag-over"),this._scheduleCollapse()}_handleZoneClick(t){var i;if(!t.target.closest('input[type="file"]')&&(this._expandUploadZone(),this._cancelScheduledCollapse(),!this.disabled&&!this.uploading)){const s=(i=this.shadowRoot)==null?void 0:i.querySelector('input[type="file"]');s&&s.click()}}_handleZoneMouseEnter(){!this.disabled&&!this.uploading&&(this._expandUploadZone(),this._cancelScheduledCollapse())}_handleZoneMouseLeave(){this._scheduleCollapse()}_processFiles(t){const i=this._validateFiles(t);if(i.length===0)return;this.error="";const s=(this.value||[]).length+this.stagedFiles.length;if(this.maxFiles&&s+i.length>this.maxFiles){this.error=`${this.maxFiles} files allowed`;return}this.autoUpload?this._uploadFiles(i):(this.stagedFiles=[...this.stagedFiles,...i],this._uploadZoneExpanded=!1,this.requestUpdate(),this.updateComplete.then(()=>this._refreshMasonry()))}_validateFiles(t){const i=[],s=this.maxFileSize?this.maxFileSize*1024*1024:null,a=Array.isArray(this.acceptedFileTypes)?this.acceptedFileTypes:["image/*","application/pdf"],n=a.join(",");for(const r of t){if(s&&r.size>s){this.error=`File "${r.name}" exceeds ${this.maxFileSize} MB`;continue}if(n&&n!=="*"&&!a.some(d=>{if(d.startsWith("."))return r.name.toLowerCase().endsWith(d.toLowerCase());if(d.endsWith("/*")){const h=d.slice(0,-2);return(r.type||"").startsWith(h)}return r.type===d||r.name&&r.name.toLowerCase().endsWith(`.${d.split("/")[1]}`)})){this.error=`File type not allowed: ${r.name}`;continue}i.push(r)}return i}_isStandaloneMode(){return!this.postType||!this.postId||!this.metaKey}async _filesToMockFileObjects(t){const i=[];for(const s of t){const n={key:`standalone_${Date.now()}_${Math.random().toString(36).slice(2)}_${s.name}`,name:s.name,type:s.type||"application/octet-stream",size:s.size};if(this._isImage({type:s.type}))try{const r=await new Promise((l,d)=>{const h=new FileReader;h.onload=()=>l(h.result),h.onerror=d,h.readAsDataURL(s)});i.push({...n,url:r,thumbnail_url:r})}catch{i.push({...n,url:"#"})}else i.push({...n,url:"#"})}return i}async _uploadFiles(t){if(this._isStandaloneMode()){this.uploading=!0,this.loading=!0,this.error="";try{const s=await this._filesToMockFileObjects(t),a=Array.isArray(this.value)?[...this.value]:[];this.value=[...a,...s],this.stagedFiles=[],this._uploadZoneExpanded=!1,this.saved=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:this.value}})),this._refreshMasonry()}catch(s){this.error=(s==null?void 0:s.message)||"Upload failed"}finally{this.uploading=!1,this.loading=!1}return}this.uploading=!0,this.loading=!0,this.error="";const i=new CustomEvent("dt:upload",{bubbles:!0,detail:{files:t,metaKey:this.metaKey,keyPrefix:this.keyPrefix||"",onSuccess:({result:s,fieldValue:a})=>{const n=Array.isArray(this.value)?[...this.value]:[],r=(s.uploaded_files||[]).filter(l=>l.uploaded&&l.file).map(l=>l.file);if(r.length>0){const l=new Set(n.map(h=>String(h.key||h))),d=[...n];for(const h of r){const g=String(h.key||h);l.has(g)||(d.push(h),l.add(g))}this.value=d}else Array.isArray(a)&&a.length>0&&(this.value=a);this.stagedFiles=[],this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:this.value}})),this._refreshMasonry(),this._uploadZoneExpanded=!1,this.saved=!0,this.uploading=!1,this.loading=!1},onError:s=>{console.error("Upload error:",s),this.error=s.message||"Upload failed",this.uploading=!1,this.loading=!1}}});this.dispatchEvent(i)}async _deleteFile(t){if(!this.deleteEnabled||!confirm("Are you sure you want to delete this file?"))return;if(this._isStandaloneMode()){const s=Array.isArray(this.value)?[...this.value]:[];this.value=s.filter(a=>(a.key||a)!==t),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:s,newValue:this.value}})),this.updateComplete.then(()=>this._refreshMasonry());return}if(!this.postType||!this.postId||!this.metaKey)return;this.loading=!0,this.error="";const i=new CustomEvent("dt:delete-file",{bubbles:!0,detail:{fileKey:t,metaKey:this.metaKey,onSuccess:()=>{this.value=(this.value||[]).filter(s=>(s.key||s)!==t),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:this.value}})),this.updateComplete.then(()=>this._refreshMasonry()),this.loading=!1},onError:s=>{console.error("Delete error:",s),this.error=s.message||"Delete failed",this.loading=!1}}});this.dispatchEvent(i)}async _renameFile(t,i){if(!this.renameEnabled)return;if(this._isStandaloneMode()){const a=this._parseValue(this.value);this.value=a.map(n=>(n.key||n)===t?{...n,name:i}:n),this._editingFileKey="",this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:this.value}})),this.updateComplete.then(()=>this._refreshMasonry());return}if(!this.postType||!this.postId||!this.metaKey)return;this.loading=!0,this.error="";const s=new CustomEvent("dt:rename-file",{bubbles:!0,detail:{fileKey:t,newName:i,metaKey:this.metaKey,onSuccess:()=>{const a=this._parseValue(this.value);this.value=a.map(n=>(n.key||n)===t?{...n,name:i}:n),this._editingFileKey="",this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{field:this.name,oldValue:this.value,newValue:this.value}})),this.updateComplete.then(()=>this._refreshMasonry()),this.loading=!1},onError:a=>{console.error("Rename error:",a),this.error=(a==null?void 0:a.message)||"Rename failed",this.loading=!1}}});this.dispatchEvent(s)}_startRename(t,i){!this.renameEnabled||this.disabled||(this._editingFileKey=typeof t=="string"?t:String(t),this._editingFileName=i||"")}_commitRename(t,i){const s=(i??this._editingFileName??"").trim();if(this._editingFileKey="",this._editingFileName="",!s)return;const n=this._parseValue(this.value).find(l=>(l.key||l)===t),r=(n==null?void 0:n.name)||(typeof t=="string"?t.split("/").pop():"");s!==r&&this._renameFile(t,s)}_cancelRename(){this._editingFileKey="",this._editingFileName=""}_downloadFile(t){if(!this.downloadEnabled)return;if(this._isStandaloneMode()){const n=t.url;if(!n)return;const r=document.createElement("a");r.href=n,r.download=t.name||"download",r.target="_blank",r.rel="noopener",document.body.appendChild(r),r.click(),document.body.removeChild(r);return}const i=t.key||t,s=t.name||(typeof i=="string"?i.split("/").pop():"download")||"download",a=new CustomEvent("dt:download-file",{bubbles:!0,detail:{fileKey:i,fileName:s,metaKey:this.metaKey,onSuccess:()=>{},onError:n=>{console.error("Download error:",n),this.error=n.message||"Download failed"}}});this.dispatchEvent(a)}_validateRequired(){var i,s,a,n;const t=Array.isArray(this.value)?this.value:[];this.required&&t.length===0?(this.invalid=!0,(s=(i=this.internals)==null?void 0:i.setValidity)==null||s.call(i,{valueMissing:!0},this.requiredMessage||"This field is required")):(this.invalid=!1,(n=(a=this.internals)==null?void 0:a.setValidity)==null||n.call(a,{}))}labelTemplate(){if(!this.label)return"";let t=null;if(this.icon&&this.icon.trim()){const i=this.icon.trim();if(i.startsWith("http://")||i.startsWith("https://")||i.startsWith("/")||i.startsWith("data:"))t=u`${this.iconAltText||`;else if(i.toLowerCase().includes("mdi")){const a=this._mdiToIconify(i);a&&(t=u``)}}return u` + + ${t?u`${t}`:u``} + ${this.label} + + `}render(){const t=this._parseValue(this.value),s=(this.displayLayout||"grid")==="grid";return u` +
    + ${this.labelTemplate()} +
    + +
    + + + +
    +
    + + ${Y(this.stagedFiles.length>0&&!this.autoUpload,()=>u` +
    +
    Staged files (${this.stagedFiles.length})
    + ${de(this.stagedFiles,(a,n)=>`${a.name}-${a.size}-${n}`,(a,n)=>u` +
    + ${a.name} (${this._formatFileSize(a.size)}) + +
    + `)} + +
    + `)} + + ${Y(t.length>0,()=>u` +
    +
    + ${de(t,a=>a.key||a,a=>{const n=typeof a.key=="string"?a.key:typeof a=="string"?a:String(a.key??a.name??""),r=a.name||(typeof n=="string"?n.split("/").pop():""),l=a.size,d=this._getFilePreviewUrl(a),h=this._isImage(a),g=this._editingFileKey===n;return u` +
    + ${Y(d,()=>u` + {a.url||m.preventDefault()}} + > + ${r} + + `,()=>u` + ${a.url?u` + + ${this._renderFileTypeIcon(a)||(h?u``:u``)} + + `:u` +
    + ${this._renderFileTypeIcon(a)||(h?u``:u``)} +
    + `} + `)} + ${Y(g,()=>u` + {this._editingFileName=m.target.value}} + @keydown=${m=>{m.key==="Enter"||m.keyCode===13?(m.preventDefault(),m.stopPropagation(),this._commitRename(n,m.target.value)):(m.key==="Escape"||m.keyCode===27)&&(m.preventDefault(),this._cancelRename())}} + @blur=${m=>this._commitRename(n,m.target.value)} + @click=${m=>m.stopPropagation()} + /> + `,()=>u` +
    {m.stopPropagation(),this.renameEnabled&&!this.disabled&&this._startRename(n,r)}} + @keydown=${m=>{this.renameEnabled&&!this.disabled&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),this._startRename(n,r))}} + > + ${r} +
    + `)} + ${Y(l!=null,()=>u`
    ${this._formatFileSize(l)}
    `)} +
    + ${Y(this.downloadEnabled&&a.url,()=>u` + + `)} + ${Y(this.deleteEnabled&&!this.disabled,()=>u` + + `)} +
    +
    + `})} +
    +
    + `)} + + ${this.renderIcons()} +
    + `}}customElements.define("dt-file-upload",Ss);class Es extends D{static get styles(){return x` :host { display: block; } @@ -3064,7 +3550,7 @@ var DtWebComponents=function($){"use strict";var Pr=Object.defineProperty;var Mr display: flex; align-items: center; } - `}static get properties(){return{context:{type:String},dismissable:{type:Boolean},timeout:{type:Number},hide:{type:Boolean},outline:{type:Boolean}}}get classes(){const e={"dt-alert":!0,"dt-alert--outline":this.outline},t=`dt-alert--${this.context}`;return e[t]=!0,e}constructor(){super(),this.context="default"}connectedCallback(){super.connectedCallback(),this.timeout&&setTimeout(()=>{this._dismiss()},this.timeout)}_dismiss(){this.hide=!0}render(){if(this.hide)return f``;const e=f` + `}static get properties(){return{context:{type:String},dismissable:{type:Boolean},timeout:{type:Number},hide:{type:Boolean},outline:{type:Boolean}}}get classes(){const e={"dt-alert":!0,"dt-alert--outline":this.outline},t=`dt-alert--${this.context}`;return e[t]=!0,e}constructor(){super(),this.context="default"}connectedCallback(){super.connectedCallback(),this.timeout&&setTimeout(()=>{this._dismiss()},this.timeout)}_dismiss(){this.hide=!0}render(){if(this.hide)return u``;const e=u` xmlns="http://www.w3.org/2000/svg"> - `;return f` -