@openremote/or-tree-menu 1.30.0 → 1.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist → build/dist}/umd/index.bundle.js +19 -14
- package/{dist → build/dist}/umd/index.js +19 -14
- package/{dist → build/dist}/umd/index.orbundle.js +21 -16
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/index.js.map +1 -0
- package/build/lib/model.d.ts.map +1 -0
- package/build/lib/model.js.map +1 -0
- package/build/lib/or-tree-group.d.ts.map +1 -0
- package/build/lib/or-tree-group.js.map +1 -0
- package/build/lib/or-tree-node.d.ts.map +1 -0
- package/build/lib/or-tree-node.js.map +1 -0
- package/build/lib/util.d.ts.map +1 -0
- package/build/lib/util.js.map +1 -0
- package/package.json +19 -13
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/model.d.ts.map +0 -1
- package/lib/model.js.map +0 -1
- package/lib/or-tree-group.d.ts.map +0 -1
- package/lib/or-tree-group.js.map +0 -1
- package/lib/or-tree-node.d.ts.map +0 -1
- package/lib/or-tree-node.js.map +0 -1
- package/lib/util.d.ts.map +0 -1
- package/lib/util.js.map +0 -1
- package/rspack.config.js +0 -31
- package/stories/or-tree-menu.stories.ts +0 -71
- /package/{custom-elements-jsx.d.ts → build/custom-elements-jsx.d.ts} +0 -0
- /package/{custom-elements.json → build/custom-elements.json} +0 -0
- /package/{lib → build/lib}/index.d.ts +0 -0
- /package/{lib → build/lib}/index.js +0 -0
- /package/{lib → build/lib}/model.d.ts +0 -0
- /package/{lib → build/lib}/model.js +0 -0
- /package/{lib → build/lib}/or-tree-group.d.ts +0 -0
- /package/{lib → build/lib}/or-tree-group.js +0 -0
- /package/{lib → build/lib}/or-tree-node.d.ts +0 -0
- /package/{lib → build/lib}/or-tree-node.js +0 -0
- /package/{lib → build/lib}/util.d.ts +0 -0
- /package/{lib → build/lib}/util.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954},487(e){e.exports=__rspack_external__487},673(e){e.exports=__rspack_external__673}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var o=t[s]={exports:{}};return e[s](o,o.exports,i),o.exports}i.d=(e,t,s)=>{var n=(t,s)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[s]:t[n]})};n(t,"get"),n(s,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{let e,t,n;i.r(s),i.d(s,{OrTreeDragEvent:()=>eS,OrTreeGroup:()=>
|
|
2
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,V=/"/g,K=/^(?:script|style|textarea|title)$/i,W=(e,...t)=>({_$litType$:1,strings:e,values:t}),q=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),X=new WeakMap,Z=L.createTreeWalker(L,129);function Y(e,t){if(!B(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==$?$.createHTML(t):t}class Q{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let n=0,o=0;const r=e.length-1,a=this.parts,[l,d]=((e,t)=>{let i=e.length-1,s=[],n,o=2===t?"<svg>":3===t?"<math>":"",r=F;for(let t=0;t<i;t++){let i=e[t],a,l,d=-1,h=0;for(;h<i.length&&(r.lastIndex=h,null!==(l=r.exec(i)));)h=r.lastIndex,r===F?"!--"===l[1]?r=j:void 0!==l[1]?r=U:void 0!==l[2]?(K.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=z):void 0!==l[3]&&(r=z):r===z?">"===l[0]?(r=n??F,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?z:'"'===l[3]?V:H):r===V||r===H?r=z:r===j||r===U?r=F:(r=z,n=void 0);let c=r===z&&e[t+1].startsWith("/>")?" ":"";o+=r===F?i+P:d>=0?(s.push(a),i.slice(0,d)+T+i.slice(d)+M+c):i+M+(-2===d?t:c)}return[Y(e,o+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]})(e,t);if(this.el=Q.createElement(l,i),Z.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<r;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(T)){const t=d[o++],i=s.getAttribute(e).split(M),r=/([.?@])?(.*)/.exec(t);a.push({type:1,index:n,name:r[2],strings:i,ctor:"."===r[1]?es:"?"===r[1]?en:"@"===r[1]?eo:ei}),s.removeAttribute(e)}else e.startsWith(M)&&(a.push({type:6,index:n}),s.removeAttribute(e));if(K.test(s.tagName)){const e=s.textContent.split(M),t=e.length-1;if(t>0){s.textContent=O?O.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],I()),Z.nextNode(),a.push({type:2,index:++n});s.append(e[t],I())}}}else if(8===s.nodeType)if(s.data===N)a.push({type:2,index:n});else{let e=-1;for(;-1!==(e=s.data.indexOf(M,e+1));)a.push({type:7,index:n}),e+=M.length-1}n++}}static createElement(e,t){let i=L.createElement("template");return i.innerHTML=e,i}}function J(e,t,i=e,s){if(t===q)return t;let n=void 0!==s?i._$Co?.[s]:i._$Cl,o=D(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(e))._$AT(e,i,s),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(t=J(e,n._$AS(e,t.values),n,s)),t}class ee{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??L).importNode(t,!0);Z.currentNode=s;let n=Z.nextNode(),o=0,r=0,a=i[0];for(;void 0!==a;){if(o===a.index){let t;2===a.type?t=new et(n,n.nextSibling,this,e):1===a.type?t=new a.ctor(n,a.name,a.strings,this,e):6===a.type&&(t=new er(n,this,e)),this._$AV.push(t),a=i[++r]}o!==a?.index&&(n=Z.nextNode(),o++)}return Z.currentNode=L,s}p(e){let t=0;for(let i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){let i;D(e=J(this,e,t))?e===G||null==e||""===e?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==q&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):B(i=e)||"function"==typeof i?.[Symbol.iterator]?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==G&&D(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(Y(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let e=new ee(s,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=X.get(e.strings);return void 0===t&&X.set(e.strings,t=new Q(e)),t}k(e){B(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let n of e)s===t.length?t.push(i=new et(this.O(I()),this.O(I()),this,this.options)):i=t[s],i._$AI(n),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class ei{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}_$AI(e,t=this,i,s){let n=this.strings,o=!1;if(void 0===n)(o=!D(e=J(this,e,t,0))||e!==this._$AH&&e!==q)&&(this._$AH=e);else{let s,r,a=e;for(e=n[0],s=0;s<n.length-1;s++)(r=J(this,a[i+s],t,s))===q&&(r=this._$AH[s]),o||=!D(r)||r!==this._$AH[s],r===G?e=G:e!==G&&(e+=(r??"")+n[s+1]),this._$AH[s]=r}o&&!s&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class es extends ei{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}}class en extends ei{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}}class eo extends ei{constructor(e,t,i,s,n){super(e,t,i,s,n),this.type=5}_$AI(e,t=this){if((e=J(this,e,t,0)??G)===q)return;let i=this._$AH,s=e===G&&i!==G||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==G&&(i===G||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class er{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}}let ea=S.litHtmlPolyfillSupport;ea?.(Q,et),(S.litHtmlVersions??=[]).push("3.3.1");let el=(e,t,i)=>{let s=i?.renderBefore??t,n=s._$litPart$;if(void 0===n){let e=i?.renderBefore??null;s._$litPart$=n=new et(t.insertBefore(I(),e),e,void 0,i??{})}return n._$AI(e),n},ed=globalThis;class eh extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=el(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return q}}eh._$litElement$=!0,eh.finalized=!0,ed.litElementHydrateSupport?.({LitElement:eh});let ec=ed.litElementPolyfillSupport;ec?.({LitElement:eh}),(ed.litElementVersions??=[]).push("4.2.1");var eu,ep,e_,ev,em=i(487);let ef=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},eg={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:E};function eb(e){return(t,i)=>{let s;return"object"==typeof i?((e=eg,t,i)=>{let{kind:s,metadata:n}=i,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===s&&((e=Object.create(e)).wrapped=!0),o.set(i.name,e),"accessor"===s){let{name:s}=i;return{set(i){let n=t.get.call(this);t.set.call(this,i),this.requestUpdate(s,n,e)},init(t){return void 0!==t&&this.C(s,void 0,e,t),t}}}if("setter"===s){let{name:s}=i;return function(i){let n=this[s];t.call(this,i),this.requestUpdate(s,n,e)}}throw Error("Unsupported decorator location: "+s)})(e,t,i):(s=t.hasOwnProperty(i),t.constructor.createProperty(i,e),s?Object.getOwnPropertyDescriptor(t,i):void 0)}}let ey=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i);function ew(t){return(i,s)=>ey(i,s,{get(){return(this.renderRoot??(e??=document.createDocumentFragment())).querySelectorAll(t)}})}function ex(e){return(t,i)=>{let{slot:s,selector:n}=e??{},o="slot"+(s?`[name=${s}]`:":not([name])");return ey(t,i,{get(){let t=this.renderRoot?.querySelector(o),i=t?.assignedElements(e)??[];return void 0===n?i:i.filter(e=>e.matches(n))}})}}function*eC(e,t){if(void 0!==e){let i=0;for(let s of e)yield t(s,i++)}}var eE=i(954);function eA(e,t,i=[]){console.debug(`Moving nodes '${e.map(e=>e.label).join(", ")}' into group '${null==t?void 0:t.label}'. Tree nodes are`,t);let s=function i(s){return s.map(s=>{if(e.some(e=>s.id===e.id))return console.debug("Removed the node from original position."),null;let n=Object.assign({},s);return n.children&&(n.children=i(n.children).filter(e=>null!==e)),t&&s.id===(null==t?void 0:t.id)&&e.forEach(e=>{n.children=n.children?[...n.children,e]:[e]}),n}).filter(e=>null!==e)}(i);return t||s.push(...e),s}(eu=e_||(e_={})).LEAF="leaf",eu.SINGLE="single",eu.MULTI="multi",(ep=ev||(ev={})).A_TO_Z="a_to_z",ep.Z_TO_A="z_to_a";class ek extends CustomEvent{constructor(e){super(ek.NAME,{bubbles:!0,composed:!0,detail:e})}}ek.NAME="or-tree-select";class eS extends CustomEvent{constructor(e,t,i=[]){super(eS.NAME,{bubbles:!0,composed:!0,cancelable:!0,detail:{nodes:e,groupNode:t,newNodes:i}})}}eS.NAME="or-tree-drag",window.Vaadin||={},window.Vaadin.featureFlags||={};let eO={};function e$(e,t="25.2.8"){if(Object.defineProperty(e,"version",{get:()=>t}),e.experimental){let t="string"==typeof e.experimental?e.experimental:`${e.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,e=>e[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[t]||eO[t]){if(eO[t])return void eO[t].add(e)}else{eO[t]=new Set,eO[t].add(e),Object.defineProperty(window.Vaadin.featureFlags,t,{get:()=>0===eO[t].size,set(e){e&&eO[t].size>0&&(eO[t].forEach(e=>{customElements.define(e.is,e)}),eO[t].clear())}});return}}let i=customElements.get(e.is);if(i){let t=i.version;t&&e.version&&t===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(e.is,e)}let eT=[];function eM(e,t,i=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=i&&e.removeAttribute("dir")}function eN(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let e=eN();eT.forEach(t=>{eM(t,e)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let eP=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>""===e?null:e}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),eM(this,eN(),null))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"dir"!==e)return;let s=eN(),n=i===s&&-1===eT.indexOf(this),o=!i&&t&&-1===eT.indexOf(this),r=i!==s&&t===s;n||o?(this.__subscribe(),eM(this,s,i)):r&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=eT.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,i){("dir"!==i||""!==t||e.hasAttribute("dir"))&&super._valueToNodeAttribute(e,t,i)}_attributeToProperty(e,t,i){"dir"!==e||t?super._attributeToProperty(e,t,i):this.dir=""}__subscribe(){eT.includes(this)||eT.push(this)}__unsubscribe(){eT.includes(this)&&eT.splice(eT.indexOf(this),1)}},eL=new WeakMap;function eI(e){return t=>{if(function(e,t){let i=t;for(;i;){if(eL.get(i)===e)return!0;i=Object.getPrototypeOf(i)}return!1}(e,t))return t;let i=e(t);return eL.set(i,e),i}}let eD={},eB=/([A-Z])/gu;function eR(e){return eD[e]||(eD[e]=e.replace(eB,"-$1").toLowerCase()),eD[e]}function eF(e){return e[0].toUpperCase()+e.substring(1)}function ej(e){let[t,i]=e.split("(");return{method:t,observerProps:i.replace(")","").split(",").map(e=>e.trim())}}function eU(e,t){return Object.prototype.hasOwnProperty.call(e,t)||(e[t]=new Map(e[t])),e[t]}let ez=eI(e=>class extends e{static enabledWarnings=[];static createProperty(e,t){[String,Boolean,Number,Array].includes(t)&&(t={type:t}),t?.reflectToAttribute&&(t.reflect=!0),super.createProperty(e,t)}static getOrCreateMap(e){return eU(this,e)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let e=this.getOrCreateMap("__complexObservers");this.observers.forEach(t=>{let{method:i,observerProps:s}=ej(t);e.set(i,s)})}}static addCheckedInitializer(e){super.addInitializer(t=>{t instanceof this&&e(t)})}static getPropertyDescriptor(e,t,i){let s=super.getPropertyDescriptor(e,t,i),n=s;if(this.getOrCreateMap("__propKeys").set(e,t),i.sync&&(n={get:s.get,set(s){let n=this[e];E(s,n)&&(this[t]=s,this.requestUpdate(e,n,i),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),i.readOnly){let t=n.set;this.addCheckedInitializer(i=>{i[`_set${eF(e)}`]=function(e){t.call(i,e)}}),n={get:n.get,set(){},configurable:!0,enumerable:!0}}if("value"in i&&this.addCheckedInitializer(t=>{let s="function"==typeof i.value?i.value.call(t):i.value;i.readOnly?t[`_set${eF(e)}`](s):t[e]=s}),i.observer){let t=i.observer;this.getOrCreateMap("__observers").set(e,t),this.addCheckedInitializer(e=>{e[t]||console.warn(`observer method ${t} not defined`)})}if(i.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let e=this.__notifyProps;this.__notifyProps=new Set(e)}}else this.__notifyProps=new Set;this.__notifyProps.add(e)}if(i.computed){let t=`__assignComputed${e}`,s=ej(i.computed);this.prototype[t]=function(...t){this[e]=this[s.method](...t)},this.getOrCreateMap("__computedObservers").set(t,s.observerProps)}return i.attribute||(i.attribute=eR(e)),n}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:e}=this.constructor;this.hasUpdated||e.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e})}ready(){}willUpdate(e){this.constructor.__computedObservers&&this.__runComplexObservers(e,this.constructor.__computedObservers)}updated(e){let t=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(e,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(e,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(e,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(e,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(e,this.constructor.__notifyProps),t||this.ready()}setProperties(e){Object.entries(e).forEach(([e,t])=>{let i=this.constructor.__propKeys.get(e),s=this[i];this[i]=t,this.requestUpdate(e,s)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(e){let t=eU(this,"__dynamicMethodObservers"),{method:i,observerProps:s}=ej(e);t.set(i,s)}_createPropertyObserver(e,t){eU(this,"__dynamicPropertyObservers").set(t,e)}__runComplexObservers(e,t){t.forEach((t,i)=>{t.some(t=>e.has(t))&&(this[i]?this[i](...t.map(e=>this[e])):console.warn(`observer method ${i} not defined`))})}__runDynamicObservers(e,t){t.forEach((t,i)=>{e.has(t)&&this[i]&&this[i](this[t],e.get(t))})}__runObservers(e,t){e.forEach((e,i)=>{let s=t.get(i);void 0!==s&&this[s]&&this[s](this[i],e)})}__runNotifyProps(e,t){e.forEach((e,i)=>{t.has(i)&&this.dispatchEvent(new CustomEvent(`${eR(i)}-changed`,{detail:{value:this[i]}}))})}_get(e,t){return e.split(".").reduce((e,t)=>e?e[t]:void 0,t)}_set(e,t,i){let s,n;n=(s=e.split(".")).pop(),s.reduce((e,t)=>e[t],i)[n]=t}}),eH=0,eV=0,eK=[],eW=!1,eq={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},eG={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},eX={run(e){eW||(eW=!0,queueMicrotask(()=>(function(){eW=!1;let e=eK.length;for(let t=0;t<e;t++){let e=eK[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}eK.splice(0,e),eV+=e})())),eK.push(e);let t=eH;return eH+=1,t},cancel(e){let t=e-eV;if(t>=0){if(!eK[t])throw Error(`invalid async handle: ${e}`);eK[t]=null}}},eZ="string"==typeof document.head.style.touchAction,eY="__polymerGestures",eQ="__polymerGesturesHandled",eJ="__polymerGesturesTouchAction",e0=["mousedown","mousemove","mouseup","click"],e1=[0,1,4,2],e2=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function e5(e){return e0.indexOf(e)>-1}try{let e=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}let e4=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),e8={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function e7(e){let t=e.type;if(!e5(t))return!1;if("mousemove"===t){let t=e.buttons??1;return e instanceof window.MouseEvent&&!e2&&(t=e1[e.which]||0),!!(1&t)}return 0===(e.button??0)}let e3={x:0,y:0,id:-1,scrollDecided:!1};function e6(e,t,i){e.movefn=t,e.upfn=i,document.addEventListener("mousemove",t),document.addEventListener("mouseup",i)}function e9(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}let te=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],tt={},ti=[];function ts(e,t){let i=document.elementFromPoint(e,t),s=i;for(;s?.shadowRoot&&!window.ShadyDOM&&s!==(s=s.shadowRoot.elementFromPoint(e,t));)s&&(i=s);return i}function tn(e){let t=te(e);return t.length>0?t[0]:e.target}function to(e){let t=e.type,i=e.currentTarget[eY];if(!i)return;let s=i[t];if(!s)return;if(!e[eQ]&&(e[eQ]={},t.startsWith("touch"))){let i=e.changedTouches[0];if("touchstart"===t&&1===e.touches.length&&(e3.id=i.identifier),e3.id!==i.identifier)return;eZ||"touchstart"!==t&&"touchmove"!==t||function(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)e3.x=t.clientX,e3.y=t.clientY,e3.scrollDecided=!1;else if("touchmove"===i){if(e3.scrollDecided)return;e3.scrollDecided=!0;let i=function(e){let t="auto",i=te(e);for(let e=0,s;e<i.length;e++)if((s=i[e])[eJ]){t=s[eJ];break}return t}(e),s=!1,n=Math.abs(e3.x-t.clientX),o=Math.abs(e3.y-t.clientY);e.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>n:"pan-y"===i&&(s=n>o)),s?e.preventDefault():td("track")}}(e)}let n=e[eQ];if(!n.skip){for(let t=0,i;t<ti.length;t++)s[(i=ti[t]).name]&&!n[i.name]&&i.flow&&i.flow.start.indexOf(e.type)>-1&&i.reset&&i.reset();for(let i=0,o;i<ti.length;i++)s[(o=ti[i]).name]&&!n[o.name]&&(n[o.name]=!0,o[t](e))}}function tr(e,t,i){return!!tt[t]&&(function(e,t,i){var s,n;let o=tt[t],r=o.deps,a=o.name,l=e[eY];l||(e[eY]=l={});for(let t=0,i,s;t<r.length;t++)i=r[t],e4&&e5(i)&&"click"!==i||((s=l[i])||(l[i]=s={_count:0}),0===s._count&&e.addEventListener(i,to,void e5(i)),s[a]=(s[a]||0)+1,s._count=(s._count||0)+1);e.addEventListener(t,i),o.touchAction&&(s=e,n=o.touchAction,eZ&&s instanceof HTMLElement&&eX.run(()=>{s.style.touchAction=n}),s[eJ]=n)}(e,t,i),!0)}function ta(e){ti.push(e),e.emits.forEach(t=>{tt[t]=e})}function tl(e,t,i){let s=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,e.dispatchEvent(s),s.defaultPrevented){let e=i.preventer||i.sourceEvent;e?.preventDefault&&e.preventDefault()}}function td(e){let t=function(e){for(let t=0,i;t<ti.length;t++){i=ti[t];for(let t=0;t<i.emits.length;t++)if(i.emits[t]===e)return i}return null}(e);t.info&&(t.info.prevent=!0)}function th(e,t,i,s){t&&tl(t,e,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:e=>td(e)})}function tc(e,t,i){if(e.prevent)return!1;if(e.started)return!0;let s=Math.abs(e.x-t),n=Math.abs(e.y-i);return s>=5||n>=5}function tu(e,t,i){if(!t)return;let s=e.moves[e.moves.length-2],n=e.moves[e.moves.length-1],o=n.x-e.x,r=n.y-e.y,a,l=0;s&&(a=n.x-s.x,l=n.y-s.y),tl(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:o,dy:r,ddx:a,ddy:l,sourceEvent:i,hover:()=>ts(i.clientX,i.clientY)})}function tp(e,t,i){let s=Math.abs(t.clientX-e.x),n=Math.abs(t.clientY-e.y),o=tn(i||t);!(!o||e8[o.localName]&&o.hasAttribute("disabled"))&&(isNaN(s)||isNaN(n)||s<=25&&n<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=tn(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),s=e.pageX,n=e.pageY;return!(s>=i.left&&s<=i.right&&n>=i.top&&n<=i.bottom)}return!1}(t))&&!e.prevent&&tl(o,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i})}ta({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){e9(this.info)},mousedown(e){if(!e7(e))return;let t=tn(e),i=this;e6(this.info,e=>{e7(e)||(th("up",t,e),e9(i.info))},e=>{e7(e)&&th("up",t,e),e9(i.info)}),th("down",t,e)},touchstart(e){th("down",tn(e),e.changedTouches[0],e)},touchend(e){th("up",tn(e),e.changedTouches[0],e)}}),ta({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,e9(this.info)},mousedown(e){if(!e7(e))return;let t=tn(e),i=this,s=e=>{let s=e.clientX,n=e.clientY;tc(i.info,s,n)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&td("tap"),i.info.addMove({x:s,y:n}),e7(e)||(i.info.state="end",e9(i.info)),t&&tu(i.info,t,e),i.info.started=!0)};e6(this.info,s,e=>{i.info.started&&s(e),e9(i.info)}),this.info.x=e.clientX,this.info.y=e.clientY},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove(e){let t=tn(e),i=e.changedTouches[0],s=i.clientX,n=i.clientY;tc(this.info,s,n)&&("start"===this.info.state&&td("tap"),this.info.addMove({x:s,y:n}),tu(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend(e){let t=tn(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),tu(this.info,t,i))}}),ta({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:0/0,y:0/0,prevent:!1},reset(){this.info.x=0/0,this.info.y=0/0,this.info.prevent=!1},mousedown(e){e7(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click(e){e7(e)&&tp(this.info,e)},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend(e){tp(this.info,e.changedTouches[0],e)}});let t_=eI(e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}),tv=eI(e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}}),tm=e=>class extends t_(tv(e)){get _activeKeys(){return[" "]}ready(){super.ready(),tr(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0)}),tr(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(e){return!this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",e=>{this._activeKeys.includes(e.key)&&this._setActive(!1)},{once:!0}))}_setActive(e){this.toggleAttribute("active",e)}},tf=!1;function tg(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function tb(e){let t=e.style;if("hidden"===t.visibility||"none"===t.display)return!0;let i=window.getComputedStyle(e);return"hidden"===i.visibility||"none"===i.display}function ty(e){return e.checkVisibility?!e.checkVisibility({visibilityProperty:!0}):null===e.offsetParent&&0===e.clientWidth&&0===e.clientHeight||tb(e)}function tw(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function tx(e){return e.getRootNode().activeElement===e}window.addEventListener("keydown",()=>{tf=!0},{capture:!0}),window.addEventListener("mousedown",()=>{tf=!1},{capture:!0});let tC=eI(e=>class extends e{get _keyboardActive(){return tf}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}focus(e){super.focus(e),e?.focusVisible!==!1&&this.setAttribute("focus-ring","")}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}}),tE=e=>class extends tm(tC(e)){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged",sync:!0},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return this._value??this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();let e=this.getAttribute("value");null!==e&&(this.value=e),this.__shouldAllowFocusWhenDisabled()&&this.style.setProperty("--_vaadin-item-disabled-pointer-events","auto")}focus(e){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus(e)}_shouldSetActive(e){return!this.disabled&&!("keydown"===e.type&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.__shouldAllowFocusWhenDisabled()||this.blur())}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click())}__shouldAllowFocusWhenDisabled(){return!1}};function tA(e){try{CSS.registerProperty(e)}catch(t){if(t instanceof DOMException&&"InvalidModificationError"===t.name)console.warn(`The CSS property ${e.name} has already been registered.`);else throw t}}class tk extends EventTarget{#e;#t=new Set;#i;#s=!1;constructor(e){super(),this.#e=e,this.#i=new CSSStyleSheet}#n(e){let{propertyName:t}=e;this.#t.has(t)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:t}}))}observe(e){this.connect(),this.#t.has(e)||(this.#t.add(e),this.#i.replaceSync(`
|
|
1
|
+
var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954},487(e){e.exports=__rspack_external__487},673(e){e.exports=__rspack_external__673}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var o=t[s]={exports:{}};return e[s](o,o.exports,i),o.exports}i.d=(e,t,s)=>{var n=(t,s)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,[s]:t[n]})};n(t,"get"),n(s,"value")},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{let e,t,n;i.r(s),i.d(s,{OrTreeDragEvent:()=>eS,OrTreeGroup:()=>iZ,OrTreeMenu:()=>i2,OrTreeNode:()=>iJ,OrTreeSelectEvent:()=>ek,TreeMenuSelection:()=>e_,TreeMenuSorting:()=>ev});let o=globalThis,r=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),l=new WeakMap;class d{constructor(e,t,i){if(this._$cssResult$=!0,i!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(r&&void 0===e){let i=void 0!==t&&1===t.length;i&&(e=l.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&l.set(t,e))}return e}toString(){return this.cssText}}let h=(e,...t)=>new d(1===e.length?e[0]:t.reduce((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1],e[0]),e,a),c=(e,t)=>{if(r)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let i of t){let t=document.createElement("style"),s=o.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=i.cssText,e.appendChild(t)}},u=r?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t,i="";for(let t of e.cssRules)i+=t.cssText;return new d("string"==typeof(t=i)?t:t+"",void 0,a)})(e):e,{is:p,defineProperty:_,getOwnPropertyDescriptor:v,getOwnPropertyNames:m,getOwnPropertySymbols:f,getPrototypeOf:g}=Object,b=globalThis,y=b.trustedTypes,w=y?y.emptyScript:"",x=b.reactiveElementPolyfillSupport,C={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},E=(e,t)=>!p(e,t),A={attribute:!0,type:String,converter:C,reflect:!1,useDefault:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class k extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=A){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&_(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:n}=v(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:s,set(t){let o=s?.call(this);n?.call(this,t),this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??A}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let e=g(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let e=this.properties;for(let t of[...m(e),...f(e)])this.createProperty(t,e[t])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,i]of t)this.elementProperties.set(e,i)}for(let[e,t]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e))for(let i of new Set(e.flat(1/0).reverse()))t.unshift(u(i));else void 0!==e&&t.push(u(e));return t}static _$Eu(e,t){let i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(void 0!==s&&!0===i.reflect){let n=(void 0!==i.converter?.toAttribute?i.converter:C).toAttribute(t,i.type);this._$Em=e,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){let i=this.constructor,s=i._$Eh.get(e);if(void 0!==s&&this._$Em!==s){let e=i.getPropertyOptions(s),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:C;this._$Em=s;let o=n.fromAttribute(t,e.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){let s=this.constructor,n=this[e];if(!(((i??=s.getPropertyOptions(e)).hasChanged??E)(n,t)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==n||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===s&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,i]of e){let{wrapped:e}=i,s=this[t];!0!==e||this._$AL.has(t)||void 0===s||this.C(t,void 0,i,s)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k.elementProperties=new Map,k.finalized=new Map,x?.({ReactiveElement:k}),(b.reactiveElementVersions??=[]).push("2.1.1");let S=globalThis,O=S.trustedTypes,$=O?O.createPolicy("lit-html",{createHTML:e=>e}):void 0,T="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,N="?"+M,P=`<${N}>`,L=document,I=()=>L.createComment(""),D=e=>null===e||"object"!=typeof e&&"function"!=typeof e,B=Array.isArray,R="[ \n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,U=/>/g,z=RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^
|
|
2
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,V=/"/g,K=/^(?:script|style|textarea|title)$/i,W=(e,...t)=>({_$litType$:1,strings:e,values:t}),q=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),X=new WeakMap,Z=L.createTreeWalker(L,129);function Y(e,t){if(!B(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==$?$.createHTML(t):t}class Q{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let n=0,o=0;const r=e.length-1,a=this.parts,[l,d]=((e,t)=>{let i=e.length-1,s=[],n,o=2===t?"<svg>":3===t?"<math>":"",r=F;for(let t=0;t<i;t++){let i=e[t],a,l,d=-1,h=0;for(;h<i.length&&(r.lastIndex=h,null!==(l=r.exec(i)));)h=r.lastIndex,r===F?"!--"===l[1]?r=j:void 0!==l[1]?r=U:void 0!==l[2]?(K.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=z):void 0!==l[3]&&(r=z):r===z?">"===l[0]?(r=n??F,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?z:'"'===l[3]?V:H):r===V||r===H?r=z:r===j||r===U?r=F:(r=z,n=void 0);let c=r===z&&e[t+1].startsWith("/>")?" ":"";o+=r===F?i+P:d>=0?(s.push(a),i.slice(0,d)+T+i.slice(d)+M+c):i+M+(-2===d?t:c)}return[Y(e,o+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]})(e,t);if(this.el=Q.createElement(l,i),Z.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<r;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(T)){const t=d[o++],i=s.getAttribute(e).split(M),r=/([.?@])?(.*)/.exec(t);a.push({type:1,index:n,name:r[2],strings:i,ctor:"."===r[1]?es:"?"===r[1]?en:"@"===r[1]?eo:ei}),s.removeAttribute(e)}else e.startsWith(M)&&(a.push({type:6,index:n}),s.removeAttribute(e));if(K.test(s.tagName)){const e=s.textContent.split(M),t=e.length-1;if(t>0){s.textContent=O?O.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],I()),Z.nextNode(),a.push({type:2,index:++n});s.append(e[t],I())}}}else if(8===s.nodeType)if(s.data===N)a.push({type:2,index:n});else{let e=-1;for(;-1!==(e=s.data.indexOf(M,e+1));)a.push({type:7,index:n}),e+=M.length-1}n++}}static createElement(e,t){let i=L.createElement("template");return i.innerHTML=e,i}}function J(e,t,i=e,s){if(t===q)return t;let n=void 0!==s?i._$Co?.[s]:i._$Cl,o=D(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(e))._$AT(e,i,s),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(t=J(e,n._$AS(e,t.values),n,s)),t}class ee{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??L).importNode(t,!0);Z.currentNode=s;let n=Z.nextNode(),o=0,r=0,a=i[0];for(;void 0!==a;){if(o===a.index){let t;2===a.type?t=new et(n,n.nextSibling,this,e):1===a.type?t=new a.ctor(n,a.name,a.strings,this,e):6===a.type&&(t=new er(n,this,e)),this._$AV.push(t),a=i[++r]}o!==a?.index&&(n=Z.nextNode(),o++)}return Z.currentNode=L,s}p(e){let t=0;for(let i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){let i;D(e=J(this,e,t))?e===G||null==e||""===e?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==q&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):B(i=e)||"function"==typeof i?.[Symbol.iterator]?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==G&&D(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(Y(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let e=new ee(s,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=X.get(e.strings);return void 0===t&&X.set(e.strings,t=new Q(e)),t}k(e){B(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let n of e)s===t.length?t.push(i=new et(this.O(I()),this.O(I()),this,this.options)):i=t[s],i._$AI(n),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class ei{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}_$AI(e,t=this,i,s){let n=this.strings,o=!1;if(void 0===n)(o=!D(e=J(this,e,t,0))||e!==this._$AH&&e!==q)&&(this._$AH=e);else{let s,r,a=e;for(e=n[0],s=0;s<n.length-1;s++)(r=J(this,a[i+s],t,s))===q&&(r=this._$AH[s]),o||=!D(r)||r!==this._$AH[s],r===G?e=G:e!==G&&(e+=(r??"")+n[s+1]),this._$AH[s]=r}o&&!s&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class es extends ei{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}}class en extends ei{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}}class eo extends ei{constructor(e,t,i,s,n){super(e,t,i,s,n),this.type=5}_$AI(e,t=this){if((e=J(this,e,t,0)??G)===q)return;let i=this._$AH,s=e===G&&i!==G||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==G&&(i===G||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class er{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}}let ea=S.litHtmlPolyfillSupport;ea?.(Q,et),(S.litHtmlVersions??=[]).push("3.3.1");let el=(e,t,i)=>{let s=i?.renderBefore??t,n=s._$litPart$;if(void 0===n){let e=i?.renderBefore??null;s._$litPart$=n=new et(t.insertBefore(I(),e),e,void 0,i??{})}return n._$AI(e),n},ed=globalThis;class eh extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=el(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return q}}eh._$litElement$=!0,eh.finalized=!0,ed.litElementHydrateSupport?.({LitElement:eh});let ec=ed.litElementPolyfillSupport;ec?.({LitElement:eh}),(ed.litElementVersions??=[]).push("4.2.1");var eu,ep,e_,ev,em=i(487);let ef=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},eg={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:E};function eb(e){return(t,i)=>{let s;return"object"==typeof i?((e=eg,t,i)=>{let{kind:s,metadata:n}=i,o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===s&&((e=Object.create(e)).wrapped=!0),o.set(i.name,e),"accessor"===s){let{name:s}=i;return{set(i){let n=t.get.call(this);t.set.call(this,i),this.requestUpdate(s,n,e)},init(t){return void 0!==t&&this.C(s,void 0,e,t),t}}}if("setter"===s){let{name:s}=i;return function(i){let n=this[s];t.call(this,i),this.requestUpdate(s,n,e)}}throw Error("Unsupported decorator location: "+s)})(e,t,i):(s=t.hasOwnProperty(i),t.constructor.createProperty(i,e),s?Object.getOwnPropertyDescriptor(t,i):void 0)}}let ey=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i);function ew(t){return(i,s)=>ey(i,s,{get(){return(this.renderRoot??(e??=document.createDocumentFragment())).querySelectorAll(t)}})}function ex(e){return(t,i)=>{let{slot:s,selector:n}=e??{},o="slot"+(s?`[name=${s}]`:":not([name])");return ey(t,i,{get(){let t=this.renderRoot?.querySelector(o),i=t?.assignedElements(e)??[];return void 0===n?i:i.filter(e=>e.matches(n))}})}}function*eC(e,t){if(void 0!==e){let i=0;for(let s of e)yield t(s,i++)}}var eE=i(954);function eA(e,t,i=[]){console.debug(`Moving nodes '${e.map(e=>e.label).join(", ")}' into group '${null==t?void 0:t.label}'. Tree nodes are`,t);let s=function i(s){return s.map(s=>{if(e.some(e=>s.id===e.id))return console.debug("Removed the node from original position."),null;let n=Object.assign({},s);return n.children&&(n.children=i(n.children).filter(e=>null!==e)),t&&s.id===(null==t?void 0:t.id)&&e.forEach(e=>{n.children=n.children?[...n.children,e]:[e]}),n}).filter(e=>null!==e)}(i);return t||s.push(...e),s}(eu=e_||(e_={})).LEAF="leaf",eu.SINGLE="single",eu.MULTI="multi",(ep=ev||(ev={})).A_TO_Z="a_to_z",ep.Z_TO_A="z_to_a";class ek extends CustomEvent{constructor(e){super(ek.NAME,{bubbles:!0,composed:!0,detail:e})}}ek.NAME="or-tree-select";class eS extends CustomEvent{constructor(e,t,i=[]){super(eS.NAME,{bubbles:!0,composed:!0,cancelable:!0,detail:{nodes:e,groupNode:t,newNodes:i}})}}eS.NAME="or-tree-drag",window.Vaadin||={},window.Vaadin.featureFlags||={};let eO={};function e$(e,t="25.2.11"){if(Object.defineProperty(e,"version",{get:()=>t}),e.experimental){let t="string"==typeof e.experimental?e.experimental:`${e.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,e=>e[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[t]||eO[t]){if(eO[t])return void eO[t].add(e)}else{eO[t]=new Set,eO[t].add(e),Object.defineProperty(window.Vaadin.featureFlags,t,{get:()=>0===eO[t].size,set(e){e&&eO[t].size>0&&(eO[t].forEach(e=>{customElements.define(e.is,e)}),eO[t].clear())}});return}}let i=customElements.get(e.is);if(i){let t=i.version;t&&e.version&&t===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(e.is,e)}let eT=[];function eM(e,t,i=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=i&&e.removeAttribute("dir")}function eN(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let e=eN();eT.forEach(t=>{eM(t,e)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let eP=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>""===e?null:e}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),eM(this,eN(),null))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"dir"!==e)return;let s=eN(),n=i===s&&-1===eT.indexOf(this),o=!i&&t&&-1===eT.indexOf(this),r=i!==s&&t===s;n||o?(this.__subscribe(),eM(this,s,i)):r&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=eT.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,i){("dir"!==i||""!==t||e.hasAttribute("dir"))&&super._valueToNodeAttribute(e,t,i)}_attributeToProperty(e,t,i){"dir"!==e||t?super._attributeToProperty(e,t,i):this.dir=""}__subscribe(){eT.includes(this)||eT.push(this)}__unsubscribe(){eT.includes(this)&&eT.splice(eT.indexOf(this),1)}},eL=new WeakMap;function eI(e){return t=>{if(function(e,t){let i=t;for(;i;){if(eL.get(i)===e)return!0;i=Object.getPrototypeOf(i)}return!1}(e,t))return t;let i=e(t);return eL.set(i,e),i}}let eD={},eB=/([A-Z])/gu;function eR(e){return eD[e]||(eD[e]=e.replace(eB,"-$1").toLowerCase()),eD[e]}function eF(e){return e[0].toUpperCase()+e.substring(1)}function ej(e){let[t,i]=e.split("(");return{method:t,observerProps:i.replace(")","").split(",").map(e=>e.trim())}}function eU(e,t){return Object.prototype.hasOwnProperty.call(e,t)||(e[t]=new Map(e[t])),e[t]}let ez=eI(e=>class extends e{static enabledWarnings=[];static createProperty(e,t){[String,Boolean,Number,Array].includes(t)&&(t={type:t}),t?.reflectToAttribute&&(t.reflect=!0),super.createProperty(e,t)}static getOrCreateMap(e){return eU(this,e)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let e=this.getOrCreateMap("__complexObservers");this.observers.forEach(t=>{let{method:i,observerProps:s}=ej(t);e.set(i,s)})}}static addCheckedInitializer(e){super.addInitializer(t=>{t instanceof this&&e(t)})}static getPropertyDescriptor(e,t,i){let s=super.getPropertyDescriptor(e,t,i),n=s;if(this.getOrCreateMap("__propKeys").set(e,t),i.sync&&(n={get:s.get,set(s){let n=this[e];E(s,n)&&(this[t]=s,this.requestUpdate(e,n,i),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),i.readOnly){let t=n.set;this.addCheckedInitializer(i=>{i[`_set${eF(e)}`]=function(e){t.call(i,e)}}),n={get:n.get,set(){},configurable:!0,enumerable:!0}}if("value"in i&&this.addCheckedInitializer(t=>{let s="function"==typeof i.value?i.value.call(t):i.value;i.readOnly?t[`_set${eF(e)}`](s):t[e]=s}),i.observer){let t=i.observer;this.getOrCreateMap("__observers").set(e,t),this.addCheckedInitializer(e=>{e[t]||console.warn(`observer method ${t} not defined`)})}if(i.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let e=this.__notifyProps;this.__notifyProps=new Set(e)}}else this.__notifyProps=new Set;this.__notifyProps.add(e)}if(i.computed){let t=`__assignComputed${e}`,s=ej(i.computed);this.prototype[t]=function(...t){this[e]=this[s.method](...t)},this.getOrCreateMap("__computedObservers").set(t,s.observerProps)}return i.attribute||(i.attribute=eR(e)),n}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:e}=this.constructor;this.hasUpdated||e.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e})}ready(){}willUpdate(e){this.constructor.__computedObservers&&this.__runComplexObservers(e,this.constructor.__computedObservers)}updated(e){let t=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(e,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(e,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(e,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(e,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(e,this.constructor.__notifyProps),t||this.ready()}setProperties(e){Object.entries(e).forEach(([e,t])=>{let i=this.constructor.__propKeys.get(e),s=this[i];this[i]=t,this.requestUpdate(e,s)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(e){let t=eU(this,"__dynamicMethodObservers"),{method:i,observerProps:s}=ej(e);t.set(i,s)}_createPropertyObserver(e,t){eU(this,"__dynamicPropertyObservers").set(t,e)}__runComplexObservers(e,t){t.forEach((t,i)=>{t.some(t=>e.has(t))&&(this[i]?this[i](...t.map(e=>this[e])):console.warn(`observer method ${i} not defined`))})}__runDynamicObservers(e,t){t.forEach((t,i)=>{e.has(t)&&this[i]&&this[i](this[t],e.get(t))})}__runObservers(e,t){e.forEach((e,i)=>{let s=t.get(i);void 0!==s&&this[s]&&this[s](this[i],e)})}__runNotifyProps(e,t){e.forEach((e,i)=>{t.has(i)&&this.dispatchEvent(new CustomEvent(`${eR(i)}-changed`,{detail:{value:this[i]}}))})}_get(e,t){return e.split(".").reduce((e,t)=>e?e[t]:void 0,t)}_set(e,t,i){let s,n;n=(s=e.split(".")).pop(),s.reduce((e,t)=>e[t],i)[n]=t}}),eH=0,eV=0,eK=[],eW=!1,eq={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},eG={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},eX={run(e){eW||(eW=!0,queueMicrotask(()=>(function(){eW=!1;let e=eK.length;for(let t=0;t<e;t++){let e=eK[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}eK.splice(0,e),eV+=e})())),eK.push(e);let t=eH;return eH+=1,t},cancel(e){let t=e-eV;if(t>=0){if(!eK[t])throw Error(`invalid async handle: ${e}`);eK[t]=null}}},eZ="string"==typeof document.head.style.touchAction,eY="__polymerGestures",eQ="__polymerGesturesHandled",eJ="__polymerGesturesTouchAction",e0=["mousedown","mousemove","mouseup","click"],e1=[0,1,4,2],e2=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function e5(e){return e0.indexOf(e)>-1}try{let e=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}let e4=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),e8={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function e7(e){let t=e.type;if(!e5(t))return!1;if("mousemove"===t){let t=e.buttons??1;return e instanceof window.MouseEvent&&!e2&&(t=e1[e.which]||0),!!(1&t)}return 0===(e.button??0)}let e3={x:0,y:0,id:-1,scrollDecided:!1};function e6(e,t,i){e.movefn=t,e.upfn=i,document.addEventListener("mousemove",t),document.addEventListener("mouseup",i)}function e9(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}let te=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],tt={},ti=[];function ts(e,t){let i=document.elementFromPoint(e,t),s=i;for(;s?.shadowRoot&&!window.ShadyDOM&&s!==(s=s.shadowRoot.elementFromPoint(e,t));)s&&(i=s);return i}function tn(e){let t=te(e);return t.length>0?t[0]:e.target}function to(e){let t=e.type,i=e.currentTarget[eY];if(!i)return;let s=i[t];if(!s)return;if(!e[eQ]&&(e[eQ]={},t.startsWith("touch"))){let i=e.changedTouches[0];if("touchstart"===t&&1===e.touches.length&&(e3.id=i.identifier),e3.id!==i.identifier)return;eZ||"touchstart"!==t&&"touchmove"!==t||function(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)e3.x=t.clientX,e3.y=t.clientY,e3.scrollDecided=!1;else if("touchmove"===i){if(e3.scrollDecided)return;e3.scrollDecided=!0;let i=function(e){let t="auto",i=te(e);for(let e=0,s;e<i.length;e++)if((s=i[e])[eJ]){t=s[eJ];break}return t}(e),s=!1,n=Math.abs(e3.x-t.clientX),o=Math.abs(e3.y-t.clientY);e.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>n:"pan-y"===i&&(s=n>o)),s?e.preventDefault():td("track")}}(e)}let n=e[eQ];if(!n.skip){for(let t=0,i;t<ti.length;t++)s[(i=ti[t]).name]&&!n[i.name]&&i.flow&&i.flow.start.indexOf(e.type)>-1&&i.reset&&i.reset();for(let i=0,o;i<ti.length;i++)s[(o=ti[i]).name]&&!n[o.name]&&(n[o.name]=!0,o[t](e))}}function tr(e,t,i){return!!tt[t]&&(function(e,t,i){var s,n;let o=tt[t],r=o.deps,a=o.name,l=e[eY];l||(e[eY]=l={});for(let t=0,i,s;t<r.length;t++)i=r[t],e4&&e5(i)&&"click"!==i||((s=l[i])||(l[i]=s={_count:0}),0===s._count&&e.addEventListener(i,to,void e5(i)),s[a]=(s[a]||0)+1,s._count=(s._count||0)+1);e.addEventListener(t,i),o.touchAction&&(s=e,n=o.touchAction,eZ&&s instanceof HTMLElement&&eX.run(()=>{s.style.touchAction=n}),s[eJ]=n)}(e,t,i),!0)}function ta(e){ti.push(e),e.emits.forEach(t=>{tt[t]=e})}function tl(e,t,i){let s=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,e.dispatchEvent(s),s.defaultPrevented){let e=i.preventer||i.sourceEvent;e?.preventDefault&&e.preventDefault()}}function td(e){let t=function(e){for(let t=0,i;t<ti.length;t++){i=ti[t];for(let t=0;t<i.emits.length;t++)if(i.emits[t]===e)return i}return null}(e);t.info&&(t.info.prevent=!0)}function th(e,t,i,s){t&&tl(t,e,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:e=>td(e)})}function tc(e,t,i){if(e.prevent)return!1;if(e.started)return!0;let s=Math.abs(e.x-t),n=Math.abs(e.y-i);return s>=5||n>=5}function tu(e,t,i){if(!t)return;let s=e.moves[e.moves.length-2],n=e.moves[e.moves.length-1],o=n.x-e.x,r=n.y-e.y,a,l=0;s&&(a=n.x-s.x,l=n.y-s.y),tl(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:o,dy:r,ddx:a,ddy:l,sourceEvent:i,hover:()=>ts(i.clientX,i.clientY)})}function tp(e,t,i){let s=Math.abs(t.clientX-e.x),n=Math.abs(t.clientY-e.y),o=tn(i||t);!(!o||e8[o.localName]&&o.hasAttribute("disabled"))&&(isNaN(s)||isNaN(n)||s<=25&&n<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=tn(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),s=e.pageX,n=e.pageY;return!(s>=i.left&&s<=i.right&&n>=i.top&&n<=i.bottom)}return!1}(t))&&!e.prevent&&tl(o,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i})}ta({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){e9(this.info)},mousedown(e){if(!e7(e))return;let t=tn(e),i=this;e6(this.info,e=>{e7(e)||(th("up",t,e),e9(i.info))},e=>{e7(e)&&th("up",t,e),e9(i.info)}),th("down",t,e)},touchstart(e){th("down",tn(e),e.changedTouches[0],e)},touchend(e){th("up",tn(e),e.changedTouches[0],e)}}),ta({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,e9(this.info)},mousedown(e){if(!e7(e))return;let t=tn(e),i=this,s=e=>{let s=e.clientX,n=e.clientY;tc(i.info,s,n)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&td("tap"),i.info.addMove({x:s,y:n}),e7(e)||(i.info.state="end",e9(i.info)),t&&tu(i.info,t,e),i.info.started=!0)};e6(this.info,s,e=>{i.info.started&&s(e),e9(i.info)}),this.info.x=e.clientX,this.info.y=e.clientY},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove(e){let t=tn(e),i=e.changedTouches[0],s=i.clientX,n=i.clientY;tc(this.info,s,n)&&("start"===this.info.state&&td("tap"),this.info.addMove({x:s,y:n}),tu(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend(e){let t=tn(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),tu(this.info,t,i))}}),ta({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:0/0,y:0/0,prevent:!1},reset(){this.info.x=0/0,this.info.y=0/0,this.info.prevent=!1},mousedown(e){e7(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click(e){e7(e)&&tp(this.info,e)},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend(e){tp(this.info,e.changedTouches[0],e)}});let t_=eI(e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}),tv=eI(e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}}),tm=e=>class extends t_(tv(e)){get _activeKeys(){return[" "]}ready(){super.ready(),tr(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0)}),tr(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(e){return!this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",e=>{this._activeKeys.includes(e.key)&&this._setActive(!1)},{once:!0}))}_setActive(e){this.toggleAttribute("active",e)}},tf=!1;function tg(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function tb(e){let t=e.style;if("hidden"===t.visibility||"none"===t.display)return!0;let i=window.getComputedStyle(e);return"hidden"===i.visibility||"none"===i.display}function ty(e){return e.checkVisibility?!e.checkVisibility({visibilityProperty:!0}):null===e.offsetParent&&0===e.clientWidth&&0===e.clientHeight||tb(e)}function tw(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function tx(e){return e.getRootNode().activeElement===e}window.addEventListener("keydown",()=>{tf=!0},{capture:!0}),window.addEventListener("mousedown",()=>{tf=!1},{capture:!0});let tC=eI(e=>class extends e{get _keyboardActive(){return tf}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}focus(e){super.focus(e),e?.focusVisible!==!1&&this.setAttribute("focus-ring","")}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}}),tE=e=>class extends tm(tC(e)){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged",sync:!0},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return this._value??this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();let e=this.getAttribute("value");null!==e&&(this.value=e),this.__shouldAllowFocusWhenDisabled()&&this.style.setProperty("--_vaadin-item-disabled-pointer-events","auto")}focus(e){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus(e)}_shouldSetActive(e){return!this.disabled&&!("keydown"===e.type&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.__shouldAllowFocusWhenDisabled()||this.blur())}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click())}__shouldAllowFocusWhenDisabled(){return!1}};function tA(e){try{CSS.registerProperty(e)}catch(t){if(t instanceof DOMException&&"InvalidModificationError"===t.name)console.warn(`The CSS property ${e.name} has already been registered.`);else throw t}}class tk extends EventTarget{#e;#t=new Set;#i;#s=!1;constructor(e){super(),this.#e=e,this.#i=new CSSStyleSheet}#n(e){let{propertyName:t}=e;this.#t.has(t)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:t}}))}observe(e){this.connect(),this.#t.has(e)||(this.#t.add(e),this.#i.replaceSync(`
|
|
3
3
|
:root::before, :host::before {
|
|
4
4
|
content: '' !important;
|
|
5
5
|
position: absolute !important;
|
|
@@ -240,7 +240,7 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
240
240
|
<div part="items">
|
|
241
241
|
<slot></slot>
|
|
242
242
|
</div>
|
|
243
|
-
`}ready(){super.ready(),this.setAttribute("role","menu")}}e$(tY);class tQ{saveFocus(e){this.focusNode=e||tg()}restoreFocus(e){let t=this.focusNode;if(!t)return;let i={preventScroll:!!e&&e.preventScroll,focusVisible:!!e&&e.focusVisible};tg()===document.body?setTimeout(()=>t.focus(i)):t.focus(i),this.focusNode=null}}let tJ=[];class t0{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){var e;let t;return e=this.__trapNode,!function e(t,i){if(t.nodeType!==Node.ELEMENT_NODE||tb(t))return!1;let s=tw(t)?Number(t.getAttribute("tabindex")||0):-1,n=s>0;s>=0&&i.push(t);return[..."slot"===t.localName?t.assignedNodes({flatten:!0}):(t.shadowRoot||t).children].forEach(t=>{n=e(t,i)||n}),n}(e,t=[])?t:function e(t){let i=t.length;if(i<2)return t;let s=Math.ceil(i/2),n=e(t.slice(0,s)),o=e(t.slice(s)),r=[];for(;n.length>0&&o.length>0;)!function(e,t){let i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}(n[0],o[0])?r.push(n.shift()):r.push(o.shift());return r.concat(n,o)}(t)}get __focusedElementIndex(){let e=this.__focusableElements;return e.indexOf(e.filter(tx).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,Error("The trap node should have at least one focusable descendant or be focusable itself.");tJ.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus({focusVisible:tf})}releaseFocus(){this.__trapNode=null,tJ.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(tJ).pop()&&"Tab"===e.key){if(e.defaultPrevented)return;e.preventDefault();let t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){let t=this.__focusableElements,i=this.__focusedElementIndex,s=(t.length+i+(e?-1:1))%t.length,n=t[s];n.focus({focusVisible:!0}),"input"===n.localName&&n.select()}}let t1=e=>class extends e{static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__focusTrapController=new t0(this),this.__focusRestorationController=new tQ}get _contentRoot(){return this}ready(){super.ready(),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}get _focusTrapRoot(){return this.$.overlay}_resetFocus(){if(this.focusTrap&&this.__focusTrapController.releaseFocus(),this.restoreFocusOnClose&&this._shouldRestoreFocus()){let e=tf;this.__focusRestorationController.restoreFocus({preventScroll:!e,focusVisible:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&!ty(this._focusTrapRoot)&&this.__focusTrapController.trapFocus(this._focusTrapRoot)}_shouldRestoreFocus(){let e=tg();return e===document.body||this._deepContains(e)}_deepContains(e){if(this._contentRoot.contains(e))return!0;let t=e,i=e.ownerDocument;for(;t&&t!==i&&t!==this._contentRoot;)t=t.parentNode||t.host;return t===this._contentRoot}};function t2(e,t,i){let s=[e];e.owner&&s.push(e.owner),"string"==typeof i?s.forEach(e=>{e.setAttribute(t,i)}):i?s.forEach(e=>{e.setAttribute(t,"")}):s.forEach(e=>{e.removeAttribute(t)})}let t5={start:"top",end:"bottom"},t4={start:"left",end:"right"},t8=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),t7=e=>class extends e{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}constructor(){super(),this._hasOverlayPositionMixin=!0,this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}updated(e){if(super.updated(e),e.has("positionTarget")){let t=e.get("positionTarget");this.__oldContentWidth=void 0,this.__oldContentHeight=void 0,(!this.positionTarget&&t||this.positionTarget&&!t&&this.__margins)&&this.__resetPosition()}(e.has("opened")||e.has("positionTarget"))&&this.__updatePositionSettings(this.opened,this.positionTarget),["horizontalAlign","verticalAlign","noHorizontalOverlap","noVerticalOverlap","requiredVerticalSpace"].some(t=>e.has(t))&&this._updatePosition()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(e){let t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(e),e=e.host;continue}if(e.assignedSlot){e=e.assignedSlot;continue}e=e.parentNode}return t}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=function(e,t){let i,s=null,n=document.documentElement;function o(){i&&clearTimeout(i),s?.disconnect(),s=null}return!function r(a=!1,l=1){o();let{left:d,top:h,width:c,height:u}=e.getBoundingClientRect();if(a||t(),!c||!u)return;let p=Math.floor(h),_=Math.floor(n.clientWidth-(d+c)),v=Math.floor(n.clientHeight-(h+u)),m=Math.floor(d),f=!0;(s=new IntersectionObserver(function(e){let t=e[0].intersectionRatio;if(t!==l){if(!f)return r();t?r(!1,t):i=setTimeout(()=>{r(!1,1e-7)},1e3)}f=!1},{rootMargin:`${-p}px ${-_}px ${-v}px ${-m}px`,threshold:Math.max(0,Math.min(1,l))||1})).observe(e)}(!0),o}(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__updatePositionSettings(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,t8.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,t8.observe(t))),e){let e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(t=>{this.__margins[t]=parseInt(e[t],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__onScroll(e){e.target instanceof Node&&this._deepContains(e.target)||this._updatePosition()}__resetPosition(){this.__margins=null,Object.assign(this.style,{justifyContent:"",alignItems:"",top:"",bottom:"",left:"",right:""}),t2(this,"bottom-aligned",!1),t2(this,"top-aligned",!1),t2(this,"end-aligned",!1),t2(this,"start-aligned",!1)}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;let e=this.positionTarget.getBoundingClientRect();if(0===e.width&&0===e.height&&this.opened){this.opened=!1;return}let t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";let i=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,i),n=!i&&s||i&&!s;this.style.alignItems=n?"flex-start":"flex-end";let o=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(e,o,this.noVerticalOverlap,t5,this,t),a=this.__calculatePositionInOneDimension(e,o,this.noHorizontalOverlap,t4,this,s);Object.assign(this.style,r,a),t2(this,"bottom-aligned",!t),t2(this,"top-aligned",t),t2(this,"end-aligned",!n),t2(this,"start-aligned",n)}__shouldAlignStartHorizontally(e,t){let i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;let s=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,i,s,this.__margins,n,this.noHorizontalOverlap,t4)}__shouldAlignStartVertically(e){let t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;let i=Math.min(window.innerHeight,document.documentElement.clientHeight),s="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,i,this.__margins,s,this.noVerticalOverlap,t5)}__shouldAlignStart(e,t,i,s,n,o,r){let a=i-e[o?r.end:r.start]-s[r.end],l=e[o?r.start:r.end]-s[r.start],d=n?a:l;return n===(d>(n?l:a)||d>t)}__adjustBottomProperty(e,t,i){let s;if(e===t.end){if(t.end===t5.end){let e=Math.min(window.innerHeight,document.documentElement.clientHeight);i>e&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-e)),this.__oldViewportHeight=e}if(t.end===t4.end){let e=Math.min(window.innerWidth,document.documentElement.clientWidth);i>e&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-e)),this.__oldViewportWidth=e}}return s}__calculatePositionInOneDimension(e,t,i,s,n,o){let r=o?s.start:s.end,a=o?s.end:s.start,l=parseFloat(n.style[r]||getComputedStyle(n)[r]),d=this.__adjustBottomProperty(r,s,l),h=t[o?s.start:s.end]-e[i===o?s.end:s.start];return{[r]:d?`${d}px`:`${l+h*(o?-1:1)}px`,[a]:""}}},t3=e=>class extends t1(t7(e)){static get properties(){return{parentOverlay:{type:Object,readOnly:!0},_theme:{type:String,readOnly:!0,sync:!0}}}static get observers(){return["_themeChanged(_theme)"]}get _contentRoot(){return this._rendererRoot}get _rendererRoot(){if(!this.__savedRoot){let e=document.createElement("div");e.setAttribute("slot","overlay"),e.style.display="contents",this.owner.appendChild(e),this.__savedRoot=e}return this.__savedRoot}ready(){super.ready(),this.restoreFocusOnClose=!0,this.addEventListener("keydown",e=>{if(!e.defaultPrevented&&e.composedPath()[0]===this.$.overlay&&[38,40].indexOf(e.keyCode)>-1){let t=this._contentRoot.firstElementChild;t&&Array.isArray(t.items)&&t.items.length&&(e.preventDefault(),38===e.keyCode?t.items[t.items.length-1].focus():t.focus())}})}_themeChanged(){this.close()}getBoundaries(){let e=this.getBoundingClientRect(),t=this.$.overlay.getBoundingClientRect(),i=e.bottom-t.height,s=this.parentOverlay;if(s?.hasAttribute("bottom-aligned")){let e=getComputedStyle(s);i=i-parseFloat(e.bottom)-parseFloat(e.height)}return{xMax:e.right-t.width,xMin:e.left+t.width,yMax:i}}_updatePosition(){if(super._updatePosition(),this.positionTarget&&this.parentOverlay&&this.opened){let e=getComputedStyle(this.$.content);this.style.left?this.style.left=`${parseFloat(this.style.left)+parseFloat(e.paddingLeft)}px`:this.style.right=`${parseFloat(this.style.right)+parseFloat(e.paddingRight)}px`,this.style.bottom?this.style.bottom=`${parseFloat(this.style.bottom)-parseFloat(e.paddingBottom)}px`:this.style.top=`${parseFloat(this.style.top)-parseFloat(e.paddingTop)}px`}}_shouldRestoreFocus(){return!this.parentOverlay&&super._shouldRestoreFocus()}_deepContains(e){return this.owner.contains(e)}},t6=/Android/u.test(navigator.userAgent);/Chrome/u.test(navigator.userAgent)&&/Google Inc/u.test(navigator.vendor),/Firefox/u.test(navigator.userAgent);let t9=/^iPad/u.test(navigator.platform)||/^Mac/u.test(navigator.platform)&&navigator.maxTouchPoints>1,ie=/^iPhone/u.test(navigator.platform)||t9;/^((?!chrome|android).)*safari/iu.test(navigator.userAgent);let it=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})(),ii=new Set,is=()=>[...ii].filter(e=>!e.hasAttribute("closing")),io=(e,t=e=>!0)=>e===is().filter(t).pop(),ir=e=>class extends e{get _last(){return io(this)}get _isAttached(){return ii.has(this)}bringToFront(){let e,t;if(io(this))return;let i=-1===(t=(e=is()).indexOf(this))?[]:e.slice(t+1),s=i.filter(e=>e._hasOverlayPositionMixin&&this._deepContains(e));s.length!==i.length&&[this,...s].forEach(e=>{e.matches(":popover-open")&&(e.hidePopover(),e.showPopover()),e._removeAttachedInstance(),e._appendAttachedInstance()})}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),is().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")})}_exitModalState(){let e;void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);let t=is();for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}_appendAttachedInstance(){ii.add(this)}_removeAttachedInstance(){this._isAttached&&ii.delete(this)}},ia=e=>class extends t1(ir(e)){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_withBackdropChanged",sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}get _rendererRoot(){return this}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),ie&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}firstUpdated(){super.firstUpdated(),this.popover="manual",this.addEventListener("click",()=>{}),this.$.backdrop&&this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}),this.addEventListener("animationcancel",()=>{this._flushAnimation("opening"),this._flushAnimation("closing")})}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener)),this.opened&&this._attachOverlay()}disconnectedCallback(){super.disconnectedCallback(),this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this._rendererRoot,this.owner,this.model)}close(e){let t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{overlay:this,sourceEvent:e}});this.dispatchEvent(t),document.body.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}setBounds(e,t=!0){let i=this.$.overlay,s={...e};t&&"absolute"!==i.style.position&&(i.style.position="absolute"),Object.keys(s).forEach(e=>{null===s[e]||isNaN(s[e])||(s[e]=`${s[e]}px`)}),Object.assign(i.style,s)}_detectIosNavbar(){if(!this.opened)return;let e=window.innerHeight,t=window.innerWidth,i=document.documentElement.clientHeight;t>e&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${i-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0px")}_shouldAddGlobalListeners(){return!this.modeless}_addGlobalListeners(){this.__hasGlobalListeners||(this.__hasGlobalListeners=!0,document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0))}_removeGlobalListeners(){this.__hasGlobalListeners&&(this.__hasGlobalListeners=!1,document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0))}_rendererOrDataChanged(e,t,i,s){let n=this._oldOwner!==t||this._oldModel!==i;this._oldModel=i,this._oldOwner=t;let o=this._oldRenderer!==e,r=void 0!==this._oldRenderer;this._oldRenderer=e;let a=this._oldOpened!==s;this._oldOpened=s,o&&r&&(this._rendererRoot.innerHTML="",delete this._rendererRoot._$litPart$),s&&e&&(o||a||n)&&this.requestContentUpdate()}_modelessChanged(e){this.opened&&(this._shouldAddGlobalListeners()?this._addGlobalListeners():this._removeGlobalListeners()),e?this._exitModalState():this.opened&&this._enterModalState(),t2(this,"modeless",e)}_withBackdropChanged(e){t2(this,"with-backdrop",e)}_openedChanged(e,t){if(e){if(!this.isConnected){this.opened=!1;return}this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus();let e=new CustomEvent("vaadin-overlay-open",{detail:{overlay:this},bubbles:!0});this.dispatchEvent(e),document.body.dispatchEvent(e)})}),document.addEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._addGlobalListeners()}else t&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){let e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return"none"!==e.getPropertyValue("display")&&t&&"none"!==t}_enqueueAnimation(e,t){let i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){let t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this._isAttached&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this._appendAttachedInstance(),this.bringToFront(),this.modeless||this._enterModalState(),t2(this,"opening",!0),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening()}):this._finishOpening()}_attachOverlay(){this.matches(":popover-open")||this.showPopover()}_finishOpening(){t2(this,"opening",!1)}_finishClosing(){this._detachOverlay(),this._removeAttachedInstance(),this.$.overlay.style.removeProperty("pointer-events"),t2(this,"closing",!1),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._isAttached&&(this._exitModalState(),t2(this,"closing",!0),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing()}):this._finishClosing())}_detachOverlay(){this.hidePopover()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;let t=new CustomEvent("vaadin-overlay-outside-click",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&(this.close(e),this.opened||this.modeless||e.preventDefault())}_keydownListener(e){if(this._last&&!e.defaultPrevented&&(this._shouldAddGlobalListeners()||e.composedPath().includes(this._focusTrapRoot))&&"Escape"===e.key){let t=new CustomEvent("vaadin-overlay-escape-press",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},il=h`
|
|
243
|
+
`}ready(){super.ready(),this.setAttribute("role","menu")}}e$(tY);class tQ{saveFocus(e){this.focusNode=e||tg()}restoreFocus(e){let t=this.focusNode;if(!t)return;let i={preventScroll:!!e&&e.preventScroll,focusVisible:!!e&&e.focusVisible};tg()===document.body?setTimeout(()=>t.focus(i)):t.focus(i),this.focusNode=null}}let tJ=[];class t0{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){var e;let t;return e=this.__trapNode,!function e(t,i){if(t.nodeType!==Node.ELEMENT_NODE||tb(t))return!1;let s=tw(t)?Number(t.getAttribute("tabindex")||0):-1,n=s>0;s>=0&&i.push(t);return[..."slot"===t.localName?t.assignedNodes({flatten:!0}):(t.shadowRoot||t).children].forEach(t=>{n=e(t,i)||n}),n}(e,t=[])?t:function e(t){let i=t.length;if(i<2)return t;let s=Math.ceil(i/2),n=e(t.slice(0,s)),o=e(t.slice(s)),r=[];for(;n.length>0&&o.length>0;)!function(e,t){let i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}(n[0],o[0])?r.push(n.shift()):r.push(o.shift());return r.concat(n,o)}(t)}get __focusedElementIndex(){let e=this.__focusableElements;return e.indexOf(e.filter(tx).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,Error("The trap node should have at least one focusable descendant or be focusable itself.");tJ.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus({focusVisible:tf})}releaseFocus(){this.__trapNode=null,tJ.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(tJ).pop()&&"Tab"===e.key){if(e.defaultPrevented)return;e.preventDefault();let t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){let t=this.__focusableElements,i=this.__focusedElementIndex,s=(t.length+i+(e?-1:1))%t.length,n=t[s];n.focus({focusVisible:!0}),"input"===n.localName&&n.select()}}let t1=e=>class extends e{static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__focusTrapController=new t0(this),this.__focusRestorationController=new tQ}get _contentRoot(){return this}ready(){super.ready(),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}get _focusTrapRoot(){return this.$.overlay}_resetFocus(){if(this.focusTrap&&this.__focusTrapController.releaseFocus(),this.restoreFocusOnClose&&this._shouldRestoreFocus()){let e=tf;this.__focusRestorationController.restoreFocus({preventScroll:!e,focusVisible:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&!ty(this._focusTrapRoot)&&this.__focusTrapController.trapFocus(this._focusTrapRoot)}_shouldRestoreFocus(){let e=tg();return e===document.body||this._deepContains(e)}_deepContains(e){if(this._contentRoot.contains(e))return!0;let t=e,i=e.ownerDocument;for(;t&&t!==i&&t!==this._contentRoot;)t=t.parentNode||t.host;return t===this._contentRoot}};function t2(e,t,i){let s=[e];e.owner&&s.push(e.owner),"string"==typeof i?s.forEach(e=>{e.setAttribute(t,i)}):i?s.forEach(e=>{e.setAttribute(t,"")}):s.forEach(e=>{e.removeAttribute(t)})}let t5={start:"top",end:"bottom"},t4={start:"left",end:"right"},t8=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),t7=e=>class extends e{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}constructor(){super(),this._hasOverlayPositionMixin=!0,this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}updated(e){if(super.updated(e),e.has("positionTarget")){let t=e.get("positionTarget");this.__oldContentWidth=void 0,this.__oldContentHeight=void 0,(!this.positionTarget&&t||this.positionTarget&&!t&&this.__margins)&&this.__resetPosition()}(e.has("opened")||e.has("positionTarget"))&&this.__updatePositionSettings(this.opened,this.positionTarget),["horizontalAlign","verticalAlign","noHorizontalOverlap","noVerticalOverlap","requiredVerticalSpace"].some(t=>e.has(t))&&this._updatePosition()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(e){let t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(e),e=e.host;continue}if(e.assignedSlot){e=e.assignedSlot;continue}e=e.parentNode}return t}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=function(e,t){let i,s=null,n=document.documentElement;function o(){i&&clearTimeout(i),s?.disconnect(),s=null}return!function r(a=!1,l=1){o();let{left:d,top:h,width:c,height:u}=e.getBoundingClientRect();if(a||t(),!c||!u)return;let p=Math.floor(h),_=Math.floor(n.clientWidth-(d+c)),v=Math.floor(n.clientHeight-(h+u)),m=Math.floor(d),f=!0;(s=new IntersectionObserver(function(e){let t=e[0].intersectionRatio;if(t!==l){if(!f)return r();t?r(!1,t):i=setTimeout(()=>{r(!1,1e-7)},1e3)}f=!1},{rootMargin:`${-p}px ${-_}px ${-v}px ${-m}px`,threshold:Math.max(0,Math.min(1,l))||1})).observe(e)}(!0),o}(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__updatePositionSettings(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,t8.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,t8.observe(t))),e){let e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(t=>{this.__margins[t]=parseInt(e[t],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__onScroll(e){e.target instanceof Node&&this._deepContains(e.target)||this._updatePosition()}__resetPosition(){this.__margins=null,Object.assign(this.style,{justifyContent:"",alignItems:"",top:"",bottom:"",left:"",right:""}),t2(this,"bottom-aligned",!1),t2(this,"top-aligned",!1),t2(this,"end-aligned",!1),t2(this,"start-aligned",!1)}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;let e=this.positionTarget.getBoundingClientRect();if(0===e.width&&0===e.height&&this.opened){this.opened=!1;return}let t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";let i=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,i),n=!i&&s||i&&!s;this.style.alignItems=n?"flex-start":"flex-end";let o=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(e,o,this.noVerticalOverlap,t5,this,t),a=this.__calculatePositionInOneDimension(e,o,this.noHorizontalOverlap,t4,this,s);Object.assign(this.style,r,a),t2(this,"bottom-aligned",!t),t2(this,"top-aligned",t),t2(this,"end-aligned",!n),t2(this,"start-aligned",n)}__shouldAlignStartHorizontally(e,t){let i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;let s=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,i,s,this.__margins,n,this.noHorizontalOverlap,t4)}__shouldAlignStartVertically(e){let t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;let i=Math.min(window.innerHeight,document.documentElement.clientHeight),s="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,i,this.__margins,s,this.noVerticalOverlap,t5)}__shouldAlignStart(e,t,i,s,n,o,r){let a=i-e[o?r.end:r.start]-s[r.end],l=e[o?r.start:r.end]-s[r.start],d=n?a:l;return n===(d>(n?l:a)||d>t)}__adjustBottomProperty(e,t,i){let s;if(e===t.end){if(t.end===t5.end){let e=Math.min(window.innerHeight,document.documentElement.clientHeight);i>e&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-e)),this.__oldViewportHeight=e}if(t.end===t4.end){let e=Math.min(window.innerWidth,document.documentElement.clientWidth);i>e&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-e)),this.__oldViewportWidth=e}}return s}__calculatePositionInOneDimension(e,t,i,s,n,o){let r=o?s.start:s.end,a=o?s.end:s.start,l=parseFloat(n.style[r]||getComputedStyle(n)[r]),d=this.__adjustBottomProperty(r,s,l),h=t[o?s.start:s.end]-e[i===o?s.end:s.start];return{[r]:d?`${d}px`:`${l+h*(o?-1:1)}px`,[a]:""}}},t3=e=>class extends t1(t7(e)){static get properties(){return{parentOverlay:{type:Object,readOnly:!0},_theme:{type:String,readOnly:!0,sync:!0}}}static get observers(){return["_themeChanged(_theme)"]}get _contentRoot(){return this._rendererRoot}get _rendererRoot(){if(!this.__savedRoot){let e=document.createElement("div");e.setAttribute("slot","overlay"),e.style.display="contents",this.owner.appendChild(e),this.__savedRoot=e}return this.__savedRoot}ready(){super.ready(),this.restoreFocusOnClose=!0,this.addEventListener("keydown",e=>{if(!e.defaultPrevented&&e.composedPath()[0]===this.$.overlay&&[38,40].indexOf(e.keyCode)>-1){let t=this._contentRoot.firstElementChild;t&&Array.isArray(t.items)&&t.items.length&&(e.preventDefault(),38===e.keyCode?t.items[t.items.length-1].focus():t.focus())}})}_themeChanged(){this.close()}getBoundaries(){let e=this.getBoundingClientRect(),t=this.$.overlay.getBoundingClientRect(),i=e.bottom-t.height,s=this.parentOverlay;if(s?.hasAttribute("bottom-aligned")){let e=getComputedStyle(s);i=i-parseFloat(e.bottom)-parseFloat(e.height)}return{xMax:e.right-t.width,xMin:e.left+t.width,yMax:i}}_updatePosition(){if(super._updatePosition(),this.positionTarget&&this.parentOverlay&&this.opened){let e=getComputedStyle(this.$.content);this.style.left?this.style.left=`${parseFloat(this.style.left)+parseFloat(e.paddingLeft)}px`:this.style.right=`${parseFloat(this.style.right)+parseFloat(e.paddingRight)}px`,this.style.bottom?this.style.bottom=`${parseFloat(this.style.bottom)-parseFloat(e.paddingBottom)}px`:this.style.top=`${parseFloat(this.style.top)-parseFloat(e.paddingTop)}px`}}_shouldRestoreFocus(){return!this.parentOverlay&&super._shouldRestoreFocus()}_deepContains(e){return this.owner.contains(e)}},t6=/Android/u.test(navigator.userAgent);/Chrome/u.test(navigator.userAgent)&&/Google Inc/u.test(navigator.vendor),/Firefox/u.test(navigator.userAgent);let t9=/^iPad/u.test(navigator.platform)||/^Mac/u.test(navigator.platform)&&navigator.maxTouchPoints>1,ie=/^iPhone/u.test(navigator.platform)||t9;/^((?!chrome|android).)*safari/iu.test(navigator.userAgent);let it=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})(),ii=new Set,is=()=>[...ii].filter(e=>!e.hasAttribute("closing")),io=(e,t=e=>!0)=>e===is().filter(t).pop(),ir=e=>class extends e{get _last(){return io(this)}get _isAttached(){return ii.has(this)}bringToFront(){let e,t;if(io(this))return;let i=-1===(t=(e=is()).indexOf(this))?[]:e.slice(t+1),s=i.filter(e=>e._hasOverlayPositionMixin&&this._deepContains(e));s.length!==i.length&&[this,...s].forEach(e=>{e.matches(":popover-open")&&(e.hidePopover(),e.showPopover()),e._removeAttachedInstance(),e._appendAttachedInstance()})}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),is().forEach(e=>{e!==this&&e.toggleAttribute("suppressed",!0)})}_exitModalState(){let e;void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);let t=is();for(;(e=t.pop())&&(e===this||(e.toggleAttribute("suppressed",!1),e.modeless)););}_appendAttachedInstance(){ii.add(this)}_removeAttachedInstance(){this._isAttached&&ii.delete(this)}},ia=e=>class extends t1(ir(e)){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_withBackdropChanged",sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}get _rendererRoot(){return this}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),ie&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}firstUpdated(){super.firstUpdated(),this.popover="manual",this.addEventListener("click",()=>{}),this.$.backdrop&&this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}),this.addEventListener("animationcancel",()=>{this._flushAnimation("opening"),this._flushAnimation("closing")})}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener)),this.opened&&this._attachOverlay()}disconnectedCallback(){super.disconnectedCallback(),this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this._rendererRoot,this.owner,this.model)}close(e){let t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{overlay:this,sourceEvent:e}});this.dispatchEvent(t),document.body.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}setBounds(e,t=!0){let i=this.$.overlay,s={...e};t&&"absolute"!==i.style.position&&(i.style.position="absolute"),Object.keys(s).forEach(e=>{null===s[e]||isNaN(s[e])||(s[e]=`${s[e]}px`)}),Object.assign(i.style,s)}_detectIosNavbar(){if(!this.opened)return;let e=window.innerHeight,t=window.innerWidth,i=document.documentElement.clientHeight;t>e&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${i-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0px")}_shouldAddGlobalListeners(){return!this.modeless}_addGlobalListeners(){this.__hasGlobalListeners||(this.__hasGlobalListeners=!0,document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0))}_removeGlobalListeners(){this.__hasGlobalListeners&&(this.__hasGlobalListeners=!1,document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0))}_rendererOrDataChanged(e,t,i,s){let n=this._oldOwner!==t||this._oldModel!==i;this._oldModel=i,this._oldOwner=t;let o=this._oldRenderer!==e,r=void 0!==this._oldRenderer;this._oldRenderer=e;let a=this._oldOpened!==s;this._oldOpened=s,o&&r&&(this._rendererRoot.innerHTML="",delete this._rendererRoot._$litPart$),s&&e&&(o||a||n)&&this.requestContentUpdate()}_modelessChanged(e){this.opened&&(this._shouldAddGlobalListeners()?this._addGlobalListeners():this._removeGlobalListeners()),e?this._exitModalState():this.opened&&this._enterModalState(),t2(this,"modeless",e)}_withBackdropChanged(e){t2(this,"with-backdrop",e)}_openedChanged(e,t){if(e){if(!this.isConnected){this.opened=!1;return}this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus();let e=new CustomEvent("vaadin-overlay-open",{detail:{overlay:this},bubbles:!0});this.dispatchEvent(e),document.body.dispatchEvent(e)})}),document.addEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._addGlobalListeners()}else t&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){let e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return"none"!==e.getPropertyValue("display")&&t&&"none"!==t}_enqueueAnimation(e,t){let i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){let t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this._isAttached&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this._appendAttachedInstance(),this.bringToFront(),this.modeless||this._enterModalState(),t2(this,"opening",!0),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening()}):this._finishOpening()}_attachOverlay(){this.matches(":popover-open")||this.showPopover()}_finishOpening(){t2(this,"opening",!1)}_finishClosing(){this._detachOverlay(),this._removeAttachedInstance(),this.toggleAttribute("suppressed",!1),t2(this,"closing",!1),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._isAttached&&(this._exitModalState(),t2(this,"closing",!0),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing()}):this._finishClosing())}_detachOverlay(){this.hidePopover()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;let t=new CustomEvent("vaadin-overlay-outside-click",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&(this.close(e),this.opened||this.modeless||e.preventDefault())}_keydownListener(e){if(this._last&&!e.defaultPrevented&&(this._shouldAddGlobalListeners()||e.composedPath().includes(this._focusTrapRoot))&&"Escape"===e.key){let t=new CustomEvent("vaadin-overlay-escape-press",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},il=h`
|
|
244
244
|
:host {
|
|
245
245
|
align-items: flex-start;
|
|
246
246
|
justify-content: flex-start;
|
|
@@ -316,6 +316,11 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
316
316
|
display: none !important;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
:host([suppressed]) [part='overlay'],
|
|
320
|
+
:host([suppressed]) ::slotted(*) {
|
|
321
|
+
pointer-events: none !important;
|
|
322
|
+
}
|
|
323
|
+
|
|
319
324
|
[part='overlay'] {
|
|
320
325
|
color: var(--vaadin-overlay-text-color, var(--vaadin-text-color));
|
|
321
326
|
background: var(--vaadin-overlay-background, var(--vaadin-background-color));
|
|
@@ -497,7 +502,7 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
497
502
|
}
|
|
498
503
|
}
|
|
499
504
|
`,i$=e=>class extends t_(e){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),!this.__shouldAllowFocusWhenDisabled()&&(e?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):t&&(void 0!==this._lastTabIndex?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0))}_tabindexChanged(e){!this.__shouldAllowFocusWhenDisabled()&&this.disabled&&-1!==e&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"))}focus(e){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus(e)}__shouldAllowFocusWhenDisabled(){return!1}},iT=["mousedown","mouseup","click","dblclick","keypress","keydown","keyup"],iM=e=>class extends tm(i$(tC(e))){constructor(){super(),this.__onInteractionEvent=this.__onInteractionEvent.bind(this),iT.forEach(e=>{this.addEventListener(e,this.__onInteractionEvent,!0)}),this.tabindex=0}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button"),this.__shouldAllowFocusWhenDisabled()&&this.style.setProperty("--_vaadin-button-disabled-pointer-events","auto")}_onKeyDown(e){super._onKeyDown(e),e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click())}__onInteractionEvent(e){this.__shouldSuppressInteractionEvent(e)&&e.stopImmediatePropagation()}__shouldSuppressInteractionEvent(e){return this.disabled}};class iN extends iM(ik(tz(ez(tB(eh))))){static get is(){return"vaadin-button"}static get styles(){return iO}static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}render(){return W`
|
|
500
|
-
<div class="vaadin-button-container">
|
|
505
|
+
<div class="vaadin-button-container" role="presentation">
|
|
501
506
|
<span part="prefix" aria-hidden="true">
|
|
502
507
|
<slot name="prefix"></slot>
|
|
503
508
|
</span>
|
|
@@ -595,7 +600,7 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
595
600
|
:host([theme~='end-aligned'][has-single-button]) ::slotted(vaadin-menu-bar-button) {
|
|
596
601
|
margin-inline-start: auto;
|
|
597
602
|
}
|
|
598
|
-
`;class iI{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)}}
|
|
603
|
+
`;class iI{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)}}let iD=["__proto__","constructor","prototype"],iB=e=>{if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t};function iR(e,...t){return t.forEach(t=>(function e(t,i,s){return iB(t)&&iB(i)&&Object.keys(i).forEach(n=>{if(iD.includes(n))return;let o=i[n];if(iB(o)){if(!Object.hasOwn(t,n)||!iB(t[n])){if(s&&Object.hasOwn(t,n)&&t[n])return;t[n]={}}e(t[n],o,s)}else s&&Array.isArray(o)?t[n]=[...o]:s&&null==o||(t[n]=o)}),t})(e,t,!0)),e}let iF=e=>class extends e{static get properties(){return{i18n:{type:Object},__effectiveI18n:{type:Object,sync:!0}}}static get defaultI18n(){return{}}constructor(){super(),this.i18n=iR({},this.constructor.defaultI18n)}get i18n(){return this.__customI18n}set i18n(e){e!==this.__customI18n&&(this.__customI18n=e,this.__effectiveI18n=iR({},this.constructor.defaultI18n,this.__customI18n))}},ij=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.isConnected&&(e.target.resizables?e.target.resizables.forEach(t=>{t._onResize(e.contentRect)}):e.target._onResize(e.contentRect))})})}),iU=eI(e=>class extends e{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),ij.observe(this),this._observeParent){let e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,ij.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),ij.unobserve(this);let e=this.__parent;if(this._observeParent&&e){let t=e.resizables;t&&(t.delete(this),0===t.size&&ij.unobserve(e)),this.__parent=null}}_onResize(e){}});class iz extends i_{_getItem(e){return"vaadin-menu-bar-button"===e.localName?e.item:super._getItem(e)}_getDefaultPosition(e){return"vaadin-menu-bar-button"===e.localName?"bottom":super._getDefaultPosition(e)}}let iH=(n=class extends iI{update(e,[{component:t,text:i}]){let{parentNode:s,startNode:n}=e,o=t||(i?document.createTextNode(i):null),r=this.getOldNode(e);return r===o||(r&&o?s.replaceChild(o,r):r?s.removeChild(r):o&&n.after(o)),q}getOldNode(e){let{startNode:t,endNode:i}=e;return t.nextSibling===i?null:t.nextSibling}},(...e)=>({_$litDirective$:n,values:e})),iV={moreOptions:"More options"},iK=e=>class extends iF(tG(iU(tC(t_(e))))){static get properties(){return{items:{type:Array,sync:!0,value:()=>[]},openOnHover:{type:Boolean},reverseCollapse:{type:Boolean,sync:!0},tabNavigation:{type:Boolean,sync:!0}}}static get defaultI18n(){return iV}get i18n(){return super.i18n}set i18n(e){super.i18n=e}constructor(){super(),this.__boundOnContextMenuKeydown=this.__onContextMenuKeydown.bind(this)}get focused(){return(this._getItems()||[]).find(tx)||this._expandedButton}get _vertical(){return!1}get _tabNavigation(){return this.tabNavigation}get _observeParent(){return!0}get _buttons(){return Array.from(this.querySelectorAll("vaadin-menu-bar-button"))}get _hasOverflow(){return this._overflow&&!this._overflow.hasAttribute("hidden")}set _hasOverflow(e){this._overflow&&this._overflow.toggleAttribute("hidden",!e)}ready(){super.ready(),this.setAttribute("role","menubar"),this._subMenuController=new ip(this,"submenu","vaadin-menu-bar-submenu",{initializer:e=>{e.setAttribute("is-root",""),e.addEventListener("item-selected",this.__onItemSelected.bind(this)),e.addEventListener("close-all-menus",this.__onEscapeClose.bind(this)),e._overlayElement._contentRoot.addEventListener("keydown",this.__boundOnContextMenuKeydown),this._subMenu=e}}),this._overflowController=new ip(this,"overflow","vaadin-menu-bar-button",{initializer:e=>{e.setAttribute("hidden","");let t=document.createElement("div");t.setAttribute("aria-hidden","true"),t.innerHTML="·".repeat(3),e.appendChild(t),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.setAttribute("role",this.tabNavigation?"button":"menuitem"),this._overflow=e}}),this._tooltipController=new iz(this),this.addEventListener("mousedown",()=>this._tooltipController.close(!0)),this.addEventListener("mouseleave",()=>this._tooltipController.close()),this.addController(this._tooltipController),this.addController(this._subMenuController),this.addController(this._overflowController),this._container=this.shadowRoot.querySelector('[part="container"]')}updated(e){super.updated(e),(e.has("items")||e.has("_theme")||e.has("disabled"))&&this.__renderButtons(this.items),(e.has("items")||e.has("_theme")||e.has("reverseCollapse"))&&this.__scheduleOverflow(),e.has("items")&&this.__updateSubMenu(),e.has("_theme")&&this._themeChanged(this._theme),e.has("disabled")&&this._overflow.toggleAttribute("disabled",this.disabled),e.has("tabNavigation")&&this._tabNavigationChanged(this.tabNavigation),e.has("__effectiveI18n")&&this.__i18nChanged(this.__effectiveI18n)}_getItems(){return this._buttons}disconnectedCallback(){super.disconnectedCallback(),this._tooltipController.setTarget(null)}_onResize(){this.__scheduleOverflow()}_themeChanged(e){e?(this._overflow.setAttribute("theme",e),this._subMenu.setAttribute("theme",e)):(this._overflow.removeAttribute("theme"),this._subMenu.removeAttribute("theme"))}_tabNavigationChanged(e){let t=this.querySelector('[tabindex="0"]');this._buttons.forEach(i=>{t?this._setTabindex(i,i===t):this._setTabindex(i,!1),i.setAttribute("role",e?"button":"menuitem")}),this.setAttribute("role",e?"group":"menubar")}__updateSubMenu(){let e=this._subMenu;if(e?.opened){let t=e._positionTarget;t.isConnected&&Array.isArray(t.item.children)&&0!==t.item.children.length||e.close()}}__i18nChanged(e){e?.moreOptions!==void 0&&(e.moreOptions?this._overflow.setAttribute("aria-label",e.moreOptions):this._overflow.removeAttribute("aria-label"))}__getOverflowCount(e){return e.item&&e.item.children&&e.item.children.length||0}__restoreButtons(e){e.forEach(e=>{e.style.visibility="",e.style.position="",e.style.width="";let t=e.item&&e.item.component;t instanceof HTMLElement&&"menuitem"===t.getAttribute("role")&&this.__restoreItem(e,t)}),this.__updateOverflow([])}__restoreItem(e,t){e.appendChild(t),t.removeAttribute("role"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-haspopup"),t.removeAttribute("tabindex")}__updateOverflow(e){this._overflow.item={children:e},this._hasOverflow=e.length>0}__setOverflowItems(e,t){let i=this._container;if(i.style.minWidth=`${i.offsetWidth}px`,i.offsetWidth<i.scrollWidth){this._hasOverflow=!0;let s=this.__isRTL,n=i.offsetLeft,o=[...e];for(;o.length;){let e=o[o.length-1],r=e.offsetLeft-n;if(!s&&r+e.offsetWidth<i.offsetWidth-t.offsetWidth||s&&r>=t.offsetWidth)break;let a=this.reverseCollapse?o.shift():o.pop();a.style.width=getComputedStyle(a).width,a.style.visibility="hidden",a.style.position="absolute"}let r=e.filter(e=>!o.includes(e)).map(e=>e.item);this.__updateOverflow(r)}i.style.minWidth=""}__scheduleOverflow(){this._overflowDebouncer=tW.debounce(this._overflowDebouncer,eX,()=>{this.__detectOverflow()})}__detectOverflow(){let e=this._overflow,t=this._buttons.filter(t=>t!==e),i=this.__getOverflowCount(e);this.__restoreButtons(t),this.__setOverflowItems(t,e);let s=this.__getOverflowCount(e);i!==s&&this._subMenu.opened&&this._subMenu.close();let n=s===t.length||0===s&&1===t.length;this.toggleAttribute("has-single-button",n);let o=t.filter(e=>"hidden"!==e.style.visibility);o.length?o.some(e=>"0"===e.getAttribute("tabindex"))||this._setTabindex(o[o.length-1],!0):this._overflow.setAttribute("tabindex","0"),o.forEach((e,t,i)=>{e.toggleAttribute("first-visible",0===t),e.toggleAttribute("last-visible",!this._hasOverflow&&t===i.length-1)})}__getButtonTheme(e,t){let i=t,s=e?.theme;return null!=s&&(i=Array.isArray(s)?s.join(" "):s),i}__getComponent(e){let t,i=e.component,s=i instanceof HTMLElement;return s&&"vaadin-menu-bar-item"===i.localName?t=i:(t=document.createElement("vaadin-menu-bar-item")).appendChild(s?i:document.createElement(i)),e.text&&((t.firstChild||t).textContent=e.text),t}__renderButtons(e=[]){el(W`
|
|
599
604
|
${e.map(e=>{let t={...e},i=!!e?.children;if(t.component){let e=this.__getComponent(t);t.component=e,e.item=t}return W`
|
|
600
605
|
<vaadin-menu-bar-button
|
|
601
606
|
.item="${t}"
|
|
@@ -606,10 +611,10 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
606
611
|
class="${(e.className||G)??G}"
|
|
607
612
|
theme="${(this.__getButtonTheme(e,this._theme)||G)??G}"
|
|
608
613
|
@click="${this.__onRootButtonClick}"
|
|
609
|
-
>${
|
|
614
|
+
>${iH(t)}</vaadin-menu-bar-button
|
|
610
615
|
>
|
|
611
616
|
`})}
|
|
612
|
-
`,this,{renderBefore:this._overflow})}__onRootButtonClick(e){let t=e.target;t.item&&t.item.component&&!e.composedPath().includes(t.item.component)&&(e.stopPropagation(),t.item.component.click())}_setExpanded(e,t){e.toggleAttribute("expanded",t),e.toggleAttribute("active",t),e.setAttribute("aria-expanded",t?"true":"false")}_setTabindex(e,t){this.tabNavigation&&this._isItemFocusable(e)?e.setAttribute("tabindex","0"):e.setAttribute("tabindex",t?"0":"-1")}_focusItem(e,t,i){let s=i&&this.focused===this._expandedButton;s&&this._close(),super._focusItem(e,t,i),this._buttons.forEach(t=>{this._setTabindex(t,t===e)}),this._tooltipController.setTarget(e),s&&e.item&&e.item.children?this.__openSubMenu(e,!0,{keepFocus:!0}):this._subMenu.opened||this._tooltipController.open({trigger:"focus"})}_getButtonFromEvent(e){return Array.from(e.composedPath()).find(e=>"vaadin-menu-bar-button"===e.localName)}_shouldSetFocus(e){return!e.composedPath().includes(this._subMenu)&&super._shouldSetFocus(e)}_shouldRemoveFocus(e){return!e.composedPath().includes(this._subMenu)&&super._shouldRemoveFocus(e)}_setFocused(e){let t=e?this.__getFocusTarget():null;t?(this._tooltipController.setTarget(t),this._buttons.forEach(e=>{this._setTabindex(e,e===t)}),!this._subMenu.opened&&tf&&this._tooltipController.open({trigger:"focus"})):this._tooltipController.close(!0)}__getFocusTarget(){let e=this._buttons.find(e=>tx(e));if(!e){let t=this.tabNavigation?"[focused]":'[tabindex="0"]';ty(e=this.querySelector(`vaadin-menu-bar-button${t}`))&&(e=this._buttons[this._getFocusableIndex()])}return e}_onArrowDown(e){e.preventDefault();let t=this._getButtonFromEvent(e);t===this._expandedButton?this._focusFirstItem():this.__openSubMenu(t,!0)}_onArrowUp(e){e.preventDefault();let t=this._getButtonFromEvent(e);t===this._expandedButton?this._focusLastItem():this.__openSubMenu(t,!0,{focusLast:!0})}_onEscape(e){e.composedPath().includes(this._expandedButton)&&this._close(!0),this._tooltipController.close(!0)}_onKeyDown(e){e.composedPath().includes(this._subMenu)||this._handleKeyDown(e)}_handleKeyDown(e){switch(e.key){case"ArrowDown":this._onArrowDown(e);break;case"ArrowUp":this._onArrowUp(e);break;default:super._onKeyDown(e)}}_onMouseOver(e){if(e.composedPath().includes(this._subMenu))return;let t=this._getButtonFromEvent(e);this._tooltipController.setTarget(t),t&&t!==this._expandedButton&&t.item.children&&(this.openOnHover||this._subMenu.opened)&&this.__openSubMenu(t,!1),this._subMenu.opened||this._tooltipController.open({trigger:"hover"})}__onContextMenuKeydown(e){let t=Array.from(e.composedPath()).find(e=>e._item);if(t){let i=t.parentNode;38===e.keyCode&&t===i.items[0]&&this._close(!0),37!==e.keyCode&&(39!==e.keyCode||t._item.children)||(e.stopImmediatePropagation(),this._handleKeyDown(e)),"Tab"===e.key&&this.tabNavigation&&this._handleKeyDown(e)}}__fireItemSelected(e){this.dispatchEvent(new CustomEvent("item-selected",{detail:{value:e}}))}__onButtonClick(e){let t=this._getButtonFromEvent(e);t&&this.__openSubMenu(t,t.__triggeredWithActiveKeys)}__openSubMenu(e,t,i={}){if(e.disabled)return;let s=this._subMenu,n=e.item;if(s.opened&&(this._close(),s.listenOn===e))return;let o=n?.children;if(!o||0===o.length)return void this.__fireItemSelected(n);s.items=o,s.listenOn=e,s._positionTarget=e;let r=s._overlayElement;r.noVerticalOverlap=!0,this._tooltipController.close(!0),this._expandedButton=e,this._setExpanded(e,!0),this.style.pointerEvents="auto",e.dispatchEvent(new CustomEvent("opensubmenu",{detail:{children:o}})),r.addEventListener("vaadin-overlay-open",()=>{if(i.focusLast&&this._focusLastItem(),i.keepFocus){let e={focusVisible:tf};this._focusItem(this._expandedButton,e,!1)}t||r.$.overlay.focus()},{once:!0})}_focusFirstItem(){this._subMenu._overlayElement._contentRoot.firstElementChild.focus()}_focusLastItem(){let e=this._subMenu._overlayElement._contentRoot.firstElementChild,t=e.items[e.items.length-1];t&&t.focus()}__onItemSelected(e){e.stopPropagation(),this.__fireItemSelected(e.detail.value)}__onEscapeClose(){this.__deactivateButton(!0)}__deactivateButton(e){let t=this._expandedButton;if(t?.hasAttribute("expanded")){if(this._setExpanded(t,!1),e){let e={focusVisible:tf};this._focusItem(t,e,!1)}else this._tooltipController.close(!0);this._expandedButton=null}}_close(e=!1){this.style.pointerEvents="",this.__deactivateButton(e),this._subMenu.opened&&this._subMenu.close()}close(){this._close()}_isItemFocusable(e){return e.disabled&&e.__shouldAllowFocusWhenDisabled?e.__shouldAllowFocusWhenDisabled():super._isItemFocusable(e)}};class
|
|
617
|
+
`,this,{renderBefore:this._overflow})}__onRootButtonClick(e){let t=e.target;t.item&&t.item.component&&!e.composedPath().includes(t.item.component)&&(e.stopPropagation(),t.item.component.click())}_setExpanded(e,t){e.toggleAttribute("expanded",t),e.toggleAttribute("active",t),e.setAttribute("aria-expanded",t?"true":"false")}_setTabindex(e,t){this.tabNavigation&&this._isItemFocusable(e)?e.setAttribute("tabindex","0"):e.setAttribute("tabindex",t?"0":"-1")}_focusItem(e,t,i){let s=i&&this.focused===this._expandedButton;s&&this._close(),super._focusItem(e,t,i),this._buttons.forEach(t=>{this._setTabindex(t,t===e)}),this._tooltipController.setTarget(e),s&&e.item&&e.item.children?this.__openSubMenu(e,!0,{keepFocus:!0}):this._subMenu.opened||this._tooltipController.open({trigger:"focus"})}_getButtonFromEvent(e){return Array.from(e.composedPath()).find(e=>"vaadin-menu-bar-button"===e.localName)}_shouldSetFocus(e){return!e.composedPath().includes(this._subMenu)&&super._shouldSetFocus(e)}_shouldRemoveFocus(e){return!e.composedPath().includes(this._subMenu)&&super._shouldRemoveFocus(e)}_setFocused(e){let t=e?this.__getFocusTarget():null;t?(this._tooltipController.setTarget(t),this._buttons.forEach(e=>{this._setTabindex(e,e===t)}),!this._subMenu.opened&&tf&&this._tooltipController.open({trigger:"focus"})):this._tooltipController.close(!0)}__getFocusTarget(){let e=this._buttons.find(e=>tx(e));if(!e){let t=this.tabNavigation?"[focused]":'[tabindex="0"]';ty(e=this.querySelector(`vaadin-menu-bar-button${t}`))&&(e=this._buttons[this._getFocusableIndex()])}return e}_onArrowDown(e){e.preventDefault();let t=this._getButtonFromEvent(e);t===this._expandedButton?this._focusFirstItem():this.__openSubMenu(t,!0)}_onArrowUp(e){e.preventDefault();let t=this._getButtonFromEvent(e);t===this._expandedButton?this._focusLastItem():this.__openSubMenu(t,!0,{focusLast:!0})}_onEscape(e){e.composedPath().includes(this._expandedButton)&&this._close(!0),this._tooltipController.close(!0)}_onKeyDown(e){e.composedPath().includes(this._subMenu)||this._handleKeyDown(e)}_handleKeyDown(e){switch(e.key){case"ArrowDown":this._onArrowDown(e);break;case"ArrowUp":this._onArrowUp(e);break;default:super._onKeyDown(e)}}_onMouseOver(e){if(e.composedPath().includes(this._subMenu))return;let t=this._getButtonFromEvent(e);this._tooltipController.setTarget(t),t&&t!==this._expandedButton&&t.item.children&&(this.openOnHover||this._subMenu.opened)&&this.__openSubMenu(t,!1),this._subMenu.opened||this._tooltipController.open({trigger:"hover"})}__onContextMenuKeydown(e){let t=Array.from(e.composedPath()).find(e=>e._item);if(t){let i=t.parentNode;38===e.keyCode&&t===i.items[0]&&this._close(!0),37!==e.keyCode&&(39!==e.keyCode||t._item.children)||(e.stopImmediatePropagation(),this._handleKeyDown(e)),"Tab"===e.key&&this.tabNavigation&&this._handleKeyDown(e)}}__fireItemSelected(e){this.dispatchEvent(new CustomEvent("item-selected",{detail:{value:e}}))}__onButtonClick(e){let t=this._getButtonFromEvent(e);t&&this.__openSubMenu(t,t.__triggeredWithActiveKeys)}__openSubMenu(e,t,i={}){if(e.disabled)return;let s=this._subMenu,n=e.item;if(s.opened&&(this._close(),s.listenOn===e))return;let o=n?.children;if(!o||0===o.length)return void this.__fireItemSelected(n);s.items=o,s.listenOn=e,s._positionTarget=e;let r=s._overlayElement;r.noVerticalOverlap=!0,this._tooltipController.close(!0),this._expandedButton=e,this._setExpanded(e,!0),this.style.pointerEvents="auto",e.dispatchEvent(new CustomEvent("opensubmenu",{detail:{children:o}})),r.addEventListener("vaadin-overlay-open",()=>{if(i.focusLast&&this._focusLastItem(),i.keepFocus){let e={focusVisible:tf};this._focusItem(this._expandedButton,e,!1)}t||r.$.overlay.focus()},{once:!0})}_focusFirstItem(){this._subMenu._overlayElement._contentRoot.firstElementChild.focus()}_focusLastItem(){let e=this._subMenu._overlayElement._contentRoot.firstElementChild,t=e.items[e.items.length-1];t&&t.focus()}__onItemSelected(e){e.stopPropagation(),this.__fireItemSelected(e.detail.value)}__onEscapeClose(){this.__deactivateButton(!0)}__deactivateButton(e){let t=this._expandedButton;if(t?.hasAttribute("expanded")){if(this._setExpanded(t,!1),e){let e={focusVisible:tf};this._focusItem(t,e,!1)}else this._tooltipController.close(!0);this._expandedButton=null}}_close(e=!1){this.style.pointerEvents="",this.__deactivateButton(e),this._subMenu.opened&&this._subMenu.close()}close(){this._close()}_isItemFocusable(e){return e.disabled&&e.__shouldAllowFocusWhenDisabled?e.__shouldAllowFocusWhenDisabled():super._isItemFocusable(e)}};class iW extends iK(ik(tz(ez(tB(eh))))){static get is(){return"vaadin-menu-bar"}static get styles(){return iL}render(){return W`
|
|
613
618
|
<div part="container" @click="${this.__onButtonClick}" @mouseover="${this._onMouseOver}">
|
|
614
619
|
<slot></slot>
|
|
615
620
|
<slot name="overflow"></slot>
|
|
@@ -618,7 +623,7 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
618
623
|
<slot name="submenu"></slot>
|
|
619
624
|
|
|
620
625
|
<slot name="tooltip"></slot>
|
|
621
|
-
`}}function
|
|
626
|
+
`}}function iq(e){let t=document.createElement("vaadin-menu-bar-item");return el(e,t),t}e$(iW);let iG=class extends iW{};iG=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ef("or-vaadin-menu-bar")],iG),i(673);var iX=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};let iZ=class extends em.OrElement{constructor(){super(...arguments),this.expanded=!1,this.leaf=!1,this.readonly=!1,this._slotClickListener=e=>this.leaf?this._onExpandToggle(e):null,this._chevronClickListener=e=>this._onExpandToggle(e)}static get styles(){return[h`
|
|
622
627
|
* {
|
|
623
628
|
box-sizing: border-box;
|
|
624
629
|
}
|
|
@@ -669,7 +674,7 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
669
674
|
icon="${e?"chevron-down":"chevron-right"}"
|
|
670
675
|
@click="${this._chevronClickListener}"
|
|
671
676
|
></or-icon>
|
|
672
|
-
`}_onExpandToggle(e){this.expanded=!this.expanded}_onSlotChange(e){this._applyIndentToChildren()}_applyIndentToChildren(e=this.getChildNodes()){e.forEach(e=>{let t=(e=>{let t=0;for(;e;)"or-tree-group"===e.tagName.toLowerCase()&&t++,e=e.parentElement;return t})(e);"parent"===e.slot&&t--,e.style.setProperty("--or-tree-node-indent",`${24+12*t}px`)})}};
|
|
677
|
+
`}_onExpandToggle(e){this.expanded=!this.expanded}_onSlotChange(e){this._applyIndentToChildren()}_applyIndentToChildren(e=this.getChildNodes()){e.forEach(e=>{let t=(e=>{let t=0;for(;e;)"or-tree-group"===e.tagName.toLowerCase()&&t++,e=e.parentElement;return t})(e);"parent"===e.slot&&t--,e.style.setProperty("--or-tree-node-indent",`${24+12*t}px`)})}};iX([eb({type:Boolean,reflect:!0})],iZ.prototype,"expanded",void 0),iX([eb({type:Boolean})],iZ.prototype,"leaf",void 0),iX([eb({type:Boolean})],iZ.prototype,"readonly",void 0),iX([ex({slot:void 0})],iZ.prototype,"_childNodes",void 0),iX([ex({slot:"parent"})],iZ.prototype,"_parentNodes",void 0),iZ=iX([ef("or-tree-group")],iZ);var iY=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};let iQ=h`
|
|
673
678
|
* {
|
|
674
679
|
box-sizing: border-box;
|
|
675
680
|
}
|
|
@@ -707,11 +712,11 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
707
712
|
::slotted(*:not([slot])) {
|
|
708
713
|
flex: 1;
|
|
709
714
|
}
|
|
710
|
-
`,
|
|
715
|
+
`,iJ=class extends em.OrElement{constructor(){super(...arguments),this.readonly=!1,this.selected=!1}static get styles(){return[iQ]}render(){return W`
|
|
711
716
|
<slot name="prefix"></slot>
|
|
712
717
|
<slot></slot>
|
|
713
718
|
<slot name="suffix"></slot>
|
|
714
|
-
`}};
|
|
719
|
+
`}};iY([eb({type:Boolean,reflect:!0})],iJ.prototype,"readonly",void 0),iY([eb({type:Boolean,reflect:!0})],iJ.prototype,"selected",void 0),iJ=iY([ef("or-tree-node")],iJ);var i0=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};let i1=h`
|
|
715
720
|
* {
|
|
716
721
|
box-sizing: border-box;
|
|
717
722
|
}
|
|
@@ -763,7 +768,7 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
763
768
|
display: flex;
|
|
764
769
|
align-items: center;
|
|
765
770
|
}
|
|
766
|
-
`,
|
|
771
|
+
`,i2=class extends em.OrElement{constructor(){super(...arguments),this.nodes=[],this.selection=e_.LEAF,this.draggable=!1,this.noHeader=!1,this.menuTitle="Tree Menu",this.sortBy=ev.A_TO_Z,this.groupFirst=!1,this._treeNodeCache=new Map}static get styles(){return[i1]}willUpdate(e){return(e.has("nodes")||e.has("sortBy")||e.has("groupFirst"))&&this.nodes&&(this.nodes=this._sortNodes(this.nodes,this.sortBy,this.groupFirst)),e.has("selection")&&e.get("selection")&&this.selection&&this.deselectAllNodes(),super.willUpdate(e)}render(){var e,t;return W`
|
|
767
772
|
<div id="tree-container">
|
|
768
773
|
${e=!this.noHeader,t=()=>this._getHeaderTemplate(),e?t():void 0} ${this._getTreeTemplate(this.nodes)}
|
|
769
774
|
${this._getErrorTemplate()}
|
|
@@ -821,10 +826,10 @@ var ORTreeMenu;(()=>{"use strict";var e={954(e){e.exports=__rspack_external__954
|
|
|
821
826
|
</h3>
|
|
822
827
|
<div id="tree-header-actions">${this._getSortActionTemplate(this.sortBy,this.sortOptions)}</div>
|
|
823
828
|
</div>
|
|
824
|
-
`}_getSortActionTemplate(e,t){let i=[{component:
|
|
829
|
+
`}_getSortActionTemplate(e,t){let i=[{component:iq(W`<or-icon icon="sort-variant"></or-icon>`),children:(null!=t?t:[]).map(t=>({checked:e&&t===e,component:iq(W`<or-translate value=${t}></or-translate>`),value:t}))}];return W`
|
|
825
830
|
<or-vaadin-menu-bar
|
|
826
831
|
theme="icon"
|
|
827
832
|
.items=${i}
|
|
828
833
|
@item-selected=${e=>this._onSortClick(e.detail.value.value)}
|
|
829
834
|
></or-vaadin-menu-bar>
|
|
830
|
-
`}_getErrorTemplate(){return W``}_onSortClick(e){this.sortBy=e}_onTreeGroupClick(e){let t=e.currentTarget,i=t.parentElement,s=(e,t)=>{e.select(),this._lastSelectedNode=t,this._notifyNodesSelect()};switch(this.selection){case e_.LEAF:return;case e_.MULTI:if(e.shiftKey&&this._lastSelectedNode){let e=Array.from(this._uiNodes||[]),t=i.getGroupNode();if(t){let i=e.indexOf(t),s=e.indexOf(this._lastSelectedNode);this._selectNodesBetween(e,i,s);return}}else if(e.ctrlKey)return void s(i,t);this.deselectAllNodes(),s(i,t);return;case e_.SINGLE:this.deselectAllNodes(),s(i,t)}}_onTreeNodeClick(e){let t=e.currentTarget;if(t)if(this.selection===e_.MULTI){if(e.shiftKey&&this._lastSelectedNode){let e=Array.from(this._uiNodes||[]),i=e.indexOf(this._lastSelectedNode),s=e.indexOf(t);if(i>-1&&s>-1)return void this._selectNodesBetween(e,i,s)}else if(e.ctrlKey)return void this._selectNode(t);this.deselectAllNodes(),this._selectNode(t);return}else this.deselectAllNodes(),this._selectNode(t)}_onDragStart(e,t){var i;e.target?null==(i=e.dataTransfer)||i.setData("treeNode",JSON.stringify(t)):e.preventDefault()}_onDragOverList(e){this.draggable&&e.preventDefault()}_onDragOverSingleNode(e,t,i){if(this.draggable&&(e.preventDefault(),i)){let e=this._getUiNodeFromTree(i);null==e||e.setAttribute("drophover","true")}}_onDragOverGroup(e,t){this.draggable&&(e.preventDefault(),e.currentTarget.setAttribute("drophover","true"))}_onDragLeaveSingleNode(e,t,i){if(i&&this.draggable){e.preventDefault();let t=this._getUiNodeFromTree(i);null==t||t.removeAttribute("drophover")}}_onDragLeaveGroup(e,t){this.draggable&&e.currentTarget.removeAttribute("drophover")}_onDragDropList(e){this._onDragDropGroup(e)}_onDragDropSingleNode(e,t,i){this._onDragDropGroup(e,i)}_onDragDropGroup(e,t){var i,s;if(this.draggable){e.preventDefault(),e.stopPropagation(),t&&(null==(i=this._getUiNodeFromTree(t))||i.removeAttribute("drophover"));let n=[],o=null==(s=e.dataTransfer)?void 0:s.getData("treeNode");if(o){let e=JSON.parse(o);e&&n.push(e)}if(this.selection===e_.MULTI){let e=this._findSelectedTreeNodes();(e=e.filter(e=>!e.children)).length>0&&(this.deselectAllNodes(),n.push(...e.filter(e=>!n.find(t=>JSON.stringify(t)===JSON.stringify(e)))))}(null==t?void 0:t.children)&&(n=n.filter(e=>{var i;return!(null==(i=t.children)?void 0:i.find(t=>t.id===e.id))})),n.length>0&&this._dispatchCancellableDragEvent(n,t,this.nodes).then(()=>{this.nodes=eA(n,t,this.nodes)}).catch(e=>{})}}_dispatchCancellableDragEvent(e,t,i=[]){return new Promise((s,n)=>{this.dispatchEvent(new eS(e,t,i))?s():n()})}_selectNode(e,t=!0){if(e){if(t){let t=[...this._findSelectedTreeNodes()],i=this._getTreeNodeFromTree(e);if(i&&t.push(i),!this._dispatchSelectEvent(t))return}e.selected=!0,this._lastSelectedNode=e}}_selectNodesBetween(e,t,i,s=!0){let n=[];if(t<i)for(let s=t;s<=i;s++)n.push(e[s]);else if(t>i)for(let s=i;s<=t;s++)n.push(e[s]);if(s){let e=n.map(e=>this._getTreeNodeFromTree(e)).filter(e=>e);if(!this._notifyNodesSelect(e))return}n.forEach(e=>this._selectNode(e))}_notifyNodesSelect(e){var t,i,s,n;return t=this,i=void 0,s=void 0,n=function*(){return yield this.getUpdateComplete(),e||(e=this._findSelectedTreeNodes()),this._dispatchSelectEvent(e)},new(s||(s=Promise))(function(e,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(t){var i;t.done?e(t.value):((i=t.value)instanceof s?i:new s(function(e){e(i)})).then(r,a)}l((n=n.apply(t,i||[])).next())})}_findSelectedTreeNodes(e=Array.from(this._uiNodes||[]),t=this._treeNodeCache){let i=e.filter(e=>e.selected),s=Array.from(t.entries());return i.map(e=>s.find(t=>t[1]===e.id)).map(e=>null==e?void 0:e[0]).filter(e=>void 0!==e)}_getTreeNodeFromTree(e,t=this._treeNodeCache){var i;return null==(i=Array.from(t.entries()).find(t=>t[1]===e.id))?void 0:i[0]}_getUiNodeFromTree(e,t=this._treeNodeCache){var i;let s=Array.from(t.entries()),n=JSON.stringify(e),o=null==(i=s.find(e=>JSON.stringify(e[0])===n))?void 0:i[1];return o?this.shadowRoot.getElementById(o):void 0}_dispatchSelectEvent(e){return this.dispatchEvent(new ek(e||[]))}deselectAllNodes(){(this._uiGroups||[]).forEach(e=>e.deselect()),(this._uiNodes||[]).forEach(e=>e.selected=!1)}_sortNodes(e,t,i=!1){console.debug(`Sorting nodes in the tree menu using '${t}'`);let s=e.filter(e=>void 0!==e.children);if(s.forEach(e=>{var i;return null==(i=e.children)?void 0:i.sort(this._getSortFunction(t))}),i){let i=e.filter(e=>void 0===e.children);return s.sort(this._getSortFunction(t)),i.sort(this._getSortFunction(t)),[...s,...i]}return e.sort(this._getSortFunction(t))}_setTreeNodeId(e,t=eE.Util.generateUniqueUUID()){return this._treeNodeCache.get(e)?this._treeNodeCache.get(e):(this._treeNodeCache.set(e,t),t)}_getSortFunction(e){return e===ev.Z_TO_A?(e,t)=>t.label.localeCompare(e.label):eE.Util.sortByString(e=>e.label)}expandGroup(e){this.updateComplete.then(()=>{let t=this.nodes.find(t=>t.id===e&&t.children);t&&(t.expanded=!0,this.requestUpdate())})}};
|
|
835
|
+
`}_getErrorTemplate(){return W``}_onSortClick(e){this.sortBy=e}_onTreeGroupClick(e){let t=e.currentTarget,i=t.parentElement,s=(e,t)=>{e.select(),this._lastSelectedNode=t,this._notifyNodesSelect()};switch(this.selection){case e_.LEAF:return;case e_.MULTI:if(e.shiftKey&&this._lastSelectedNode){let e=Array.from(this._uiNodes||[]),t=i.getGroupNode();if(t){let i=e.indexOf(t),s=e.indexOf(this._lastSelectedNode);this._selectNodesBetween(e,i,s);return}}else if(e.ctrlKey)return void s(i,t);this.deselectAllNodes(),s(i,t);return;case e_.SINGLE:this.deselectAllNodes(),s(i,t)}}_onTreeNodeClick(e){let t=e.currentTarget;if(t)if(this.selection===e_.MULTI){if(e.shiftKey&&this._lastSelectedNode){let e=Array.from(this._uiNodes||[]),i=e.indexOf(this._lastSelectedNode),s=e.indexOf(t);if(i>-1&&s>-1)return void this._selectNodesBetween(e,i,s)}else if(e.ctrlKey)return void this._selectNode(t);this.deselectAllNodes(),this._selectNode(t);return}else this.deselectAllNodes(),this._selectNode(t)}_onDragStart(e,t){var i;e.target?null==(i=e.dataTransfer)||i.setData("treeNode",JSON.stringify(t)):e.preventDefault()}_onDragOverList(e){this.draggable&&e.preventDefault()}_onDragOverSingleNode(e,t,i){if(this.draggable&&(e.preventDefault(),i)){let e=this._getUiNodeFromTree(i);null==e||e.setAttribute("drophover","true")}}_onDragOverGroup(e,t){this.draggable&&(e.preventDefault(),e.currentTarget.setAttribute("drophover","true"))}_onDragLeaveSingleNode(e,t,i){if(i&&this.draggable){e.preventDefault();let t=this._getUiNodeFromTree(i);null==t||t.removeAttribute("drophover")}}_onDragLeaveGroup(e,t){this.draggable&&e.currentTarget.removeAttribute("drophover")}_onDragDropList(e){this._onDragDropGroup(e)}_onDragDropSingleNode(e,t,i){this._onDragDropGroup(e,i)}_onDragDropGroup(e,t){var i,s;if(this.draggable){e.preventDefault(),e.stopPropagation(),t&&(null==(i=this._getUiNodeFromTree(t))||i.removeAttribute("drophover"));let n=[],o=null==(s=e.dataTransfer)?void 0:s.getData("treeNode");if(o){let e=JSON.parse(o);e&&n.push(e)}if(this.selection===e_.MULTI){let e=this._findSelectedTreeNodes();(e=e.filter(e=>!e.children)).length>0&&(this.deselectAllNodes(),n.push(...e.filter(e=>!n.find(t=>JSON.stringify(t)===JSON.stringify(e)))))}(null==t?void 0:t.children)&&(n=n.filter(e=>{var i;return!(null==(i=t.children)?void 0:i.find(t=>t.id===e.id))})),n.length>0&&this._dispatchCancellableDragEvent(n,t,this.nodes).then(()=>{this.nodes=eA(n,t,this.nodes)}).catch(e=>{})}}_dispatchCancellableDragEvent(e,t,i=[]){return new Promise((s,n)=>{this.dispatchEvent(new eS(e,t,i))?s():n()})}_selectNode(e,t=!0){if(e){if(t){let t=[...this._findSelectedTreeNodes()],i=this._getTreeNodeFromTree(e);if(i&&t.push(i),!this._dispatchSelectEvent(t))return}e.selected=!0,this._lastSelectedNode=e}}_selectNodesBetween(e,t,i,s=!0){let n=[];if(t<i)for(let s=t;s<=i;s++)n.push(e[s]);else if(t>i)for(let s=i;s<=t;s++)n.push(e[s]);if(s){let e=n.map(e=>this._getTreeNodeFromTree(e)).filter(e=>e);if(!this._notifyNodesSelect(e))return}n.forEach(e=>this._selectNode(e))}_notifyNodesSelect(e){var t,i,s,n;return t=this,i=void 0,s=void 0,n=function*(){return yield this.getUpdateComplete(),e||(e=this._findSelectedTreeNodes()),this._dispatchSelectEvent(e)},new(s||(s=Promise))(function(e,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(t){var i;t.done?e(t.value):((i=t.value)instanceof s?i:new s(function(e){e(i)})).then(r,a)}l((n=n.apply(t,i||[])).next())})}_findSelectedTreeNodes(e=Array.from(this._uiNodes||[]),t=this._treeNodeCache){let i=e.filter(e=>e.selected),s=Array.from(t.entries());return i.map(e=>s.find(t=>t[1]===e.id)).map(e=>null==e?void 0:e[0]).filter(e=>void 0!==e)}_getTreeNodeFromTree(e,t=this._treeNodeCache){var i;return null==(i=Array.from(t.entries()).find(t=>t[1]===e.id))?void 0:i[0]}_getUiNodeFromTree(e,t=this._treeNodeCache){var i;let s=Array.from(t.entries()),n=JSON.stringify(e),o=null==(i=s.find(e=>JSON.stringify(e[0])===n))?void 0:i[1];return o?this.shadowRoot.getElementById(o):void 0}_dispatchSelectEvent(e){return this.dispatchEvent(new ek(e||[]))}deselectAllNodes(){(this._uiGroups||[]).forEach(e=>e.deselect()),(this._uiNodes||[]).forEach(e=>e.selected=!1)}_sortNodes(e,t,i=!1){console.debug(`Sorting nodes in the tree menu using '${t}'`);let s=e.filter(e=>void 0!==e.children);if(s.forEach(e=>{var i;return null==(i=e.children)?void 0:i.sort(this._getSortFunction(t))}),i){let i=e.filter(e=>void 0===e.children);return s.sort(this._getSortFunction(t)),i.sort(this._getSortFunction(t)),[...s,...i]}return e.sort(this._getSortFunction(t))}_setTreeNodeId(e,t=eE.Util.generateUniqueUUID()){return this._treeNodeCache.get(e)?this._treeNodeCache.get(e):(this._treeNodeCache.set(e,t),t)}_getSortFunction(e){return e===ev.Z_TO_A?(e,t)=>t.label.localeCompare(e.label):eE.Util.sortByString(e=>e.label)}expandGroup(e){this.updateComplete.then(()=>{let t=this.nodes.find(t=>t.id===e&&t.children);t&&(t.expanded=!0,this.requestUpdate())})}};i0([eb({type:Array})],i2.prototype,"nodes",void 0),i0([eb({type:String})],i2.prototype,"selection",void 0),i0([eb({type:Boolean})],i2.prototype,"draggable",void 0),i0([eb({type:Boolean,attribute:"no-header"})],i2.prototype,"noHeader",void 0),i0([eb({type:String,attribute:"menu-title"})],i2.prototype,"menuTitle",void 0),i0([eb({type:Array,attribute:"sort-options"})],i2.prototype,"sortOptions",void 0),i0([eb({type:String,attribute:"sort-by",reflect:!0})],i2.prototype,"sortBy",void 0),i0([eb({type:Boolean,attribute:"group-first"})],i2.prototype,"groupFirst",void 0),i0([ew("or-tree-node")],i2.prototype,"_uiNodes",void 0),i0([ew("or-tree-group")],i2.prototype,"_uiGroups",void 0),i2=i0([ef("or-tree-menu")],i2)})(),ORTreeMenu=s})();
|