lituix 0.1.32 → 0.1.34
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/components.json +2 -2
- package/dist/components/lui-dropmenu.d.ts.map +1 -1
- package/dist/components/lui-popover.d.ts.map +1 -1
- package/dist/components/lui-tab.d.ts +1 -0
- package/dist/components/lui-tab.d.ts.map +1 -1
- package/dist/index.browser.js +108 -96
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +76 -64
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +141 -129
- package/dist/index.mjs.map +3 -3
- package/llm.txt +266 -266
- package/llms-full.txt +444 -444
- package/llms.txt +70 -70
- package/package.json +16 -23
- package/recipes.json +111 -111
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var V0=Object.create;var Da=Object.defineProperty;var Ou=Object.getOwnPropertyDescriptor;var D0=Object.getOwnPropertyNames;var F0=Object.getPrototypeOf,N0=Object.prototype.hasOwnProperty;var Hu=i=>{throw TypeError(i)};var nc=(i,o)=>()=>(i&&(o=i(i=0)),o);var L0=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),Ru=(i,o)=>{for(var e in o)Da(i,e,{get:o[e],enumerable:!0})},Iu=(i,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of D0(o))!N0.call(i,r)&&r!==e&&Da(i,r,{get:()=>o[r],enumerable:!(t=Ou(o,r))||t.enumerable});return i};var xn=(i,o,e)=>(e=i!=null?V0(F0(i)):{},Iu(o||!i||!i.__esModule?Da(e,"default",{value:i,enumerable:!0}):e,i)),B0=i=>Iu(Da({},"__esModule",{value:!0}),i),a=(i,o,e,t)=>{for(var r=t>1?void 0:t?Ou(o,e):o,n=i.length-1,s;n>=0;n--)(s=i[n])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&Da(o,e,r),r};var Vu=(i,o,e)=>o.has(i)||Hu("Cannot "+e);var ke=(i,o,e)=>(Vu(i,o,"read from private field"),e?e.call(i):o.get(i)),Du=(i,o,e)=>o.has(i)?Hu("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,e),Fu=(i,o,e,t)=>(Vu(i,o,"write to private field"),t?t.call(i,e):o.set(i,e),e);var ns,Dh=nc(()=>{ns=class{constructor(o){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,o?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(o,e){let t=this._map.get(o)||0;this._map.set(o,e),this.totalSize+=e-t}get averageSize(){if(this._map.size>0){let o=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(o):o}return 0}getSize(o){return this._map.get(o)}clear(){this._map.clear(),this.totalSize=0}}});function $c(i){return i==="horizontal"?"width":"height"}var rl,Fh=nc(()=>{rl=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(o,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=o,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}set config(o){Object.assign(this,Object.assign({},this._getDefaultConfig(),o))}get config(){return{direction:this.direction}}get items(){return this._items}set items(o){this._setItems(o)}_setItems(o){o!==this._items&&(this._items=o,this._scheduleReflow())}get direction(){return this._direction}set direction(o){o=o==="horizontal"?o:"vertical",o!==this._direction&&(this._direction=o,this._sizeDim=o==="horizontal"?"width":"height",this._secondarySizeDim=o==="horizontal"?"height":"width",this._positionDim=o==="horizontal"?"left":"top",this._secondaryPositionDim=o==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(o){let{_viewDim1:e,_viewDim2:t}=this;Object.assign(this._viewportSize,o),t!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(o){Object.assign(this._latestCoords,o);let e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(o=!1){(o||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(o){this._pin=o,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:o,block:e}=this._pin;return{index:Math.max(0,Math.min(o,this.items.length-1)),block:e}}return null}_clampScrollPosition(o){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(o,this.totalScrollSize[$c(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let o=this._scrollPosition,{index:e,block:t}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:t||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=o-this._scrollPosition}}_calculateScrollIntoViewPosition(o){let{block:e}=o,t=Math.min(this.items.length,Math.max(0,o.index)),r=this._getItemPosition(t)[this._positionDim],n=r;if(e!=="start"){let s=this._getItemSize(t)[this._sizeDim];if(e==="center")n=r-.5*this._viewDim1+.5*s;else{let d=r-this._viewDim1+s;if(e==="end")n=d;else{let h=this._scrollPosition;n=Math.abs(h-r)<Math.abs(h-d)?r:d}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(o){return{[this._positionDim]:this._calculateScrollIntoViewPosition(o)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let o=new Map;if(this._first!==-1&&this._last!==-1)for(let t=this._first;t<=this._last;t++)o.set(t,this._getItemPosition(t));let e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:o};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let o=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>o||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(o){if(this._first===-1||this._last===-1)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let t=this._last;for(;t>this._first&&Math.round(this._getItemPosition(t)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)t--;(e!==this._firstVisible||t!==this._lastVisible)&&(this._firstVisible=e,this._lastVisible=t,o&&o.emit&&this._sendVisibilityChangedMessage())}}});var Lh={};Ru(Lh,{FlowLayout:()=>ol,flow:()=>km});function Nh(i){return i==="horizontal"?"marginLeft":"marginTop"}function xm(i){return i==="horizontal"?"marginRight":"marginBottom"}function wm(i){return i==="horizontal"?"xOffset":"yOffset"}function _m(i,o){let e=[i,o].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}var km,Tc,ol,Bh=nc(()=>{Dh();Fh();km=i=>Object.assign({type:ol},i);Tc=class{constructor(){this._childSizeCache=new ns,this._marginSizeCache=new ns,this._metricsCache=new Map}update(o,e){let t=new Set;Object.keys(o).forEach(r=>{let n=Number(r);this._metricsCache.set(n,o[n]),this._childSizeCache.set(n,o[n][$c(e)]),t.add(n),t.add(n+1)});for(let r of t){let n=this._metricsCache.get(r)?.[Nh(e)]||0,s=this._metricsCache.get(r-1)?.[xm(e)]||0;this._marginSizeCache.set(r,_m(n,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(o,e){return this._metricsCache.get(o)?.[Nh(e)]||0}getChildSize(o){return this._childSizeCache.getSize(o)}getMarginSize(o){return this._marginSizeCache.getSize(o)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},ol=class extends rl{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Tc,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(o){this._metricsCache.update(o,this.direction),this._scheduleReflow()}_getPhysicalItem(o){return this._newPhysicalItems.get(o)??this._physicalItems.get(o)}_getSize(o){return this._getPhysicalItem(o)&&this._metricsCache.getChildSize(o)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(o){let e=this._metricsCache;if(this._first===-1||this._last===-1)return e.averageMarginSize+o*(e.averageMarginSize+this._getAverageSize());if(o<this._first){let t=this._first-o;return this._getPhysicalItem(this._first).pos-(e.getMarginSize(this._first-1)||e.averageMarginSize)-(t*e.averageChildSize+(t-1)*e.averageMarginSize)}else{let t=o-this._last;return this._getPhysicalItem(this._last).pos+(e.getChildSize(this._last)||e.averageChildSize)+(e.getMarginSize(this._last)||e.averageMarginSize)+t*(e.averageChildSize+e.averageMarginSize)}}_getPosition(o){let e=this._getPhysicalItem(o),{averageMarginSize:t}=this._metricsCache;return o===0?this._metricsCache.getMarginSize(0)??t:e?e.pos:this._estimatePosition(o)}_calculateAnchor(o,e){return o<=0?0:e>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((o+e)/2/this._delta)))}_getAnchor(o,e){if(this._physicalItems.size===0)return this._calculateAnchor(o,e);if(this._first<0)return this._calculateAnchor(o,e);if(this._last<0)return this._calculateAnchor(o,e);let t=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),n=t.pos;if(r.pos+this._metricsCache.getChildSize(this._last)<o)return this._calculateAnchor(o,e);if(n>e)return this._calculateAnchor(o,e);let h=this._firstVisible-1,p=-1/0;for(;p<o;)p=this._getPhysicalItem(++h).pos+this._metricsCache.getChildSize(h);return h}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let o=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o,this._stable=!0}_getItems(){let o=this._newPhysicalItems;this._stable=!0;let e,t;if(this.pin!==null){let{index:p}=this.pin;this._anchorIdx=p,this._anchorPos=this._getPosition(p)}if(e=this._scrollPosition-this._overhang,t=this._scrollPosition+this._viewDim1+this._overhang,t<0||e>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(e,t),this._anchorPos=this._getPosition(this._anchorIdx));let r=this._getSize(this._anchorIdx);r===void 0&&(this._stable=!1,r=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,s=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-s-r);let d=0;for(this._anchorPos+r+s<e&&(d=e-(this._anchorPos+r+s)),this._anchorPos-n>t&&(d=t-(this._anchorPos-n)),d&&(this._scrollPosition-=d,e-=d,t-=d,this._scrollError+=d),o.set(this._anchorIdx,{pos:this._anchorPos,size:r}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+r+s;this._physicalMin>e&&this._first>0;){let p=this._getSize(--this._first);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._first);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize),this._physicalMin-=p;let x=this._physicalMin;if(o.set(this._first,{pos:x,size:p}),this._physicalMin-=f,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<t&&this._last<this.items.length-1;){let p=this._getSize(++this._last);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._last);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize);let x=this._physicalMax;if(o.set(this._last,{pos:x,size:p}),this._physicalMax+=p+f,!this._stable&&!this._estimate)break}let h=this._calculateError();h&&(this._physicalMin-=h,this._physicalMax-=h,this._anchorPos-=h,this._scrollPosition-=h,o.forEach(p=>p.pos-=h),this._scrollError+=h),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:o,_last:e}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===o&&this._last===e)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:o}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(o+this._getAverageSize())+o)}get _delta(){let{averageMarginSize:o}=this._metricsCache;return this._getAverageSize()+o}_getItemPosition(o){return{[this._positionDim]:this._getPosition(o),[this._secondaryPositionDim]:0,[wm(this.direction)]:-(this._metricsCache.getLeadingMarginValue(o,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(o){return{[this._sizeDim]:this._getSize(o)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var ia=L0((Vc,Tn)=>{(function(i,o){typeof Vc=="object"&&typeof Tn<"u"?Tn.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self).interact=o()})(Vc,function(){"use strict";function i(c,l){var u=Object.keys(c);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(c);l&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(c,g).enumerable})),u.push.apply(u,m)}return u}function o(c){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?i(Object(u),!0).forEach(function(m){s(c,m,u[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(u)):i(Object(u)).forEach(function(m){Object.defineProperty(c,m,Object.getOwnPropertyDescriptor(u,m))})}return c}function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e(c)}function t(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var u=0;u<l.length;u++){var m=l[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,C(m.key),m)}}function n(c,l,u){return l&&r(c.prototype,l),u&&r(c,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function s(c,l,u){return(l=C(l))in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}function d(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&p(c,l)}function h(c){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},h(c)}function p(c,l){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,m){return u.__proto__=m,u},p(c,l)}function f(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function x(c){var l=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,m=h(c);if(l){var g=h(this).constructor;u=Reflect.construct(m,arguments,g)}else u=m.apply(this,arguments);return function(v,b){if(b&&(typeof b=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(v)}(this,u)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,l,u){var m=function(v,b){for(;!Object.prototype.hasOwnProperty.call(v,b)&&(v=h(v))!==null;);return v}(c,l);if(m){var g=Object.getOwnPropertyDescriptor(m,l);return g.get?g.get.call(arguments.length<3?c:u):g.value}},k.apply(this,arguments)}function C(c){var l=function(u,m){if(typeof u!="object"||u===null)return u;var g=u[Symbol.toPrimitive];if(g!==void 0){var v=g.call(u,m||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(u)}(c,"string");return typeof l=="symbol"?l:l+""}var S=function(c){return!(!c||!c.Window)&&c instanceof c.Window},z=void 0,T=void 0;function P(c){z=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),T=c}function H(c){return S(c)?c:(c.ownerDocument||c).defaultView||T.window}typeof window<"u"&&window&&P(window);var I=function(c){return!!c&&e(c)==="object"},B=function(c){return typeof c=="function"},$={window:function(c){return c===T||S(c)},docFrag:function(c){return I(c)&&c.nodeType===11},object:I,func:B,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||e(c)!=="object")return!1;var l=H(c)||T;return/object|function/.test(typeof Element>"u"?"undefined":e(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return I(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return I(c)&&c.length!==void 0&&B(c.splice)}};function Q(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;u==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):u==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function ye(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="drag"){var m=u.prepared.axis;if(m==="x"||m==="y"){var g=m==="x"?"y":"x";l.page[g]=u.coords.start.page[g],l.client[g]=u.coords.start.client[g],l.delta[g]=0}}}var De={id:"actions/drag",install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.draggable=De.draggable,l.map.drag=De,l.methodDict.drag="draggable",m.actions.drag=De.defaults},listeners:{"interactions:before-action-move":Q,"interactions:action-resume":Q,"interactions:action-move":ye,"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.buttons,g=u.options.drag;if(g&&g.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||m&u.options.drag.mouseButtons))return c.action={name:"drag",axis:g.lockAxis==="start"?g.startAxis:g.lockAxis},!1}},draggable:function(c){return $.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):$.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:Q,move:ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},yt=De,Ee={init:function(c){var l=c;Ee.document=l.document,Ee.DocumentFragment=l.DocumentFragment||ai,Ee.SVGElement=l.SVGElement||ai,Ee.SVGSVGElement=l.SVGSVGElement||ai,Ee.SVGElementInstance=l.SVGElementInstance||ai,Ee.Element=l.Element||ai,Ee.HTMLElement=l.HTMLElement||Ee.Element,Ee.Event=l.Event,Ee.Touch=l.Touch||ai,Ee.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ai(){}var et=Ee,qr={init:function(c){var l=et.Element,u=c.navigator||{};qr.supportsTouch="ontouchstart"in c||$.func(c.DocumentTouch)&&et.document instanceof c.DocumentTouch,qr.supportsPointerEvent=u.pointerEnabled!==!1&&!!et.PointerEvent,qr.isIOS=/iP(hone|od|ad)/.test(u.platform),qr.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),qr.isIe9=/MSIE 9/.test(u.userAgent),qr.isOperaMobile=u.appName==="Opera"&&qr.supportsTouch&&/Presto/.test(u.userAgent),qr.prefixedMatchesSelector="matches"in l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",qr.pEventTypes=qr.supportsPointerEvent?et.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,qr.wheelEvent=et.document&&"onmousewheel"in et.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},io=qr;function si(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function Bn(c,l){for(;$.element(c);){if(zi(c,l))return c;c=Go(c)}return null}function Go(c){var l=c.parentNode;if($.docFrag(l)){for(;(l=l.host)&&$.docFrag(l););return l}return l}function zi(c,l){return T!==z&&(l=l.replace(/\/deep\//g," ")),c[io.prefixedMatchesSelector](l)}var q=function(c){return c.parentNode||c.host};function ee(c,l){for(var u,m=[],g=c;(u=q(g))&&g!==l&&u!==g.ownerDocument;)m.unshift(g),g=u;return m}function fe(c,l,u){for(;$.element(c);){if(zi(c,l))return!0;if((c=Go(c))===u)return zi(c,l)}return!1}function Ne(c){return c.correspondingUseElement||c}function Z(c){var l=c instanceof et.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function Ae(c){var l,u=Z(c);if(!io.isIOS7&&u){var m={x:(l=(l=H(c))||T).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};u.left+=m.x,u.right+=m.x,u.top+=m.y,u.bottom+=m.y}return u}function ce(c){for(var l=[];c;)l.push(c),c=Go(c);return l}function wo(c){return!!$.string(c)&&(et.document.querySelector(c),!0)}function U(c,l){for(var u in l)c[u]=l[u];return c}function en(c,l,u){return c==="parent"?Go(u):c==="self"?l.getRect(u):Bn(u,c)}function li(c,l,u,m){var g=c;return $.string(g)?g=en(g,l,u):$.func(g)&&(g=g.apply(void 0,m)),$.element(g)&&(g=Ae(g)),g}function Yo(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function ci(c){return!c||"x"in c&&"y"in c||((c=U({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function tn(c,l,u){c.left&&(l.left+=u.x),c.right&&(l.right+=u.x),c.top&&(l.top+=u.y),c.bottom&&(l.bottom+=u.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function ji(c,l,u){var m=u&&c.options[u];return Yo(li(m&&m.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function di(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(w){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},$.string(c)&&c.search(" ")!==-1&&(c=qn(c)),$.array(c))return c.forEach(function(w){return di(w,l,u,m)}),m;if($.object(c)&&(l=c,c=""),$.func(l)&&u(c))m[c]=m[c]||[],m[c].push(l);else if($.array(l))for(var g=0,v=l;g<v.length;g++){var b=v[g];di(c,b,u,m)}else if($.object(l))for(var y in l)di(qn(y).map(function(w){return"".concat(c).concat(w)}),l[y],u,m);return m}function qn(c){return c.trim().split(/ +/)}var $a=function(c,l){return Math.sqrt(c*c+l*l)},C1=["webkit","moz"];function ws(c,l){c.__set||(c.__set={});var u=function(g){if(C1.some(function(v){return g.indexOf(v)===0}))return 1;typeof c[g]!="function"&&g!=="__set"&&Object.defineProperty(c,g,{get:function(){return g in c.__set?c.__set[g]:c.__set[g]=l[g]},set:function(v){c.__set[g]=v},configurable:!0})};for(var m in l)u(m);return c}function _s(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function Kd(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function Wd(c){return c instanceof et.Event||c instanceof et.Touch}function Ms(c,l,u){return c=c||"page",(u=u||{}).x=l[c+"X"],u.y=l[c+"Y"],u}function Ud(c,l){return l=l||{x:0,y:0},io.isOperaMobile&&Wd(c)?(Ms("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):Ms("page",c,l),l}function Ta(c){return $.number(c.pointerId)?c.pointerId:c.identifier}function z1(c,l,u){var m=l.length>1?Gd(l):l[0];Ud(m,c.page),function(g,v){v=v||{},io.isOperaMobile&&Wd(g)?Ms("screen",g,v):Ms("client",g,v)}(m,c.client),c.timeStamp=u}function Il(c){var l=[];return $.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function Gd(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<c.length;u++){var m=c[u];for(var g in l)l[g]+=m[g]}for(var v in l)l[v]/=c.length;return l}function Vl(c){if(!c.length)return null;var l=Il(c),u=Math.min(l[0].pageX,l[1].pageX),m=Math.min(l[0].pageY,l[1].pageY),g=Math.max(l[0].pageX,l[1].pageX),v=Math.max(l[0].pageY,l[1].pageY);return{x:u,y:m,left:u,top:m,right:g,bottom:v,width:g-u,height:v-m}}function Dl(c,l){var u=l+"X",m=l+"Y",g=Il(c),v=g[0][u]-g[1][u],b=g[0][m]-g[1][m];return $a(v,b)}function Fl(c,l){var u=l+"X",m=l+"Y",g=Il(c),v=g[1][u]-g[0][u],b=g[1][m]-g[0][m];return 180*Math.atan2(b,v)/Math.PI}function Yd(c){return $.string(c.pointerType)?c.pointerType:$.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof et.Touch?"touch":"mouse"}function Xd(c){var l=$.func(c.composedPath)?c.composedPath():c.path;return[Ne(l?l[0]:c.target),Ne(c.currentTarget)]}var Cs=function(){function c(l){t(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return n(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(Cs.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Zd=function(c,l){for(var u=0;u<l.length;u++){var m=l[u];c.push(m)}return c},Qd=function(c){return Zd([],c)},Aa=function(c,l){for(var u=0;u<c.length;u++)if(l(c[u],u,c))return u;return-1},Pa=function(c,l){return c[Aa(c,l)]},Kn=function(c){d(u,c);var l=x(u);function u(m,g,v){var b;t(this,u),(b=l.call(this,g._interaction)).dropzone=void 0,b.dragEvent=void 0,b.relatedTarget=void 0,b.draggable=void 0,b.propagationStopped=!1,b.immediatePropagationStopped=!1;var y=v==="dragleave"?m.prev:m.cur,w=y.element,M=y.dropzone;return b.type=v,b.target=w,b.currentTarget=w,b.dropzone=M,b.dragEvent=g,b.relatedTarget=g.target,b.draggable=g.interactable,b.timeStamp=g.timeStamp,b}return n(u,[{key:"reject",value:function(){var m=this,g=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&g.cur.dropzone===this.dropzone&&g.cur.element===this.target)if(g.prev.dropzone=this.dropzone,g.prev.element=this.target,g.rejected=!0,g.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var v=g.activeDrops,b=Aa(v,function(w){var M=w.dropzone,_=w.element;return M===m.dropzone&&_===m.target});g.activeDrops.splice(b,1);var y=new u(g,this.dragEvent,"dropdeactivate");y.dropzone=this.dropzone,y.target=this.target,this.dropzone.fire(y)}else this.dropzone.fire(new u(g,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(Cs);function Jd(c,l){for(var u=0,m=c.slice();u<m.length;u++){var g=m[u],v=g.dropzone,b=g.element;l.dropzone=v,l.target=b,v.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function Nl(c,l){for(var u=function(v,b){for(var y=[],w=0,M=v.interactables.list;w<M.length;w++){var _=M[w];if(_.options.drop.enabled){var E=_.options.drop.accept;if(!($.element(E)&&E!==b||$.string(E)&&!zi(b,E)||$.func(E)&&!E({dropzone:_,draggableElement:b})))for(var O=0,D=_.getAllElements();O<D.length;O++){var V=D[O];V!==b&&y.push({dropzone:_,element:V,rect:_.getRect(V)})}}}return y}(c,l),m=0;m<u.length;m++){var g=u[m];g.rect=g.dropzone.getRect(g.element)}return u}function eu(c,l,u){for(var m=c.dropState,g=c.interactable,v=c.element,b=[],y=0,w=m.activeDrops;y<w.length;y++){var M=w[y],_=M.dropzone,E=M.element,O=M.rect,D=_.dropCheck(l,u,g,v,E,O);b.push(D?E:null)}var V=function(N){for(var G,K,X,pe=[],Ce=0;Ce<N.length;Ce++){var re=N[Ce],ve=N[G];if(re&&Ce!==G)if(ve){var ao=q(re),kt=q(ve);if(ao!==re.ownerDocument)if(kt!==re.ownerDocument)if(ao!==kt){pe=pe.length?pe:ee(ve);var Fo=void 0;if(ve instanceof et.HTMLElement&&re instanceof et.SVGElement&&!(re instanceof et.SVGSVGElement)){if(re===kt)continue;Fo=re.ownerSVGElement}else Fo=re;for(var ui=ee(Fo,ve.ownerDocument),Ri=0;ui[Ri]&&ui[Ri]===pe[Ri];)Ri++;var Os=[ui[Ri-1],ui[Ri],pe[Ri]];if(Os[0])for(var Va=Os[0].lastChild;Va;){if(Va===Os[1]){G=Ce,pe=ui;break}if(Va===Os[2])break;Va=Va.previousSibling}}else X=ve,(parseInt(H(K=re).getComputedStyle(K).zIndex,10)||0)>=(parseInt(H(X).getComputedStyle(X).zIndex,10)||0)&&(G=Ce);else G=Ce}else G=Ce}return G}(b);return m.activeDrops[V]||null}function Ll(c,l,u){var m=c.dropState,g={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(g.activate=new Kn(m,u,"dropactivate"),g.activate.target=null,g.activate.dropzone=null),u.type==="dragend"&&(g.deactivate=new Kn(m,u,"dropdeactivate"),g.deactivate.target=null,g.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(g.leave=new Kn(m,u,"dragleave"),u.dragLeave=g.leave.target=m.prev.element,u.prevDropzone=g.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(g.enter=new Kn(m,u,"dragenter"),u.dragEnter=m.cur.element,u.dropzone=m.cur.dropzone)),u.type==="dragend"&&m.cur.dropzone&&(g.drop=new Kn(m,u,"drop"),u.dropzone=m.cur.dropzone,u.relatedTarget=m.cur.element),u.type==="dragmove"&&m.cur.dropzone&&(g.move=new Kn(m,u,"dropmove"),u.dropzone=m.cur.dropzone)),g}function Bl(c,l){var u=c.dropState,m=u.activeDrops,g=u.cur,v=u.prev;l.leave&&v.dropzone.fire(l.leave),l.enter&&g.dropzone.fire(l.enter),l.move&&g.dropzone.fire(l.move),l.drop&&g.dropzone.fire(l.drop),l.deactivate&&Jd(m,l.deactivate),u.prev.dropzone=g.dropzone,u.prev.element=g.element}function tu(c,l){var u=c.interaction,m=c.iEvent,g=c.event;if(m.type==="dragmove"||m.type==="dragend"){var v=u.dropState;l.dynamicDrop&&(v.activeDrops=Nl(l,u.element));var b=m,y=eu(u,b,g);v.rejected=v.rejected&&!!y&&y.dropzone===v.cur.dropzone&&y.element===v.cur.element,v.cur.dropzone=y&&y.dropzone,v.cur.element=y&&y.element,v.events=Ll(u,0,b)}}var ru={id:"actions/drop",install:function(c){var l=c.actions,u=c.interactStatic,m=c.Interactable,g=c.defaults;c.usePlugin(yt),m.prototype.dropzone=function(v){return function(b,y){if($.object(y)){if(b.options.drop.enabled=y.enabled!==!1,y.listeners){var w=di(y.listeners),M=Object.keys(w).reduce(function(E,O){return E[/^(enter|leave)/.test(O)?"drag".concat(O):/^(activate|deactivate|move)/.test(O)?"drop".concat(O):O]=w[O],E},{}),_=b.options.drop.listeners;_&&b.off(_),b.on(M),b.options.drop.listeners=M}return $.func(y.ondrop)&&b.on("drop",y.ondrop),$.func(y.ondropactivate)&&b.on("dropactivate",y.ondropactivate),$.func(y.ondropdeactivate)&&b.on("dropdeactivate",y.ondropdeactivate),$.func(y.ondragenter)&&b.on("dragenter",y.ondragenter),$.func(y.ondragleave)&&b.on("dragleave",y.ondragleave),$.func(y.ondropmove)&&b.on("dropmove",y.ondropmove),/^(pointer|center)$/.test(y.overlap)?b.options.drop.overlap=y.overlap:$.number(y.overlap)&&(b.options.drop.overlap=Math.max(Math.min(1,y.overlap),0)),"accept"in y&&(b.options.drop.accept=y.accept),"checker"in y&&(b.options.drop.checker=y.checker),b}return $.bool(y)?(b.options.drop.enabled=y,b):b.options.drop}(this,v)},m.prototype.dropCheck=function(v,b,y,w,M,_){return function(E,O,D,V,N,G,K){var X=!1;if(!(K=K||E.getRect(G)))return!!E.options.drop.checker&&E.options.drop.checker(O,D,X,E,G,V,N);var pe=E.options.drop.overlap;if(pe==="pointer"){var Ce=ji(V,N,"drag"),re=Ud(O);re.x+=Ce.x,re.y+=Ce.y;var ve=re.x>K.left&&re.x<K.right,ao=re.y>K.top&&re.y<K.bottom;X=ve&&ao}var kt=V.getRect(N);if(kt&&pe==="center"){var Fo=kt.left+kt.width/2,ui=kt.top+kt.height/2;X=Fo>=K.left&&Fo<=K.right&&ui>=K.top&&ui<=K.bottom}return kt&&$.number(pe)&&(X=Math.max(0,Math.min(K.right,kt.right)-Math.max(K.left,kt.left))*Math.max(0,Math.min(K.bottom,kt.bottom)-Math.max(K.top,kt.top))/(kt.width*kt.height)>=pe),E.options.drop.checker&&(X=E.options.drop.checker(O,D,X,E,G,V,N)),X}(this,v,b,y,w,M,_)},u.dynamicDrop=function(v){return $.bool(v)?(c.dynamicDrop=v,u):c.dynamicDrop},U(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,g.actions.drop=ru.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var u=c.interaction,m=(c.event,c.iEvent);if(u.prepared.name==="drag"){var g=u.dropState;g.activeDrops=[],g.events={},g.activeDrops=Nl(l,u.element),g.events=Ll(u,0,m),g.events.activate&&(Jd(g.activeDrops,g.events.activate),l.fire("actions/drop:start",{interaction:u,dragEvent:m}))}},"interactions:action-move":tu,"interactions:after-action-move":function(c,l){var u=c.interaction,m=c.iEvent;if(u.prepared.name==="drag"){var g=u.dropState;Bl(u,g.events),l.fire("actions/drop:move",{interaction:u,dragEvent:m}),g.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var u=c.interaction,m=c.iEvent;tu(c,l),Bl(u,u.dropState.events),l.fire("actions/drop:end",{interaction:u,dragEvent:m})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:Nl,getDrop:eu,getDropEvents:Ll,fireDropEvents:Bl,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},E1=ru;function ql(c){var l=c.interaction,u=c.iEvent,m=c.phase;if(l.prepared.name==="gesture"){var g=l.pointers.map(function(M){return M.pointer}),v=m==="start",b=m==="end",y=l.interactable.options.deltaSource;if(u.touches=[g[0],g[1]],v)u.distance=Dl(g,y),u.box=Vl(g),u.scale=1,u.ds=0,u.angle=Fl(g,y),u.da=0,l.gesture.startDistance=u.distance,l.gesture.startAngle=u.angle;else if(b||l.pointers.length<2){var w=l.prevEvent;u.distance=w.distance,u.box=w.box,u.scale=w.scale,u.ds=0,u.angle=w.angle,u.da=0}else u.distance=Dl(g,y),u.box=Vl(g),u.scale=u.distance/l.gesture.startDistance,u.angle=Fl(g,y),u.ds=u.scale-l.gesture.scale,u.da=u.angle-l.gesture.angle;l.gesture.distance=u.distance,l.gesture.angle=u.angle,$.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(l.gesture.scale=u.scale)}}var Kl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.gesturable=function(g){return $.object(g)?(this.options.gesture.enabled=g.enabled!==!1,this.setPerAction("gesture",g),this.setOnEvents("gesture",g),this):$.bool(g)?(this.options.gesture.enabled=g,this):this.options.gesture},l.map.gesture=Kl,l.methodDict.gesture="gesturable",m.actions.gesture=Kl.defaults},listeners:{"interactions:action-start":ql,"interactions:action-move":ql,"interactions:action-end":ql,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},S1=Kl;function $1(c,l,u,m,g,v,b){if(!l)return!1;if(l===!0){var y=$.number(v.width)?v.width:v.right-v.left,w=$.number(v.height)?v.height:v.bottom-v.top;if(b=Math.min(b,Math.abs((c==="left"||c==="right"?y:w)/2)),y<0&&(c==="left"?c="right":c==="right"&&(c="left")),w<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var M=y>=0?v.left:v.right;return u.x<M+b}if(c==="top"){var _=w>=0?v.top:v.bottom;return u.y<_+b}if(c==="right")return u.x>(y>=0?v.right:v.left)-b;if(c==="bottom")return u.y>(w>=0?v.bottom:v.top)-b}return!!$.element(m)&&($.element(l)?l===m:fe(m,l,g))}function ou(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var m=l;u.interactable.options.resize.square?(u.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=u.resizeAxes,u.resizeAxes==="x"?m.delta.y=0:u.resizeAxes==="y"&&(m.delta.x=0))}}var Oi,yn,Hi={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,u=c.browser,m=c.Interactable,g=c.defaults;Hi.cursors=function(v){return v.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),Hi.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,m.prototype.resizable=function(v){return function(b,y,w){return $.object(y)?(b.options.resize.enabled=y.enabled!==!1,b.setPerAction("resize",y),b.setOnEvents("resize",y),$.string(y.axis)&&/^x$|^y$|^xy$/.test(y.axis)?b.options.resize.axis=y.axis:y.axis===null&&(b.options.resize.axis=w.defaults.actions.resize.axis),$.bool(y.preserveAspectRatio)?b.options.resize.preserveAspectRatio=y.preserveAspectRatio:$.bool(y.square)&&(b.options.resize.square=y.square),b):$.bool(y)?(b.options.resize.enabled=y,b):b.options.resize}(this,v,c)},l.map.resize=Hi,l.methodDict.resize="resizable",g.actions.resize=Hi.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.rect;m._rects={start:U({},v),corrected:U({},v),previous:U({},v),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},g.edges=m.prepared.edges,g.rect=m._rects.corrected,g.deltaRect=m._rects.delta}})(c),ou(c)},"interactions:action-move":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.interactable.options.resize.invert,b=v==="reposition"||v==="negate",y=m.rect,w=m._rects,M=w.start,_=w.corrected,E=w.delta,O=w.previous;if(U(O,_),b){if(U(_,y),v==="reposition"){if(_.top>_.bottom){var D=_.top;_.top=_.bottom,_.bottom=D}if(_.left>_.right){var V=_.left;_.left=_.right,_.right=V}}}else _.top=Math.min(y.top,M.bottom),_.bottom=Math.max(y.bottom,M.top),_.left=Math.min(y.left,M.right),_.right=Math.max(y.right,M.left);for(var N in _.width=_.right-_.left,_.height=_.bottom-_.top,_)E[N]=_[N]-O[N];g.edges=m.prepared.edges,g.rect=_,g.deltaRect=E}})(c),ou(c)},"interactions:action-end":function(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var m=l;m.edges=u.prepared.edges,m.rect=u._rects.corrected,m.deltaRect=u._rects.delta}},"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.element,g=c.rect,v=c.buttons;if(g){var b=U({},l.coords.cur.page),y=u.options.resize;if(y&&y.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||v&y.mouseButtons)){if($.object(y.edges)){var w={left:!1,right:!1,top:!1,bottom:!1};for(var M in w)w[M]=$1(M,y.edges[M],b,l._latestPointer.eventTarget,m,g,y.margin||Hi.defaultMargin);w.left=w.left&&!w.right,w.top=w.top&&!w.bottom,(w.left||w.right||w.top||w.bottom)&&(c.action={name:"resize",edges:w})}else{var _=y.axis!=="y"&&b.x>g.right-Hi.defaultMargin,E=y.axis!=="x"&&b.y>g.bottom-Hi.defaultMargin;(_||E)&&(c.action={name:"resize",axes:(_?"x":"")+(E?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var l=c.edges,u=c.axis,m=c.name,g=Hi.cursors,v=null;if(u)v=g[m+u];else if(l){for(var b="",y=0,w=["top","bottom","left","right"];y<w.length;y++){var M=w[y];l[M]&&(b+=M)}v=g[b]}return v},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},T1=Hi,A1={id:"actions",install:function(c){c.usePlugin(S1),c.usePlugin(T1),c.usePlugin(yt),c.usePlugin(E1)}},iu=0,rn={request:function(c){return Oi(c)},cancel:function(c){return yn(c)},init:function(c){if(Oi=c.requestAnimationFrame,yn=c.cancelAnimationFrame,!Oi)for(var l=["ms","moz","webkit","o"],u=0;u<l.length;u++){var m=l[u];Oi=c["".concat(m,"RequestAnimationFrame")],yn=c["".concat(m,"CancelAnimationFrame")]||c["".concat(m,"CancelRequestAnimationFrame")]}Oi=Oi&&Oi.bind(c),yn=yn&&yn.bind(c),Oi||(Oi=function(g){var v=Date.now(),b=Math.max(0,16-(v-iu)),y=c.setTimeout(function(){g(v+b)},b);return iu=v+b,y},yn=function(g){return clearTimeout(g)})}},oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){oe.isScrolling=!0,rn.cancel(oe.i),c.autoScroll=oe,oe.interaction=c,oe.prevTime=oe.now(),oe.i=rn.request(oe.scroll)},stop:function(){oe.isScrolling=!1,oe.interaction&&(oe.interaction.autoScroll=null),rn.cancel(oe.i)},scroll:function(){var c=oe.interaction,l=c.interactable,u=c.element,m=c.prepared.name,g=l.options[m].autoScroll,v=nu(g.container,l,u),b=oe.now(),y=(b-oe.prevTime)/1e3,w=g.speed*y;if(w>=1){var M={x:oe.x*w,y:oe.y*w};if(M.x||M.y){var _=au(v);$.window(v)?v.scrollBy(M.x,M.y):v&&(v.scrollLeft+=M.x,v.scrollTop+=M.y);var E=au(v),O={x:E.x-_.x,y:E.y-_.y};(O.x||O.y)&&l.fire({type:"autoscroll",target:u,interactable:l,delta:O,interaction:c,container:v})}oe.prevTime=b}oe.isScrolling&&(rn.cancel(oe.i),oe.i=rn.request(oe.scroll))},check:function(c,l){var u;return(u=c.options[l].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(c){var l=c.interaction,u=c.pointer;if(l.interacting()&&oe.check(l.interactable,l.prepared.name))if(l.simulation)oe.x=oe.y=0;else{var m,g,v,b,y=l.interactable,w=l.element,M=l.prepared.name,_=y.options[M].autoScroll,E=nu(_.container,y,w);if($.window(E))b=u.clientX<oe.margin,m=u.clientY<oe.margin,g=u.clientX>E.innerWidth-oe.margin,v=u.clientY>E.innerHeight-oe.margin;else{var O=Z(E);b=u.clientX<O.left+oe.margin,m=u.clientY<O.top+oe.margin,g=u.clientX>O.right-oe.margin,v=u.clientY>O.bottom-oe.margin}oe.x=g?1:b?-1:0,oe.y=v?1:m?-1:0,oe.isScrolling||(oe.margin=_.margin,oe.speed=_.speed,oe.start(l))}}};function nu(c,l,u){return($.string(c)?en(c,l,u):c)||H(u)}function au(c){return $.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var P1={id:"auto-scroll",install:function(c){var l=c.defaults,u=c.actions;c.autoScroll=oe,oe.now=function(){return c.now()},u.phaselessTypes.autoscroll=!0,l.perAction.autoScroll=oe.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,oe.stop(),oe.interaction&&(oe.interaction=null)},"interactions:stop":oe.stop,"interactions:action-move":function(c){return oe.onInteractionMove(c)}}},j1=P1;function ja(c,l){var u=!1;return function(){return u||(T.console.warn(l),u=!0),c.apply(this,arguments)}}function Wl(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function O1(c){return $.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function H1(c){return $.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var R1={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(u,m,g,v){var b=function(y,w,M,_,E){var O=y.getRect(_),D=w.buttons||{0:1,1:4,3:8,4:16}[w.button],V={action:null,interactable:y,interaction:M,element:_,rect:O,buttons:D};return E.fire("auto-start:check",V),V.action}(this,m,g,v,c);return this.options.actionChecker?this.options.actionChecker(u,m,b,this,v,g):b},l.prototype.ignoreFrom=ja(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=ja(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=H1,l.prototype.styleCursor=O1}};function su(c,l,u,m,g){return l.testIgnoreAllow(l.options[c.name],u,m)&&l.options[c.name].enabled&&zs(l,u,c,g)?c:null}function I1(c,l,u,m,g,v,b){for(var y=0,w=m.length;y<w;y++){var M=m[y],_=g[y],E=M.getAction(l,u,c,_);if(E){var O=su(E,M,_,v,b);if(O)return{action:O,interactable:M,element:_}}}return{action:null,interactable:null,element:null}}function lu(c,l,u,m,g){var v=[],b=[],y=m;function w(_){v.push(_),b.push(y)}for(;$.element(y);){v=[],b=[],g.interactables.forEachMatch(y,w);var M=I1(c,l,u,v,b,m,g);if(M.action&&!M.interactable.options[M.action.name].manualStart)return M;y=Go(y)}return{action:null,interactable:null,element:null}}function cu(c,l,u){var m=l.action,g=l.interactable,v=l.element;m=m||{name:null},c.interactable=g,c.element=v,Wl(c.prepared,m),c.rect=g&&m.name?g.getRect(v):null,uu(c,u),u.fire("autoStart:prepared",{interaction:c})}function zs(c,l,u,m){var g=c.options,v=g[u.name].max,b=g[u.name].maxPerElement,y=m.autoStart.maxInteractions,w=0,M=0,_=0;if(!(v&&b&&y))return!1;for(var E=0,O=m.interactions.list;E<O.length;E++){var D=O[E],V=D.prepared.name;if(D.interacting()&&(++w>=y||D.interactable===c&&((M+=V===u.name?1:0)>=v||D.element===l&&(_++,V===u.name&&_>=b))))return!1}return y>0}function du(c,l){return $.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function Ul(c,l,u){var m=u.autoStart.cursorElement;m&&m!==c&&(m.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,u.autoStart.cursorElement=l?c:null}function uu(c,l){var u=c.interactable,m=c.element,g=c.prepared;if(c.pointerType==="mouse"&&u&&u.options.styleCursor){var v="";if(g.name){var b=u.options[g.name].cursorChecker;v=$.func(b)?b(g,u,m,c._interacting):l.actions.map[g.name].getCursor(g)}Ul(c.element,v||"",l)}else l.autoStart.cursorElement&&Ul(l.autoStart.cursorElement,"",l)}var V1={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,u=c.defaults;c.usePlugin(R1),u.base.actionChecker=null,u.base.styleCursor=!0,U(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(m){return du(m,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:zs,cursorElement:null}},listeners:{"interactions:down":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;u.interacting()||cu(u,lu(u,m,g,v,l),l)},"interactions:move":function(c,l){(function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerType!=="mouse"||g.pointerIsDown||g.interacting()||cu(g,lu(g,v,b,y,m),m)})(c,l),function(u,m){var g=u.interaction;if(g.pointerIsDown&&!g.interacting()&&g.pointerWasMoved&&g.prepared.name){m.fire("autoStart:before-start",u);var v=g.interactable,b=g.prepared.name;b&&v&&(v.options[b].manualStart||!zs(v,g.element,g.prepared,m)?g.stop():(g.start(g.prepared,v,g.element),uu(g,m)))}}(c,l)},"interactions:stop":function(c,l){var u=c.interaction,m=u.interactable;m&&m.options.styleCursor&&Ul(u.element,"",l)}},maxInteractions:du,withinInteractionLimit:zs,validateAction:su},Gl=V1,D1={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var u=c.interaction,m=c.eventTarget,g=c.dx,v=c.dy;if(u.prepared.name==="drag"){var b=Math.abs(g),y=Math.abs(v),w=u.interactable.options.drag,M=w.startAxis,_=b>y?"x":b<y?"y":"xy";if(u.prepared.axis=w.lockAxis==="start"?_[0]:w.lockAxis,_!=="xy"&&M!=="xy"&&M!==_){u.prepared.name=null;for(var E=m,O=function(V){if(V!==u.interactable){var N=u.interactable.options.drag;if(!N.manualStart&&V.testIgnoreAllow(N,E,m)){var G=V.getAction(u.downPointer,u.downEvent,u,E);if(G&&G.name==="drag"&&function(K,X){if(!X)return!1;var pe=X.options.drag.startAxis;return K==="xy"||pe==="xy"||pe===K}(_,V)&&Gl.validateAction(G,V,E,m,l))return V}}};$.element(E);){var D=l.interactables.forEachMatch(E,O);if(D){u.prepared.name="drag",u.interactable=D,u.element=E;break}E=Go(E)}}}}}};function Yl(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var u=c.interactable.options;return u[l].hold||u[l].delay}var F1={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(Gl),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,u=Yl(l);u>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},u))},"interactions:move":function(c){var l=c.interaction,u=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!u&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Yl(l)>0&&(l.prepared.name=null)}},getHoldDuration:Yl},N1=F1,L1={id:"auto-start",install:function(c){c.usePlugin(Gl),c.usePlugin(N1),c.usePlugin(D1)}},B1=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):$.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function q1(c){var l=c.interaction,u=c.event;l.interactable&&l.interactable.checkAndPreventDefault(u)}var hu={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=B1,l.prototype.checkAndPreventDefault=function(u){return function(m,g,v){var b=m.options.preventDefault;if(b!=="never")if(b!=="always"){if(g.events.supportsPassive&&/^touch(start|move)$/.test(v.type)){var y=H(v.target).document,w=g.getDocOptions(y);if(!w||!w.events||w.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(v.type)||$.element(v.target)&&zi(v.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||v.preventDefault()}else v.preventDefault()}(this,c,u)},c.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var m=0,g=c.interactions.list;m<g.length;m++){var v=g[m];if(v.element&&(v.element===u.target||si(v.element,u.target)))return void v.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(c,l){return c["interactions:".concat(l)]=q1,c},{})};function Es(c,l){if(l.phaselessTypes[c])return!0;for(var u in l.map)if(c.indexOf(u)===0&&c.substr(u.length)in l.phases)return!0;return!1}function Wn(c){var l={};for(var u in c){var m=c[u];$.plainObject(m)?l[u]=Wn(m):$.array(m)?l[u]=Qd(m):l[u]=m}return l}var Xl=function(){function c(l){t(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=l,this.result=Ss(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return n(c,[{key:"start",value:function(l,u){var m,g,v=l.phase,b=this.interaction,y=function(M){var _=M.interactable.options[M.prepared.name],E=_.modifiers;return E&&E.length?E:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(O){var D=_[O];return D&&D.enabled&&{options:D,methods:D._methods}}).filter(function(O){return!!O})}(b);this.prepareStates(y),this.startEdges=U({},b.edges),this.edges=U({},this.startEdges),this.startOffset=(m=b.rect,g=u,m?{left:g.x-m.left,top:g.y-m.top,right:m.right-g.x,bottom:m.bottom-g.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var w=this.fillArg({phase:v,pageCoords:u,preEnd:!1});return this.result=Ss(),this.startAll(w),this.result=this.setAll(w)}},{key:"fillArg",value:function(l){var u=this.interaction;return l.interaction=u,l.interactable=u.interactable,l.element=u.element,l.rect||(l.rect=u.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var u=0,m=this.states;u<m.length;u++){var g=m[u];g.methods.start&&(l.state=g,g.methods.start(l))}}},{key:"setAll",value:function(l){var u=l.phase,m=l.preEnd,g=l.skipModifiers,v=l.rect,b=l.edges;l.coords=U({},l.pageCoords),l.rect=U({},v),l.edges=U({},b);for(var y=g?this.states.slice(g):this.states,w=Ss(l.coords,l.rect),M=0;M<y.length;M++){var _,E=y[M],O=E.options,D=U({},l.coords),V=null;(_=E.methods)!=null&&_.set&&this.shouldDo(O,m,u)&&(l.state=E,V=E.methods.set(l),tn(l.edges,l.rect,{x:l.coords.x-D.x,y:l.coords.y-D.y})),w.eventProps.push(V)}U(this.edges,l.edges),w.delta.x=l.coords.x-l.pageCoords.x,w.delta.y=l.coords.y-l.pageCoords.y,w.rectDelta.left=l.rect.left-v.left,w.rectDelta.right=l.rect.right-v.right,w.rectDelta.top=l.rect.top-v.top,w.rectDelta.bottom=l.rect.bottom-v.bottom;var N=this.result.coords,G=this.result.rect;if(N&&G){var K=w.rect.left!==G.left||w.rect.right!==G.right||w.rect.top!==G.top||w.rect.bottom!==G.bottom;w.changed=K||N.x!==w.coords.x||N.y!==w.coords.y}return w}},{key:"applyToInteraction",value:function(l){var u=this.interaction,m=l.phase,g=u.coords.cur,v=u.coords.start,b=this.result,y=this.startDelta,w=b.delta;m==="start"&&U(this.startDelta,b.delta);for(var M=0,_=[[v,y],[g,w]];M<_.length;M++){var E=_[M],O=E[0],D=E[1];O.page.x+=D.x,O.page.y+=D.y,O.client.x+=D.x,O.client.y+=D.y}var V=this.result.rectDelta,N=l.rect||u.rect;N.left+=V.left,N.right+=V.right,N.top+=V.top,N.bottom+=V.bottom,N.width=N.right-N.left,N.height=N.bottom-N.top}},{key:"setAndApply",value:function(l){var u=this.interaction,m=l.phase,g=l.preEnd,v=l.skipModifiers,b=this.setAll(this.fillArg({preEnd:g,phase:m,pageCoords:l.modifiedCoords||u.coords.cur.page}));if(this.result=b,!b.changed&&(!v||v<this.states.length)&&u.interacting())return!1;if(l.modifiedCoords){var y=u.coords.cur.page,w={x:l.modifiedCoords.x-y.x,y:l.modifiedCoords.y-y.y};b.coords.x+=w.x,b.coords.y+=w.y,b.delta.x+=w.x,b.delta.y+=w.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var u=l.interaction,m=l.event,g=this.states;if(g&&g.length){for(var v=!1,b=0;b<g.length;b++){var y=g[b];l.state=y;var w=y.options,M=y.methods,_=M.beforeEnd&&M.beforeEnd(l);if(_)return this.endResult=_,!1;v=v||!v&&this.shouldDo(w,!0,l.phase,!0)}v&&u.move({event:m,preEnd:!0})}}},{key:"stop",value:function(l){var u=l.interaction;if(this.states&&this.states.length){var m=U({states:this.states,interactable:u.interactable,element:u.element,rect:null},l);this.fillArg(m);for(var g=0,v=this.states;g<v.length;g++){var b=v[g];m.state=b,b.methods.stop&&b.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var u=0;u<l.length;u++){var m=l[u],g=m.options,v=m.methods,b=m.name;this.states.push({options:g,methods:v,index:u,name:b})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var u=l.interaction,m=u.coords,g=u.rect,v=u.modification;if(v.result){for(var b=v.startDelta,y=v.result,w=y.delta,M=y.rectDelta,_=0,E=[[m.start,b],[m.cur,w]];_<E.length;_++){var O=E[_],D=O[0],V=O[1];D.page.x-=V.x,D.page.y-=V.y,D.client.x-=V.x,D.client.y-=V.y}g.left-=M.left,g.right-=M.right,g.top-=M.top,g.bottom-=M.bottom}}},{key:"shouldDo",value:function(l,u,m,g){return!(!l||l.enabled===!1||g&&!l.endOnly||l.endOnly&&!u||m==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(u){return Wn(u)}),this.result=Ss(U({},l.result.coords),U({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function Ss(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function on(c,l){var u=c.defaults,m={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},g=function(v){var b=v||{};for(var y in b.enabled=b.enabled!==!1,u)y in b||(b[y]=u[y]);var w={options:b,methods:m,name:l,enable:function(){return b.enabled=!0,w},disable:function(){return b.enabled=!1,w}};return w};return l&&typeof l=="string"&&(g._defaults=u,g._methods=m),g}function Oa(c){var l=c.iEvent,u=c.interaction.modification.result;u&&(l.modifiers=u.eventProps)}var K1={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new Xl(l)},"interactions:before-action-start":function(c){var l=c.interaction,u=c.interaction.modification;u.start(c,l.coords.start.page),l.edges=u.edges,u.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,u=l.modification,m=u.setAndApply(c);return l.edges=u.edges,m},"interactions:before-action-end":function(c){var l=c.interaction,u=l.modification,m=u.beforeEnd(c);return l.edges=u.startEdges,m},"interactions:action-start":Oa,"interactions:action-move":Oa,"interactions:action-end":Oa,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},pu=K1,mu={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Zl=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w,M){var _;t(this,u),(_=l.call(this,m)).relatedTarget=null,_.screenX=void 0,_.screenY=void 0,_.button=void 0,_.buttons=void 0,_.ctrlKey=void 0,_.shiftKey=void 0,_.altKey=void 0,_.metaKey=void 0,_.page=void 0,_.client=void 0,_.delta=void 0,_.rect=void 0,_.x0=void 0,_.y0=void 0,_.t0=void 0,_.dt=void 0,_.duration=void 0,_.clientX0=void 0,_.clientY0=void 0,_.velocity=void 0,_.speed=void 0,_.swipe=void 0,_.axes=void 0,_.preEnd=void 0,y=y||m.element;var E=m.interactable,O=(E&&E.options||mu).deltaSource,D=ji(E,y,v),V=b==="start",N=b==="end",G=V?f(_):m.prevEvent,K=V?m.coords.start:N?{page:G.page,client:G.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return _.page=U({},K.page),_.client=U({},K.client),_.rect=U({},m.rect),_.timeStamp=K.timeStamp,N||(_.page.x-=D.x,_.page.y-=D.y,_.client.x-=D.x,_.client.y-=D.y),_.ctrlKey=g.ctrlKey,_.altKey=g.altKey,_.shiftKey=g.shiftKey,_.metaKey=g.metaKey,_.button=g.button,_.buttons=g.buttons,_.target=y,_.currentTarget=y,_.preEnd=w,_.type=M||v+(b||""),_.interactable=E,_.t0=V?m.pointers[m.pointers.length-1].downTime:G.t0,_.x0=m.coords.start.page.x-D.x,_.y0=m.coords.start.page.y-D.y,_.clientX0=m.coords.start.client.x-D.x,_.clientY0=m.coords.start.client.y-D.y,_.delta=V||N?{x:0,y:0}:{x:_[O].x-G[O].x,y:_[O].y-G[O].y},_.dt=m.coords.delta.timeStamp,_.duration=_.timeStamp-_.t0,_.velocity=U({},m.coords.velocity[O]),_.speed=$a(_.velocity.x,_.velocity.y),_.swipe=N||b==="inertiastart"?_.getSwipe():null,_}return n(u,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var g=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var v=112.5<=g&&g<247.5,b=202.5<=g&&g<337.5;return{up:b,down:!b&&22.5<=g&&g<157.5,left:v,right:!v&&(292.5<=g||g<67.5),angle:g,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(Cs);Object.defineProperties(Zl.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var W1=n(function c(l,u,m,g,v){t(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=l,this.pointer=u,this.event=m,this.downTime=g,this.downTarget=v}),U1=function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c}({}),gu=function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c}({}),G1=0,Y1=function(){function c(l){var u=this,m=l.pointerType,g=l.scopeFire;t(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ja(function(_){this.move(_)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=G1++,this._scopeFire=g,this.pointerType=m;var v=this;this._proxy={};var b=function(_){Object.defineProperty(u._proxy,_,{get:function(){return v[_]}})};for(var y in U1)b(y);var w=function(_){Object.defineProperty(u._proxy,_,{value:function(){return v[_].apply(v,arguments)}})};for(var M in gu)w(M);this._scopeFire("interactions:new",{interaction:this})}return n(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,u,m){var g=this.updatePointer(l,u,m,!0),v=this.pointers[g];this._scopeFire("interactions:down",{pointer:l,event:u,eventTarget:m,pointerIndex:g,pointerInfo:v,type:"down",interaction:this})}},{key:"start",value:function(l,u,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!u.options[l.name].enabled)&&(Wl(this.prepared,l),this.interactable=u,this.element=m,this.rect=u.getRect(m),this.edges=this.prepared.edges?U({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(l,u,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,u,m,!1);var g,v,b=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(g=this.coords.cur.client.x-this.coords.start.client.x,v=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=$a(g,v)>this.pointerMoveTolerance);var y,w,M,_=this.getPointerIndex(l),E={pointer:l,pointerIndex:_,pointerInfo:this.pointers[_],event:u,type:"move",eventTarget:m,dx:g,dy:v,duplicate:b,interaction:this};b||(y=this.coords.velocity,w=this.coords.delta,M=Math.max(w.timeStamp/1e3,.001),y.page.x=w.page.x/M,y.page.y=w.page.y/M,y.client.x=w.client.x/M,y.client.y=w.client.y/M,y.timeStamp=M),this._scopeFire("interactions:move",E),b||this.simulation||(this.interacting()&&(E.type=null,this.move(E)),this.pointerWasMoved&&_s(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||Kd(this.coords.delta),(l=U({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,u,m,g){var v=this.getPointerIndex(l);v===-1&&(v=this.updatePointer(l,u,m,!1));var b=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(b),{pointer:l,pointerIndex:v,pointerInfo:this.pointers[v],event:u,eventTarget:m,type:b,curEventTarget:g,interaction:this}),this.simulation||this.end(u),this.removePointer(l,u)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var u;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:l,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(l){var u=Ta(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Aa(this.pointers,function(m){return m.id===u})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,u,m,g){var v,b,y,w=Ta(l),M=this.getPointerIndex(l),_=this.pointers[M];return g=g!==!1&&(g||/(down|start)$/i.test(u.type)),_?_.pointer=l:(_=new W1(w,l,u,null,null),M=this.pointers.length,this.pointers.push(_)),z1(this.coords.cur,this.pointers.map(function(E){return E.pointer}),this._now()),v=this.coords.delta,b=this.coords.prev,y=this.coords.cur,v.page.x=y.page.x-b.page.x,v.page.y=y.page.y-b.page.y,v.client.x=y.client.x-b.client.x,v.client.y=y.client.y-b.client.y,v.timeStamp=y.timeStamp-b.timeStamp,g&&(this.pointerIsDown=!0,_.downTime=this.coords.cur.timeStamp,_.downTarget=m,ws(this.downPointer,l),this.interacting()||(_s(this.coords.start,this.coords.cur),_s(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(l,u,m),this._scopeFire("interactions:update-pointer",{pointer:l,event:u,eventTarget:m,down:g,pointerInfo:_,pointerIndex:M,interaction:this}),M}},{key:"removePointer",value:function(l,u){var m=this.getPointerIndex(l);if(m!==-1){var g=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:l,event:u,eventTarget:null,pointerIndex:m,pointerInfo:g,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,u,m){this._latestPointer.pointer=l,this._latestPointer.event=u,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,u,m,g){return new Zl(this,l,this.prepared.name,u,this.element,m,g)}},{key:"_fireEvent",value:function(l){var u;(u=this.interactable)==null||u.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var u=l.event,m=l.phase,g=l.preEnd,v=l.type,b=this.rect;if(b&&m==="move"&&(tn(this.edges,b,this.coords.delta[this.interactable.options.deltaSource]),b.width=b.right-b.left,b.height=b.bottom-b.top),this._scopeFire("interactions:before-action-".concat(m),l)===!1)return!1;var y=l.iEvent=this._createPreparedEvent(u,m,g,v);return this._scopeFire("interactions:action-".concat(m),l),m==="start"&&(this.prevEvent=y),this._fireEvent(y),this._scopeFire("interactions:after-action-".concat(m),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function fu(c){vu(c.interaction)}function vu(c){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(c))return!1;var l=c.offset.pending;return Ql(c.coords.cur,l),Ql(c.coords.delta,l),tn(c.edges,c.rect,l),l.x=0,l.y=0,!0}function X1(c){var l=c.x,u=c.y;this.offset.pending.x+=l,this.offset.pending.y+=u,this.offset.total.x+=l,this.offset.total.y+=u}function Ql(c,l){var u=c.page,m=c.client,g=l.x,v=l.y;u.x+=g,u.y+=v,m.x+=g,m.y+=v}gu.offsetBy="";var Z1={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=X1},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return function(l){l.pointerIsDown&&(Ql(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":fu,"interactions:before-action-move":fu,"interactions:before-action-end":function(c){var l=c.interaction;if(vu(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},bu=Z1,Q1=function(){function c(l){t(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=l}return n(c,[{key:"start",value:function(l){var u=this.interaction,m=$s(u);if(!m||!m.enabled)return!1;var g=u.coords.velocity.client,v=$a(g.x,g.y),b=this.modification||(this.modification=new Xl(u));if(b.copyFrom(u.modification),this.t0=u._now(),this.allowResume=m.allowResume,this.v0=v,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=b.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&v>m.minSpeed&&v>m.endSpeed)this.startInertia();else{if(b.result=b.setAll(this.modifierArg),!b.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:l,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var l=this,u=this.interaction.coords.velocity.client,m=$s(this.interaction),g=m.resistance,v=-Math.log(m.endSpeed/this.v0)/g;this.targetOffset={x:(u.x-v)/g,y:(u.y-v)/g},this.te=v,this.lambda_v0=g/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var b=this.modification,y=this.modifierArg;y.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},b.result=b.setAll(y),b.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+b.result.delta.x,y:this.targetOffset.y+b.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var u=this;this.timeout=rn.request(function(){u.active&&l()})}},{key:"inertiaTick",value:function(){var l,u,m,g,v,b,y,w=this,M=this.interaction,_=$s(M).resistance,E=(M._now()-this.t0)/1e3;if(E<this.te){var O,D=1-(Math.exp(-_*E)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,u=0,m=this.targetOffset.x,g=this.targetOffset.y,v=this.modifiedOffset.x,b=this.modifiedOffset.y,O={x:yu(y=D,l,m,v),y:yu(y,u,g,b)}):O={x:this.targetOffset.x*D,y:this.targetOffset.y*D};var V={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=V.x,this.currentOffset.y+=V.y,M.offsetBy(V),M.move(),this.onNextFrame(function(){return w.inertiaTick()})}else M.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var l=this,u=this.interaction,m=u._now()-this.t0,g=$s(u).smoothEndDuration;if(m<g){var v={x:ku(m,0,this.targetOffset.x,g),y:ku(m,0,this.targetOffset.y,g)},b={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=b.x,this.currentOffset.y+=b.y,u.offsetBy(b),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var u=l.pointer,m=l.event,g=l.eventTarget,v=this.interaction;v.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),v.updatePointer(u,m,g,!0),v._doPhase({interaction:v,event:m,phase:"resume"}),_s(v.coords.prev,v.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rn.cancel(this.timeout)}}]),c}();function $s(c){var l=c.interactable,u=c.prepared;return l&&l.options&&u.name&&l.options[u.name].inertia}var J1={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(bu),c.usePlugin(pu),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new Q1(l)},"interactions:before-action-end":function(c){var l=c.interaction,u=c.event;return(!l._interacting||l.simulation||!l.inertia.start(u))&&null},"interactions:down":function(c){var l=c.interaction,u=c.eventTarget,m=l.inertia;if(m.active)for(var g=u;$.element(g);){if(g===l.element){m.resume(c);break}g=Go(g)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":Oa,"interactions:action-inertiastart":Oa,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function yu(c,l,u,m){var g=1-c;return g*g*l+2*g*c*u+c*c*m}function ku(c,l,u,m){return-u*(c/=m)*(c-2)+l}var e0=J1;function xu(c,l){for(var u=0;u<l.length;u++){var m=l[u];if(c.immediatePropagationStopped)break;m(c)}}var wu=function(){function c(l){t(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=U({},l||{})}return n(c,[{key:"fire",value:function(l){var u,m=this.global;(u=this.types[l.type])&&xu(l,u),!l.propagationStopped&&m&&(u=m[l.type])&&xu(l,u)}},{key:"on",value:function(l,u){var m=di(l,u);for(l in m)this.types[l]=Zd(this.types[l]||[],m[l])}},{key:"off",value:function(l,u){var m=di(l,u);for(l in m){var g=this.types[l];if(g&&g.length)for(var v=0,b=m[l];v<b.length;v++){var y=b[v],w=g.indexOf(y);w!==-1&&g.splice(w,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),t0=function(){function c(l){t(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,ws(this,l)}return n(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c}();function Ha(c){return $.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function Ts(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var r0={id:"events",install:function(c){var l,u=[],m={},g=[],v={add:b,remove:y,addDelegate:function(_,E,O,D,V){var N=Ha(V);if(!m[O]){m[O]=[];for(var G=0;G<g.length;G++){var K=g[G];b(K,O,w),b(K,O,M,!0)}}var X=m[O],pe=Pa(X,function(Ce){return Ce.selector===_&&Ce.context===E});pe||(pe={selector:_,context:E,listeners:[]},X.push(pe)),pe.listeners.push({func:D,options:N})},removeDelegate:function(_,E,O,D,V){var N,G=Ha(V),K=m[O],X=!1;if(K)for(N=K.length-1;N>=0;N--){var pe=K[N];if(pe.selector===_&&pe.context===E){for(var Ce=pe.listeners,re=Ce.length-1;re>=0;re--){var ve=Ce[re];if(ve.func===D&&Ts(ve.options,G)){Ce.splice(re,1),Ce.length||(K.splice(N,1),y(E,O,w),y(E,O,M,!0)),X=!0;break}}if(X)break}}},delegateListener:w,delegateUseCapture:M,delegatedEvents:m,documents:g,targets:u,supportsOptions:!1,supportsPassive:!1};function b(_,E,O,D){if(_.addEventListener){var V=Ha(D),N=Pa(u,function(G){return G.eventTarget===_});N||(N={eventTarget:_,events:{}},u.push(N)),N.events[E]||(N.events[E]=[]),Pa(N.events[E],function(G){return G.func===O&&Ts(G.options,V)})||(_.addEventListener(E,O,v.supportsOptions?V:V.capture),N.events[E].push({func:O,options:V}))}}function y(_,E,O,D){if(_.addEventListener&&_.removeEventListener){var V=Aa(u,function(ao){return ao.eventTarget===_}),N=u[V];if(N&&N.events)if(E!=="all"){var G=!1,K=N.events[E];if(K){if(O==="all"){for(var X=K.length-1;X>=0;X--){var pe=K[X];y(_,E,pe.func,pe.options)}return}for(var Ce=Ha(D),re=0;re<K.length;re++){var ve=K[re];if(ve.func===O&&Ts(ve.options,Ce)){_.removeEventListener(E,O,v.supportsOptions?Ce:Ce.capture),K.splice(re,1),K.length===0&&(delete N.events[E],G=!0);break}}}G&&!Object.keys(N.events).length&&u.splice(V,1)}else for(E in N.events)N.events.hasOwnProperty(E)&&y(_,E,"all")}}function w(_,E){for(var O=Ha(E),D=new t0(_),V=m[_.type],N=Xd(_)[0],G=N;$.element(G);){for(var K=0;K<V.length;K++){var X=V[K],pe=X.selector,Ce=X.context;if(zi(G,pe)&&si(Ce,N)&&si(Ce,G)){var re=X.listeners;D.currentTarget=G;for(var ve=0;ve<re.length;ve++){var ao=re[ve];Ts(ao.options,O)&&ao.func(D)}}}G=Go(G)}}function M(_){return w(_,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return v.supportsOptions=!0},get passive(){return v.supportsPassive=!0}}),c.events=v,v}},Jl={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,u=Jl.methodOrder;l<u.length;l++){var m=u[l],g=Jl[m](c);if(g)return g}return null},simulationResume:function(c){var l=c.pointerType,u=c.eventType,m=c.eventTarget,g=c.scope;if(!/down|start/i.test(u))return null;for(var v=0,b=g.interactions.list;v<b.length;v++){var y=b[v],w=m;if(y.simulation&&y.simulation.allowResume&&y.pointerType===l)for(;w;){if(w===y.element)return y;w=Go(w)}}return null},mouseOrPen:function(c){var l,u=c.pointerId,m=c.pointerType,g=c.eventType,v=c.scope;if(m!=="mouse"&&m!=="pen")return null;for(var b=0,y=v.interactions.list;b<y.length;b++){var w=y[b];if(w.pointerType===m){if(w.simulation&&!_u(w,u))continue;if(w.interacting())return w;l||(l=w)}}if(l)return l;for(var M=0,_=v.interactions.list;M<_.length;M++){var E=_[M];if(!(E.pointerType!==m||/down/i.test(g)&&E.simulation))return E}return null},hasPointer:function(c){for(var l=c.pointerId,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(_u(g,l))return g}return null},idle:function(c){for(var l=c.pointerType,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(g.pointers.length===1){var v=g.interactable;if(v&&(!v.options.gesture||!v.options.gesture.enabled))continue}else if(g.pointers.length>=2)continue;if(!g.interacting()&&l===g.pointerType)return g}return null}};function _u(c,l){return c.pointers.some(function(u){return u.id===l})}var o0=Jl,ec=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Mu(c,l){return function(u){var m=l.interactions.list,g=Yd(u),v=Xd(u),b=v[0],y=v[1],w=[];if(/^touch/.test(u.type)){l.prevTouchTime=l.now();for(var M=0,_=u.changedTouches;M<_.length;M++){var E=_[M],O={pointer:E,pointerId:Ta(E),pointerType:g,eventType:u.type,eventTarget:b,curEventTarget:y,scope:l},D=Cu(O);w.push([O.pointer,O.eventTarget,O.curEventTarget,D])}}else{var V=!1;if(!io.supportsPointerEvent&&/mouse/.test(u.type)){for(var N=0;N<m.length&&!V;N++)V=m[N].pointerType!=="mouse"&&m[N].pointerIsDown;V=V||l.now()-l.prevTouchTime<500||u.timeStamp===0}if(!V){var G={pointer:u,pointerId:Ta(u),pointerType:g,eventType:u.type,curEventTarget:y,eventTarget:b,scope:l},K=Cu(G);w.push([G.pointer,G.eventTarget,G.curEventTarget,K])}}for(var X=0;X<w.length;X++){var pe=w[X],Ce=pe[0],re=pe[1],ve=pe[2];pe[3][c](Ce,u,re,ve)}}}function Cu(c){var l=c.pointerType,u=c.scope,m={interaction:o0.search(c),searchDetails:c};return u.fire("interactions:find",m),m.interaction||u.interactions.new({pointerType:l})}function tc(c,l){var u=c.doc,m=c.scope,g=c.options,v=m.interactions.docEvents,b=m.events,y=b[l];for(var w in m.browser.isIOS&&!g.events&&(g.events={passive:!1}),b.delegatedEvents)y(u,w,b.delegateListener),y(u,w,b.delegateUseCapture,!0);for(var M=g&&g.events,_=0;_<v.length;_++){var E=v[_];y(u,E.type,E.listener,M)}}var i0={id:"core/interactions",install:function(c){for(var l={},u=0;u<ec.length;u++){var m=ec[u];l[m]=Mu(m,c)}var g,v=io.pEventTypes;function b(){for(var y=0,w=c.interactions.list;y<w.length;y++){var M=w[y];if(M.pointerIsDown&&M.pointerType==="touch"&&!M._interacting)for(var _=function(){var D=O[E];c.documents.some(function(V){return si(V.doc,D.downTarget)})||M.removePointer(D.pointer,D.event)},E=0,O=M.pointers;E<O.length;E++)_()}}(g=et.PointerEvent?[{type:v.down,listener:b},{type:v.down,listener:l.pointerDown},{type:v.move,listener:l.pointerMove},{type:v.up,listener:l.pointerUp},{type:v.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:b},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.pointerUp}]).push({type:"blur",listener:function(y){for(var w=0,M=c.interactions.list;w<M.length;w++)M[w].documentBlur(y)}}),c.prevTouchTime=0,c.Interaction=function(y){d(M,y);var w=x(M);function M(){return t(this,M),w.apply(this,arguments)}return n(M,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(_){c.interactions.pointerMoveTolerance=_}},{key:"_now",value:function(){return c.now()}}]),M}(Y1),c.interactions={list:[],new:function(y){y.scopeFire=function(M,_){return c.fire(M,_)};var w=new c.Interaction(y);return c.interactions.list.push(w),w},listeners:l,docEvents:g,pointerMoveTolerance:1},c.usePlugin(hu)},listeners:{"scope:add-document":function(c){return tc(c,"add")},"scope:remove-document":function(c){return tc(c,"remove")},"interactable:unset":function(c,l){for(var u=c.interactable,m=l.interactions.list.length-1;m>=0;m--){var g=l.interactions.list[m];g.interactable===u&&(g.stop(),l.fire("interactions:destroy",{interaction:g}),g.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(m,1))}}},onDocSignal:tc,doOnInteractions:Mu,methodNames:ec},n0=i0,nn=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(nn||{}),a0=function(){function c(l,u,m,g){t(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new wu,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=l,this._context=u.context||m,this._win=H(wo(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=g,this.set(u)}return n(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,u){return $.func(u.onstart)&&this.on("".concat(l,"start"),u.onstart),$.func(u.onmove)&&this.on("".concat(l,"move"),u.onmove),$.func(u.onend)&&this.on("".concat(l,"end"),u.onend),$.func(u.oninertiastart)&&this.on("".concat(l,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,u,m){var g,v=this,b=(g=this._actions.map[l])==null?void 0:g.filterEventType,y=function(w){return(b==null||b(w))&&Es(w,v._actions)};($.array(u)||$.object(u))&&this._onOff(nn.Off,l,u,void 0,y),($.array(m)||$.object(m))&&this._onOff(nn.On,l,m,void 0,y)}},{key:"setPerAction",value:function(l,u){var m=this._defaults;for(var g in u){var v=g,b=this.options[l],y=u[v];v==="listeners"&&this.updatePerActionListeners(l,b.listeners,y),$.array(y)?b[v]=Qd(y):$.plainObject(y)?(b[v]=U(b[v]||{},Wn(y)),$.object(m.perAction[v])&&"enabled"in m.perAction[v]&&(b[v].enabled=y.enabled!==!1)):$.bool(y)&&$.object(m.perAction[v])?b[v].enabled=y:b[v]=y}}},{key:"getRect",value:function(l){return l=l||($.element(this.target)?this.target:null),$.string(this.target)&&(l=l||this._context.querySelector(this.target)),Ae(l)}},{key:"rectChecker",value:function(l){var u=this;return $.func(l)?(this.getRect=function(m){var g=U({},l.apply(u,m));return"width"in g||(g.width=g.right-g.left,g.height=g.bottom-g.top),g},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,u){if(wo(u)||$.object(u)){for(var m in this.options[l]=u,this._actions.map)this.options[m][l]=u;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return $.string(l)?Array.from(this._context.querySelectorAll(l)):$.func(l)&&l.getAllElements?l.getAllElements():$.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||si(this._context,l)}},{key:"testIgnoreAllow",value:function(l,u,m){return!this.testIgnore(l.ignoreFrom,u,m)&&this.testAllow(l.allowFrom,u,m)}},{key:"testAllow",value:function(l,u,m){return!l||!!$.element(m)&&($.string(l)?fe(m,l,u):!!$.element(l)&&si(l,m))}},{key:"testIgnore",value:function(l,u,m){return!(!l||!$.element(m))&&($.string(l)?fe(m,l,u):!!$.element(l)&&si(l,m))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,u,m,g,v){$.object(u)&&!$.array(u)&&(g=m,m=null);var b=di(u,m,v);for(var y in b){y==="wheel"&&(y=io.wheelEvent);for(var w=0,M=b[y];w<M.length;w++){var _=M[w];Es(y,this._actions)?this.events[l===nn.On?"on":"off"](y,_):$.string(this.target)?this._scopeEvents[l===nn.On?"addDelegate":"removeDelegate"](this.target,this._context,y,_,g):this._scopeEvents[l===nn.On?"add":"remove"](this.target,y,_,g)}}return this}},{key:"on",value:function(l,u,m){return this._onOff(nn.On,l,u,m)}},{key:"off",value:function(l,u,m){return this._onOff(nn.Off,l,u,m)}},{key:"set",value:function(l){var u=this._defaults;for(var m in $.object(l)||(l={}),this.options=Wn(u.base),this._actions.methodDict){var g=m,v=this._actions.methodDict[g];this.options[g]={},this.setPerAction(g,U(U({},u.perAction),u.actions[g])),this[v](l[g])}for(var b in l)b!=="getRect"?$.func(this[b])&&this[b](l[b]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if($.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[l],m=u.length-1;m>=0;m--){var g=u[m],v=g.selector,b=g.context,y=g.listeners;v===this.target&&b===this._context&&u.splice(m,1);for(var w=y.length-1;w>=0;w--)this._scopeEvents.removeDelegate(this.target,this._context,l,y[w][0],y[w][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),s0=function(){function c(l){var u=this;t(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(m){var g=m.interactable,v=g.target,b=$.string(v)?u.selectorMap[v]:v[u.scope.id],y=Aa(b,function(w){return w===g});b.splice(y,1)}})}return n(c,[{key:"new",value:function(l,u){u=U(u||{},{actions:this.scope.actions});var m=new this.scope.Interactable(l,u,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),$.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(m)):(m.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:l,options:u,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(l,u){var m=u&&u.context||this.scope.document,g=$.string(l),v=g?this.selectorMap[l]:l[this.scope.id];if(v)return Pa(v,function(b){return b._context===m&&(g||b.inContext(l))})}},{key:"forEachMatch",value:function(l,u){for(var m=0,g=this.list;m<g.length;m++){var v=g[m],b=void 0;if(($.string(v.target)?$.element(l)&&zi(l,v.target):l===v.target)&&v.inContext(l)&&(b=u(v)),b!==void 0)return b}}}]),c}(),l0=function(){function c(){var l=this;t(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=io,this.defaults=Wn(mu),this.Eventable=wu,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var g=function v(b,y){var w=m.interactables.getExisting(b,y);return w||((w=m.interactables.new(b,y)).events.global=v.globalEvents),w};return g.getPointerAverage=Gd,g.getTouchBBox=Vl,g.getTouchDistance=Dl,g.getTouchAngle=Fl,g.getElementRect=Ae,g.getElementClientRect=Z,g.matchesSelector=zi,g.closest=Bn,g.globalEvents={},g.version="1.10.27",g.scope=m,g.use=function(v,b){return this.scope.usePlugin(v,b),this},g.isSet=function(v,b){return!!this.scope.interactables.get(v,b&&b.context)},g.on=ja(function(v,b,y){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.on(_,b,y)}return this}if($.object(v)){for(var E in v)this.on(E,v[E],b);return this}return Es(v,this.scope.actions)?this.globalEvents[v]?this.globalEvents[v].push(b):this.globalEvents[v]=[b]:this.scope.events.add(this.scope.document,v,b,{options:y}),this},"The interact.on() method is being deprecated"),g.off=ja(function(v,b,y){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.off(_,b,y)}return this}if($.object(v)){for(var E in v)this.off(E,v[E],b);return this}var O;return Es(v,this.scope.actions)?v in this.globalEvents&&(O=this.globalEvents[v].indexOf(b))!==-1&&this.globalEvents[v].splice(O,1):this.scope.events.remove(this.scope.document,v,b,y),this},"The interact.off() method is being deprecated"),g.debug=function(){return this.scope},g.supportsTouch=function(){return io.supportsTouch},g.supportsPointerEvent=function(){return io.supportsPointerEvent},g.stop=function(){for(var v=0,b=this.scope.interactions.list;v<b.length;v++)b[v].stop();return this},g.pointerMoveTolerance=function(v){return $.number(v)?(this.scope.interactions.pointerMoveTolerance=v,this):this.scope.interactions.pointerMoveTolerance},g.addDocument=function(v,b){this.scope.addDocument(v,b)},g.removeDocument=function(v){this.scope.removeDocument(v)},g}(this),this.InteractEvent=Zl,this.Interactable=void 0,this.interactables=new s0(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return l.removeDocument(m.target)};var u=this;this.Interactable=function(m){d(v,m);var g=x(v);function v(){return t(this,v),g.apply(this,arguments)}return n(v,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(b){return k(h(v.prototype),"set",this).call(this,b),u.fire("interactable:set",{options:b,interactable:this}),this}},{key:"unset",value:function(){k(h(v.prototype),"unset",this).call(this);var b=u.interactables.list.indexOf(this);b<0||(u.interactables.list.splice(b,1),u.fire("interactable:unset",{interactable:this}))}}]),v}(a0)}return n(c,[{key:"addListeners",value:function(l,u){this.listenerMaps.push({id:u,map:l})}},{key:"fire",value:function(l,u){for(var m=0,g=this.listenerMaps;m<g.length;m++){var v=g[m].map[l];if(v&&v(u,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(u,m){return u.isInitialized=!0,$.window(m)&&P(m),et.init(m),io.init(m),rn.init(m),u.window=m,u.document=m.document,u.usePlugin(n0),u.usePlugin(r0),u}(this,l)}},{key:"pluginIsInstalled",value:function(l){var u=l.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,u),l.listeners&&l.before){for(var m=0,g=this.listenerMaps.length,v=l.before.reduce(function(y,w){return y[w]=!0,y[zu(w)]=!0,y},{});m<g;m++){var b=this.listenerMaps[m].id;if(b&&(v[b]||v[zu(b)]))break}this.listenerMaps.splice(m,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,u){if(this.getDocIndex(l)!==-1)return!1;var m=H(l);u=u?U({},u):{},this.documents.push({doc:l,options:u}),this.events.documents.push(l),l!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:m,scope:this,options:u})}},{key:"removeDocument",value:function(l){var u=this.getDocIndex(l),m=H(l),g=this.documents[u].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:l,window:m,scope:this,options:g})}},{key:"getDocIndex",value:function(l){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===l)return u;return-1}},{key:"getDocOptions",value:function(l){var u=this.getDocIndex(l);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function zu(c){return c&&c.replace(/\/.*$/,"")}var Eu=new l0,no=Eu.interactStatic,c0=typeof globalThis<"u"?globalThis:window;Eu.init(c0);var d0=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var g=m[0],v=m[1];return g in c||v in c}),u=function(m,g){for(var v=c.range,b=c.limits,y=b===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:b,w=c.offset,M=w===void 0?{x:0,y:0}:w,_={range:v,grid:c,x:null,y:null},E=0;E<l.length;E++){var O=l[E],D=O[0],V=O[1],N=Math.round((m-M.x)/c[D]),G=Math.round((g-M.y)/c[V]);_[D]=Math.max(y.left,Math.min(y.right,N*c[D]+M.x)),_[V]=Math.max(y.top,Math.min(y.bottom,G*c[V]+M.y))}return _};return u.grid=c,u.coordFields=l,u}}),u0={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=U(l.snappers||{},d0),l.createSnapGrid=l.snappers.grid}},h0=u0,p0={start:function(c){var l=c.state,u=c.rect,m=c.edges,g=c.pageCoords,v=l.options,b=v.ratio,y=v.enabled,w=l.options,M=w.equalDelta,_=w.modifiers;b==="preserve"&&(b=u.width/u.height),l.startCoords=U({},g),l.startRect=U({},u),l.ratio=b,l.equalDelta=M;var E=l.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(l.xIsPrimaryAxis=!(!m.left&&!m.right),l.equalDelta){var O=(E.left?1:-1)*(E.top?1:-1);l.edgeSign={x:O,y:O}}else l.edgeSign={x:E.left?-1:1,y:E.top?-1:1};if(y!==!1&&U(m,E),_!=null&&_.length){var D=new Xl(c.interaction);D.copyFrom(c.interaction.modification),D.prepareStates(_),l.subModification=D,D.startAll(o({},c))}},set:function(c){var l=c.state,u=c.rect,m=c.coords,g=l.linkedEdges,v=U({},m),b=l.equalDelta?m0:g0;if(U(c.edges,g),b(l,l.xIsPrimaryAxis,m,u),!l.subModification)return null;var y=U({},u);tn(g,y,{x:m.x-v.x,y:m.y-v.y});var w=l.subModification.setAll(o(o({},c),{},{rect:y,edges:g,pageCoords:m,prevCoords:m,prevRect:y})),M=w.delta;return w.changed&&(b(l,Math.abs(M.x)>Math.abs(M.y),w.coords,w.rect),U(m,w.coords)),w.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function m0(c,l,u){var m=c.startCoords,g=c.edgeSign;l?u.y=m.y+(u.x-m.x)*g.y:u.x=m.x+(u.y-m.y)*g.x}function g0(c,l,u,m){var g=c.startRect,v=c.startCoords,b=c.ratio,y=c.edgeSign;if(l){var w=m.width/b;u.y=v.y+(w-g.height)*y.y}else{var M=m.height*b;u.x=v.x+(M-g.width)*y.x}}var f0=on(p0,"aspectRatio"),Su=function(){};Su._defaults={};var As=Su;function kn(c,l,u){return $.func(c)?li(c,l.interactable,l.element,[u.x,u.y,l]):li(c,l.interactable,l.element)}var Ps={start:function(c){var l=c.rect,u=c.startOffset,m=c.state,g=c.interaction,v=c.pageCoords,b=m.options,y=b.elementRect,w=U({left:0,top:0,right:0,bottom:0},b.offset||{});if(l&&y){var M=kn(b.restriction,g,v);if(M){var _=M.right-M.left-l.width,E=M.bottom-M.top-l.height;_<0&&(w.left+=_,w.right+=_),E<0&&(w.top+=E,w.bottom+=E)}w.left+=u.left-l.width*y.left,w.top+=u.top-l.height*y.top,w.right+=u.right-l.width*(1-y.right),w.bottom+=u.bottom-l.height*(1-y.bottom)}m.offset=w},set:function(c){var l=c.coords,u=c.interaction,m=c.state,g=m.options,v=m.offset,b=kn(g.restriction,u,l);if(b){var y=function(w){return!w||"left"in w&&"top"in w||((w=U({},w)).left=w.x||0,w.top=w.y||0,w.right=w.right||w.left+w.width,w.bottom=w.bottom||w.top+w.height),w}(b);l.x=Math.max(Math.min(y.right-v.right,l.x),y.left+v.left),l.y=Math.max(Math.min(y.bottom-v.bottom,l.y),y.top+v.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},v0=on(Ps,"restrict"),$u={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Tu={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Au(c,l){for(var u=0,m=["top","left","bottom","right"];u<m.length;u++){var g=m[u];g in c||(c[g]=l[g])}return c}var Ra={noInner:$u,noOuter:Tu,start:function(c){var l,u=c.interaction,m=c.startOffset,g=c.state,v=g.options;v&&(l=Yo(kn(v.offset,u,u.coords.start.page))),l=l||{x:0,y:0},g.offset={top:l.y+m.top,left:l.x+m.left,bottom:l.y-m.bottom,right:l.x-m.right}},set:function(c){var l=c.coords,u=c.edges,m=c.interaction,g=c.state,v=g.offset,b=g.options;if(u){var y=U({},l),w=kn(b.inner,m,y)||{},M=kn(b.outer,m,y)||{};Au(w,$u),Au(M,Tu),u.top?l.y=Math.min(Math.max(M.top+v.top,y.y),w.top+v.top):u.bottom&&(l.y=Math.max(Math.min(M.bottom+v.bottom,y.y),w.bottom+v.bottom)),u.left?l.x=Math.min(Math.max(M.left+v.left,y.x),w.left+v.left):u.right&&(l.x=Math.max(Math.min(M.right+v.right,y.x),w.right+v.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},b0=on(Ra,"restrictEdges"),y0=U({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},Ps.defaults),k0=on({start:Ps.start,set:Ps.set,defaults:y0},"restrictRect"),x0={width:-1/0,height:-1/0},w0={width:1/0,height:1/0},_0=on({start:function(c){return Ra.start(c)},set:function(c){var l=c.interaction,u=c.state,m=c.rect,g=c.edges,v=u.options;if(g){var b=ci(kn(v.min,l,c.coords))||x0,y=ci(kn(v.max,l,c.coords))||w0;u.options={endOnly:v.endOnly,inner:U({},Ra.noInner),outer:U({},Ra.noOuter)},g.top?(u.options.inner.top=m.bottom-b.height,u.options.outer.top=m.bottom-y.height):g.bottom&&(u.options.inner.bottom=m.top+b.height,u.options.outer.bottom=m.top+y.height),g.left?(u.options.inner.left=m.right-b.width,u.options.outer.left=m.right-y.width):g.right&&(u.options.inner.right=m.left+b.width,u.options.outer.right=m.left+y.width),Ra.set(c),u.options=v}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),rc={start:function(c){var l,u=c.interaction,m=c.interactable,g=c.element,v=c.rect,b=c.state,y=c.startOffset,w=b.options,M=w.offsetWithOrigin?function(O){var D=O.interaction.element,V=Yo(li(O.state.options.origin,null,null,[D])),N=V||ji(O.interactable,D,O.interaction.prepared.name);return N}(c):{x:0,y:0};if(w.offset==="startCoords")l={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var _=li(w.offset,m,g,[u]);(l=Yo(_)||{x:0,y:0}).x+=M.x,l.y+=M.y}var E=w.relativePoints;b.offsets=v&&E&&E.length?E.map(function(O,D){return{index:D,relativePoint:O,x:y.left-v.width*O.x+l.x,y:y.top-v.height*O.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,u=c.coords,m=c.state,g=m.options,v=m.offsets,b=ji(l.interactable,l.element,l.prepared.name),y=U({},u),w=[];g.offsetWithOrigin||(y.x-=b.x,y.y-=b.y);for(var M=0,_=v;M<_.length;M++)for(var E=_[M],O=y.x-E.x,D=y.y-E.y,V=0,N=g.targets.length;V<N;V++){var G=g.targets[V],K=void 0;(K=$.func(G)?G(O,D,l._proxy,E,V):G)&&w.push({x:($.number(K.x)?K.x:O)+E.x,y:($.number(K.y)?K.y:D)+E.y,range:$.number(K.range)?K.range:g.range,source:G,index:V,offset:E})}for(var X={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},pe=0;pe<w.length;pe++){var Ce=w[pe],re=Ce.range,ve=Ce.x-y.x,ao=Ce.y-y.y,kt=$a(ve,ao),Fo=kt<=re;re===1/0&&X.inRange&&X.range!==1/0&&(Fo=!1),X.target&&!(Fo?X.inRange&&re!==1/0?kt/re<X.distance/X.range:re===1/0&&X.range!==1/0||kt<X.distance:!X.inRange&&kt<X.distance)||(X.target=Ce,X.distance=kt,X.range=re,X.inRange=Fo,X.delta.x=ve,X.delta.y=ao)}return X.inRange&&(u.x=X.target.x,u.y=X.target.y),m.closest=X,X},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},M0=on(rc,"snap"),js={start:function(c){var l=c.state,u=c.edges,m=l.options;if(!u)return null;c.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],rc.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,u=c.state,m=c.coords,g=u.options,v=u.offsets,b={x:m.x-v[0].x,y:m.y-v[0].y};u.options=U({},g),u.options.targets=[];for(var y=0,w=g.targets||[];y<w.length;y++){var M=w[y],_=void 0;if(_=$.func(M)?M(b.x,b.y,l):M){for(var E=0,O=u.targetFields;E<O.length;E++){var D=O[E],V=D[0],N=D[1];if(V in _||N in _){_.x=_[V],_.y=_[N];break}}u.options.targets.push(_)}}var G=rc.set(c);return u.options=g,G},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},C0=on(js,"snapSize"),oc={aspectRatio:f0,restrictEdges:b0,restrict:v0,restrictRect:k0,restrictSize:_0,snapEdges:on({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],js.start(c)):null},set:js.set,defaults:U(Wn(js.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:M0,snapSize:C0,spring:As,avoid:As,transform:As,rubberband:As},z0={id:"modifiers",install:function(c){var l=c.interactStatic;for(var u in c.usePlugin(pu),c.usePlugin(h0),l.modifiers=oc,oc){var m=oc[u],g=m._defaults,v=m._methods;g._methods=v,c.defaults.perAction[u]=g}}},E0=z0,Pu=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w){var M;if(t(this,u),ws(f(M=l.call(this,y)),v),v!==g&&ws(f(M),g),M.timeStamp=w,M.originalEvent=v,M.type=m,M.pointerId=Ta(g),M.pointerType=Yd(g),M.target=b,M.currentTarget=null,m==="tap"){var _=y.getPointerIndex(g);M.dt=M.timeStamp-y.pointers[_].downTime;var E=M.timeStamp-y.tapTime;M.double=!!y.prevTap&&y.prevTap.type!=="doubletap"&&y.prevTap.target===M.target&&E<500}else m==="doubletap"&&(M.dt=g.timeStamp-y.tapTime,M.double=!0);return M}return n(u,[{key:"_subtractOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX-=g,this.pageY-=v,this.clientX-=g,this.clientY-=v,this}},{key:"_addOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX+=g,this.pageY+=v,this.clientX+=g,this.clientY+=v,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(Cs),Ia={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=Ia,c.defaults.actions.pointerEvents=Ia.defaults,U(c.actions.phaselessTypes,Ia.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,u=c.pointerInfo;!l&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;c.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&ic(c),an({interaction:u,pointer:m,event:g,eventTarget:v,type:"move"},l))},"interactions:down":function(c,l){(function(u,m){for(var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget,w=u.pointerIndex,M=g.pointers[w].hold,_=ce(y),E={interaction:g,pointer:v,event:b,eventTarget:y,type:"hold",targets:[],path:_,node:null},O=0;O<_.length;O++){var D=_[O];E.node=D,m.fire("pointerEvents:collect-targets",E)}if(E.targets.length){for(var V=1/0,N=0,G=E.targets;N<G.length;N++){var K=G[N].eventable.options.holdDuration;K<V&&(V=K)}M.duration=V,M.timeout=setTimeout(function(){an({interaction:g,eventTarget:y,pointer:v,event:b,type:"hold"},m)},V)}})(c,l),an(c,l)},"interactions:up":function(c,l){ic(c),an(c,l),function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerWasMoved||an({interaction:g,eventTarget:y,pointer:v,event:b,type:"tap"},m)}(c,l)},"interactions:cancel":function(c,l){ic(c),an(c,l)}},PointerEvent:Pu,fire:an,collectEventTargets:ju,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function an(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=c.targets,w=y===void 0?ju(c,l):y,M=new Pu(b,m,g,v,u,l.now());l.fire("pointerEvents:new",{pointerEvent:M});for(var _={interaction:u,pointer:m,event:g,eventTarget:v,targets:w,type:b,pointerEvent:M},E=0;E<w.length;E++){var O=w[E];for(var D in O.props||{})M[D]=O.props[D];var V=ji(O.eventable,O.node);if(M._subtractOrigin(V),M.eventable=O.eventable,M.currentTarget=O.node,O.eventable.fire(M),M._addOrigin(V),M.immediatePropagationStopped||M.propagationStopped&&E+1<w.length&&w[E+1].node!==M.currentTarget)break}if(l.fire("pointerEvents:fired",_),b==="tap"){var N=M.double?an({interaction:u,pointer:m,event:g,eventTarget:v,type:"doubletap"},l):M;u.prevTap=N,u.tapTime=N.timeStamp}return M}function ju(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=u.getPointerIndex(m),w=u.pointers[y];if(b==="tap"&&(u.pointerWasMoved||!w||w.downTarget!==v))return[];for(var M=ce(v),_={interaction:u,pointer:m,event:g,eventTarget:v,type:b,path:M,targets:[],node:null},E=0;E<M.length;E++){var O=M[E];_.node=O,l.fire("pointerEvents:collect-targets",_)}return b==="hold"&&(_.targets=_.targets.filter(function(D){var V,N;return D.eventable.options.holdDuration===((V=u.pointers[y])==null||(N=V.hold)==null?void 0:N.duration)})),_.targets}function ic(c){var l=c.interaction,u=c.pointerIndex,m=l.pointers[u].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var S0=Object.freeze({__proto__:null,default:Ia});function $0(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var T0={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(Ia);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=$0,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var u=c.interaction,m=c.pointerEvent,g=c.eventTarget,v=c.targets;if(m.type==="hold"&&v.length){var b=v[0].eventable.options.holdRepeatInterval;b<=0||(u.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:u,eventTarget:g,type:"hold",pointer:m,event:m},l)},b))}}})},A0=T0,P0={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(m){return U(this.events.options,m),this};var u=l.prototype._backCompatOption;l.prototype._backCompatOption=function(m,g){var v=u.call(this,m,g);return v===this&&(this.events.options[m]=g),v}},listeners:{"pointerEvents:collect-targets":function(c,l){var u=c.targets,m=c.node,g=c.type,v=c.eventTarget;l.interactables.forEachMatch(m,function(b){var y=b.events,w=y.options;y.types[g]&&y.types[g].length&&b.testIgnoreAllow(w,m,v)&&u.push({node:m,eventable:y,props:{interactable:b}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(u){return l.getRect(u)}},"interactable:set":function(c,l){var u=c.interactable,m=c.options;U(u.events.options,l.pointerEvents.defaults),U(u.events.options,m.pointerEvents||{})}}},j0=P0,O0={id:"pointer-events",install:function(c){c.usePlugin(S0),c.usePlugin(A0),c.usePlugin(j0)}},H0=O0,R0={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(u){return function(m,g,v){for(var b=m.getAllElements(),y=v.window.Promise,w=y?[]:null,M=function(){var E=b[_],O=m.getRect(E);if(!O)return 1;var D,V=Pa(v.interactions.list,function(K){return K.interacting()&&K.interactable===m&&K.element===E&&K.prepared.name===g.name});if(V)V.move(),w&&(D=V._reflowPromise||new y(function(K){V._reflowResolve=K}));else{var N=ci(O),G=function(K){return{coords:K,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:N.x,y:N.y},client:{x:N.x,y:N.y},timeStamp:v.now()});D=function(K,X,pe,Ce,re){var ve=K.interactions.new({pointerType:"reflow"}),ao={interaction:ve,event:re,pointer:re,eventTarget:pe,phase:"reflow"};ve.interactable=X,ve.element=pe,ve.prevEvent=re,ve.updatePointer(re,re,pe,!0),Kd(ve.coords.delta),Wl(ve.prepared,Ce),ve._doPhase(ao);var kt=K.window,Fo=kt.Promise,ui=Fo?new Fo(function(Ri){ve._reflowResolve=Ri}):void 0;return ve._reflowPromise=ui,ve.start(Ce,X,pe),ve._interacting?(ve.move(ao),ve.end(re)):(ve.stop(),ve._reflowResolve()),ve.removePointer(re,re),ui}(v,m,E,g,G)}w&&w.push(D)},_=0;_<b.length&&!M();_++);return w&&y.all(w).then(function(){return m})}(this,u,c)}},listeners:{"interactions:stop":function(c,l){var u=c.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(m,g){m.splice(m.indexOf(g),1)}(l.interactions.list,u))}}},I0=R0;if(no.use(hu),no.use(bu),no.use(H0),no.use(e0),no.use(E0),no.use(L1),no.use(A1),no.use(j1),no.use(I0),no.default=no,(typeof Tn>"u"?"undefined":e(Tn))==="object"&&Tn)try{Tn.exports=no}catch{}return no.default=no,no})});var Yf={};Ru(Yf,{BP:()=>vd,LuiAlert:()=>$r,LuiAutocomplete:()=>mt,LuiAvatar:()=>$t,LuiAvatarGroup:()=>ir,LuiBackground:()=>ct,LuiBadge:()=>rr,LuiBreadcrumb:()=>Xt,LuiBreadcrumbItem:()=>_r,LuiButton:()=>Wt,LuiButtonGroup:()=>Ge,LuiButtonGroupItem:()=>Ut,LuiCalendar:()=>Fr,LuiCard:()=>Rt,LuiCascader:()=>ht,LuiCheckbox:()=>Gt,LuiCheckboxGroup:()=>Cr,LuiCol:()=>po,LuiCollapse:()=>$o,LuiCollapseItem:()=>Yr,LuiColorPicker:()=>ot,LuiCommandPalette:()=>lr,LuiConfigProvider:()=>ur,LuiContextMenu:()=>Re,LuiDateRangePicker:()=>Ro,LuiDatepicker:()=>_t,LuiDialog:()=>Me,LuiDivider:()=>Hr,LuiDrawer:()=>it,LuiDropdown:()=>Fi,LuiDropmenu:()=>Se,LuiEmptyState:()=>No,LuiFileInput:()=>jo,LuiForm:()=>Lt,LuiFormItem:()=>sr,LuiIcon:()=>Oe,LuiIconPicker:()=>$e,LuiImage:()=>Ie,LuiImageCropper:()=>wt,LuiInput:()=>He,LuiInputNumber:()=>Nt,LuiInputOpt:()=>Ir,LuiMenu:()=>Zo,LuiMenuDivider:()=>En,LuiMenuItem:()=>er,LuiOption:()=>fi,LuiOptionGroup:()=>un,LuiOverlayRoot:()=>Jn,LuiPagination:()=>Ye,LuiPopconfirm:()=>bt,LuiPopover:()=>te,LuiProgress:()=>Qt,LuiQrcode:()=>pr,LuiRadio:()=>zr,LuiRadioGroup:()=>Dr,LuiRow:()=>ri,LuiScrollArea:()=>Ft,LuiSelect:()=>me,LuiSkeleton:()=>jr,LuiSlider:()=>ut,LuiSpinner:()=>_o,LuiSplitter:()=>ro,LuiStatistic:()=>St,LuiSwitch:()=>go,LuiTab:()=>It,LuiTabPanel:()=>So,LuiTable:()=>Y,LuiTableColumn:()=>vr,LuiTabs:()=>ca,LuiTag:()=>so,LuiText:()=>Xe,LuiTextarea:()=>dt,LuiToast:()=>cr,LuiTooltip:()=>Gr,LuiTree:()=>le,LuiTreeSelect:()=>pt,baseStyles:()=>j,bringOverlayStackToFront:()=>Et,builtinIconCollection:()=>qs,builtinIconNames:()=>Ya,builtinIconPrefix:()=>wn,builtinTranslations:()=>Oc,commandPalette:()=>u1,contextMenu:()=>y1,createCommandPalette:()=>Sl,createContextMenu:()=>ks,createDialog:()=>Sa,createDialogForm:()=>Rd,createDrawer:()=>Tl,createForm:()=>f1,createPopover:()=>Ol,createTable:()=>qd,createToastHost:()=>Ld,dialog:()=>p1,drawer:()=>h1,encodeQr:()=>zl,ensureOverlayExternalLayer:()=>Ar,ensureOverlayLayer:()=>Js,ensureOverlayRoot:()=>Qs,eventPathContainsOwnedOverlay:()=>Cn,form:()=>v1,formatDate:()=>J2,formatSize:()=>Q2,getLocale:()=>Em,hasRecentOverlayInteraction:()=>es,hideAllContextMenus:()=>Dd,isImageIconSource:()=>Ks,isOverlayTopmost:()=>rs,markOverlayInteraction:()=>Ja,mergeTranslations:()=>ne,normalizeStatus:()=>Nn,onLocaleChange:()=>xe,popover:()=>k1,registerFormField:()=>Wp,registerOverlayStack:()=>Jt,registerTranslations:()=>Ic,resolveBuiltinIcon:()=>Yn,resolveBuiltinTranslations:()=>Zh,resolveOverlayLayerRegistration:()=>zn,setLocale:()=>Rc,setOverlayOwner:()=>Cc,setupBuiltinIcons:()=>Xa,showContextMenu:()=>Vd,statusColorToken:()=>o1,statusColorVar:()=>Wg,statusIcon:()=>Pi,statusOrder:()=>Ug,t:()=>Sm,table:()=>M1,toCssLength:()=>Ot,toast:()=>Ji,tokens:()=>A,translate:()=>ae,unregisterFormField:()=>Up,unregisterOverlayStack:()=>Xo});module.exports=B0(Yf);var Mo=require("lit"),mr=require("lit/decorators.js");var ac=require("lit"),A=ac.css`
|
|
1
|
+
"use strict";var V0=Object.create;var Da=Object.defineProperty;var Ou=Object.getOwnPropertyDescriptor;var D0=Object.getOwnPropertyNames;var F0=Object.getPrototypeOf,N0=Object.prototype.hasOwnProperty;var Hu=i=>{throw TypeError(i)};var nc=(i,o)=>()=>(i&&(o=i(i=0)),o);var L0=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),Ru=(i,o)=>{for(var e in o)Da(i,e,{get:o[e],enumerable:!0})},Iu=(i,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of D0(o))!N0.call(i,r)&&r!==e&&Da(i,r,{get:()=>o[r],enumerable:!(t=Ou(o,r))||t.enumerable});return i};var xn=(i,o,e)=>(e=i!=null?V0(F0(i)):{},Iu(o||!i||!i.__esModule?Da(e,"default",{value:i,enumerable:!0}):e,i)),B0=i=>Iu(Da({},"__esModule",{value:!0}),i),a=(i,o,e,t)=>{for(var r=t>1?void 0:t?Ou(o,e):o,n=i.length-1,s;n>=0;n--)(s=i[n])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&Da(o,e,r),r};var Vu=(i,o,e)=>o.has(i)||Hu("Cannot "+e);var ke=(i,o,e)=>(Vu(i,o,"read from private field"),e?e.call(i):o.get(i)),Du=(i,o,e)=>o.has(i)?Hu("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,e),Fu=(i,o,e,t)=>(Vu(i,o,"write to private field"),t?t.call(i,e):o.set(i,e),e);var ns,Dh=nc(()=>{ns=class{constructor(o){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,o?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(o,e){let t=this._map.get(o)||0;this._map.set(o,e),this.totalSize+=e-t}get averageSize(){if(this._map.size>0){let o=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(o):o}return 0}getSize(o){return this._map.get(o)}clear(){this._map.clear(),this.totalSize=0}}});function $c(i){return i==="horizontal"?"width":"height"}var rl,Fh=nc(()=>{rl=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(o,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=o,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}set config(o){Object.assign(this,Object.assign({},this._getDefaultConfig(),o))}get config(){return{direction:this.direction}}get items(){return this._items}set items(o){this._setItems(o)}_setItems(o){o!==this._items&&(this._items=o,this._scheduleReflow())}get direction(){return this._direction}set direction(o){o=o==="horizontal"?o:"vertical",o!==this._direction&&(this._direction=o,this._sizeDim=o==="horizontal"?"width":"height",this._secondarySizeDim=o==="horizontal"?"height":"width",this._positionDim=o==="horizontal"?"left":"top",this._secondaryPositionDim=o==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(o){let{_viewDim1:e,_viewDim2:t}=this;Object.assign(this._viewportSize,o),t!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(o){Object.assign(this._latestCoords,o);let e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(o=!1){(o||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(o){this._pin=o,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:o,block:e}=this._pin;return{index:Math.max(0,Math.min(o,this.items.length-1)),block:e}}return null}_clampScrollPosition(o){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(o,this.totalScrollSize[$c(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let o=this._scrollPosition,{index:e,block:t}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:t||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=o-this._scrollPosition}}_calculateScrollIntoViewPosition(o){let{block:e}=o,t=Math.min(this.items.length,Math.max(0,o.index)),r=this._getItemPosition(t)[this._positionDim],n=r;if(e!=="start"){let s=this._getItemSize(t)[this._sizeDim];if(e==="center")n=r-.5*this._viewDim1+.5*s;else{let d=r-this._viewDim1+s;if(e==="end")n=d;else{let h=this._scrollPosition;n=Math.abs(h-r)<Math.abs(h-d)?r:d}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(o){return{[this._positionDim]:this._calculateScrollIntoViewPosition(o)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let o=new Map;if(this._first!==-1&&this._last!==-1)for(let t=this._first;t<=this._last;t++)o.set(t,this._getItemPosition(t));let e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:o};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let o=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>o||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(o){if(this._first===-1||this._last===-1)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let t=this._last;for(;t>this._first&&Math.round(this._getItemPosition(t)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)t--;(e!==this._firstVisible||t!==this._lastVisible)&&(this._firstVisible=e,this._lastVisible=t,o&&o.emit&&this._sendVisibilityChangedMessage())}}});var Lh={};Ru(Lh,{FlowLayout:()=>ol,flow:()=>km});function Nh(i){return i==="horizontal"?"marginLeft":"marginTop"}function xm(i){return i==="horizontal"?"marginRight":"marginBottom"}function wm(i){return i==="horizontal"?"xOffset":"yOffset"}function _m(i,o){let e=[i,o].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}var km,Tc,ol,Bh=nc(()=>{Dh();Fh();km=i=>Object.assign({type:ol},i);Tc=class{constructor(){this._childSizeCache=new ns,this._marginSizeCache=new ns,this._metricsCache=new Map}update(o,e){let t=new Set;Object.keys(o).forEach(r=>{let n=Number(r);this._metricsCache.set(n,o[n]),this._childSizeCache.set(n,o[n][$c(e)]),t.add(n),t.add(n+1)});for(let r of t){let n=this._metricsCache.get(r)?.[Nh(e)]||0,s=this._metricsCache.get(r-1)?.[xm(e)]||0;this._marginSizeCache.set(r,_m(n,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(o,e){return this._metricsCache.get(o)?.[Nh(e)]||0}getChildSize(o){return this._childSizeCache.getSize(o)}getMarginSize(o){return this._marginSizeCache.getSize(o)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},ol=class extends rl{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Tc,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(o){this._metricsCache.update(o,this.direction),this._scheduleReflow()}_getPhysicalItem(o){return this._newPhysicalItems.get(o)??this._physicalItems.get(o)}_getSize(o){return this._getPhysicalItem(o)&&this._metricsCache.getChildSize(o)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(o){let e=this._metricsCache;if(this._first===-1||this._last===-1)return e.averageMarginSize+o*(e.averageMarginSize+this._getAverageSize());if(o<this._first){let t=this._first-o;return this._getPhysicalItem(this._first).pos-(e.getMarginSize(this._first-1)||e.averageMarginSize)-(t*e.averageChildSize+(t-1)*e.averageMarginSize)}else{let t=o-this._last;return this._getPhysicalItem(this._last).pos+(e.getChildSize(this._last)||e.averageChildSize)+(e.getMarginSize(this._last)||e.averageMarginSize)+t*(e.averageChildSize+e.averageMarginSize)}}_getPosition(o){let e=this._getPhysicalItem(o),{averageMarginSize:t}=this._metricsCache;return o===0?this._metricsCache.getMarginSize(0)??t:e?e.pos:this._estimatePosition(o)}_calculateAnchor(o,e){return o<=0?0:e>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((o+e)/2/this._delta)))}_getAnchor(o,e){if(this._physicalItems.size===0)return this._calculateAnchor(o,e);if(this._first<0)return this._calculateAnchor(o,e);if(this._last<0)return this._calculateAnchor(o,e);let t=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),n=t.pos;if(r.pos+this._metricsCache.getChildSize(this._last)<o)return this._calculateAnchor(o,e);if(n>e)return this._calculateAnchor(o,e);let h=this._firstVisible-1,p=-1/0;for(;p<o;)p=this._getPhysicalItem(++h).pos+this._metricsCache.getChildSize(h);return h}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let o=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o,this._stable=!0}_getItems(){let o=this._newPhysicalItems;this._stable=!0;let e,t;if(this.pin!==null){let{index:p}=this.pin;this._anchorIdx=p,this._anchorPos=this._getPosition(p)}if(e=this._scrollPosition-this._overhang,t=this._scrollPosition+this._viewDim1+this._overhang,t<0||e>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(e,t),this._anchorPos=this._getPosition(this._anchorIdx));let r=this._getSize(this._anchorIdx);r===void 0&&(this._stable=!1,r=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,s=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-s-r);let d=0;for(this._anchorPos+r+s<e&&(d=e-(this._anchorPos+r+s)),this._anchorPos-n>t&&(d=t-(this._anchorPos-n)),d&&(this._scrollPosition-=d,e-=d,t-=d,this._scrollError+=d),o.set(this._anchorIdx,{pos:this._anchorPos,size:r}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+r+s;this._physicalMin>e&&this._first>0;){let p=this._getSize(--this._first);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._first);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize),this._physicalMin-=p;let x=this._physicalMin;if(o.set(this._first,{pos:x,size:p}),this._physicalMin-=f,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<t&&this._last<this.items.length-1;){let p=this._getSize(++this._last);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._last);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize);let x=this._physicalMax;if(o.set(this._last,{pos:x,size:p}),this._physicalMax+=p+f,!this._stable&&!this._estimate)break}let h=this._calculateError();h&&(this._physicalMin-=h,this._physicalMax-=h,this._anchorPos-=h,this._scrollPosition-=h,o.forEach(p=>p.pos-=h),this._scrollError+=h),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:o,_last:e}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===o&&this._last===e)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:o}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(o+this._getAverageSize())+o)}get _delta(){let{averageMarginSize:o}=this._metricsCache;return this._getAverageSize()+o}_getItemPosition(o){return{[this._positionDim]:this._getPosition(o),[this._secondaryPositionDim]:0,[wm(this.direction)]:-(this._metricsCache.getLeadingMarginValue(o,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(o){return{[this._sizeDim]:this._getSize(o)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var ia=L0((Vc,Tn)=>{(function(i,o){typeof Vc=="object"&&typeof Tn<"u"?Tn.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self).interact=o()})(Vc,function(){"use strict";function i(c,l){var u=Object.keys(c);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(c);l&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(c,g).enumerable})),u.push.apply(u,m)}return u}function o(c){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?i(Object(u),!0).forEach(function(m){s(c,m,u[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(u)):i(Object(u)).forEach(function(m){Object.defineProperty(c,m,Object.getOwnPropertyDescriptor(u,m))})}return c}function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e(c)}function t(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var u=0;u<l.length;u++){var m=l[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,C(m.key),m)}}function n(c,l,u){return l&&r(c.prototype,l),u&&r(c,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function s(c,l,u){return(l=C(l))in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}function d(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&p(c,l)}function h(c){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},h(c)}function p(c,l){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,m){return u.__proto__=m,u},p(c,l)}function f(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function x(c){var l=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,m=h(c);if(l){var g=h(this).constructor;u=Reflect.construct(m,arguments,g)}else u=m.apply(this,arguments);return function(v,b){if(b&&(typeof b=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(v)}(this,u)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,l,u){var m=function(v,b){for(;!Object.prototype.hasOwnProperty.call(v,b)&&(v=h(v))!==null;);return v}(c,l);if(m){var g=Object.getOwnPropertyDescriptor(m,l);return g.get?g.get.call(arguments.length<3?c:u):g.value}},k.apply(this,arguments)}function C(c){var l=function(u,m){if(typeof u!="object"||u===null)return u;var g=u[Symbol.toPrimitive];if(g!==void 0){var v=g.call(u,m||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(u)}(c,"string");return typeof l=="symbol"?l:l+""}var S=function(c){return!(!c||!c.Window)&&c instanceof c.Window},z=void 0,T=void 0;function P(c){z=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),T=c}function H(c){return S(c)?c:(c.ownerDocument||c).defaultView||T.window}typeof window<"u"&&window&&P(window);var I=function(c){return!!c&&e(c)==="object"},B=function(c){return typeof c=="function"},$={window:function(c){return c===T||S(c)},docFrag:function(c){return I(c)&&c.nodeType===11},object:I,func:B,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||e(c)!=="object")return!1;var l=H(c)||T;return/object|function/.test(typeof Element>"u"?"undefined":e(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return I(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return I(c)&&c.length!==void 0&&B(c.splice)}};function Q(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;u==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):u==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function ye(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="drag"){var m=u.prepared.axis;if(m==="x"||m==="y"){var g=m==="x"?"y":"x";l.page[g]=u.coords.start.page[g],l.client[g]=u.coords.start.client[g],l.delta[g]=0}}}var De={id:"actions/drag",install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.draggable=De.draggable,l.map.drag=De,l.methodDict.drag="draggable",m.actions.drag=De.defaults},listeners:{"interactions:before-action-move":Q,"interactions:action-resume":Q,"interactions:action-move":ye,"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.buttons,g=u.options.drag;if(g&&g.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||m&u.options.drag.mouseButtons))return c.action={name:"drag",axis:g.lockAxis==="start"?g.startAxis:g.lockAxis},!1}},draggable:function(c){return $.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):$.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:Q,move:ye,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},yt=De,Ee={init:function(c){var l=c;Ee.document=l.document,Ee.DocumentFragment=l.DocumentFragment||ai,Ee.SVGElement=l.SVGElement||ai,Ee.SVGSVGElement=l.SVGSVGElement||ai,Ee.SVGElementInstance=l.SVGElementInstance||ai,Ee.Element=l.Element||ai,Ee.HTMLElement=l.HTMLElement||Ee.Element,Ee.Event=l.Event,Ee.Touch=l.Touch||ai,Ee.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ai(){}var tt=Ee,qr={init:function(c){var l=tt.Element,u=c.navigator||{};qr.supportsTouch="ontouchstart"in c||$.func(c.DocumentTouch)&&tt.document instanceof c.DocumentTouch,qr.supportsPointerEvent=u.pointerEnabled!==!1&&!!tt.PointerEvent,qr.isIOS=/iP(hone|od|ad)/.test(u.platform),qr.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),qr.isIe9=/MSIE 9/.test(u.userAgent),qr.isOperaMobile=u.appName==="Opera"&&qr.supportsTouch&&/Presto/.test(u.userAgent),qr.prefixedMatchesSelector="matches"in l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",qr.pEventTypes=qr.supportsPointerEvent?tt.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,qr.wheelEvent=tt.document&&"onmousewheel"in tt.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},io=qr;function si(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function Bn(c,l){for(;$.element(c);){if(zi(c,l))return c;c=Go(c)}return null}function Go(c){var l=c.parentNode;if($.docFrag(l)){for(;(l=l.host)&&$.docFrag(l););return l}return l}function zi(c,l){return T!==z&&(l=l.replace(/\/deep\//g," ")),c[io.prefixedMatchesSelector](l)}var q=function(c){return c.parentNode||c.host};function ee(c,l){for(var u,m=[],g=c;(u=q(g))&&g!==l&&u!==g.ownerDocument;)m.unshift(g),g=u;return m}function fe(c,l,u){for(;$.element(c);){if(zi(c,l))return!0;if((c=Go(c))===u)return zi(c,l)}return!1}function Ne(c){return c.correspondingUseElement||c}function Z(c){var l=c instanceof tt.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function Ae(c){var l,u=Z(c);if(!io.isIOS7&&u){var m={x:(l=(l=H(c))||T).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};u.left+=m.x,u.right+=m.x,u.top+=m.y,u.bottom+=m.y}return u}function ce(c){for(var l=[];c;)l.push(c),c=Go(c);return l}function wo(c){return!!$.string(c)&&(tt.document.querySelector(c),!0)}function U(c,l){for(var u in l)c[u]=l[u];return c}function en(c,l,u){return c==="parent"?Go(u):c==="self"?l.getRect(u):Bn(u,c)}function li(c,l,u,m){var g=c;return $.string(g)?g=en(g,l,u):$.func(g)&&(g=g.apply(void 0,m)),$.element(g)&&(g=Ae(g)),g}function Yo(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function ci(c){return!c||"x"in c&&"y"in c||((c=U({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function tn(c,l,u){c.left&&(l.left+=u.x),c.right&&(l.right+=u.x),c.top&&(l.top+=u.y),c.bottom&&(l.bottom+=u.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function ji(c,l,u){var m=u&&c.options[u];return Yo(li(m&&m.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function di(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(w){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},$.string(c)&&c.search(" ")!==-1&&(c=qn(c)),$.array(c))return c.forEach(function(w){return di(w,l,u,m)}),m;if($.object(c)&&(l=c,c=""),$.func(l)&&u(c))m[c]=m[c]||[],m[c].push(l);else if($.array(l))for(var g=0,v=l;g<v.length;g++){var b=v[g];di(c,b,u,m)}else if($.object(l))for(var y in l)di(qn(y).map(function(w){return"".concat(c).concat(w)}),l[y],u,m);return m}function qn(c){return c.trim().split(/ +/)}var $a=function(c,l){return Math.sqrt(c*c+l*l)},C1=["webkit","moz"];function ws(c,l){c.__set||(c.__set={});var u=function(g){if(C1.some(function(v){return g.indexOf(v)===0}))return 1;typeof c[g]!="function"&&g!=="__set"&&Object.defineProperty(c,g,{get:function(){return g in c.__set?c.__set[g]:c.__set[g]=l[g]},set:function(v){c.__set[g]=v},configurable:!0})};for(var m in l)u(m);return c}function _s(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function Kd(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function Wd(c){return c instanceof tt.Event||c instanceof tt.Touch}function Ms(c,l,u){return c=c||"page",(u=u||{}).x=l[c+"X"],u.y=l[c+"Y"],u}function Ud(c,l){return l=l||{x:0,y:0},io.isOperaMobile&&Wd(c)?(Ms("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):Ms("page",c,l),l}function Ta(c){return $.number(c.pointerId)?c.pointerId:c.identifier}function z1(c,l,u){var m=l.length>1?Gd(l):l[0];Ud(m,c.page),function(g,v){v=v||{},io.isOperaMobile&&Wd(g)?Ms("screen",g,v):Ms("client",g,v)}(m,c.client),c.timeStamp=u}function Il(c){var l=[];return $.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function Gd(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<c.length;u++){var m=c[u];for(var g in l)l[g]+=m[g]}for(var v in l)l[v]/=c.length;return l}function Vl(c){if(!c.length)return null;var l=Il(c),u=Math.min(l[0].pageX,l[1].pageX),m=Math.min(l[0].pageY,l[1].pageY),g=Math.max(l[0].pageX,l[1].pageX),v=Math.max(l[0].pageY,l[1].pageY);return{x:u,y:m,left:u,top:m,right:g,bottom:v,width:g-u,height:v-m}}function Dl(c,l){var u=l+"X",m=l+"Y",g=Il(c),v=g[0][u]-g[1][u],b=g[0][m]-g[1][m];return $a(v,b)}function Fl(c,l){var u=l+"X",m=l+"Y",g=Il(c),v=g[1][u]-g[0][u],b=g[1][m]-g[0][m];return 180*Math.atan2(b,v)/Math.PI}function Yd(c){return $.string(c.pointerType)?c.pointerType:$.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof tt.Touch?"touch":"mouse"}function Xd(c){var l=$.func(c.composedPath)?c.composedPath():c.path;return[Ne(l?l[0]:c.target),Ne(c.currentTarget)]}var Cs=function(){function c(l){t(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return n(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(Cs.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Zd=function(c,l){for(var u=0;u<l.length;u++){var m=l[u];c.push(m)}return c},Qd=function(c){return Zd([],c)},Aa=function(c,l){for(var u=0;u<c.length;u++)if(l(c[u],u,c))return u;return-1},Pa=function(c,l){return c[Aa(c,l)]},Kn=function(c){d(u,c);var l=x(u);function u(m,g,v){var b;t(this,u),(b=l.call(this,g._interaction)).dropzone=void 0,b.dragEvent=void 0,b.relatedTarget=void 0,b.draggable=void 0,b.propagationStopped=!1,b.immediatePropagationStopped=!1;var y=v==="dragleave"?m.prev:m.cur,w=y.element,M=y.dropzone;return b.type=v,b.target=w,b.currentTarget=w,b.dropzone=M,b.dragEvent=g,b.relatedTarget=g.target,b.draggable=g.interactable,b.timeStamp=g.timeStamp,b}return n(u,[{key:"reject",value:function(){var m=this,g=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&g.cur.dropzone===this.dropzone&&g.cur.element===this.target)if(g.prev.dropzone=this.dropzone,g.prev.element=this.target,g.rejected=!0,g.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var v=g.activeDrops,b=Aa(v,function(w){var M=w.dropzone,_=w.element;return M===m.dropzone&&_===m.target});g.activeDrops.splice(b,1);var y=new u(g,this.dragEvent,"dropdeactivate");y.dropzone=this.dropzone,y.target=this.target,this.dropzone.fire(y)}else this.dropzone.fire(new u(g,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(Cs);function Jd(c,l){for(var u=0,m=c.slice();u<m.length;u++){var g=m[u],v=g.dropzone,b=g.element;l.dropzone=v,l.target=b,v.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function Nl(c,l){for(var u=function(v,b){for(var y=[],w=0,M=v.interactables.list;w<M.length;w++){var _=M[w];if(_.options.drop.enabled){var E=_.options.drop.accept;if(!($.element(E)&&E!==b||$.string(E)&&!zi(b,E)||$.func(E)&&!E({dropzone:_,draggableElement:b})))for(var O=0,D=_.getAllElements();O<D.length;O++){var V=D[O];V!==b&&y.push({dropzone:_,element:V,rect:_.getRect(V)})}}}return y}(c,l),m=0;m<u.length;m++){var g=u[m];g.rect=g.dropzone.getRect(g.element)}return u}function eu(c,l,u){for(var m=c.dropState,g=c.interactable,v=c.element,b=[],y=0,w=m.activeDrops;y<w.length;y++){var M=w[y],_=M.dropzone,E=M.element,O=M.rect,D=_.dropCheck(l,u,g,v,E,O);b.push(D?E:null)}var V=function(N){for(var G,K,X,pe=[],Ce=0;Ce<N.length;Ce++){var re=N[Ce],ve=N[G];if(re&&Ce!==G)if(ve){var ao=q(re),kt=q(ve);if(ao!==re.ownerDocument)if(kt!==re.ownerDocument)if(ao!==kt){pe=pe.length?pe:ee(ve);var Fo=void 0;if(ve instanceof tt.HTMLElement&&re instanceof tt.SVGElement&&!(re instanceof tt.SVGSVGElement)){if(re===kt)continue;Fo=re.ownerSVGElement}else Fo=re;for(var ui=ee(Fo,ve.ownerDocument),Ri=0;ui[Ri]&&ui[Ri]===pe[Ri];)Ri++;var Os=[ui[Ri-1],ui[Ri],pe[Ri]];if(Os[0])for(var Va=Os[0].lastChild;Va;){if(Va===Os[1]){G=Ce,pe=ui;break}if(Va===Os[2])break;Va=Va.previousSibling}}else X=ve,(parseInt(H(K=re).getComputedStyle(K).zIndex,10)||0)>=(parseInt(H(X).getComputedStyle(X).zIndex,10)||0)&&(G=Ce);else G=Ce}else G=Ce}return G}(b);return m.activeDrops[V]||null}function Ll(c,l,u){var m=c.dropState,g={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(g.activate=new Kn(m,u,"dropactivate"),g.activate.target=null,g.activate.dropzone=null),u.type==="dragend"&&(g.deactivate=new Kn(m,u,"dropdeactivate"),g.deactivate.target=null,g.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(g.leave=new Kn(m,u,"dragleave"),u.dragLeave=g.leave.target=m.prev.element,u.prevDropzone=g.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(g.enter=new Kn(m,u,"dragenter"),u.dragEnter=m.cur.element,u.dropzone=m.cur.dropzone)),u.type==="dragend"&&m.cur.dropzone&&(g.drop=new Kn(m,u,"drop"),u.dropzone=m.cur.dropzone,u.relatedTarget=m.cur.element),u.type==="dragmove"&&m.cur.dropzone&&(g.move=new Kn(m,u,"dropmove"),u.dropzone=m.cur.dropzone)),g}function Bl(c,l){var u=c.dropState,m=u.activeDrops,g=u.cur,v=u.prev;l.leave&&v.dropzone.fire(l.leave),l.enter&&g.dropzone.fire(l.enter),l.move&&g.dropzone.fire(l.move),l.drop&&g.dropzone.fire(l.drop),l.deactivate&&Jd(m,l.deactivate),u.prev.dropzone=g.dropzone,u.prev.element=g.element}function tu(c,l){var u=c.interaction,m=c.iEvent,g=c.event;if(m.type==="dragmove"||m.type==="dragend"){var v=u.dropState;l.dynamicDrop&&(v.activeDrops=Nl(l,u.element));var b=m,y=eu(u,b,g);v.rejected=v.rejected&&!!y&&y.dropzone===v.cur.dropzone&&y.element===v.cur.element,v.cur.dropzone=y&&y.dropzone,v.cur.element=y&&y.element,v.events=Ll(u,0,b)}}var ru={id:"actions/drop",install:function(c){var l=c.actions,u=c.interactStatic,m=c.Interactable,g=c.defaults;c.usePlugin(yt),m.prototype.dropzone=function(v){return function(b,y){if($.object(y)){if(b.options.drop.enabled=y.enabled!==!1,y.listeners){var w=di(y.listeners),M=Object.keys(w).reduce(function(E,O){return E[/^(enter|leave)/.test(O)?"drag".concat(O):/^(activate|deactivate|move)/.test(O)?"drop".concat(O):O]=w[O],E},{}),_=b.options.drop.listeners;_&&b.off(_),b.on(M),b.options.drop.listeners=M}return $.func(y.ondrop)&&b.on("drop",y.ondrop),$.func(y.ondropactivate)&&b.on("dropactivate",y.ondropactivate),$.func(y.ondropdeactivate)&&b.on("dropdeactivate",y.ondropdeactivate),$.func(y.ondragenter)&&b.on("dragenter",y.ondragenter),$.func(y.ondragleave)&&b.on("dragleave",y.ondragleave),$.func(y.ondropmove)&&b.on("dropmove",y.ondropmove),/^(pointer|center)$/.test(y.overlap)?b.options.drop.overlap=y.overlap:$.number(y.overlap)&&(b.options.drop.overlap=Math.max(Math.min(1,y.overlap),0)),"accept"in y&&(b.options.drop.accept=y.accept),"checker"in y&&(b.options.drop.checker=y.checker),b}return $.bool(y)?(b.options.drop.enabled=y,b):b.options.drop}(this,v)},m.prototype.dropCheck=function(v,b,y,w,M,_){return function(E,O,D,V,N,G,K){var X=!1;if(!(K=K||E.getRect(G)))return!!E.options.drop.checker&&E.options.drop.checker(O,D,X,E,G,V,N);var pe=E.options.drop.overlap;if(pe==="pointer"){var Ce=ji(V,N,"drag"),re=Ud(O);re.x+=Ce.x,re.y+=Ce.y;var ve=re.x>K.left&&re.x<K.right,ao=re.y>K.top&&re.y<K.bottom;X=ve&&ao}var kt=V.getRect(N);if(kt&&pe==="center"){var Fo=kt.left+kt.width/2,ui=kt.top+kt.height/2;X=Fo>=K.left&&Fo<=K.right&&ui>=K.top&&ui<=K.bottom}return kt&&$.number(pe)&&(X=Math.max(0,Math.min(K.right,kt.right)-Math.max(K.left,kt.left))*Math.max(0,Math.min(K.bottom,kt.bottom)-Math.max(K.top,kt.top))/(kt.width*kt.height)>=pe),E.options.drop.checker&&(X=E.options.drop.checker(O,D,X,E,G,V,N)),X}(this,v,b,y,w,M,_)},u.dynamicDrop=function(v){return $.bool(v)?(c.dynamicDrop=v,u):c.dynamicDrop},U(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,g.actions.drop=ru.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var u=c.interaction,m=(c.event,c.iEvent);if(u.prepared.name==="drag"){var g=u.dropState;g.activeDrops=[],g.events={},g.activeDrops=Nl(l,u.element),g.events=Ll(u,0,m),g.events.activate&&(Jd(g.activeDrops,g.events.activate),l.fire("actions/drop:start",{interaction:u,dragEvent:m}))}},"interactions:action-move":tu,"interactions:after-action-move":function(c,l){var u=c.interaction,m=c.iEvent;if(u.prepared.name==="drag"){var g=u.dropState;Bl(u,g.events),l.fire("actions/drop:move",{interaction:u,dragEvent:m}),g.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var u=c.interaction,m=c.iEvent;tu(c,l),Bl(u,u.dropState.events),l.fire("actions/drop:end",{interaction:u,dragEvent:m})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:Nl,getDrop:eu,getDropEvents:Ll,fireDropEvents:Bl,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},E1=ru;function ql(c){var l=c.interaction,u=c.iEvent,m=c.phase;if(l.prepared.name==="gesture"){var g=l.pointers.map(function(M){return M.pointer}),v=m==="start",b=m==="end",y=l.interactable.options.deltaSource;if(u.touches=[g[0],g[1]],v)u.distance=Dl(g,y),u.box=Vl(g),u.scale=1,u.ds=0,u.angle=Fl(g,y),u.da=0,l.gesture.startDistance=u.distance,l.gesture.startAngle=u.angle;else if(b||l.pointers.length<2){var w=l.prevEvent;u.distance=w.distance,u.box=w.box,u.scale=w.scale,u.ds=0,u.angle=w.angle,u.da=0}else u.distance=Dl(g,y),u.box=Vl(g),u.scale=u.distance/l.gesture.startDistance,u.angle=Fl(g,y),u.ds=u.scale-l.gesture.scale,u.da=u.angle-l.gesture.angle;l.gesture.distance=u.distance,l.gesture.angle=u.angle,$.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(l.gesture.scale=u.scale)}}var Kl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.gesturable=function(g){return $.object(g)?(this.options.gesture.enabled=g.enabled!==!1,this.setPerAction("gesture",g),this.setOnEvents("gesture",g),this):$.bool(g)?(this.options.gesture.enabled=g,this):this.options.gesture},l.map.gesture=Kl,l.methodDict.gesture="gesturable",m.actions.gesture=Kl.defaults},listeners:{"interactions:action-start":ql,"interactions:action-move":ql,"interactions:action-end":ql,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},S1=Kl;function $1(c,l,u,m,g,v,b){if(!l)return!1;if(l===!0){var y=$.number(v.width)?v.width:v.right-v.left,w=$.number(v.height)?v.height:v.bottom-v.top;if(b=Math.min(b,Math.abs((c==="left"||c==="right"?y:w)/2)),y<0&&(c==="left"?c="right":c==="right"&&(c="left")),w<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var M=y>=0?v.left:v.right;return u.x<M+b}if(c==="top"){var _=w>=0?v.top:v.bottom;return u.y<_+b}if(c==="right")return u.x>(y>=0?v.right:v.left)-b;if(c==="bottom")return u.y>(w>=0?v.bottom:v.top)-b}return!!$.element(m)&&($.element(l)?l===m:fe(m,l,g))}function ou(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var m=l;u.interactable.options.resize.square?(u.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=u.resizeAxes,u.resizeAxes==="x"?m.delta.y=0:u.resizeAxes==="y"&&(m.delta.x=0))}}var Oi,yn,Hi={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,u=c.browser,m=c.Interactable,g=c.defaults;Hi.cursors=function(v){return v.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),Hi.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,m.prototype.resizable=function(v){return function(b,y,w){return $.object(y)?(b.options.resize.enabled=y.enabled!==!1,b.setPerAction("resize",y),b.setOnEvents("resize",y),$.string(y.axis)&&/^x$|^y$|^xy$/.test(y.axis)?b.options.resize.axis=y.axis:y.axis===null&&(b.options.resize.axis=w.defaults.actions.resize.axis),$.bool(y.preserveAspectRatio)?b.options.resize.preserveAspectRatio=y.preserveAspectRatio:$.bool(y.square)&&(b.options.resize.square=y.square),b):$.bool(y)?(b.options.resize.enabled=y,b):b.options.resize}(this,v,c)},l.map.resize=Hi,l.methodDict.resize="resizable",g.actions.resize=Hi.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.rect;m._rects={start:U({},v),corrected:U({},v),previous:U({},v),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},g.edges=m.prepared.edges,g.rect=m._rects.corrected,g.deltaRect=m._rects.delta}})(c),ou(c)},"interactions:action-move":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.interactable.options.resize.invert,b=v==="reposition"||v==="negate",y=m.rect,w=m._rects,M=w.start,_=w.corrected,E=w.delta,O=w.previous;if(U(O,_),b){if(U(_,y),v==="reposition"){if(_.top>_.bottom){var D=_.top;_.top=_.bottom,_.bottom=D}if(_.left>_.right){var V=_.left;_.left=_.right,_.right=V}}}else _.top=Math.min(y.top,M.bottom),_.bottom=Math.max(y.bottom,M.top),_.left=Math.min(y.left,M.right),_.right=Math.max(y.right,M.left);for(var N in _.width=_.right-_.left,_.height=_.bottom-_.top,_)E[N]=_[N]-O[N];g.edges=m.prepared.edges,g.rect=_,g.deltaRect=E}})(c),ou(c)},"interactions:action-end":function(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var m=l;m.edges=u.prepared.edges,m.rect=u._rects.corrected,m.deltaRect=u._rects.delta}},"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.element,g=c.rect,v=c.buttons;if(g){var b=U({},l.coords.cur.page),y=u.options.resize;if(y&&y.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||v&y.mouseButtons)){if($.object(y.edges)){var w={left:!1,right:!1,top:!1,bottom:!1};for(var M in w)w[M]=$1(M,y.edges[M],b,l._latestPointer.eventTarget,m,g,y.margin||Hi.defaultMargin);w.left=w.left&&!w.right,w.top=w.top&&!w.bottom,(w.left||w.right||w.top||w.bottom)&&(c.action={name:"resize",edges:w})}else{var _=y.axis!=="y"&&b.x>g.right-Hi.defaultMargin,E=y.axis!=="x"&&b.y>g.bottom-Hi.defaultMargin;(_||E)&&(c.action={name:"resize",axes:(_?"x":"")+(E?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var l=c.edges,u=c.axis,m=c.name,g=Hi.cursors,v=null;if(u)v=g[m+u];else if(l){for(var b="",y=0,w=["top","bottom","left","right"];y<w.length;y++){var M=w[y];l[M]&&(b+=M)}v=g[b]}return v},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},T1=Hi,A1={id:"actions",install:function(c){c.usePlugin(S1),c.usePlugin(T1),c.usePlugin(yt),c.usePlugin(E1)}},iu=0,rn={request:function(c){return Oi(c)},cancel:function(c){return yn(c)},init:function(c){if(Oi=c.requestAnimationFrame,yn=c.cancelAnimationFrame,!Oi)for(var l=["ms","moz","webkit","o"],u=0;u<l.length;u++){var m=l[u];Oi=c["".concat(m,"RequestAnimationFrame")],yn=c["".concat(m,"CancelAnimationFrame")]||c["".concat(m,"CancelRequestAnimationFrame")]}Oi=Oi&&Oi.bind(c),yn=yn&&yn.bind(c),Oi||(Oi=function(g){var v=Date.now(),b=Math.max(0,16-(v-iu)),y=c.setTimeout(function(){g(v+b)},b);return iu=v+b,y},yn=function(g){return clearTimeout(g)})}},oe={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){oe.isScrolling=!0,rn.cancel(oe.i),c.autoScroll=oe,oe.interaction=c,oe.prevTime=oe.now(),oe.i=rn.request(oe.scroll)},stop:function(){oe.isScrolling=!1,oe.interaction&&(oe.interaction.autoScroll=null),rn.cancel(oe.i)},scroll:function(){var c=oe.interaction,l=c.interactable,u=c.element,m=c.prepared.name,g=l.options[m].autoScroll,v=nu(g.container,l,u),b=oe.now(),y=(b-oe.prevTime)/1e3,w=g.speed*y;if(w>=1){var M={x:oe.x*w,y:oe.y*w};if(M.x||M.y){var _=au(v);$.window(v)?v.scrollBy(M.x,M.y):v&&(v.scrollLeft+=M.x,v.scrollTop+=M.y);var E=au(v),O={x:E.x-_.x,y:E.y-_.y};(O.x||O.y)&&l.fire({type:"autoscroll",target:u,interactable:l,delta:O,interaction:c,container:v})}oe.prevTime=b}oe.isScrolling&&(rn.cancel(oe.i),oe.i=rn.request(oe.scroll))},check:function(c,l){var u;return(u=c.options[l].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(c){var l=c.interaction,u=c.pointer;if(l.interacting()&&oe.check(l.interactable,l.prepared.name))if(l.simulation)oe.x=oe.y=0;else{var m,g,v,b,y=l.interactable,w=l.element,M=l.prepared.name,_=y.options[M].autoScroll,E=nu(_.container,y,w);if($.window(E))b=u.clientX<oe.margin,m=u.clientY<oe.margin,g=u.clientX>E.innerWidth-oe.margin,v=u.clientY>E.innerHeight-oe.margin;else{var O=Z(E);b=u.clientX<O.left+oe.margin,m=u.clientY<O.top+oe.margin,g=u.clientX>O.right-oe.margin,v=u.clientY>O.bottom-oe.margin}oe.x=g?1:b?-1:0,oe.y=v?1:m?-1:0,oe.isScrolling||(oe.margin=_.margin,oe.speed=_.speed,oe.start(l))}}};function nu(c,l,u){return($.string(c)?en(c,l,u):c)||H(u)}function au(c){return $.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var P1={id:"auto-scroll",install:function(c){var l=c.defaults,u=c.actions;c.autoScroll=oe,oe.now=function(){return c.now()},u.phaselessTypes.autoscroll=!0,l.perAction.autoScroll=oe.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,oe.stop(),oe.interaction&&(oe.interaction=null)},"interactions:stop":oe.stop,"interactions:action-move":function(c){return oe.onInteractionMove(c)}}},j1=P1;function ja(c,l){var u=!1;return function(){return u||(T.console.warn(l),u=!0),c.apply(this,arguments)}}function Wl(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function O1(c){return $.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function H1(c){return $.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var R1={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(u,m,g,v){var b=function(y,w,M,_,E){var O=y.getRect(_),D=w.buttons||{0:1,1:4,3:8,4:16}[w.button],V={action:null,interactable:y,interaction:M,element:_,rect:O,buttons:D};return E.fire("auto-start:check",V),V.action}(this,m,g,v,c);return this.options.actionChecker?this.options.actionChecker(u,m,b,this,v,g):b},l.prototype.ignoreFrom=ja(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=ja(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=H1,l.prototype.styleCursor=O1}};function su(c,l,u,m,g){return l.testIgnoreAllow(l.options[c.name],u,m)&&l.options[c.name].enabled&&zs(l,u,c,g)?c:null}function I1(c,l,u,m,g,v,b){for(var y=0,w=m.length;y<w;y++){var M=m[y],_=g[y],E=M.getAction(l,u,c,_);if(E){var O=su(E,M,_,v,b);if(O)return{action:O,interactable:M,element:_}}}return{action:null,interactable:null,element:null}}function lu(c,l,u,m,g){var v=[],b=[],y=m;function w(_){v.push(_),b.push(y)}for(;$.element(y);){v=[],b=[],g.interactables.forEachMatch(y,w);var M=I1(c,l,u,v,b,m,g);if(M.action&&!M.interactable.options[M.action.name].manualStart)return M;y=Go(y)}return{action:null,interactable:null,element:null}}function cu(c,l,u){var m=l.action,g=l.interactable,v=l.element;m=m||{name:null},c.interactable=g,c.element=v,Wl(c.prepared,m),c.rect=g&&m.name?g.getRect(v):null,uu(c,u),u.fire("autoStart:prepared",{interaction:c})}function zs(c,l,u,m){var g=c.options,v=g[u.name].max,b=g[u.name].maxPerElement,y=m.autoStart.maxInteractions,w=0,M=0,_=0;if(!(v&&b&&y))return!1;for(var E=0,O=m.interactions.list;E<O.length;E++){var D=O[E],V=D.prepared.name;if(D.interacting()&&(++w>=y||D.interactable===c&&((M+=V===u.name?1:0)>=v||D.element===l&&(_++,V===u.name&&_>=b))))return!1}return y>0}function du(c,l){return $.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function Ul(c,l,u){var m=u.autoStart.cursorElement;m&&m!==c&&(m.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,u.autoStart.cursorElement=l?c:null}function uu(c,l){var u=c.interactable,m=c.element,g=c.prepared;if(c.pointerType==="mouse"&&u&&u.options.styleCursor){var v="";if(g.name){var b=u.options[g.name].cursorChecker;v=$.func(b)?b(g,u,m,c._interacting):l.actions.map[g.name].getCursor(g)}Ul(c.element,v||"",l)}else l.autoStart.cursorElement&&Ul(l.autoStart.cursorElement,"",l)}var V1={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,u=c.defaults;c.usePlugin(R1),u.base.actionChecker=null,u.base.styleCursor=!0,U(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(m){return du(m,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:zs,cursorElement:null}},listeners:{"interactions:down":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;u.interacting()||cu(u,lu(u,m,g,v,l),l)},"interactions:move":function(c,l){(function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerType!=="mouse"||g.pointerIsDown||g.interacting()||cu(g,lu(g,v,b,y,m),m)})(c,l),function(u,m){var g=u.interaction;if(g.pointerIsDown&&!g.interacting()&&g.pointerWasMoved&&g.prepared.name){m.fire("autoStart:before-start",u);var v=g.interactable,b=g.prepared.name;b&&v&&(v.options[b].manualStart||!zs(v,g.element,g.prepared,m)?g.stop():(g.start(g.prepared,v,g.element),uu(g,m)))}}(c,l)},"interactions:stop":function(c,l){var u=c.interaction,m=u.interactable;m&&m.options.styleCursor&&Ul(u.element,"",l)}},maxInteractions:du,withinInteractionLimit:zs,validateAction:su},Gl=V1,D1={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var u=c.interaction,m=c.eventTarget,g=c.dx,v=c.dy;if(u.prepared.name==="drag"){var b=Math.abs(g),y=Math.abs(v),w=u.interactable.options.drag,M=w.startAxis,_=b>y?"x":b<y?"y":"xy";if(u.prepared.axis=w.lockAxis==="start"?_[0]:w.lockAxis,_!=="xy"&&M!=="xy"&&M!==_){u.prepared.name=null;for(var E=m,O=function(V){if(V!==u.interactable){var N=u.interactable.options.drag;if(!N.manualStart&&V.testIgnoreAllow(N,E,m)){var G=V.getAction(u.downPointer,u.downEvent,u,E);if(G&&G.name==="drag"&&function(K,X){if(!X)return!1;var pe=X.options.drag.startAxis;return K==="xy"||pe==="xy"||pe===K}(_,V)&&Gl.validateAction(G,V,E,m,l))return V}}};$.element(E);){var D=l.interactables.forEachMatch(E,O);if(D){u.prepared.name="drag",u.interactable=D,u.element=E;break}E=Go(E)}}}}}};function Yl(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var u=c.interactable.options;return u[l].hold||u[l].delay}var F1={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(Gl),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,u=Yl(l);u>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},u))},"interactions:move":function(c){var l=c.interaction,u=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!u&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Yl(l)>0&&(l.prepared.name=null)}},getHoldDuration:Yl},N1=F1,L1={id:"auto-start",install:function(c){c.usePlugin(Gl),c.usePlugin(N1),c.usePlugin(D1)}},B1=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):$.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function q1(c){var l=c.interaction,u=c.event;l.interactable&&l.interactable.checkAndPreventDefault(u)}var hu={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=B1,l.prototype.checkAndPreventDefault=function(u){return function(m,g,v){var b=m.options.preventDefault;if(b!=="never")if(b!=="always"){if(g.events.supportsPassive&&/^touch(start|move)$/.test(v.type)){var y=H(v.target).document,w=g.getDocOptions(y);if(!w||!w.events||w.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(v.type)||$.element(v.target)&&zi(v.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||v.preventDefault()}else v.preventDefault()}(this,c,u)},c.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var m=0,g=c.interactions.list;m<g.length;m++){var v=g[m];if(v.element&&(v.element===u.target||si(v.element,u.target)))return void v.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(c,l){return c["interactions:".concat(l)]=q1,c},{})};function Es(c,l){if(l.phaselessTypes[c])return!0;for(var u in l.map)if(c.indexOf(u)===0&&c.substr(u.length)in l.phases)return!0;return!1}function Wn(c){var l={};for(var u in c){var m=c[u];$.plainObject(m)?l[u]=Wn(m):$.array(m)?l[u]=Qd(m):l[u]=m}return l}var Xl=function(){function c(l){t(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=l,this.result=Ss(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return n(c,[{key:"start",value:function(l,u){var m,g,v=l.phase,b=this.interaction,y=function(M){var _=M.interactable.options[M.prepared.name],E=_.modifiers;return E&&E.length?E:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(O){var D=_[O];return D&&D.enabled&&{options:D,methods:D._methods}}).filter(function(O){return!!O})}(b);this.prepareStates(y),this.startEdges=U({},b.edges),this.edges=U({},this.startEdges),this.startOffset=(m=b.rect,g=u,m?{left:g.x-m.left,top:g.y-m.top,right:m.right-g.x,bottom:m.bottom-g.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var w=this.fillArg({phase:v,pageCoords:u,preEnd:!1});return this.result=Ss(),this.startAll(w),this.result=this.setAll(w)}},{key:"fillArg",value:function(l){var u=this.interaction;return l.interaction=u,l.interactable=u.interactable,l.element=u.element,l.rect||(l.rect=u.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var u=0,m=this.states;u<m.length;u++){var g=m[u];g.methods.start&&(l.state=g,g.methods.start(l))}}},{key:"setAll",value:function(l){var u=l.phase,m=l.preEnd,g=l.skipModifiers,v=l.rect,b=l.edges;l.coords=U({},l.pageCoords),l.rect=U({},v),l.edges=U({},b);for(var y=g?this.states.slice(g):this.states,w=Ss(l.coords,l.rect),M=0;M<y.length;M++){var _,E=y[M],O=E.options,D=U({},l.coords),V=null;(_=E.methods)!=null&&_.set&&this.shouldDo(O,m,u)&&(l.state=E,V=E.methods.set(l),tn(l.edges,l.rect,{x:l.coords.x-D.x,y:l.coords.y-D.y})),w.eventProps.push(V)}U(this.edges,l.edges),w.delta.x=l.coords.x-l.pageCoords.x,w.delta.y=l.coords.y-l.pageCoords.y,w.rectDelta.left=l.rect.left-v.left,w.rectDelta.right=l.rect.right-v.right,w.rectDelta.top=l.rect.top-v.top,w.rectDelta.bottom=l.rect.bottom-v.bottom;var N=this.result.coords,G=this.result.rect;if(N&&G){var K=w.rect.left!==G.left||w.rect.right!==G.right||w.rect.top!==G.top||w.rect.bottom!==G.bottom;w.changed=K||N.x!==w.coords.x||N.y!==w.coords.y}return w}},{key:"applyToInteraction",value:function(l){var u=this.interaction,m=l.phase,g=u.coords.cur,v=u.coords.start,b=this.result,y=this.startDelta,w=b.delta;m==="start"&&U(this.startDelta,b.delta);for(var M=0,_=[[v,y],[g,w]];M<_.length;M++){var E=_[M],O=E[0],D=E[1];O.page.x+=D.x,O.page.y+=D.y,O.client.x+=D.x,O.client.y+=D.y}var V=this.result.rectDelta,N=l.rect||u.rect;N.left+=V.left,N.right+=V.right,N.top+=V.top,N.bottom+=V.bottom,N.width=N.right-N.left,N.height=N.bottom-N.top}},{key:"setAndApply",value:function(l){var u=this.interaction,m=l.phase,g=l.preEnd,v=l.skipModifiers,b=this.setAll(this.fillArg({preEnd:g,phase:m,pageCoords:l.modifiedCoords||u.coords.cur.page}));if(this.result=b,!b.changed&&(!v||v<this.states.length)&&u.interacting())return!1;if(l.modifiedCoords){var y=u.coords.cur.page,w={x:l.modifiedCoords.x-y.x,y:l.modifiedCoords.y-y.y};b.coords.x+=w.x,b.coords.y+=w.y,b.delta.x+=w.x,b.delta.y+=w.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var u=l.interaction,m=l.event,g=this.states;if(g&&g.length){for(var v=!1,b=0;b<g.length;b++){var y=g[b];l.state=y;var w=y.options,M=y.methods,_=M.beforeEnd&&M.beforeEnd(l);if(_)return this.endResult=_,!1;v=v||!v&&this.shouldDo(w,!0,l.phase,!0)}v&&u.move({event:m,preEnd:!0})}}},{key:"stop",value:function(l){var u=l.interaction;if(this.states&&this.states.length){var m=U({states:this.states,interactable:u.interactable,element:u.element,rect:null},l);this.fillArg(m);for(var g=0,v=this.states;g<v.length;g++){var b=v[g];m.state=b,b.methods.stop&&b.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var u=0;u<l.length;u++){var m=l[u],g=m.options,v=m.methods,b=m.name;this.states.push({options:g,methods:v,index:u,name:b})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var u=l.interaction,m=u.coords,g=u.rect,v=u.modification;if(v.result){for(var b=v.startDelta,y=v.result,w=y.delta,M=y.rectDelta,_=0,E=[[m.start,b],[m.cur,w]];_<E.length;_++){var O=E[_],D=O[0],V=O[1];D.page.x-=V.x,D.page.y-=V.y,D.client.x-=V.x,D.client.y-=V.y}g.left-=M.left,g.right-=M.right,g.top-=M.top,g.bottom-=M.bottom}}},{key:"shouldDo",value:function(l,u,m,g){return!(!l||l.enabled===!1||g&&!l.endOnly||l.endOnly&&!u||m==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(u){return Wn(u)}),this.result=Ss(U({},l.result.coords),U({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function Ss(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function on(c,l){var u=c.defaults,m={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},g=function(v){var b=v||{};for(var y in b.enabled=b.enabled!==!1,u)y in b||(b[y]=u[y]);var w={options:b,methods:m,name:l,enable:function(){return b.enabled=!0,w},disable:function(){return b.enabled=!1,w}};return w};return l&&typeof l=="string"&&(g._defaults=u,g._methods=m),g}function Oa(c){var l=c.iEvent,u=c.interaction.modification.result;u&&(l.modifiers=u.eventProps)}var K1={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new Xl(l)},"interactions:before-action-start":function(c){var l=c.interaction,u=c.interaction.modification;u.start(c,l.coords.start.page),l.edges=u.edges,u.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,u=l.modification,m=u.setAndApply(c);return l.edges=u.edges,m},"interactions:before-action-end":function(c){var l=c.interaction,u=l.modification,m=u.beforeEnd(c);return l.edges=u.startEdges,m},"interactions:action-start":Oa,"interactions:action-move":Oa,"interactions:action-end":Oa,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},pu=K1,mu={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Zl=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w,M){var _;t(this,u),(_=l.call(this,m)).relatedTarget=null,_.screenX=void 0,_.screenY=void 0,_.button=void 0,_.buttons=void 0,_.ctrlKey=void 0,_.shiftKey=void 0,_.altKey=void 0,_.metaKey=void 0,_.page=void 0,_.client=void 0,_.delta=void 0,_.rect=void 0,_.x0=void 0,_.y0=void 0,_.t0=void 0,_.dt=void 0,_.duration=void 0,_.clientX0=void 0,_.clientY0=void 0,_.velocity=void 0,_.speed=void 0,_.swipe=void 0,_.axes=void 0,_.preEnd=void 0,y=y||m.element;var E=m.interactable,O=(E&&E.options||mu).deltaSource,D=ji(E,y,v),V=b==="start",N=b==="end",G=V?f(_):m.prevEvent,K=V?m.coords.start:N?{page:G.page,client:G.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return _.page=U({},K.page),_.client=U({},K.client),_.rect=U({},m.rect),_.timeStamp=K.timeStamp,N||(_.page.x-=D.x,_.page.y-=D.y,_.client.x-=D.x,_.client.y-=D.y),_.ctrlKey=g.ctrlKey,_.altKey=g.altKey,_.shiftKey=g.shiftKey,_.metaKey=g.metaKey,_.button=g.button,_.buttons=g.buttons,_.target=y,_.currentTarget=y,_.preEnd=w,_.type=M||v+(b||""),_.interactable=E,_.t0=V?m.pointers[m.pointers.length-1].downTime:G.t0,_.x0=m.coords.start.page.x-D.x,_.y0=m.coords.start.page.y-D.y,_.clientX0=m.coords.start.client.x-D.x,_.clientY0=m.coords.start.client.y-D.y,_.delta=V||N?{x:0,y:0}:{x:_[O].x-G[O].x,y:_[O].y-G[O].y},_.dt=m.coords.delta.timeStamp,_.duration=_.timeStamp-_.t0,_.velocity=U({},m.coords.velocity[O]),_.speed=$a(_.velocity.x,_.velocity.y),_.swipe=N||b==="inertiastart"?_.getSwipe():null,_}return n(u,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var g=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var v=112.5<=g&&g<247.5,b=202.5<=g&&g<337.5;return{up:b,down:!b&&22.5<=g&&g<157.5,left:v,right:!v&&(292.5<=g||g<67.5),angle:g,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(Cs);Object.defineProperties(Zl.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var W1=n(function c(l,u,m,g,v){t(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=l,this.pointer=u,this.event=m,this.downTime=g,this.downTarget=v}),U1=function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c}({}),gu=function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c}({}),G1=0,Y1=function(){function c(l){var u=this,m=l.pointerType,g=l.scopeFire;t(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ja(function(_){this.move(_)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=G1++,this._scopeFire=g,this.pointerType=m;var v=this;this._proxy={};var b=function(_){Object.defineProperty(u._proxy,_,{get:function(){return v[_]}})};for(var y in U1)b(y);var w=function(_){Object.defineProperty(u._proxy,_,{value:function(){return v[_].apply(v,arguments)}})};for(var M in gu)w(M);this._scopeFire("interactions:new",{interaction:this})}return n(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,u,m){var g=this.updatePointer(l,u,m,!0),v=this.pointers[g];this._scopeFire("interactions:down",{pointer:l,event:u,eventTarget:m,pointerIndex:g,pointerInfo:v,type:"down",interaction:this})}},{key:"start",value:function(l,u,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!u.options[l.name].enabled)&&(Wl(this.prepared,l),this.interactable=u,this.element=m,this.rect=u.getRect(m),this.edges=this.prepared.edges?U({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(l,u,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,u,m,!1);var g,v,b=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(g=this.coords.cur.client.x-this.coords.start.client.x,v=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=$a(g,v)>this.pointerMoveTolerance);var y,w,M,_=this.getPointerIndex(l),E={pointer:l,pointerIndex:_,pointerInfo:this.pointers[_],event:u,type:"move",eventTarget:m,dx:g,dy:v,duplicate:b,interaction:this};b||(y=this.coords.velocity,w=this.coords.delta,M=Math.max(w.timeStamp/1e3,.001),y.page.x=w.page.x/M,y.page.y=w.page.y/M,y.client.x=w.client.x/M,y.client.y=w.client.y/M,y.timeStamp=M),this._scopeFire("interactions:move",E),b||this.simulation||(this.interacting()&&(E.type=null,this.move(E)),this.pointerWasMoved&&_s(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||Kd(this.coords.delta),(l=U({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,u,m,g){var v=this.getPointerIndex(l);v===-1&&(v=this.updatePointer(l,u,m,!1));var b=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(b),{pointer:l,pointerIndex:v,pointerInfo:this.pointers[v],event:u,eventTarget:m,type:b,curEventTarget:g,interaction:this}),this.simulation||this.end(u),this.removePointer(l,u)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var u;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:l,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(l){var u=Ta(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Aa(this.pointers,function(m){return m.id===u})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,u,m,g){var v,b,y,w=Ta(l),M=this.getPointerIndex(l),_=this.pointers[M];return g=g!==!1&&(g||/(down|start)$/i.test(u.type)),_?_.pointer=l:(_=new W1(w,l,u,null,null),M=this.pointers.length,this.pointers.push(_)),z1(this.coords.cur,this.pointers.map(function(E){return E.pointer}),this._now()),v=this.coords.delta,b=this.coords.prev,y=this.coords.cur,v.page.x=y.page.x-b.page.x,v.page.y=y.page.y-b.page.y,v.client.x=y.client.x-b.client.x,v.client.y=y.client.y-b.client.y,v.timeStamp=y.timeStamp-b.timeStamp,g&&(this.pointerIsDown=!0,_.downTime=this.coords.cur.timeStamp,_.downTarget=m,ws(this.downPointer,l),this.interacting()||(_s(this.coords.start,this.coords.cur),_s(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(l,u,m),this._scopeFire("interactions:update-pointer",{pointer:l,event:u,eventTarget:m,down:g,pointerInfo:_,pointerIndex:M,interaction:this}),M}},{key:"removePointer",value:function(l,u){var m=this.getPointerIndex(l);if(m!==-1){var g=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:l,event:u,eventTarget:null,pointerIndex:m,pointerInfo:g,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,u,m){this._latestPointer.pointer=l,this._latestPointer.event=u,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,u,m,g){return new Zl(this,l,this.prepared.name,u,this.element,m,g)}},{key:"_fireEvent",value:function(l){var u;(u=this.interactable)==null||u.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var u=l.event,m=l.phase,g=l.preEnd,v=l.type,b=this.rect;if(b&&m==="move"&&(tn(this.edges,b,this.coords.delta[this.interactable.options.deltaSource]),b.width=b.right-b.left,b.height=b.bottom-b.top),this._scopeFire("interactions:before-action-".concat(m),l)===!1)return!1;var y=l.iEvent=this._createPreparedEvent(u,m,g,v);return this._scopeFire("interactions:action-".concat(m),l),m==="start"&&(this.prevEvent=y),this._fireEvent(y),this._scopeFire("interactions:after-action-".concat(m),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function fu(c){vu(c.interaction)}function vu(c){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(c))return!1;var l=c.offset.pending;return Ql(c.coords.cur,l),Ql(c.coords.delta,l),tn(c.edges,c.rect,l),l.x=0,l.y=0,!0}function X1(c){var l=c.x,u=c.y;this.offset.pending.x+=l,this.offset.pending.y+=u,this.offset.total.x+=l,this.offset.total.y+=u}function Ql(c,l){var u=c.page,m=c.client,g=l.x,v=l.y;u.x+=g,u.y+=v,m.x+=g,m.y+=v}gu.offsetBy="";var Z1={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=X1},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return function(l){l.pointerIsDown&&(Ql(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":fu,"interactions:before-action-move":fu,"interactions:before-action-end":function(c){var l=c.interaction;if(vu(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},bu=Z1,Q1=function(){function c(l){t(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=l}return n(c,[{key:"start",value:function(l){var u=this.interaction,m=$s(u);if(!m||!m.enabled)return!1;var g=u.coords.velocity.client,v=$a(g.x,g.y),b=this.modification||(this.modification=new Xl(u));if(b.copyFrom(u.modification),this.t0=u._now(),this.allowResume=m.allowResume,this.v0=v,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=b.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&v>m.minSpeed&&v>m.endSpeed)this.startInertia();else{if(b.result=b.setAll(this.modifierArg),!b.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:l,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var l=this,u=this.interaction.coords.velocity.client,m=$s(this.interaction),g=m.resistance,v=-Math.log(m.endSpeed/this.v0)/g;this.targetOffset={x:(u.x-v)/g,y:(u.y-v)/g},this.te=v,this.lambda_v0=g/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var b=this.modification,y=this.modifierArg;y.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},b.result=b.setAll(y),b.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+b.result.delta.x,y:this.targetOffset.y+b.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var u=this;this.timeout=rn.request(function(){u.active&&l()})}},{key:"inertiaTick",value:function(){var l,u,m,g,v,b,y,w=this,M=this.interaction,_=$s(M).resistance,E=(M._now()-this.t0)/1e3;if(E<this.te){var O,D=1-(Math.exp(-_*E)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,u=0,m=this.targetOffset.x,g=this.targetOffset.y,v=this.modifiedOffset.x,b=this.modifiedOffset.y,O={x:yu(y=D,l,m,v),y:yu(y,u,g,b)}):O={x:this.targetOffset.x*D,y:this.targetOffset.y*D};var V={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=V.x,this.currentOffset.y+=V.y,M.offsetBy(V),M.move(),this.onNextFrame(function(){return w.inertiaTick()})}else M.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var l=this,u=this.interaction,m=u._now()-this.t0,g=$s(u).smoothEndDuration;if(m<g){var v={x:ku(m,0,this.targetOffset.x,g),y:ku(m,0,this.targetOffset.y,g)},b={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=b.x,this.currentOffset.y+=b.y,u.offsetBy(b),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var u=l.pointer,m=l.event,g=l.eventTarget,v=this.interaction;v.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),v.updatePointer(u,m,g,!0),v._doPhase({interaction:v,event:m,phase:"resume"}),_s(v.coords.prev,v.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,rn.cancel(this.timeout)}}]),c}();function $s(c){var l=c.interactable,u=c.prepared;return l&&l.options&&u.name&&l.options[u.name].inertia}var J1={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(bu),c.usePlugin(pu),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new Q1(l)},"interactions:before-action-end":function(c){var l=c.interaction,u=c.event;return(!l._interacting||l.simulation||!l.inertia.start(u))&&null},"interactions:down":function(c){var l=c.interaction,u=c.eventTarget,m=l.inertia;if(m.active)for(var g=u;$.element(g);){if(g===l.element){m.resume(c);break}g=Go(g)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":Oa,"interactions:action-inertiastart":Oa,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function yu(c,l,u,m){var g=1-c;return g*g*l+2*g*c*u+c*c*m}function ku(c,l,u,m){return-u*(c/=m)*(c-2)+l}var e0=J1;function xu(c,l){for(var u=0;u<l.length;u++){var m=l[u];if(c.immediatePropagationStopped)break;m(c)}}var wu=function(){function c(l){t(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=U({},l||{})}return n(c,[{key:"fire",value:function(l){var u,m=this.global;(u=this.types[l.type])&&xu(l,u),!l.propagationStopped&&m&&(u=m[l.type])&&xu(l,u)}},{key:"on",value:function(l,u){var m=di(l,u);for(l in m)this.types[l]=Zd(this.types[l]||[],m[l])}},{key:"off",value:function(l,u){var m=di(l,u);for(l in m){var g=this.types[l];if(g&&g.length)for(var v=0,b=m[l];v<b.length;v++){var y=b[v],w=g.indexOf(y);w!==-1&&g.splice(w,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),t0=function(){function c(l){t(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,ws(this,l)}return n(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c}();function Ha(c){return $.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function Ts(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var r0={id:"events",install:function(c){var l,u=[],m={},g=[],v={add:b,remove:y,addDelegate:function(_,E,O,D,V){var N=Ha(V);if(!m[O]){m[O]=[];for(var G=0;G<g.length;G++){var K=g[G];b(K,O,w),b(K,O,M,!0)}}var X=m[O],pe=Pa(X,function(Ce){return Ce.selector===_&&Ce.context===E});pe||(pe={selector:_,context:E,listeners:[]},X.push(pe)),pe.listeners.push({func:D,options:N})},removeDelegate:function(_,E,O,D,V){var N,G=Ha(V),K=m[O],X=!1;if(K)for(N=K.length-1;N>=0;N--){var pe=K[N];if(pe.selector===_&&pe.context===E){for(var Ce=pe.listeners,re=Ce.length-1;re>=0;re--){var ve=Ce[re];if(ve.func===D&&Ts(ve.options,G)){Ce.splice(re,1),Ce.length||(K.splice(N,1),y(E,O,w),y(E,O,M,!0)),X=!0;break}}if(X)break}}},delegateListener:w,delegateUseCapture:M,delegatedEvents:m,documents:g,targets:u,supportsOptions:!1,supportsPassive:!1};function b(_,E,O,D){if(_.addEventListener){var V=Ha(D),N=Pa(u,function(G){return G.eventTarget===_});N||(N={eventTarget:_,events:{}},u.push(N)),N.events[E]||(N.events[E]=[]),Pa(N.events[E],function(G){return G.func===O&&Ts(G.options,V)})||(_.addEventListener(E,O,v.supportsOptions?V:V.capture),N.events[E].push({func:O,options:V}))}}function y(_,E,O,D){if(_.addEventListener&&_.removeEventListener){var V=Aa(u,function(ao){return ao.eventTarget===_}),N=u[V];if(N&&N.events)if(E!=="all"){var G=!1,K=N.events[E];if(K){if(O==="all"){for(var X=K.length-1;X>=0;X--){var pe=K[X];y(_,E,pe.func,pe.options)}return}for(var Ce=Ha(D),re=0;re<K.length;re++){var ve=K[re];if(ve.func===O&&Ts(ve.options,Ce)){_.removeEventListener(E,O,v.supportsOptions?Ce:Ce.capture),K.splice(re,1),K.length===0&&(delete N.events[E],G=!0);break}}}G&&!Object.keys(N.events).length&&u.splice(V,1)}else for(E in N.events)N.events.hasOwnProperty(E)&&y(_,E,"all")}}function w(_,E){for(var O=Ha(E),D=new t0(_),V=m[_.type],N=Xd(_)[0],G=N;$.element(G);){for(var K=0;K<V.length;K++){var X=V[K],pe=X.selector,Ce=X.context;if(zi(G,pe)&&si(Ce,N)&&si(Ce,G)){var re=X.listeners;D.currentTarget=G;for(var ve=0;ve<re.length;ve++){var ao=re[ve];Ts(ao.options,O)&&ao.func(D)}}}G=Go(G)}}function M(_){return w(_,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return v.supportsOptions=!0},get passive(){return v.supportsPassive=!0}}),c.events=v,v}},Jl={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,u=Jl.methodOrder;l<u.length;l++){var m=u[l],g=Jl[m](c);if(g)return g}return null},simulationResume:function(c){var l=c.pointerType,u=c.eventType,m=c.eventTarget,g=c.scope;if(!/down|start/i.test(u))return null;for(var v=0,b=g.interactions.list;v<b.length;v++){var y=b[v],w=m;if(y.simulation&&y.simulation.allowResume&&y.pointerType===l)for(;w;){if(w===y.element)return y;w=Go(w)}}return null},mouseOrPen:function(c){var l,u=c.pointerId,m=c.pointerType,g=c.eventType,v=c.scope;if(m!=="mouse"&&m!=="pen")return null;for(var b=0,y=v.interactions.list;b<y.length;b++){var w=y[b];if(w.pointerType===m){if(w.simulation&&!_u(w,u))continue;if(w.interacting())return w;l||(l=w)}}if(l)return l;for(var M=0,_=v.interactions.list;M<_.length;M++){var E=_[M];if(!(E.pointerType!==m||/down/i.test(g)&&E.simulation))return E}return null},hasPointer:function(c){for(var l=c.pointerId,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(_u(g,l))return g}return null},idle:function(c){for(var l=c.pointerType,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(g.pointers.length===1){var v=g.interactable;if(v&&(!v.options.gesture||!v.options.gesture.enabled))continue}else if(g.pointers.length>=2)continue;if(!g.interacting()&&l===g.pointerType)return g}return null}};function _u(c,l){return c.pointers.some(function(u){return u.id===l})}var o0=Jl,ec=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Mu(c,l){return function(u){var m=l.interactions.list,g=Yd(u),v=Xd(u),b=v[0],y=v[1],w=[];if(/^touch/.test(u.type)){l.prevTouchTime=l.now();for(var M=0,_=u.changedTouches;M<_.length;M++){var E=_[M],O={pointer:E,pointerId:Ta(E),pointerType:g,eventType:u.type,eventTarget:b,curEventTarget:y,scope:l},D=Cu(O);w.push([O.pointer,O.eventTarget,O.curEventTarget,D])}}else{var V=!1;if(!io.supportsPointerEvent&&/mouse/.test(u.type)){for(var N=0;N<m.length&&!V;N++)V=m[N].pointerType!=="mouse"&&m[N].pointerIsDown;V=V||l.now()-l.prevTouchTime<500||u.timeStamp===0}if(!V){var G={pointer:u,pointerId:Ta(u),pointerType:g,eventType:u.type,curEventTarget:y,eventTarget:b,scope:l},K=Cu(G);w.push([G.pointer,G.eventTarget,G.curEventTarget,K])}}for(var X=0;X<w.length;X++){var pe=w[X],Ce=pe[0],re=pe[1],ve=pe[2];pe[3][c](Ce,u,re,ve)}}}function Cu(c){var l=c.pointerType,u=c.scope,m={interaction:o0.search(c),searchDetails:c};return u.fire("interactions:find",m),m.interaction||u.interactions.new({pointerType:l})}function tc(c,l){var u=c.doc,m=c.scope,g=c.options,v=m.interactions.docEvents,b=m.events,y=b[l];for(var w in m.browser.isIOS&&!g.events&&(g.events={passive:!1}),b.delegatedEvents)y(u,w,b.delegateListener),y(u,w,b.delegateUseCapture,!0);for(var M=g&&g.events,_=0;_<v.length;_++){var E=v[_];y(u,E.type,E.listener,M)}}var i0={id:"core/interactions",install:function(c){for(var l={},u=0;u<ec.length;u++){var m=ec[u];l[m]=Mu(m,c)}var g,v=io.pEventTypes;function b(){for(var y=0,w=c.interactions.list;y<w.length;y++){var M=w[y];if(M.pointerIsDown&&M.pointerType==="touch"&&!M._interacting)for(var _=function(){var D=O[E];c.documents.some(function(V){return si(V.doc,D.downTarget)})||M.removePointer(D.pointer,D.event)},E=0,O=M.pointers;E<O.length;E++)_()}}(g=tt.PointerEvent?[{type:v.down,listener:b},{type:v.down,listener:l.pointerDown},{type:v.move,listener:l.pointerMove},{type:v.up,listener:l.pointerUp},{type:v.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:b},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.pointerUp}]).push({type:"blur",listener:function(y){for(var w=0,M=c.interactions.list;w<M.length;w++)M[w].documentBlur(y)}}),c.prevTouchTime=0,c.Interaction=function(y){d(M,y);var w=x(M);function M(){return t(this,M),w.apply(this,arguments)}return n(M,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(_){c.interactions.pointerMoveTolerance=_}},{key:"_now",value:function(){return c.now()}}]),M}(Y1),c.interactions={list:[],new:function(y){y.scopeFire=function(M,_){return c.fire(M,_)};var w=new c.Interaction(y);return c.interactions.list.push(w),w},listeners:l,docEvents:g,pointerMoveTolerance:1},c.usePlugin(hu)},listeners:{"scope:add-document":function(c){return tc(c,"add")},"scope:remove-document":function(c){return tc(c,"remove")},"interactable:unset":function(c,l){for(var u=c.interactable,m=l.interactions.list.length-1;m>=0;m--){var g=l.interactions.list[m];g.interactable===u&&(g.stop(),l.fire("interactions:destroy",{interaction:g}),g.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(m,1))}}},onDocSignal:tc,doOnInteractions:Mu,methodNames:ec},n0=i0,nn=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(nn||{}),a0=function(){function c(l,u,m,g){t(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new wu,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=l,this._context=u.context||m,this._win=H(wo(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=g,this.set(u)}return n(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,u){return $.func(u.onstart)&&this.on("".concat(l,"start"),u.onstart),$.func(u.onmove)&&this.on("".concat(l,"move"),u.onmove),$.func(u.onend)&&this.on("".concat(l,"end"),u.onend),$.func(u.oninertiastart)&&this.on("".concat(l,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,u,m){var g,v=this,b=(g=this._actions.map[l])==null?void 0:g.filterEventType,y=function(w){return(b==null||b(w))&&Es(w,v._actions)};($.array(u)||$.object(u))&&this._onOff(nn.Off,l,u,void 0,y),($.array(m)||$.object(m))&&this._onOff(nn.On,l,m,void 0,y)}},{key:"setPerAction",value:function(l,u){var m=this._defaults;for(var g in u){var v=g,b=this.options[l],y=u[v];v==="listeners"&&this.updatePerActionListeners(l,b.listeners,y),$.array(y)?b[v]=Qd(y):$.plainObject(y)?(b[v]=U(b[v]||{},Wn(y)),$.object(m.perAction[v])&&"enabled"in m.perAction[v]&&(b[v].enabled=y.enabled!==!1)):$.bool(y)&&$.object(m.perAction[v])?b[v].enabled=y:b[v]=y}}},{key:"getRect",value:function(l){return l=l||($.element(this.target)?this.target:null),$.string(this.target)&&(l=l||this._context.querySelector(this.target)),Ae(l)}},{key:"rectChecker",value:function(l){var u=this;return $.func(l)?(this.getRect=function(m){var g=U({},l.apply(u,m));return"width"in g||(g.width=g.right-g.left,g.height=g.bottom-g.top),g},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,u){if(wo(u)||$.object(u)){for(var m in this.options[l]=u,this._actions.map)this.options[m][l]=u;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return $.string(l)?Array.from(this._context.querySelectorAll(l)):$.func(l)&&l.getAllElements?l.getAllElements():$.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||si(this._context,l)}},{key:"testIgnoreAllow",value:function(l,u,m){return!this.testIgnore(l.ignoreFrom,u,m)&&this.testAllow(l.allowFrom,u,m)}},{key:"testAllow",value:function(l,u,m){return!l||!!$.element(m)&&($.string(l)?fe(m,l,u):!!$.element(l)&&si(l,m))}},{key:"testIgnore",value:function(l,u,m){return!(!l||!$.element(m))&&($.string(l)?fe(m,l,u):!!$.element(l)&&si(l,m))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,u,m,g,v){$.object(u)&&!$.array(u)&&(g=m,m=null);var b=di(u,m,v);for(var y in b){y==="wheel"&&(y=io.wheelEvent);for(var w=0,M=b[y];w<M.length;w++){var _=M[w];Es(y,this._actions)?this.events[l===nn.On?"on":"off"](y,_):$.string(this.target)?this._scopeEvents[l===nn.On?"addDelegate":"removeDelegate"](this.target,this._context,y,_,g):this._scopeEvents[l===nn.On?"add":"remove"](this.target,y,_,g)}}return this}},{key:"on",value:function(l,u,m){return this._onOff(nn.On,l,u,m)}},{key:"off",value:function(l,u,m){return this._onOff(nn.Off,l,u,m)}},{key:"set",value:function(l){var u=this._defaults;for(var m in $.object(l)||(l={}),this.options=Wn(u.base),this._actions.methodDict){var g=m,v=this._actions.methodDict[g];this.options[g]={},this.setPerAction(g,U(U({},u.perAction),u.actions[g])),this[v](l[g])}for(var b in l)b!=="getRect"?$.func(this[b])&&this[b](l[b]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if($.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[l],m=u.length-1;m>=0;m--){var g=u[m],v=g.selector,b=g.context,y=g.listeners;v===this.target&&b===this._context&&u.splice(m,1);for(var w=y.length-1;w>=0;w--)this._scopeEvents.removeDelegate(this.target,this._context,l,y[w][0],y[w][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),s0=function(){function c(l){var u=this;t(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(m){var g=m.interactable,v=g.target,b=$.string(v)?u.selectorMap[v]:v[u.scope.id],y=Aa(b,function(w){return w===g});b.splice(y,1)}})}return n(c,[{key:"new",value:function(l,u){u=U(u||{},{actions:this.scope.actions});var m=new this.scope.Interactable(l,u,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),$.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(m)):(m.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:l,options:u,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(l,u){var m=u&&u.context||this.scope.document,g=$.string(l),v=g?this.selectorMap[l]:l[this.scope.id];if(v)return Pa(v,function(b){return b._context===m&&(g||b.inContext(l))})}},{key:"forEachMatch",value:function(l,u){for(var m=0,g=this.list;m<g.length;m++){var v=g[m],b=void 0;if(($.string(v.target)?$.element(l)&&zi(l,v.target):l===v.target)&&v.inContext(l)&&(b=u(v)),b!==void 0)return b}}}]),c}(),l0=function(){function c(){var l=this;t(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=io,this.defaults=Wn(mu),this.Eventable=wu,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var g=function v(b,y){var w=m.interactables.getExisting(b,y);return w||((w=m.interactables.new(b,y)).events.global=v.globalEvents),w};return g.getPointerAverage=Gd,g.getTouchBBox=Vl,g.getTouchDistance=Dl,g.getTouchAngle=Fl,g.getElementRect=Ae,g.getElementClientRect=Z,g.matchesSelector=zi,g.closest=Bn,g.globalEvents={},g.version="1.10.27",g.scope=m,g.use=function(v,b){return this.scope.usePlugin(v,b),this},g.isSet=function(v,b){return!!this.scope.interactables.get(v,b&&b.context)},g.on=ja(function(v,b,y){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.on(_,b,y)}return this}if($.object(v)){for(var E in v)this.on(E,v[E],b);return this}return Es(v,this.scope.actions)?this.globalEvents[v]?this.globalEvents[v].push(b):this.globalEvents[v]=[b]:this.scope.events.add(this.scope.document,v,b,{options:y}),this},"The interact.on() method is being deprecated"),g.off=ja(function(v,b,y){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.off(_,b,y)}return this}if($.object(v)){for(var E in v)this.off(E,v[E],b);return this}var O;return Es(v,this.scope.actions)?v in this.globalEvents&&(O=this.globalEvents[v].indexOf(b))!==-1&&this.globalEvents[v].splice(O,1):this.scope.events.remove(this.scope.document,v,b,y),this},"The interact.off() method is being deprecated"),g.debug=function(){return this.scope},g.supportsTouch=function(){return io.supportsTouch},g.supportsPointerEvent=function(){return io.supportsPointerEvent},g.stop=function(){for(var v=0,b=this.scope.interactions.list;v<b.length;v++)b[v].stop();return this},g.pointerMoveTolerance=function(v){return $.number(v)?(this.scope.interactions.pointerMoveTolerance=v,this):this.scope.interactions.pointerMoveTolerance},g.addDocument=function(v,b){this.scope.addDocument(v,b)},g.removeDocument=function(v){this.scope.removeDocument(v)},g}(this),this.InteractEvent=Zl,this.Interactable=void 0,this.interactables=new s0(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return l.removeDocument(m.target)};var u=this;this.Interactable=function(m){d(v,m);var g=x(v);function v(){return t(this,v),g.apply(this,arguments)}return n(v,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(b){return k(h(v.prototype),"set",this).call(this,b),u.fire("interactable:set",{options:b,interactable:this}),this}},{key:"unset",value:function(){k(h(v.prototype),"unset",this).call(this);var b=u.interactables.list.indexOf(this);b<0||(u.interactables.list.splice(b,1),u.fire("interactable:unset",{interactable:this}))}}]),v}(a0)}return n(c,[{key:"addListeners",value:function(l,u){this.listenerMaps.push({id:u,map:l})}},{key:"fire",value:function(l,u){for(var m=0,g=this.listenerMaps;m<g.length;m++){var v=g[m].map[l];if(v&&v(u,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(u,m){return u.isInitialized=!0,$.window(m)&&P(m),tt.init(m),io.init(m),rn.init(m),u.window=m,u.document=m.document,u.usePlugin(n0),u.usePlugin(r0),u}(this,l)}},{key:"pluginIsInstalled",value:function(l){var u=l.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,u),l.listeners&&l.before){for(var m=0,g=this.listenerMaps.length,v=l.before.reduce(function(y,w){return y[w]=!0,y[zu(w)]=!0,y},{});m<g;m++){var b=this.listenerMaps[m].id;if(b&&(v[b]||v[zu(b)]))break}this.listenerMaps.splice(m,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,u){if(this.getDocIndex(l)!==-1)return!1;var m=H(l);u=u?U({},u):{},this.documents.push({doc:l,options:u}),this.events.documents.push(l),l!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:m,scope:this,options:u})}},{key:"removeDocument",value:function(l){var u=this.getDocIndex(l),m=H(l),g=this.documents[u].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:l,window:m,scope:this,options:g})}},{key:"getDocIndex",value:function(l){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===l)return u;return-1}},{key:"getDocOptions",value:function(l){var u=this.getDocIndex(l);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function zu(c){return c&&c.replace(/\/.*$/,"")}var Eu=new l0,no=Eu.interactStatic,c0=typeof globalThis<"u"?globalThis:window;Eu.init(c0);var d0=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var g=m[0],v=m[1];return g in c||v in c}),u=function(m,g){for(var v=c.range,b=c.limits,y=b===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:b,w=c.offset,M=w===void 0?{x:0,y:0}:w,_={range:v,grid:c,x:null,y:null},E=0;E<l.length;E++){var O=l[E],D=O[0],V=O[1],N=Math.round((m-M.x)/c[D]),G=Math.round((g-M.y)/c[V]);_[D]=Math.max(y.left,Math.min(y.right,N*c[D]+M.x)),_[V]=Math.max(y.top,Math.min(y.bottom,G*c[V]+M.y))}return _};return u.grid=c,u.coordFields=l,u}}),u0={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=U(l.snappers||{},d0),l.createSnapGrid=l.snappers.grid}},h0=u0,p0={start:function(c){var l=c.state,u=c.rect,m=c.edges,g=c.pageCoords,v=l.options,b=v.ratio,y=v.enabled,w=l.options,M=w.equalDelta,_=w.modifiers;b==="preserve"&&(b=u.width/u.height),l.startCoords=U({},g),l.startRect=U({},u),l.ratio=b,l.equalDelta=M;var E=l.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(l.xIsPrimaryAxis=!(!m.left&&!m.right),l.equalDelta){var O=(E.left?1:-1)*(E.top?1:-1);l.edgeSign={x:O,y:O}}else l.edgeSign={x:E.left?-1:1,y:E.top?-1:1};if(y!==!1&&U(m,E),_!=null&&_.length){var D=new Xl(c.interaction);D.copyFrom(c.interaction.modification),D.prepareStates(_),l.subModification=D,D.startAll(o({},c))}},set:function(c){var l=c.state,u=c.rect,m=c.coords,g=l.linkedEdges,v=U({},m),b=l.equalDelta?m0:g0;if(U(c.edges,g),b(l,l.xIsPrimaryAxis,m,u),!l.subModification)return null;var y=U({},u);tn(g,y,{x:m.x-v.x,y:m.y-v.y});var w=l.subModification.setAll(o(o({},c),{},{rect:y,edges:g,pageCoords:m,prevCoords:m,prevRect:y})),M=w.delta;return w.changed&&(b(l,Math.abs(M.x)>Math.abs(M.y),w.coords,w.rect),U(m,w.coords)),w.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function m0(c,l,u){var m=c.startCoords,g=c.edgeSign;l?u.y=m.y+(u.x-m.x)*g.y:u.x=m.x+(u.y-m.y)*g.x}function g0(c,l,u,m){var g=c.startRect,v=c.startCoords,b=c.ratio,y=c.edgeSign;if(l){var w=m.width/b;u.y=v.y+(w-g.height)*y.y}else{var M=m.height*b;u.x=v.x+(M-g.width)*y.x}}var f0=on(p0,"aspectRatio"),Su=function(){};Su._defaults={};var As=Su;function kn(c,l,u){return $.func(c)?li(c,l.interactable,l.element,[u.x,u.y,l]):li(c,l.interactable,l.element)}var Ps={start:function(c){var l=c.rect,u=c.startOffset,m=c.state,g=c.interaction,v=c.pageCoords,b=m.options,y=b.elementRect,w=U({left:0,top:0,right:0,bottom:0},b.offset||{});if(l&&y){var M=kn(b.restriction,g,v);if(M){var _=M.right-M.left-l.width,E=M.bottom-M.top-l.height;_<0&&(w.left+=_,w.right+=_),E<0&&(w.top+=E,w.bottom+=E)}w.left+=u.left-l.width*y.left,w.top+=u.top-l.height*y.top,w.right+=u.right-l.width*(1-y.right),w.bottom+=u.bottom-l.height*(1-y.bottom)}m.offset=w},set:function(c){var l=c.coords,u=c.interaction,m=c.state,g=m.options,v=m.offset,b=kn(g.restriction,u,l);if(b){var y=function(w){return!w||"left"in w&&"top"in w||((w=U({},w)).left=w.x||0,w.top=w.y||0,w.right=w.right||w.left+w.width,w.bottom=w.bottom||w.top+w.height),w}(b);l.x=Math.max(Math.min(y.right-v.right,l.x),y.left+v.left),l.y=Math.max(Math.min(y.bottom-v.bottom,l.y),y.top+v.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},v0=on(Ps,"restrict"),$u={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Tu={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Au(c,l){for(var u=0,m=["top","left","bottom","right"];u<m.length;u++){var g=m[u];g in c||(c[g]=l[g])}return c}var Ra={noInner:$u,noOuter:Tu,start:function(c){var l,u=c.interaction,m=c.startOffset,g=c.state,v=g.options;v&&(l=Yo(kn(v.offset,u,u.coords.start.page))),l=l||{x:0,y:0},g.offset={top:l.y+m.top,left:l.x+m.left,bottom:l.y-m.bottom,right:l.x-m.right}},set:function(c){var l=c.coords,u=c.edges,m=c.interaction,g=c.state,v=g.offset,b=g.options;if(u){var y=U({},l),w=kn(b.inner,m,y)||{},M=kn(b.outer,m,y)||{};Au(w,$u),Au(M,Tu),u.top?l.y=Math.min(Math.max(M.top+v.top,y.y),w.top+v.top):u.bottom&&(l.y=Math.max(Math.min(M.bottom+v.bottom,y.y),w.bottom+v.bottom)),u.left?l.x=Math.min(Math.max(M.left+v.left,y.x),w.left+v.left):u.right&&(l.x=Math.max(Math.min(M.right+v.right,y.x),w.right+v.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},b0=on(Ra,"restrictEdges"),y0=U({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},Ps.defaults),k0=on({start:Ps.start,set:Ps.set,defaults:y0},"restrictRect"),x0={width:-1/0,height:-1/0},w0={width:1/0,height:1/0},_0=on({start:function(c){return Ra.start(c)},set:function(c){var l=c.interaction,u=c.state,m=c.rect,g=c.edges,v=u.options;if(g){var b=ci(kn(v.min,l,c.coords))||x0,y=ci(kn(v.max,l,c.coords))||w0;u.options={endOnly:v.endOnly,inner:U({},Ra.noInner),outer:U({},Ra.noOuter)},g.top?(u.options.inner.top=m.bottom-b.height,u.options.outer.top=m.bottom-y.height):g.bottom&&(u.options.inner.bottom=m.top+b.height,u.options.outer.bottom=m.top+y.height),g.left?(u.options.inner.left=m.right-b.width,u.options.outer.left=m.right-y.width):g.right&&(u.options.inner.right=m.left+b.width,u.options.outer.right=m.left+y.width),Ra.set(c),u.options=v}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),rc={start:function(c){var l,u=c.interaction,m=c.interactable,g=c.element,v=c.rect,b=c.state,y=c.startOffset,w=b.options,M=w.offsetWithOrigin?function(O){var D=O.interaction.element,V=Yo(li(O.state.options.origin,null,null,[D])),N=V||ji(O.interactable,D,O.interaction.prepared.name);return N}(c):{x:0,y:0};if(w.offset==="startCoords")l={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var _=li(w.offset,m,g,[u]);(l=Yo(_)||{x:0,y:0}).x+=M.x,l.y+=M.y}var E=w.relativePoints;b.offsets=v&&E&&E.length?E.map(function(O,D){return{index:D,relativePoint:O,x:y.left-v.width*O.x+l.x,y:y.top-v.height*O.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,u=c.coords,m=c.state,g=m.options,v=m.offsets,b=ji(l.interactable,l.element,l.prepared.name),y=U({},u),w=[];g.offsetWithOrigin||(y.x-=b.x,y.y-=b.y);for(var M=0,_=v;M<_.length;M++)for(var E=_[M],O=y.x-E.x,D=y.y-E.y,V=0,N=g.targets.length;V<N;V++){var G=g.targets[V],K=void 0;(K=$.func(G)?G(O,D,l._proxy,E,V):G)&&w.push({x:($.number(K.x)?K.x:O)+E.x,y:($.number(K.y)?K.y:D)+E.y,range:$.number(K.range)?K.range:g.range,source:G,index:V,offset:E})}for(var X={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},pe=0;pe<w.length;pe++){var Ce=w[pe],re=Ce.range,ve=Ce.x-y.x,ao=Ce.y-y.y,kt=$a(ve,ao),Fo=kt<=re;re===1/0&&X.inRange&&X.range!==1/0&&(Fo=!1),X.target&&!(Fo?X.inRange&&re!==1/0?kt/re<X.distance/X.range:re===1/0&&X.range!==1/0||kt<X.distance:!X.inRange&&kt<X.distance)||(X.target=Ce,X.distance=kt,X.range=re,X.inRange=Fo,X.delta.x=ve,X.delta.y=ao)}return X.inRange&&(u.x=X.target.x,u.y=X.target.y),m.closest=X,X},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},M0=on(rc,"snap"),js={start:function(c){var l=c.state,u=c.edges,m=l.options;if(!u)return null;c.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],rc.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,u=c.state,m=c.coords,g=u.options,v=u.offsets,b={x:m.x-v[0].x,y:m.y-v[0].y};u.options=U({},g),u.options.targets=[];for(var y=0,w=g.targets||[];y<w.length;y++){var M=w[y],_=void 0;if(_=$.func(M)?M(b.x,b.y,l):M){for(var E=0,O=u.targetFields;E<O.length;E++){var D=O[E],V=D[0],N=D[1];if(V in _||N in _){_.x=_[V],_.y=_[N];break}}u.options.targets.push(_)}}var G=rc.set(c);return u.options=g,G},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},C0=on(js,"snapSize"),oc={aspectRatio:f0,restrictEdges:b0,restrict:v0,restrictRect:k0,restrictSize:_0,snapEdges:on({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],js.start(c)):null},set:js.set,defaults:U(Wn(js.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:M0,snapSize:C0,spring:As,avoid:As,transform:As,rubberband:As},z0={id:"modifiers",install:function(c){var l=c.interactStatic;for(var u in c.usePlugin(pu),c.usePlugin(h0),l.modifiers=oc,oc){var m=oc[u],g=m._defaults,v=m._methods;g._methods=v,c.defaults.perAction[u]=g}}},E0=z0,Pu=function(c){d(u,c);var l=x(u);function u(m,g,v,b,y,w){var M;if(t(this,u),ws(f(M=l.call(this,y)),v),v!==g&&ws(f(M),g),M.timeStamp=w,M.originalEvent=v,M.type=m,M.pointerId=Ta(g),M.pointerType=Yd(g),M.target=b,M.currentTarget=null,m==="tap"){var _=y.getPointerIndex(g);M.dt=M.timeStamp-y.pointers[_].downTime;var E=M.timeStamp-y.tapTime;M.double=!!y.prevTap&&y.prevTap.type!=="doubletap"&&y.prevTap.target===M.target&&E<500}else m==="doubletap"&&(M.dt=g.timeStamp-y.tapTime,M.double=!0);return M}return n(u,[{key:"_subtractOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX-=g,this.pageY-=v,this.clientX-=g,this.clientY-=v,this}},{key:"_addOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX+=g,this.pageY+=v,this.clientX+=g,this.clientY+=v,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(Cs),Ia={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=Ia,c.defaults.actions.pointerEvents=Ia.defaults,U(c.actions.phaselessTypes,Ia.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,u=c.pointerInfo;!l&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;c.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&ic(c),an({interaction:u,pointer:m,event:g,eventTarget:v,type:"move"},l))},"interactions:down":function(c,l){(function(u,m){for(var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget,w=u.pointerIndex,M=g.pointers[w].hold,_=ce(y),E={interaction:g,pointer:v,event:b,eventTarget:y,type:"hold",targets:[],path:_,node:null},O=0;O<_.length;O++){var D=_[O];E.node=D,m.fire("pointerEvents:collect-targets",E)}if(E.targets.length){for(var V=1/0,N=0,G=E.targets;N<G.length;N++){var K=G[N].eventable.options.holdDuration;K<V&&(V=K)}M.duration=V,M.timeout=setTimeout(function(){an({interaction:g,eventTarget:y,pointer:v,event:b,type:"hold"},m)},V)}})(c,l),an(c,l)},"interactions:up":function(c,l){ic(c),an(c,l),function(u,m){var g=u.interaction,v=u.pointer,b=u.event,y=u.eventTarget;g.pointerWasMoved||an({interaction:g,eventTarget:y,pointer:v,event:b,type:"tap"},m)}(c,l)},"interactions:cancel":function(c,l){ic(c),an(c,l)}},PointerEvent:Pu,fire:an,collectEventTargets:ju,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function an(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=c.targets,w=y===void 0?ju(c,l):y,M=new Pu(b,m,g,v,u,l.now());l.fire("pointerEvents:new",{pointerEvent:M});for(var _={interaction:u,pointer:m,event:g,eventTarget:v,targets:w,type:b,pointerEvent:M},E=0;E<w.length;E++){var O=w[E];for(var D in O.props||{})M[D]=O.props[D];var V=ji(O.eventable,O.node);if(M._subtractOrigin(V),M.eventable=O.eventable,M.currentTarget=O.node,O.eventable.fire(M),M._addOrigin(V),M.immediatePropagationStopped||M.propagationStopped&&E+1<w.length&&w[E+1].node!==M.currentTarget)break}if(l.fire("pointerEvents:fired",_),b==="tap"){var N=M.double?an({interaction:u,pointer:m,event:g,eventTarget:v,type:"doubletap"},l):M;u.prevTap=N,u.tapTime=N.timeStamp}return M}function ju(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,y=u.getPointerIndex(m),w=u.pointers[y];if(b==="tap"&&(u.pointerWasMoved||!w||w.downTarget!==v))return[];for(var M=ce(v),_={interaction:u,pointer:m,event:g,eventTarget:v,type:b,path:M,targets:[],node:null},E=0;E<M.length;E++){var O=M[E];_.node=O,l.fire("pointerEvents:collect-targets",_)}return b==="hold"&&(_.targets=_.targets.filter(function(D){var V,N;return D.eventable.options.holdDuration===((V=u.pointers[y])==null||(N=V.hold)==null?void 0:N.duration)})),_.targets}function ic(c){var l=c.interaction,u=c.pointerIndex,m=l.pointers[u].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var S0=Object.freeze({__proto__:null,default:Ia});function $0(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var T0={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(Ia);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=$0,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var u=c.interaction,m=c.pointerEvent,g=c.eventTarget,v=c.targets;if(m.type==="hold"&&v.length){var b=v[0].eventable.options.holdRepeatInterval;b<=0||(u.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:u,eventTarget:g,type:"hold",pointer:m,event:m},l)},b))}}})},A0=T0,P0={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(m){return U(this.events.options,m),this};var u=l.prototype._backCompatOption;l.prototype._backCompatOption=function(m,g){var v=u.call(this,m,g);return v===this&&(this.events.options[m]=g),v}},listeners:{"pointerEvents:collect-targets":function(c,l){var u=c.targets,m=c.node,g=c.type,v=c.eventTarget;l.interactables.forEachMatch(m,function(b){var y=b.events,w=y.options;y.types[g]&&y.types[g].length&&b.testIgnoreAllow(w,m,v)&&u.push({node:m,eventable:y,props:{interactable:b}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(u){return l.getRect(u)}},"interactable:set":function(c,l){var u=c.interactable,m=c.options;U(u.events.options,l.pointerEvents.defaults),U(u.events.options,m.pointerEvents||{})}}},j0=P0,O0={id:"pointer-events",install:function(c){c.usePlugin(S0),c.usePlugin(A0),c.usePlugin(j0)}},H0=O0,R0={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(u){return function(m,g,v){for(var b=m.getAllElements(),y=v.window.Promise,w=y?[]:null,M=function(){var E=b[_],O=m.getRect(E);if(!O)return 1;var D,V=Pa(v.interactions.list,function(K){return K.interacting()&&K.interactable===m&&K.element===E&&K.prepared.name===g.name});if(V)V.move(),w&&(D=V._reflowPromise||new y(function(K){V._reflowResolve=K}));else{var N=ci(O),G=function(K){return{coords:K,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:N.x,y:N.y},client:{x:N.x,y:N.y},timeStamp:v.now()});D=function(K,X,pe,Ce,re){var ve=K.interactions.new({pointerType:"reflow"}),ao={interaction:ve,event:re,pointer:re,eventTarget:pe,phase:"reflow"};ve.interactable=X,ve.element=pe,ve.prevEvent=re,ve.updatePointer(re,re,pe,!0),Kd(ve.coords.delta),Wl(ve.prepared,Ce),ve._doPhase(ao);var kt=K.window,Fo=kt.Promise,ui=Fo?new Fo(function(Ri){ve._reflowResolve=Ri}):void 0;return ve._reflowPromise=ui,ve.start(Ce,X,pe),ve._interacting?(ve.move(ao),ve.end(re)):(ve.stop(),ve._reflowResolve()),ve.removePointer(re,re),ui}(v,m,E,g,G)}w&&w.push(D)},_=0;_<b.length&&!M();_++);return w&&y.all(w).then(function(){return m})}(this,u,c)}},listeners:{"interactions:stop":function(c,l){var u=c.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(m,g){m.splice(m.indexOf(g),1)}(l.interactions.list,u))}}},I0=R0;if(no.use(hu),no.use(bu),no.use(H0),no.use(e0),no.use(E0),no.use(L1),no.use(A1),no.use(j1),no.use(I0),no.default=no,(typeof Tn>"u"?"undefined":e(Tn))==="object"&&Tn)try{Tn.exports=no}catch{}return no.default=no,no})});var Yf={};Ru(Yf,{BP:()=>vd,LuiAlert:()=>$r,LuiAutocomplete:()=>mt,LuiAvatar:()=>$t,LuiAvatarGroup:()=>ir,LuiBackground:()=>ct,LuiBadge:()=>rr,LuiBreadcrumb:()=>Xt,LuiBreadcrumbItem:()=>_r,LuiButton:()=>Wt,LuiButtonGroup:()=>Ge,LuiButtonGroupItem:()=>Ut,LuiCalendar:()=>Fr,LuiCard:()=>Rt,LuiCascader:()=>ht,LuiCheckbox:()=>Gt,LuiCheckboxGroup:()=>Cr,LuiCol:()=>po,LuiCollapse:()=>$o,LuiCollapseItem:()=>Yr,LuiColorPicker:()=>it,LuiCommandPalette:()=>lr,LuiConfigProvider:()=>ur,LuiContextMenu:()=>Re,LuiDateRangePicker:()=>Ro,LuiDatepicker:()=>_t,LuiDialog:()=>Me,LuiDivider:()=>Hr,LuiDrawer:()=>nt,LuiDropdown:()=>Fi,LuiDropmenu:()=>Se,LuiEmptyState:()=>No,LuiFileInput:()=>jo,LuiForm:()=>Lt,LuiFormItem:()=>sr,LuiIcon:()=>Oe,LuiIconPicker:()=>$e,LuiImage:()=>Ie,LuiImageCropper:()=>wt,LuiInput:()=>He,LuiInputNumber:()=>Nt,LuiInputOpt:()=>Ir,LuiMenu:()=>Zo,LuiMenuDivider:()=>En,LuiMenuItem:()=>er,LuiOption:()=>fi,LuiOptionGroup:()=>un,LuiOverlayRoot:()=>Jn,LuiPagination:()=>Ye,LuiPopconfirm:()=>bt,LuiPopover:()=>te,LuiProgress:()=>Qt,LuiQrcode:()=>pr,LuiRadio:()=>zr,LuiRadioGroup:()=>Dr,LuiRow:()=>ri,LuiScrollArea:()=>Ft,LuiSelect:()=>me,LuiSkeleton:()=>jr,LuiSlider:()=>ut,LuiSpinner:()=>_o,LuiSplitter:()=>ro,LuiStatistic:()=>St,LuiSwitch:()=>go,LuiTab:()=>It,LuiTabPanel:()=>So,LuiTable:()=>Y,LuiTableColumn:()=>vr,LuiTabs:()=>ca,LuiTag:()=>so,LuiText:()=>Xe,LuiTextarea:()=>dt,LuiToast:()=>cr,LuiTooltip:()=>Gr,LuiTree:()=>le,LuiTreeSelect:()=>pt,baseStyles:()=>j,bringOverlayStackToFront:()=>Et,builtinIconCollection:()=>qs,builtinIconNames:()=>Ya,builtinIconPrefix:()=>wn,builtinTranslations:()=>Oc,commandPalette:()=>u1,contextMenu:()=>y1,createCommandPalette:()=>Sl,createContextMenu:()=>ks,createDialog:()=>Sa,createDialogForm:()=>Rd,createDrawer:()=>Tl,createForm:()=>f1,createPopover:()=>Ol,createTable:()=>qd,createToastHost:()=>Ld,dialog:()=>p1,drawer:()=>h1,encodeQr:()=>zl,ensureOverlayExternalLayer:()=>Ar,ensureOverlayLayer:()=>Js,ensureOverlayRoot:()=>Qs,eventPathContainsOwnedOverlay:()=>Cn,form:()=>v1,formatDate:()=>J2,formatSize:()=>Q2,getLocale:()=>Em,hasRecentOverlayInteraction:()=>es,hideAllContextMenus:()=>Dd,isImageIconSource:()=>Ks,isOverlayTopmost:()=>rs,markOverlayInteraction:()=>Ja,mergeTranslations:()=>ne,normalizeStatus:()=>Nn,onLocaleChange:()=>xe,popover:()=>k1,registerFormField:()=>Wp,registerOverlayStack:()=>Jt,registerTranslations:()=>Ic,resolveBuiltinIcon:()=>Yn,resolveBuiltinTranslations:()=>Zh,resolveOverlayLayerRegistration:()=>zn,setLocale:()=>Rc,setOverlayOwner:()=>Cc,setupBuiltinIcons:()=>Xa,showContextMenu:()=>Vd,statusColorToken:()=>o1,statusColorVar:()=>Wg,statusIcon:()=>Pi,statusOrder:()=>Ug,t:()=>Sm,table:()=>M1,toCssLength:()=>Ot,toast:()=>Ji,tokens:()=>A,translate:()=>ae,unregisterFormField:()=>Up,unregisterOverlayStack:()=>Xo});module.exports=B0(Yf);var Mo=require("lit"),mr=require("lit/decorators.js");var ac=require("lit"),A=ac.css`
|
|
2
2
|
:host {
|
|
3
3
|
/* Surfaces (refined workbench light) */
|
|
4
4
|
--lui-color-bg: #ffffff;
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
*::after {
|
|
330
330
|
box-sizing: border-box;
|
|
331
331
|
}
|
|
332
|
-
`;function Lu(i){return i instanceof HTMLElement&&i.tagName.toLowerCase()==="lui-config-provider"}function q0(i){return i?i instanceof ShadowRoot?i.host:i instanceof HTMLElement?i.parentElement:i.parentNode instanceof HTMLElement?i.parentNode:null:null}function K0(i){let o=[],e=i;for(;e;){Lu(e)&&o.unshift(e);let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=q0(e)}return o}function W0(i,o){if(!(!i&&!o))return{...i??{},...o??{},...Object.fromEntries(Object.entries(o??{}).map(([e,t])=>[e,{...i?.[e]??{},...t??{}}]))}}function Fa(i){return K0(i).reduce((e,t)=>{let r=t.getConfig?.()??{};return{...e,...r,componentConfig:W0(e.componentConfig,r.componentConfig),translations:{...e.translations??{},...r.translations??{}}}},{})}function U0(i=typeof document<"u"?document:null){if(!i)return null;let o=i.querySelector("lui-config-provider");return Lu(o)?o:null}function Un(){return U0()?.getConfig?.()??{}}function L(i,o){let e=Fa(i);return{...e.componentConfig?.common??{},...e.componentConfig?.[o]??{},...e.size!=null?{size:e.size}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.variant!=null?{variant:e.variant}:{}}}function Kt(i){let o=Un();return{...o.componentConfig?.common??{},...o.componentConfig?.[i]??{},...o.size!=null?{size:o.size}:{},...o.disabled!=null?{disabled:o.disabled}:{},...o.variant!=null?{variant:o.variant}:{}}}function
|
|
332
|
+
`;function Lu(i){return i instanceof HTMLElement&&i.tagName.toLowerCase()==="lui-config-provider"}function q0(i){return i?i instanceof ShadowRoot?i.host:i instanceof HTMLElement?i.parentElement:i.parentNode instanceof HTMLElement?i.parentNode:null:null}function K0(i){let o=[],e=i;for(;e;){Lu(e)&&o.unshift(e);let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=q0(e)}return o}function W0(i,o){if(!(!i&&!o))return{...i??{},...o??{},...Object.fromEntries(Object.entries(o??{}).map(([e,t])=>[e,{...i?.[e]??{},...t??{}}]))}}function Fa(i){return K0(i).reduce((e,t)=>{let r=t.getConfig?.()??{};return{...e,...r,componentConfig:W0(e.componentConfig,r.componentConfig),translations:{...e.translations??{},...r.translations??{}}}},{})}function U0(i=typeof document<"u"?document:null){if(!i)return null;let o=i.querySelector("lui-config-provider");return Lu(o)?o:null}function Un(){return U0()?.getConfig?.()??{}}function L(i,o){let e=Fa(i);return{...e.componentConfig?.common??{},...e.componentConfig?.[o]??{},...e.size!=null?{size:e.size}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.variant!=null?{variant:e.variant}:{}}}function Kt(i){let o=Un();return{...o.componentConfig?.common??{},...o.componentConfig?.[i]??{},...o.size!=null?{size:o.size}:{},...o.disabled!=null?{disabled:o.disabled}:{},...o.variant!=null?{variant:o.variant}:{}}}function at(i,o,e){let t=Fa(i);return{locale:o??t.locale,translations:{...t.translations??{},...e??{}}}}function hi(i,o){let e=Un();return{locale:i??e.locale,translations:{...e.translations??{},...o??{}}}}function sn(i){return Fa(i).popupContainer??null}function Ii(){return Un().popupContainer??null}function ln(i){return Fa(i).overlayContainer??null}function Vi(){return Un().overlayContainer??null}function Hs(i){return Fa(i).renderEmpty??null}var Na=require("lit"),G0=560,Gn=Na.css`
|
|
333
333
|
@keyframes lui-ripple {
|
|
334
334
|
0% {
|
|
335
335
|
opacity: 0.18;
|
|
@@ -1479,6 +1479,9 @@
|
|
|
1479
1479
|
[part~="trigger"] {
|
|
1480
1480
|
display: inline-flex;
|
|
1481
1481
|
min-width: 0;
|
|
1482
|
+
/* 宿主被拉伸(width/flex 撑满)时触发器跟随铺满;宿主收缩自适应时
|
|
1483
|
+
* 百分比宽度按 auto 处理,默认紧凑表现不变 */
|
|
1484
|
+
width: 100%;
|
|
1482
1485
|
}
|
|
1483
1486
|
|
|
1484
1487
|
[part~="backdrop"] {
|
|
@@ -2066,8 +2069,14 @@
|
|
|
2066
2069
|
}
|
|
2067
2070
|
[part="trigger"] {
|
|
2068
2071
|
display: inline-flex;
|
|
2072
|
+
/* 宿主被拉伸时触发器跟随铺满;收缩自适应时百分比按 auto,默认不变 */
|
|
2073
|
+
width: 100%;
|
|
2074
|
+
min-width: 0;
|
|
2069
2075
|
}
|
|
2070
2076
|
lui-dropdown {
|
|
2077
|
+
display: block;
|
|
2078
|
+
width: 100%;
|
|
2079
|
+
min-width: 0;
|
|
2071
2080
|
--lui-radius: var(--lui-dropmenu-radius);
|
|
2072
2081
|
--lui-dropdown-surface-padding-y: 0px;
|
|
2073
2082
|
--lui-popover-content-width: auto;
|
|
@@ -2481,7 +2490,7 @@
|
|
|
2481
2490
|
transition: none;
|
|
2482
2491
|
}
|
|
2483
2492
|
}
|
|
2484
|
-
`],a([(0,Qe.property)({reflect:!0})],Ge.prototype,"selection",2),a([(0,Qe.property)()],Ge.prototype,"value",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"values",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"variant",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"size",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"radius",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"vertical",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"disabled",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"ripple",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"block",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"collapse",2),a([(0,Qe.property)({attribute:"overflow-label"})],Ge.prototype,"overflowLabel",2),a([(0,Qe.property)({attribute:"overflow-icon"})],Ge.prototype,"overflowIcon",2),a([(0,Qe.property)({attribute:"overflow-placement"})],Ge.prototype,"overflowPlacement",2),a([(0,Qe.property)({type:Number,attribute:"overflow-trigger-width"})],Ge.prototype,"overflowTriggerWidth",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"overflowTriggerProps",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"items",2),a([(0,Qe.queryAssignedElements)({flatten:!0})],Ge.prototype,"_assignedElements",2),a([(0,Qe.query)('[part="group"]')],Ge.prototype,"_groupEl",2),a([(0,Qe.query)(".overflow-trigger")],Ge.prototype,"_overflowTriggerButton",2),a([(0,Qe.state)()],Ge.prototype,"_overflowIndexes",2),a([(0,Qe.state)()],Ge.prototype,"_activeInteractionIndex",2),Ge=a([(0,Qe.customElement)("lui-button-group")],Ge);var at=require("lit"),je=require("lit/decorators.js");var sl=require("lit"),ll=require("lit/directive.js"),Uh=require("lit/async-directive.js"),Gh=require("lit/directives/repeat.js");var ra=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};ra.eventName="rangeChanged";var oa=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};oa.eventName="visibilityChanged";var is=class i extends Event{constructor(){super(i.eventName,{bubbles:!1})}};is.eventName="unpinned";var Sc=class{constructor(o){this._element=null;let e=o??window;this._node=e,o&&(this._element=o)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},tl=class extends Sc{constructor(o,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let t=this._node;this._originalScrollTo=t.scrollTo,this._originalScrollBy=t.scrollBy,this._originalScroll=t.scroll,this._attach(o)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;this._scrollTo(t)}scrollBy(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;t.top!==void 0&&(t.top+=this.scrollTop),t.left!==void 0&&(t.left+=this.scrollLeft),this._scrollTo(t)}_nativeScrollTo(o){this._originalScrollTo.bind(this._element||window)(o)}_scrollTo(o,e=null,t=null){this._end!==null&&this._end(),o.behavior==="smooth"?(this._setDestination(o),this._retarget=e,this._end=t):this._resetScrollState(),this._nativeScrollTo(o)}_setDestination(o){let{top:e,left:t}=o;return e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollLeft)),this._destination!==null&&t===this._destination.left&&e===this._destination.top?!1:(this.__destination={top:e,left:t,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(o){this._destination&&this._setDestination(o)&&this._nativeScrollTo(this._destination)}managedScrollTo(o,e,t){return this._scrollTo(o,e,t),this._updateManagedScrollTo}correctScrollError(o){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(o),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:o,scrollLeft:e}=this,{top:t,left:r}=this._destination;t=Math.min(t||0,this.maxScrollTop),r=Math.min(r||0,this.maxScrollLeft);let n=Math.abs(t-o),s=Math.abs(r-e);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(o){return this._clients.delete(o),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(o){this._clients.add(o),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var qh=typeof window<"u"?window.ResizeObserver:void 0;var Sn=Symbol("virtualizerRef"),il="virtualizer-sizer",Kh,al=class{constructor(o){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!o)throw new Error("Virtualizer constructor requires a configuration object");if(o.hostElement)this._init(o);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(o){Array.isArray(o)&&o!==this._items&&(this._itemsChanged=!0,this._items=o,this._schedule(this._updateLayout))}_init(o){this._isScroller=!!o.scroller,this._initHostElement(o);let e=o.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new qh(()=>this._hostElementSizeChanged()),this._childrenRO=new qh(this._childrenSizeChanged.bind(this))}_initHostElement(o){let e=this._hostElement=o.hostElement;this._applyVirtualizerStyles(),e[Sn]=this}connected(){this._initObservers();let o=this._isScroller;this._clippingAncestors=zm(this._hostElement,o),this._scrollerController=new tl(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(o=>{o.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(o),this._hostElementRO.observe(o)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(o=>this._childrenRO.observe(o)),this._scrollEventListeners.forEach(o=>o.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(o=>o.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){let o=this._hostElement;if(!this._sizer){let e=o.querySelector(`[${il}]`);e||(e=document.createElement("div"),e.setAttribute(il,""),o.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(il,""),this._sizer=e}return this._sizer}async updateLayoutConfig(o){await this._layoutInitialized;let e=o.type||Kh;if(typeof e=="function"&&this._layout instanceof e){let t={...o};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(o){let e,t;if(typeof o.type=="function"){t=o.type;let r={...o};delete r.type,e=r}else e=o;t===void 0&&(Kh=t=(await Promise.resolve().then(()=>(Bh(),Lh))).FlowLayout),this._layout=new t(r=>this._handleLayoutMessage(r),e),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let o=window.performance.now(),e=o-this._benchmarkStart,r=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<o).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:r}}return null}_measureChildren(){let o={},e=this._children,t=this._measureChildOverride||this._measureChild;for(let r=0;r<e.length;r++){let n=e[r],s=this._first+r;(this._itemsChanged||this._toBeMeasured.has(n))&&(o[s]=t.call(this,n,this._items[s]))}this._childMeasurements=o,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(o){let{width:e,height:t}=o.getBoundingClientRect();return Object.assign({width:e,height:t},Mm(o))}async _schedule(o){this._scheduled.has(o)||(this._scheduled.add(o),await Promise.resolve(),this._scheduled.delete(o),o.call(this))}async _updateDOM(o){this._scrollSize=o.scrollSize,this._adjustRange(o.range),this._childrenPos=o.childPositions,this._scrollError=o.scrollError||null;let{_rangeChanged:e,_itemsChanged:t}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||t)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(o=>this._childrenRO.observe(o)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(o){switch(o.type){case"scroll":(o.currentTarget===window||this._clippingAncestors.includes(o.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",o)}}_handleLayoutMessage(o){o.type==="stateChanged"?this._updateDOM(o):o.type==="visibilityChanged"?(this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._notifyVisibility()):o.type==="unpinned"&&this._hostElement.dispatchEvent(new is)}get _children(){let o=[],e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(il)||o.push(e),e=e.nextElementSibling;return o}_updateView(){let o=this._hostElement,e=this._scrollerController?.element,t=this._layout;if(o&&e&&t){let r,n,s,d,h=o.getBoundingClientRect();r=0,n=0,s=window.innerHeight,d=window.innerWidth;let p=this._clippingAncestors.map(P=>P.getBoundingClientRect());p.unshift(h);for(let P of p)r=Math.max(r,P.top),n=Math.max(n,P.left),s=Math.min(s,P.bottom),d=Math.min(d,P.right);let f=e.getBoundingClientRect(),x={left:h.left-f.left,top:h.top-f.top},k={width:e.scrollWidth,height:e.scrollHeight},C=r-h.top+o.scrollTop,S=n-h.left+o.scrollLeft,z=Math.max(0,s-r),T=Math.max(0,d-n);t.viewportSize={width:T,height:z},t.viewportScroll={top:C,left:S},t.totalScrollSize=k,t.offsetWithinScroller=x}}_sizeHostElement(o){let t=o&&o.width!==null?Math.min(82e5,o.width):0,r=o&&o.height!==null?Math.min(82e5,o.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${t}px, ${r}px)`;else{let n=this._hostElement.style;n.minWidth=t?`${t}px`:"100%",n.minHeight=r?`${r}px`:"100%"}}_positionChildren(o){o&&o.forEach(({top:e,left:t,width:r,height:n,xOffset:s,yOffset:d},h)=>{let p=this._children[h-this._first];p&&(p.style.position="absolute",p.style.boxSizing="border-box",p.style.transform=`translate(${t}px, ${e}px)`,r!==void 0&&(p.style.width=r+"px"),n!==void 0&&(p.style.height=n+"px"),p.style.left=s===void 0?null:s+"px",p.style.top=d===void 0?null:d+"px")})}async _adjustRange(o){let{_first:e,_last:t,_firstVisible:r,_lastVisible:n}=this;this._first=o.first,this._last=o.last,this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==t,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==r||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:o,scrollLeft:e}=this._scrollerController,{top:t,left:r}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:o-t,left:e-r})}}element(o){return o===1/0&&(o=this._items.length-1),this._items?.[o]===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:o})}}_scrollElementIntoView(o){if(o.index>=this._first&&o.index<=this._last)this._children[o.index-this._first].scrollIntoView(o);else if(o.index=Math.min(o.index,this._items.length-1),o.behavior==="smooth"){let e=this._layout.getScrollIntoViewCoordinates(o),{behavior:t}=o;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:t}),()=>this._layout.getScrollIntoViewCoordinates(o),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=o}else this._layout.pin=o}_checkScrollIntoViewTarget(o){let{index:e}=this._scrollIntoViewTarget||{};e&&o?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new ra({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new oa({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((o,e)=>{this._layoutCompleteResolver=o,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(o){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(o),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(o){if(this._layout?.measureChildren){for(let e of o)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function Mm(i){let o=window.getComputedStyle(i);return{marginTop:nl(o.marginTop),marginRight:nl(o.marginRight),marginBottom:nl(o.marginBottom),marginLeft:nl(o.marginLeft)}}function nl(i){let o=i?parseFloat(i):NaN;return Number.isNaN(o)?0:o}function Wh(i){if(i.assignedSlot!==null)return i.assignedSlot;if(i.parentElement!==null)return i.parentElement;let o=i.parentNode;return o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host||null}function Cm(i,o=!1){let e=[],t=o?i:Wh(i);for(;t!==null;)e.push(t),t=Wh(t);return e}function zm(i,o=!1){let e=!1;return Cm(i,o).filter(t=>{if(e)return!1;let r=getComputedStyle(t);return e=r.position==="fixed",r.overflow!=="visible"})}var Pc=i=>i,jc=(i,o)=>sl.html`${o}: ${JSON.stringify(i,null,2)}`,Ac=class extends Uh.AsyncDirective{constructor(o){if(super(o),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>jc(e,t+this._first),this._keyFunction=(e,t)=>Pc(e,t+this._first),this._items=[],o.type!==ll.PartType.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(o){o&&this._setFunctions(o);let e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return(0,Gh.repeat)(e,this._keyFunction,this._renderItem)}update(o,[e]){this._setFunctions(e);let t=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(o,e):this._initialize(o,e),t?sl.noChange:this.render()}async _updateVirtualizerConfig(o,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){let r=o.parentNode;this._makeVirtualizer(r,e)}this._virtualizer.items=this._items}_setFunctions(o){let{renderItem:e,keyFunction:t}=o;e&&(this._renderItem=(r,n)=>e(r,n+this._first)),t&&(this._keyFunction=(r,n)=>t(r,n+this._first))}_makeVirtualizer(o,e){this._virtualizer&&this._virtualizer.disconnected();let{layout:t,scroller:r,items:n}=e;this._virtualizer=new al({hostElement:o,layout:t,scroller:r}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(o,e){let t=o.parentNode;t&&t.nodeType===1&&(t.addEventListener("rangeChanged",r=>{this._first=r.first,this._last=r.last,this.setValue(this.render())}),this._makeVirtualizer(t,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},dn=(0,ll.directive)(Ac);var Yh=require("lit"),zo=Yh.css`
|
|
2493
|
+
`],a([(0,Qe.property)({reflect:!0})],Ge.prototype,"selection",2),a([(0,Qe.property)()],Ge.prototype,"value",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"values",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"variant",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"size",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"radius",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"vertical",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"disabled",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"ripple",2),a([(0,Qe.property)({type:Boolean,reflect:!0})],Ge.prototype,"block",2),a([(0,Qe.property)({reflect:!0})],Ge.prototype,"collapse",2),a([(0,Qe.property)({attribute:"overflow-label"})],Ge.prototype,"overflowLabel",2),a([(0,Qe.property)({attribute:"overflow-icon"})],Ge.prototype,"overflowIcon",2),a([(0,Qe.property)({attribute:"overflow-placement"})],Ge.prototype,"overflowPlacement",2),a([(0,Qe.property)({type:Number,attribute:"overflow-trigger-width"})],Ge.prototype,"overflowTriggerWidth",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"overflowTriggerProps",2),a([(0,Qe.property)({attribute:!1})],Ge.prototype,"items",2),a([(0,Qe.queryAssignedElements)({flatten:!0})],Ge.prototype,"_assignedElements",2),a([(0,Qe.query)('[part="group"]')],Ge.prototype,"_groupEl",2),a([(0,Qe.query)(".overflow-trigger")],Ge.prototype,"_overflowTriggerButton",2),a([(0,Qe.state)()],Ge.prototype,"_overflowIndexes",2),a([(0,Qe.state)()],Ge.prototype,"_activeInteractionIndex",2),Ge=a([(0,Qe.customElement)("lui-button-group")],Ge);var st=require("lit"),je=require("lit/decorators.js");var sl=require("lit"),ll=require("lit/directive.js"),Uh=require("lit/async-directive.js"),Gh=require("lit/directives/repeat.js");var ra=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};ra.eventName="rangeChanged";var oa=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};oa.eventName="visibilityChanged";var is=class i extends Event{constructor(){super(i.eventName,{bubbles:!1})}};is.eventName="unpinned";var Sc=class{constructor(o){this._element=null;let e=o??window;this._node=e,o&&(this._element=o)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},tl=class extends Sc{constructor(o,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let t=this._node;this._originalScrollTo=t.scrollTo,this._originalScrollBy=t.scrollBy,this._originalScroll=t.scroll,this._attach(o)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;this._scrollTo(t)}scrollBy(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;t.top!==void 0&&(t.top+=this.scrollTop),t.left!==void 0&&(t.left+=this.scrollLeft),this._scrollTo(t)}_nativeScrollTo(o){this._originalScrollTo.bind(this._element||window)(o)}_scrollTo(o,e=null,t=null){this._end!==null&&this._end(),o.behavior==="smooth"?(this._setDestination(o),this._retarget=e,this._end=t):this._resetScrollState(),this._nativeScrollTo(o)}_setDestination(o){let{top:e,left:t}=o;return e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollLeft)),this._destination!==null&&t===this._destination.left&&e===this._destination.top?!1:(this.__destination={top:e,left:t,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(o){this._destination&&this._setDestination(o)&&this._nativeScrollTo(this._destination)}managedScrollTo(o,e,t){return this._scrollTo(o,e,t),this._updateManagedScrollTo}correctScrollError(o){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(o),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:o,scrollLeft:e}=this,{top:t,left:r}=this._destination;t=Math.min(t||0,this.maxScrollTop),r=Math.min(r||0,this.maxScrollLeft);let n=Math.abs(t-o),s=Math.abs(r-e);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(o){return this._clients.delete(o),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(o){this._clients.add(o),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var qh=typeof window<"u"?window.ResizeObserver:void 0;var Sn=Symbol("virtualizerRef"),il="virtualizer-sizer",Kh,al=class{constructor(o){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!o)throw new Error("Virtualizer constructor requires a configuration object");if(o.hostElement)this._init(o);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(o){Array.isArray(o)&&o!==this._items&&(this._itemsChanged=!0,this._items=o,this._schedule(this._updateLayout))}_init(o){this._isScroller=!!o.scroller,this._initHostElement(o);let e=o.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new qh(()=>this._hostElementSizeChanged()),this._childrenRO=new qh(this._childrenSizeChanged.bind(this))}_initHostElement(o){let e=this._hostElement=o.hostElement;this._applyVirtualizerStyles(),e[Sn]=this}connected(){this._initObservers();let o=this._isScroller;this._clippingAncestors=zm(this._hostElement,o),this._scrollerController=new tl(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(o=>{o.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(o),this._hostElementRO.observe(o)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(o=>this._childrenRO.observe(o)),this._scrollEventListeners.forEach(o=>o.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(o=>o.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){let o=this._hostElement;if(!this._sizer){let e=o.querySelector(`[${il}]`);e||(e=document.createElement("div"),e.setAttribute(il,""),o.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(il,""),this._sizer=e}return this._sizer}async updateLayoutConfig(o){await this._layoutInitialized;let e=o.type||Kh;if(typeof e=="function"&&this._layout instanceof e){let t={...o};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(o){let e,t;if(typeof o.type=="function"){t=o.type;let r={...o};delete r.type,e=r}else e=o;t===void 0&&(Kh=t=(await Promise.resolve().then(()=>(Bh(),Lh))).FlowLayout),this._layout=new t(r=>this._handleLayoutMessage(r),e),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let o=window.performance.now(),e=o-this._benchmarkStart,r=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<o).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:r}}return null}_measureChildren(){let o={},e=this._children,t=this._measureChildOverride||this._measureChild;for(let r=0;r<e.length;r++){let n=e[r],s=this._first+r;(this._itemsChanged||this._toBeMeasured.has(n))&&(o[s]=t.call(this,n,this._items[s]))}this._childMeasurements=o,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(o){let{width:e,height:t}=o.getBoundingClientRect();return Object.assign({width:e,height:t},Mm(o))}async _schedule(o){this._scheduled.has(o)||(this._scheduled.add(o),await Promise.resolve(),this._scheduled.delete(o),o.call(this))}async _updateDOM(o){this._scrollSize=o.scrollSize,this._adjustRange(o.range),this._childrenPos=o.childPositions,this._scrollError=o.scrollError||null;let{_rangeChanged:e,_itemsChanged:t}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||t)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(o=>this._childrenRO.observe(o)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(o){switch(o.type){case"scroll":(o.currentTarget===window||this._clippingAncestors.includes(o.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",o)}}_handleLayoutMessage(o){o.type==="stateChanged"?this._updateDOM(o):o.type==="visibilityChanged"?(this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._notifyVisibility()):o.type==="unpinned"&&this._hostElement.dispatchEvent(new is)}get _children(){let o=[],e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(il)||o.push(e),e=e.nextElementSibling;return o}_updateView(){let o=this._hostElement,e=this._scrollerController?.element,t=this._layout;if(o&&e&&t){let r,n,s,d,h=o.getBoundingClientRect();r=0,n=0,s=window.innerHeight,d=window.innerWidth;let p=this._clippingAncestors.map(P=>P.getBoundingClientRect());p.unshift(h);for(let P of p)r=Math.max(r,P.top),n=Math.max(n,P.left),s=Math.min(s,P.bottom),d=Math.min(d,P.right);let f=e.getBoundingClientRect(),x={left:h.left-f.left,top:h.top-f.top},k={width:e.scrollWidth,height:e.scrollHeight},C=r-h.top+o.scrollTop,S=n-h.left+o.scrollLeft,z=Math.max(0,s-r),T=Math.max(0,d-n);t.viewportSize={width:T,height:z},t.viewportScroll={top:C,left:S},t.totalScrollSize=k,t.offsetWithinScroller=x}}_sizeHostElement(o){let t=o&&o.width!==null?Math.min(82e5,o.width):0,r=o&&o.height!==null?Math.min(82e5,o.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${t}px, ${r}px)`;else{let n=this._hostElement.style;n.minWidth=t?`${t}px`:"100%",n.minHeight=r?`${r}px`:"100%"}}_positionChildren(o){o&&o.forEach(({top:e,left:t,width:r,height:n,xOffset:s,yOffset:d},h)=>{let p=this._children[h-this._first];p&&(p.style.position="absolute",p.style.boxSizing="border-box",p.style.transform=`translate(${t}px, ${e}px)`,r!==void 0&&(p.style.width=r+"px"),n!==void 0&&(p.style.height=n+"px"),p.style.left=s===void 0?null:s+"px",p.style.top=d===void 0?null:d+"px")})}async _adjustRange(o){let{_first:e,_last:t,_firstVisible:r,_lastVisible:n}=this;this._first=o.first,this._last=o.last,this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==t,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==r||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:o,scrollLeft:e}=this._scrollerController,{top:t,left:r}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:o-t,left:e-r})}}element(o){return o===1/0&&(o=this._items.length-1),this._items?.[o]===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:o})}}_scrollElementIntoView(o){if(o.index>=this._first&&o.index<=this._last)this._children[o.index-this._first].scrollIntoView(o);else if(o.index=Math.min(o.index,this._items.length-1),o.behavior==="smooth"){let e=this._layout.getScrollIntoViewCoordinates(o),{behavior:t}=o;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:t}),()=>this._layout.getScrollIntoViewCoordinates(o),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=o}else this._layout.pin=o}_checkScrollIntoViewTarget(o){let{index:e}=this._scrollIntoViewTarget||{};e&&o?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new ra({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new oa({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((o,e)=>{this._layoutCompleteResolver=o,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(o){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(o),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(o){if(this._layout?.measureChildren){for(let e of o)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function Mm(i){let o=window.getComputedStyle(i);return{marginTop:nl(o.marginTop),marginRight:nl(o.marginRight),marginBottom:nl(o.marginBottom),marginLeft:nl(o.marginLeft)}}function nl(i){let o=i?parseFloat(i):NaN;return Number.isNaN(o)?0:o}function Wh(i){if(i.assignedSlot!==null)return i.assignedSlot;if(i.parentElement!==null)return i.parentElement;let o=i.parentNode;return o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host||null}function Cm(i,o=!1){let e=[],t=o?i:Wh(i);for(;t!==null;)e.push(t),t=Wh(t);return e}function zm(i,o=!1){let e=!1;return Cm(i,o).filter(t=>{if(e)return!1;let r=getComputedStyle(t);return e=r.position==="fixed",r.overflow!=="visible"})}var Pc=i=>i,jc=(i,o)=>sl.html`${o}: ${JSON.stringify(i,null,2)}`,Ac=class extends Uh.AsyncDirective{constructor(o){if(super(o),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>jc(e,t+this._first),this._keyFunction=(e,t)=>Pc(e,t+this._first),this._items=[],o.type!==ll.PartType.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(o){o&&this._setFunctions(o);let e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return(0,Gh.repeat)(e,this._keyFunction,this._renderItem)}update(o,[e]){this._setFunctions(e);let t=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(o,e):this._initialize(o,e),t?sl.noChange:this.render()}async _updateVirtualizerConfig(o,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){let r=o.parentNode;this._makeVirtualizer(r,e)}this._virtualizer.items=this._items}_setFunctions(o){let{renderItem:e,keyFunction:t}=o;e&&(this._renderItem=(r,n)=>e(r,n+this._first)),t&&(this._keyFunction=(r,n)=>t(r,n+this._first))}_makeVirtualizer(o,e){this._virtualizer&&this._virtualizer.disconnected();let{layout:t,scroller:r,items:n}=e;this._virtualizer=new al({hostElement:o,layout:t,scroller:r}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(o,e){let t=o.parentNode;t&&t.nodeType===1&&(t.addEventListener("rangeChanged",r=>{this._first=r.first,this._last=r.last,this.setValue(this.render())}),this._makeVirtualizer(t,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},dn=(0,ll.directive)(Ac);var Yh=require("lit"),zo=Yh.css`
|
|
2485
2494
|
.control-shell {
|
|
2486
2495
|
display: inline-flex;
|
|
2487
2496
|
align-items: center;
|
|
@@ -2551,7 +2560,7 @@
|
|
|
2551
2560
|
color: var(--lui-color-fg);
|
|
2552
2561
|
background: color-mix(in srgb, var(--lui-color-fg) 8%, transparent);
|
|
2553
2562
|
}
|
|
2554
|
-
`;var Xh={"common.home":"Home","common.more":"More","common.close":"Close","common.cancel":"Cancel","common.confirm":"Confirm","common.create":"Create","common.select":"Select","common.copy":"Copy","common.move":"Move","common.delete":"Delete","common.rename":"Rename","common.download":"Download","common.folder":"Folder","common.new_folder":"New folder","common.upload_files":"Upload files","common.upload_folder":"Upload folder","common.back":"Back","common.forward":"Forward","common.refresh":"Refresh","common.search":"Search","common.sort":"Sort","common.expand":"Expand","common.collapse":"Collapse","common.clear_finished":"Clear finished","card.loading":"Loading\u2026","list.loading":"Loading\u2026","list.empty_folder":"Empty folder","list.opening_folder":"Opening Folder","dialog.close":"Close","dialog.loading_title":"Please wait","dialog.loading_message":"Processing...","dialog.mkdir.title":"New Folder","dialog.mkdir.headline":"Create folder","dialog.mkdir.hint":"This folder will be created in {path}.","dialog.mkdir.label":"Folder name","dialog.mkdir.placeholder":"Folder name","dialog.mkdir.error_name_required":"Name is required","dialog.mkdir.error_failed":"Failed to create folder","dialog.rename.title":"Rename","dialog.rename.headline":"Rename item","dialog.rename.hint_update":"Update {name} to the new name below.","dialog.rename.hint_choose":"Choose a new name for this item.","dialog.rename.label":"New name","dialog.rename.placeholder":"New name","dialog.rename.error_name_required":"Name is required","dialog.rename.error_failed":"Rename failed","dialog.batch_rename.title":"Batch rename","dialog.batch_rename.mode_replace":"Find & replace","dialog.batch_rename.mode_manual":"Manual edit","dialog.batch_rename.find":"Find","dialog.batch_rename.replace":"Replace","dialog.batch_rename.find_placeholder":"Text to replace","dialog.batch_rename.replace_placeholder":"Replacement text","dialog.batch_rename.before":"Before","dialog.batch_rename.after":"After","dialog.batch_rename.error_required":"Name is required","dialog.batch_rename.error_duplicate":'Duplicate name "{name}" in the same folder',"dialog.remove.title":"Delete","dialog.remove.headline_single":"Delete {name}?","dialog.remove.headline_multiple":"Delete {count} items?","dialog.remove.hint_single":"This action removes the selected item and cannot be undone.","dialog.remove.hint_multiple":"This action removes the selected items and cannot be undone.","dialog.remove.more":"...and {count} more","dialog.remove.error_failed":"Delete failed","picker.title":"Pick a folder","picker.confirm":"Select","picker.placeholder":"Select a folder below","upload.title":"Uploads","upload.count_active":"{count} active","upload.count_total":"{count} total","upload.empty":"No uploads yet","upload.state.queued":"Queued","upload.state.hashing":"Hashing\u2026","upload.state.uploading":"Uploading","upload.state.completed":"Completed","upload.state.failed":"Failed","upload.state.cancelled":"Cancelled","upload.state.reused":"Already uploaded","upload.cancel":"Cancel","upload.retry":"Retry","upload.remove":"Remove","action.copy_to_ellipsis":"Copy to\u2026","action.copy_to":"Copy to","action.move_to_ellipsis":"Move to\u2026","action.move_to":"Move to","layout.list":"List","layout.grid":"Grid","layout.cover":"Cover","sort.name":"Name","sort.size":"Size","sort.mtime":"Modified","sort.type":"Type","upload.drop_files":"Drop files to upload","pagination.label":"Pagination","pagination.first":"First page","pagination.prev":"Previous page","pagination.next":"Next page","pagination.last":"Last page","pagination.total":"Total {total}","pagination.page_size":"Page size","pagination.go_to":"Go to","icon_picker.placeholder":"Select icon","icon_picker.search_placeholder":"Search icons","icon_picker.empty":"No matching icons","icon_picker.clear":"Clear selected icon","icon_picker.unselected":"Unselected","select.clear":"Clear selection","select.empty":"No options","qrcode.label":"QR code","qrcode.empty":"Nothing to encode","input.clear":"Clear input","input.show_password":"Show password","input.hide_password":"Hide password","tag.close":"Close","dialog.close_aria":"Close","datepicker.select_date":"Select date","datepicker.select_time":"Select time","datepicker.select_datetime":"Select date and time","datepicker.clear":"Clear","datepicker.open":"Open","field.checkbox":"Checkbox","field.radio":"Radio","field.switch":"Switch"},cl={"common.home":"\u9996\u9875","common.more":"\u66F4\u591A","common.close":"\u5173\u95ED","common.cancel":"\u53D6\u6D88","common.confirm":"\u786E\u5B9A","common.create":"\u521B\u5EFA","common.select":"\u9009\u62E9","common.copy":"\u590D\u5236","common.move":"\u79FB\u52A8","common.delete":"\u5220\u9664","common.rename":"\u91CD\u547D\u540D","common.download":"\u4E0B\u8F7D","common.folder":"\u6587\u4EF6\u5939","common.new_folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","common.upload_files":"\u4E0A\u4F20\u6587\u4EF6","common.upload_folder":"\u4E0A\u4F20\u6587\u4EF6\u5939","common.back":"\u540E\u9000","common.forward":"\u524D\u8FDB","common.refresh":"\u5237\u65B0","common.search":"\u641C\u7D22","common.sort":"\u6392\u5E8F","common.expand":"\u5C55\u5F00","common.collapse":"\u6536\u8D77","common.clear_finished":"\u6E05\u9664\u5DF2\u5B8C\u6210","card.loading":"\u52A0\u8F7D\u4E2D\u2026","list.loading":"\u52A0\u8F7D\u4E2D\u2026","list.empty_folder":"\u7A7A\u6587\u4EF6\u5939","list.opening_folder":"\u6B63\u5728\u6253\u5F00\u6587\u4EF6\u5939","dialog.close":"\u5173\u95ED","dialog.loading_title":"\u8BF7\u7A0D\u5019","dialog.loading_message":"\u5904\u7406\u4E2D...","dialog.mkdir.title":"\u65B0\u5EFA\u6587\u4EF6\u5939","dialog.mkdir.headline":"\u521B\u5EFA\u6587\u4EF6\u5939","dialog.mkdir.hint":"\u8BE5\u6587\u4EF6\u5939\u5C06\u521B\u5EFA\u5728 {path} \u4E2D\u3002","dialog.mkdir.label":"\u6587\u4EF6\u5939\u540D\u79F0","dialog.mkdir.placeholder":"\u6587\u4EF6\u5939\u540D\u79F0","dialog.mkdir.error_name_required":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","dialog.mkdir.error_failed":"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25","dialog.rename.title":"\u91CD\u547D\u540D","dialog.rename.headline":"\u91CD\u547D\u540D\u9879\u76EE","dialog.rename.hint_update":"\u5C06 {name} \u66F4\u65B0\u4E3A\u4E0B\u9762\u7684\u65B0\u540D\u79F0\u3002","dialog.rename.hint_choose":"\u4E3A\u8BE5\u9879\u76EE\u8F93\u5165\u4E00\u4E2A\u65B0\u540D\u79F0\u3002","dialog.rename.label":"\u65B0\u540D\u79F0","dialog.rename.placeholder":"\u65B0\u540D\u79F0","dialog.rename.error_name_required":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","dialog.rename.error_failed":"\u91CD\u547D\u540D\u5931\u8D25","dialog.batch_rename.title":"\u6279\u91CF\u91CD\u547D\u540D","dialog.batch_rename.mode_replace":"\u67E5\u627E\u66FF\u6362","dialog.batch_rename.mode_manual":"\u624B\u52A8\u7F16\u8F91","dialog.batch_rename.find":"\u67E5\u627E","dialog.batch_rename.replace":"\u66FF\u6362\u4E3A","dialog.batch_rename.find_placeholder":"\u8981\u66FF\u6362\u7684\u6587\u672C","dialog.batch_rename.replace_placeholder":"\u66FF\u6362\u540E\u7684\u6587\u672C","dialog.batch_rename.before":"\u4FEE\u6539\u524D","dialog.batch_rename.after":"\u4FEE\u6539\u540E","dialog.batch_rename.error_required":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","dialog.batch_rename.error_duplicate":"\u540C\u4E00\u76EE\u5F55\u4E0B\u540D\u79F0\u201C{name}\u201D\u91CD\u590D","dialog.remove.title":"\u5220\u9664","dialog.remove.headline_single":"\u5220\u9664 {name}\uFF1F","dialog.remove.headline_multiple":"\u5220\u9664 {count} \u4E2A\u9879\u76EE\uFF1F","dialog.remove.hint_single":"\u6B64\u64CD\u4F5C\u4F1A\u5220\u9664\u6240\u9009\u9879\u76EE\uFF0C\u4E14\u65E0\u6CD5\u64A4\u9500\u3002","dialog.remove.hint_multiple":"\u6B64\u64CD\u4F5C\u4F1A\u5220\u9664\u6240\u9009\u9879\u76EE\uFF0C\u4E14\u65E0\u6CD5\u64A4\u9500\u3002","dialog.remove.more":"\u2026\u2026\u4EE5\u53CA\u53E6\u5916 {count} \u9879","dialog.remove.error_failed":"\u5220\u9664\u5931\u8D25","picker.title":"\u9009\u62E9\u6587\u4EF6\u5939","picker.confirm":"\u9009\u62E9","picker.placeholder":"\u8BF7\u9009\u62E9\u4E0B\u9762\u7684\u6587\u4EF6\u5939","upload.title":"\u4E0A\u4F20","upload.count_active":"{count} \u4E2A\u8FDB\u884C\u4E2D","upload.count_total":"\u5171 {count} \u4E2A","upload.empty":"\u6682\u65E0\u4E0A\u4F20\u4EFB\u52A1","upload.state.queued":"\u6392\u961F\u4E2D","upload.state.hashing":"\u6821\u9A8C\u4E2D\u2026","upload.state.uploading":"\u4E0A\u4F20\u4E2D","upload.state.completed":"\u5DF2\u5B8C\u6210","upload.state.failed":"\u5931\u8D25","upload.state.cancelled":"\u5DF2\u53D6\u6D88","upload.state.reused":"\u5DF2\u5B58\u5728","upload.cancel":"\u53D6\u6D88","upload.retry":"\u91CD\u8BD5","upload.remove":"\u79FB\u9664","action.copy_to_ellipsis":"\u590D\u5236\u5230\u2026","action.copy_to":"\u590D\u5236\u5230","action.move_to_ellipsis":"\u79FB\u52A8\u5230\u2026","action.move_to":"\u79FB\u52A8\u5230","layout.list":"\u5217\u8868","layout.grid":"\u7F51\u683C","layout.cover":"\u5C01\u9762","sort.name":"\u540D\u79F0","sort.size":"\u5927\u5C0F","sort.mtime":"\u4FEE\u6539\u65F6\u95F4","sort.type":"\u7C7B\u578B","upload.drop_files":"\u62D6\u653E\u6587\u4EF6\u4EE5\u4E0A\u4F20","pagination.label":"\u5206\u9875","pagination.first":"\u7B2C\u4E00\u9875","pagination.prev":"\u4E0A\u4E00\u9875","pagination.next":"\u4E0B\u4E00\u9875","pagination.last":"\u6700\u540E\u4E00\u9875","pagination.total":"\u5171 {total} \u9879","pagination.page_size":"\u6BCF\u9875\u6761\u6570","pagination.go_to":"\u8DF3\u81F3","icon_picker.placeholder":"\u9009\u62E9\u56FE\u6807","icon_picker.search_placeholder":"\u641C\u7D22\u56FE\u6807","icon_picker.empty":"\u6CA1\u6709\u5339\u914D\u7684\u56FE\u6807","icon_picker.clear":"\u6E05\u9664\u5DF2\u9009\u56FE\u6807","icon_picker.unselected":"\u672A\u9009\u62E9","select.clear":"\u6E05\u9664\u9009\u62E9","select.empty":"\u6CA1\u6709\u53EF\u9009\u9879","qrcode.label":"\u4E8C\u7EF4\u7801","qrcode.empty":"\u65E0\u5185\u5BB9","input.clear":"\u6E05\u9664\u8F93\u5165","input.show_password":"\u663E\u793A\u5BC6\u7801","input.hide_password":"\u9690\u85CF\u5BC6\u7801","tag.close":"\u5173\u95ED","dialog.close_aria":"\u5173\u95ED","datepicker.select_date":"\u9009\u62E9\u65E5\u671F","datepicker.select_time":"\u9009\u62E9\u65F6\u95F4","datepicker.select_datetime":"\u9009\u62E9\u65E5\u671F\u65F6\u95F4","datepicker.clear":"\u6E05\u9664","datepicker.open":"\u6253\u5F00","field.checkbox":"\u590D\u9009\u6846","field.radio":"\u5355\u9009\u6846","field.switch":"\u5F00\u5173"},Oc={en:Xh,"en-us":Xh,zh:cl,"zh-cn":cl},as="zh-cn",Hc=new Map,dl="locale-change";function Zh(i){if(!i)return cl;let o=i.trim().toLowerCase();return Oc[o]??Oc[o.split("-")[0]]??cl}function ne(i,o){let e=(i||as).trim().toLowerCase();return{...Zh(e),...Hc.get(e)??{},...o??{}}}function ae(i,o,e,t){let r=i?.[o]??e;return t?r.replace(/\{(\w+)\}/g,(n,s)=>{let d=t[s];return d==null?"":String(d)}):r}function Em(){return as}function Rc(i){let o=i.trim().toLowerCase();!o||o===as||(as=o,globalThis.dispatchEvent(new CustomEvent(dl,{detail:{locale:o}})))}function Ic(i,o){let e=i.trim().toLowerCase();e&&(Hc.set(e,{...Hc.get(e)??{},...o}),e===as&&globalThis.dispatchEvent(new CustomEvent(dl,{detail:{locale:e}})))}function xe(i){return globalThis.addEventListener(dl,i),()=>globalThis.removeEventListener(dl,i)}function Sm(i,o,e,t,r){return ae(ne(t,r),i,o,e)}var xt=require("lit"),tt=require("lit/decorators.js");var Le=require("lit"),ie=require("lit/decorators.js");var Qh=require("lit"),$n=Qh.css`
|
|
2563
|
+
`;var Xh={"common.home":"Home","common.more":"More","common.close":"Close","common.cancel":"Cancel","common.confirm":"Confirm","common.create":"Create","common.select":"Select","common.copy":"Copy","common.move":"Move","common.delete":"Delete","common.rename":"Rename","common.download":"Download","common.folder":"Folder","common.new_folder":"New folder","common.upload_files":"Upload files","common.upload_folder":"Upload folder","common.back":"Back","common.forward":"Forward","common.refresh":"Refresh","common.search":"Search","common.sort":"Sort","common.expand":"Expand","common.collapse":"Collapse","common.clear_finished":"Clear finished","card.loading":"Loading\u2026","list.loading":"Loading\u2026","list.empty_folder":"Empty folder","list.opening_folder":"Opening Folder","dialog.close":"Close","dialog.loading_title":"Please wait","dialog.loading_message":"Processing...","dialog.mkdir.title":"New Folder","dialog.mkdir.headline":"Create folder","dialog.mkdir.hint":"This folder will be created in {path}.","dialog.mkdir.label":"Folder name","dialog.mkdir.placeholder":"Folder name","dialog.mkdir.error_name_required":"Name is required","dialog.mkdir.error_failed":"Failed to create folder","dialog.rename.title":"Rename","dialog.rename.headline":"Rename item","dialog.rename.hint_update":"Update {name} to the new name below.","dialog.rename.hint_choose":"Choose a new name for this item.","dialog.rename.label":"New name","dialog.rename.placeholder":"New name","dialog.rename.error_name_required":"Name is required","dialog.rename.error_failed":"Rename failed","dialog.batch_rename.title":"Batch rename","dialog.batch_rename.mode_replace":"Find & replace","dialog.batch_rename.mode_manual":"Manual edit","dialog.batch_rename.find":"Find","dialog.batch_rename.replace":"Replace","dialog.batch_rename.find_placeholder":"Text to replace","dialog.batch_rename.replace_placeholder":"Replacement text","dialog.batch_rename.before":"Before","dialog.batch_rename.after":"After","dialog.batch_rename.error_required":"Name is required","dialog.batch_rename.error_duplicate":'Duplicate name "{name}" in the same folder',"dialog.remove.title":"Delete","dialog.remove.headline_single":"Delete {name}?","dialog.remove.headline_multiple":"Delete {count} items?","dialog.remove.hint_single":"This action removes the selected item and cannot be undone.","dialog.remove.hint_multiple":"This action removes the selected items and cannot be undone.","dialog.remove.more":"...and {count} more","dialog.remove.error_failed":"Delete failed","picker.title":"Pick a folder","picker.confirm":"Select","picker.placeholder":"Select a folder below","upload.title":"Uploads","upload.count_active":"{count} active","upload.count_total":"{count} total","upload.empty":"No uploads yet","upload.state.queued":"Queued","upload.state.hashing":"Hashing\u2026","upload.state.uploading":"Uploading","upload.state.completed":"Completed","upload.state.failed":"Failed","upload.state.cancelled":"Cancelled","upload.state.reused":"Already uploaded","upload.cancel":"Cancel","upload.retry":"Retry","upload.remove":"Remove","action.copy_to_ellipsis":"Copy to\u2026","action.copy_to":"Copy to","action.move_to_ellipsis":"Move to\u2026","action.move_to":"Move to","layout.list":"List","layout.grid":"Grid","layout.cover":"Cover","sort.name":"Name","sort.size":"Size","sort.mtime":"Modified","sort.type":"Type","upload.drop_files":"Drop files to upload","pagination.label":"Pagination","pagination.first":"First page","pagination.prev":"Previous page","pagination.next":"Next page","pagination.last":"Last page","pagination.total":"Total {total}","pagination.page_size":"Page size","pagination.go_to":"Go to","icon_picker.placeholder":"Select icon","icon_picker.search_placeholder":"Search icons","icon_picker.empty":"No matching icons","icon_picker.clear":"Clear selected icon","icon_picker.unselected":"Unselected","select.clear":"Clear selection","select.empty":"No options","qrcode.label":"QR code","qrcode.empty":"Nothing to encode","input.clear":"Clear input","input.show_password":"Show password","input.hide_password":"Hide password","tag.close":"Close","dialog.close_aria":"Close","datepicker.select_date":"Select date","datepicker.select_time":"Select time","datepicker.select_datetime":"Select date and time","datepicker.clear":"Clear","datepicker.open":"Open","field.checkbox":"Checkbox","field.radio":"Radio","field.switch":"Switch"},cl={"common.home":"\u9996\u9875","common.more":"\u66F4\u591A","common.close":"\u5173\u95ED","common.cancel":"\u53D6\u6D88","common.confirm":"\u786E\u5B9A","common.create":"\u521B\u5EFA","common.select":"\u9009\u62E9","common.copy":"\u590D\u5236","common.move":"\u79FB\u52A8","common.delete":"\u5220\u9664","common.rename":"\u91CD\u547D\u540D","common.download":"\u4E0B\u8F7D","common.folder":"\u6587\u4EF6\u5939","common.new_folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","common.upload_files":"\u4E0A\u4F20\u6587\u4EF6","common.upload_folder":"\u4E0A\u4F20\u6587\u4EF6\u5939","common.back":"\u540E\u9000","common.forward":"\u524D\u8FDB","common.refresh":"\u5237\u65B0","common.search":"\u641C\u7D22","common.sort":"\u6392\u5E8F","common.expand":"\u5C55\u5F00","common.collapse":"\u6536\u8D77","common.clear_finished":"\u6E05\u9664\u5DF2\u5B8C\u6210","card.loading":"\u52A0\u8F7D\u4E2D\u2026","list.loading":"\u52A0\u8F7D\u4E2D\u2026","list.empty_folder":"\u7A7A\u6587\u4EF6\u5939","list.opening_folder":"\u6B63\u5728\u6253\u5F00\u6587\u4EF6\u5939","dialog.close":"\u5173\u95ED","dialog.loading_title":"\u8BF7\u7A0D\u5019","dialog.loading_message":"\u5904\u7406\u4E2D...","dialog.mkdir.title":"\u65B0\u5EFA\u6587\u4EF6\u5939","dialog.mkdir.headline":"\u521B\u5EFA\u6587\u4EF6\u5939","dialog.mkdir.hint":"\u8BE5\u6587\u4EF6\u5939\u5C06\u521B\u5EFA\u5728 {path} \u4E2D\u3002","dialog.mkdir.label":"\u6587\u4EF6\u5939\u540D\u79F0","dialog.mkdir.placeholder":"\u6587\u4EF6\u5939\u540D\u79F0","dialog.mkdir.error_name_required":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","dialog.mkdir.error_failed":"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25","dialog.rename.title":"\u91CD\u547D\u540D","dialog.rename.headline":"\u91CD\u547D\u540D\u9879\u76EE","dialog.rename.hint_update":"\u5C06 {name} \u66F4\u65B0\u4E3A\u4E0B\u9762\u7684\u65B0\u540D\u79F0\u3002","dialog.rename.hint_choose":"\u4E3A\u8BE5\u9879\u76EE\u8F93\u5165\u4E00\u4E2A\u65B0\u540D\u79F0\u3002","dialog.rename.label":"\u65B0\u540D\u79F0","dialog.rename.placeholder":"\u65B0\u540D\u79F0","dialog.rename.error_name_required":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","dialog.rename.error_failed":"\u91CD\u547D\u540D\u5931\u8D25","dialog.batch_rename.title":"\u6279\u91CF\u91CD\u547D\u540D","dialog.batch_rename.mode_replace":"\u67E5\u627E\u66FF\u6362","dialog.batch_rename.mode_manual":"\u624B\u52A8\u7F16\u8F91","dialog.batch_rename.find":"\u67E5\u627E","dialog.batch_rename.replace":"\u66FF\u6362\u4E3A","dialog.batch_rename.find_placeholder":"\u8981\u66FF\u6362\u7684\u6587\u672C","dialog.batch_rename.replace_placeholder":"\u66FF\u6362\u540E\u7684\u6587\u672C","dialog.batch_rename.before":"\u4FEE\u6539\u524D","dialog.batch_rename.after":"\u4FEE\u6539\u540E","dialog.batch_rename.error_required":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","dialog.batch_rename.error_duplicate":"\u540C\u4E00\u76EE\u5F55\u4E0B\u540D\u79F0\u201C{name}\u201D\u91CD\u590D","dialog.remove.title":"\u5220\u9664","dialog.remove.headline_single":"\u5220\u9664 {name}\uFF1F","dialog.remove.headline_multiple":"\u5220\u9664 {count} \u4E2A\u9879\u76EE\uFF1F","dialog.remove.hint_single":"\u6B64\u64CD\u4F5C\u4F1A\u5220\u9664\u6240\u9009\u9879\u76EE\uFF0C\u4E14\u65E0\u6CD5\u64A4\u9500\u3002","dialog.remove.hint_multiple":"\u6B64\u64CD\u4F5C\u4F1A\u5220\u9664\u6240\u9009\u9879\u76EE\uFF0C\u4E14\u65E0\u6CD5\u64A4\u9500\u3002","dialog.remove.more":"\u2026\u2026\u4EE5\u53CA\u53E6\u5916 {count} \u9879","dialog.remove.error_failed":"\u5220\u9664\u5931\u8D25","picker.title":"\u9009\u62E9\u6587\u4EF6\u5939","picker.confirm":"\u9009\u62E9","picker.placeholder":"\u8BF7\u9009\u62E9\u4E0B\u9762\u7684\u6587\u4EF6\u5939","upload.title":"\u4E0A\u4F20","upload.count_active":"{count} \u4E2A\u8FDB\u884C\u4E2D","upload.count_total":"\u5171 {count} \u4E2A","upload.empty":"\u6682\u65E0\u4E0A\u4F20\u4EFB\u52A1","upload.state.queued":"\u6392\u961F\u4E2D","upload.state.hashing":"\u6821\u9A8C\u4E2D\u2026","upload.state.uploading":"\u4E0A\u4F20\u4E2D","upload.state.completed":"\u5DF2\u5B8C\u6210","upload.state.failed":"\u5931\u8D25","upload.state.cancelled":"\u5DF2\u53D6\u6D88","upload.state.reused":"\u5DF2\u5B58\u5728","upload.cancel":"\u53D6\u6D88","upload.retry":"\u91CD\u8BD5","upload.remove":"\u79FB\u9664","action.copy_to_ellipsis":"\u590D\u5236\u5230\u2026","action.copy_to":"\u590D\u5236\u5230","action.move_to_ellipsis":"\u79FB\u52A8\u5230\u2026","action.move_to":"\u79FB\u52A8\u5230","layout.list":"\u5217\u8868","layout.grid":"\u7F51\u683C","layout.cover":"\u5C01\u9762","sort.name":"\u540D\u79F0","sort.size":"\u5927\u5C0F","sort.mtime":"\u4FEE\u6539\u65F6\u95F4","sort.type":"\u7C7B\u578B","upload.drop_files":"\u62D6\u653E\u6587\u4EF6\u4EE5\u4E0A\u4F20","pagination.label":"\u5206\u9875","pagination.first":"\u7B2C\u4E00\u9875","pagination.prev":"\u4E0A\u4E00\u9875","pagination.next":"\u4E0B\u4E00\u9875","pagination.last":"\u6700\u540E\u4E00\u9875","pagination.total":"\u5171 {total} \u9879","pagination.page_size":"\u6BCF\u9875\u6761\u6570","pagination.go_to":"\u8DF3\u81F3","icon_picker.placeholder":"\u9009\u62E9\u56FE\u6807","icon_picker.search_placeholder":"\u641C\u7D22\u56FE\u6807","icon_picker.empty":"\u6CA1\u6709\u5339\u914D\u7684\u56FE\u6807","icon_picker.clear":"\u6E05\u9664\u5DF2\u9009\u56FE\u6807","icon_picker.unselected":"\u672A\u9009\u62E9","select.clear":"\u6E05\u9664\u9009\u62E9","select.empty":"\u6CA1\u6709\u53EF\u9009\u9879","qrcode.label":"\u4E8C\u7EF4\u7801","qrcode.empty":"\u65E0\u5185\u5BB9","input.clear":"\u6E05\u9664\u8F93\u5165","input.show_password":"\u663E\u793A\u5BC6\u7801","input.hide_password":"\u9690\u85CF\u5BC6\u7801","tag.close":"\u5173\u95ED","dialog.close_aria":"\u5173\u95ED","datepicker.select_date":"\u9009\u62E9\u65E5\u671F","datepicker.select_time":"\u9009\u62E9\u65F6\u95F4","datepicker.select_datetime":"\u9009\u62E9\u65E5\u671F\u65F6\u95F4","datepicker.clear":"\u6E05\u9664","datepicker.open":"\u6253\u5F00","field.checkbox":"\u590D\u9009\u6846","field.radio":"\u5355\u9009\u6846","field.switch":"\u5F00\u5173"},Oc={en:Xh,"en-us":Xh,zh:cl,"zh-cn":cl},as="zh-cn",Hc=new Map,dl="locale-change";function Zh(i){if(!i)return cl;let o=i.trim().toLowerCase();return Oc[o]??Oc[o.split("-")[0]]??cl}function ne(i,o){let e=(i||as).trim().toLowerCase();return{...Zh(e),...Hc.get(e)??{},...o??{}}}function ae(i,o,e,t){let r=i?.[o]??e;return t?r.replace(/\{(\w+)\}/g,(n,s)=>{let d=t[s];return d==null?"":String(d)}):r}function Em(){return as}function Rc(i){let o=i.trim().toLowerCase();!o||o===as||(as=o,globalThis.dispatchEvent(new CustomEvent(dl,{detail:{locale:o}})))}function Ic(i,o){let e=i.trim().toLowerCase();e&&(Hc.set(e,{...Hc.get(e)??{},...o}),e===as&&globalThis.dispatchEvent(new CustomEvent(dl,{detail:{locale:e}})))}function xe(i){return globalThis.addEventListener(dl,i),()=>globalThis.removeEventListener(dl,i)}function Sm(i,o,e,t,r){return ae(ne(t,r),i,o,e)}var xt=require("lit"),rt=require("lit/decorators.js");var Le=require("lit"),ie=require("lit/decorators.js");var Qh=require("lit"),$n=Qh.css`
|
|
2555
2564
|
.option-row {
|
|
2556
2565
|
align-items: center;
|
|
2557
2566
|
gap: var(--lui-option-gap);
|
|
@@ -2827,7 +2836,7 @@
|
|
|
2827
2836
|
</span>
|
|
2828
2837
|
<span part="option-label">${s}</span>
|
|
2829
2838
|
</div>
|
|
2830
|
-
`};this.trigger="click",this.interactive=!0,this.showArrow=!1,this.closeOnOutsidePress=!0,this.closeOnEsc=!0,this.openDelay=0,this.closeDelay=0,this.offsetDistance=6,this.sameWidth=!0}get _dataOptions(){return this.source}get _usesGroupedSource(){return this.source.length>0&&!!this.groupKey}get _usesDataOptions(){return this._dataOptions.length>0}get _shouldVirtualizeOptions(){return this._usesDataOptions&&this.virtualized&&!this._usesGroupedSource&&this._dataOptions.length>=this.virtualThreshold}get _allOptions(){let e=Array.from(this.renderRoot.querySelectorAll("lui-option"));return e.length?e:Array.from(this.querySelectorAll("lui-option"))}get _allGroups(){return Array.from(this.querySelectorAll("lui-option-group"))}get _choices(){return this._usesDataOptions?this._dataOptions.map((e,t)=>this._normalizeDataChoice(e,t)).filter(e=>e!=null):this._allOptions.map((e,t)=>({value:e.value,label:e.getTextLabel(),disabled:e.disabled,index:t,raw:void 0,element:e}))}get _selectedValues(){return this.multiple?this.values.length>0?Array.from(new Set(this.values.filter(e=>e!=null&&String(e)!=="").map(e=>String(e)))):this.value?this.value.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]:this.value?[this.value]:[]}get _visibleChoices(){let e=this._searchKeyword.trim().toLowerCase();return!this.searchable||!e?this._choices:this._choices.filter(t=>t.label.toLowerCase().includes(e))}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSlotSync()),this._tagResizeObserver=new ResizeObserver(()=>this._scheduleResponsiveTagLayout()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","label","slot"]}),setTimeout(()=>this._syncSelection())}disconnectedCallback(){this._clearPortalRestoreTimer(),this._restorePanelFromPopoverPortal(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._tagResizeObserver?.disconnect(),this._slotSyncFrame&&cancelAnimationFrame(this._slotSyncFrame),this._tagLayoutFrame&&cancelAnimationFrame(this._tagLayoutFrame)}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(){let e=L(this,"select");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("searchable")&&typeof e.searchable=="boolean"&&this.searchable!==e.searchable&&(this.searchable=e.searchable),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("multiple")&&typeof e.multiple=="boolean"&&this.multiple!==e.multiple&&(this.multiple=e.multiple),!this._explicitAttrs.has("close-on-select")&&typeof e.closeOnSelect=="boolean"&&this.closeOnSelect!==e.closeOnSelect&&(this.closeOnSelect=e.closeOnSelect),!this._explicitAttrs.has("placement")&&typeof e.placement=="string"&&this.placement!==e.placement&&(this.placement=e.placement),!this._explicitAttrs.has("multiple-display")&&typeof e.multipleDisplay=="string"&&this.multipleDisplay!==e.multipleDisplay&&(this.multipleDisplay=e.multipleDisplay),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder),!this._explicitAttrs.has("search-placeholder")&&typeof e.searchPlaceholder=="string"&&!this.searchPlaceholder&&(this.searchPlaceholder=e.searchPlaceholder),!this._explicitAttrs.has("empty-text")&&typeof e.emptyText=="string"&&!this.emptyText&&(this.emptyText=e.emptyText),!this._explicitAttrs.has("max-tag-count")&&(typeof e.maxTagCount=="number"||e.maxTagCount==="responsive"||e.maxTagCount==="auto")&&this.maxTagCount==null&&(this.maxTagCount=e.maxTagCount)}updated(e){super.updated(e),(e.has("value")||e.has("values")||e.has("multiple")||e.has("searchable")||e.has("source")||e.has("labelKey")||e.has("valueKey")||e.has("disabledKey")||e.has("groupKey")||e.has("virtualized")||e.has("virtualThreshold")||e.has("maxTagCount"))&&this._syncSelection(),this._syncResponsiveTagObserver()}_syncSelection(){let e=this._choices,t=new Set(this._selectedValues);if(!e.length){this._displayLabel="",this._currentOptionValue="",this.requestUpdate();return}if(!this._usesDataOptions)for(let n of e)n.element&&(t.has(n.value)?n.element.setAttribute("aria-selected","true"):n.element.removeAttribute("aria-selected"));let r=e.filter(n=>t.has(n.value));r.length>0?(this._displayLabel=this.multiple?r.map(n=>n.label).join(", "):r[0].label,this._currentOptionValue=r.find(n=>n.value===this._currentOptionValue)?.value??r[0].value):(this._displayLabel="",this._currentOptionValue=""),this._applyOptionVisibility(),this._ensureCurrentOptionVisible(),this.requestUpdate()}get _usesResponsiveTagCount(){return this.multiple&&this.multipleDisplay==="tag"&&(this.maxTagCount==="responsive"||this.maxTagCount==="auto")}_syncResponsiveTagObserver(){let e=this._usesResponsiveTagCount?this._valueWrapNode??this._triggerNode:void 0;if(!e){this._tagObservedElement&&(this._tagResizeObserver?.unobserve(this._tagObservedElement),this._tagObservedElement=void 0),!this._usesResponsiveTagCount&&this._responsiveMaxTagCount!==null&&(this._responsiveMaxTagCount=null);return}e!==this._tagObservedElement&&(this._tagObservedElement&&this._tagResizeObserver?.unobserve(this._tagObservedElement),this._tagObservedElement=e,this._tagResizeObserver?.observe(e)),this._scheduleResponsiveTagLayout()}_scheduleResponsiveTagLayout(){this._usesResponsiveTagCount&&(this._tagLayoutFrame&&cancelAnimationFrame(this._tagLayoutFrame),this._tagLayoutFrame=requestAnimationFrame(()=>{this._tagLayoutFrame=0,this._recomputeResponsiveTagCount()}))}_recomputeResponsiveTagCount(){if(!this._usesResponsiveTagCount){this._responsiveMaxTagCount!==null&&(this._responsiveMaxTagCount=null);return}let e=this._valueWrapNode,t=Array.from(this.renderRoot.querySelectorAll("[data-measure-tag-index]"));if(!e||t.length===0){this._responsiveMaxTagCount!==null&&(this._responsiveMaxTagCount=null);return}let r=Math.floor(e.clientWidth||e.getBoundingClientRect().width||0);if(r<=0)return;let n=Number.parseFloat(getComputedStyle(e).columnGap||"0")||0,s=t.map(p=>Math.ceil(p.getBoundingClientRect().width)),d=s.reduce((p,f)=>p+f,0)+Math.max(0,s.length-1)*n,h=s.length;if(d>r){let p=this.renderRoot.querySelector("[data-measure-tag-more]"),f=Math.ceil(p?.getBoundingClientRect().width||34),x=0;h=0;for(let k of s){let C=x+(h>0?n:0)+k;if(C+n+f<=r)x=C,h+=1;else break}h=Math.min(h,Math.max(0,s.length-1))}this._responsiveMaxTagCount!==h&&(this._responsiveMaxTagCount=h)}_scheduleSlotSync(){this.source.length>0||(this._slotSyncFrame&&cancelAnimationFrame(this._slotSyncFrame),this._slotSyncFrame=requestAnimationFrame(()=>{this._slotSyncFrame=0,this._syncSelection()}))}_normalizeDataChoice(e,t){let r=e,n=r[this.valueKey]??e.value;if(n==null)return null;let s=r[this.labelKey]??e.label,d=r[this.disabledKey]??e.disabled,h=this.groupKey?r[this.groupKey]:void 0;return{value:String(n),label:s==null?String(n):String(s),disabled:!!d,group:h==null?void 0:String(h),index:t,raw:e}}_hasNamedSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_eventFromFooter(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.getAttribute("part")?.split(/\s+/).includes("footer"))}_applyOptionVisibility(){if(this._usesDataOptions)return;let e=this._searchKeyword.trim().toLowerCase();for(let t of this._choices)t.element&&(t.element.hidden=!!(this.searchable&&e&&!t.label.toLowerCase().includes(e)));for(let t of this._allGroups){let r=Array.from(t.querySelectorAll("lui-option"));t.hidden=r.length>0&&r.every(n=>n.hidden)}}_ensureCurrentOptionVisible(){let e=this._visibleChoices.filter(r=>!r.disabled);if(!e.length){this._currentOptionValue="";return}e.some(r=>r.value===this._currentOptionValue)||(this._currentOptionValue=e[0].value)}show(){this.disabled||this.open||(this.offsetDistance=Number.parseFloat(getComputedStyle(this).getPropertyValue("--lui-select-panel-gap"))||6,this._searchKeyword="",this._applyOptionVisibility(),this._ensureCurrentOptionVisible(),this._clearPortalRestoreTimer(),super.show(),this.updateComplete.then(()=>{this.portal&&this._movePanelToPopoverPortal(),this.searchable&&this._getSearchInputNode()?.focus(),this._scrollToCurrent()}))}hide(){this.open&&(this._searchKeyword="",this._applyOptionVisibility(),this._currentOptionValue=this._selectedValues[0]??"",super.hide(),this._schedulePortalRestore())}toggle(){this.open?this.hide():this.show()}_clearPortalRestoreTimer(){this._portalRestoreTimer&&(clearTimeout(this._portalRestoreTimer),this._portalRestoreTimer=null)}_schedulePortalRestore(){if(!this.portal){this._restorePanelFromPopoverPortal();return}this._clearPortalRestoreTimer(),this._portalRestoreTimer=setTimeout(()=>{this._portalRestoreTimer=null,this.open||this._restorePanelFromPopoverPortal()},180)}_getPanelNode(){return this._panelNode??this._portaledPanelNode}_getSearchInputNode(){return this._searchInputNode??this._portaledSearchInput}_movePanelToPopoverPortal(){let e=this._panelNode,t=this.portalHostElement,r=this.portalFloatingElement,n=t?.shadowRoot;if(!e||!t||!r||!n)return;this._adoptPortalStyles(n);let s=r.querySelector('[part="surface"]');s&&(s.hidden=!0,s.style.display="none");let d=this._triggerNode?.getBoundingClientRect().width??0;r.style.maxWidth="none",r.style.minWidth=this.sameWidth&&d>0?`${d}px`:"max-content",this.sameWidth&&d>0?(e.style.width=`${d}px`,e.style.minWidth=`${d}px`,e.style.boxSizing="border-box"):(e.style.width="",e.style.minWidth="",e.style.boxSizing=""),!this._portalPanelPlaceholder&&e.parentNode&&(this._portalPanelPlaceholder=this.ownerDocument.createComment("lui-select-panel"),e.parentNode.insertBefore(this._portalPanelPlaceholder,e)),e.parentNode!==r&&r.appendChild(e),this._portalPanelOriginalPart==null&&(this._portalPanelOriginalPart=e.getAttribute("part"));let h=new Set(String(this._portalPanelOriginalPart??e.getAttribute("part")??"").split(/\s+/).map(p=>p.trim()).filter(Boolean));h.delete("content"),h.add("panel"),e.setAttribute("part",Array.from(h).join(" ")),this._portaledPanelNode=e,this._portaledSearchInput=e.querySelector('[part="search-input"]'),this.refreshFloatingPosition()}_restorePanelFromPopoverPortal(){let e=this._portaledPanelNode??this._panelNode,t=this._portalPanelPlaceholder;e&&t?.parentNode&&t.parentNode.insertBefore(e,t),t?.remove(),this._portalPanelPlaceholder=null;let r=this.portalFloatingElement;if(r){r.style.maxWidth="",r.style.minWidth="";let n=r.querySelector('[part="surface"]');n&&(n.hidden=!1,n.style.display="")}e&&(this._portalPanelOriginalPart!=null&&e.setAttribute("part",this._portalPanelOriginalPart),e.style.width="",e.style.minWidth="",e.style.boxSizing=""),this._portaledPanelNode=null,this._portaledSearchInput=null,this._portalPanelOriginalPart=null}_findChoiceByValue(e){return this._choices.find(t=>t.value===e)??null}_commitSelection(e,t=!0){let n=(this.multiple?e:e.slice(0,1)).filter(h=>h!=null&&String(h)!=="").map(h=>String(h)),s=new Set(n),d=this._choices.filter(h=>s.has(h.value));if(this.values=[...n],this.value=this.multiple?n.join(","):n[0]??"",this._displayLabel=this.multiple?d.map(h=>h.label).join(", "):d[0]?.label??"",this._currentOptionValue=d.find(h=>h.value===this._currentOptionValue)?.value??d[0]?.value??"",!this._usesDataOptions)for(let h of this._choices)h.element&&(s.has(h.value)?h.element.setAttribute("aria-selected","true"):h.element.removeAttribute("aria-selected"));t&&this.dispatchEvent(new CustomEvent("change",{detail:{value:this.multiple?this.value:this.value,values:[...this.values]},bubbles:!0,composed:!0}))}_selectChoice(e){if(e.disabled)return;Ja(this);let t=[],r=this._selectedValues.join("|");if(this.multiple){let s=new Set(this._selectedValues);s.has(e.value)?s.delete(e.value):s.add(e.value),t=this._choices.filter(d=>s.has(d.value)).map(d=>d.value)}else t=[e.value];r!==t.join("|")?this._commitSelection(t,!0):this._currentOptionValue=e.value,this.closeOnSelect&&!this.multiple&&(this.hide(),this._triggerNode?.focus())}_handleOpenKey(e){if(!this.open)return;let t=this._visibleChoices.filter(n=>!n.disabled);if(!t.length)return;let r=t.findIndex(n=>n.value===this._currentOptionValue);if(e.key==="ArrowDown"){e.preventDefault();let n=r<t.length-1?r+1:0;this._currentOptionValue=t[n]?.value??t[0].value,this._scrollToCurrent()}else if(e.key==="ArrowUp"){e.preventDefault();let n=r>0?r-1:t.length-1;this._currentOptionValue=t[n]?.value??t[t.length-1].value,this._scrollToCurrent()}else if(e.key==="Enter"&&this._currentOptionValue){e.preventDefault();let n=this._findChoiceByValue(this._currentOptionValue);n&&this._selectChoice(n)}}_scrollToCurrent(){requestAnimationFrame(()=>{let e=this._findChoiceByValue(this._currentOptionValue);if(e){if(this._usesDataOptions){if(this._shouldVirtualizeOptions){let r=this._visibleChoices.findIndex(s=>s.value===e.value);if(r<0)return;this._getPanelNode()?.[Sn]?.element(r)?.scrollIntoView({block:"nearest"});return}let t=this._visibleChoices.findIndex(r=>r.value===e.value);if(t<0)return;this._getPanelNode()?.querySelector(`[data-option-index="${t}"]`)?.scrollIntoView({block:"nearest"});return}e.element?.scrollIntoView({block:"nearest"})}})}_renderGroupedOptions(){let e,t=0;return this._visibleChoices.map(r=>{let n=r.group&&r.group!==e?Le.html`<div part="group-label">${r.group}</div>`:null;e=r.group;let s=this._renderDataOption(r,t);return t+=1,Le.html`${n}${s}`})}render(){let e=this._displayLabel||this.placeholder||"",t=!this._displayLabel&&!!this.placeholder,r=this._choices.filter(H=>this._selectedValues.includes(H.value)),n=typeof this.maxTagCount=="number"&&Number.isFinite(this.maxTagCount)&&this.maxTagCount>=0?Math.floor(this.maxTagCount):void 0,s=this._usesResponsiveTagCount?this._responsiveMaxTagCount??r.length:n,d=typeof s=="number",h=this.multiple&&this.multipleDisplay==="tag"&&d?r.slice(0,s):r,p=r.length-h.length,f=this._visibleChoices,x=this.clearable&&!this.disabled&&r.length>0,k=this._hasNamedSlot("empty"),C=this._hasNamedSlot("panel-footer"),S=Hs(this),z=this._usesDataOptions?this._usesGroupedSource?this._renderGroupedOptions():this._shouldVirtualizeOptions?dn({items:f,scroller:!0,keyFunction:H=>H.value,renderItem:this._renderDataOption}):f.map(this._renderDataOption):null,T=Le.html`
|
|
2839
|
+
`};this.trigger="click",this.interactive=!0,this.showArrow=!1,this.closeOnOutsidePress=!0,this.closeOnEsc=!0,this.openDelay=0,this.closeDelay=0,this.offsetDistance=6,this.sameWidth=!0}get _dataOptions(){return this.source}get _usesGroupedSource(){return this.source.length>0&&!!this.groupKey}get _usesDataOptions(){return this._dataOptions.length>0}get _shouldVirtualizeOptions(){return this._usesDataOptions&&this.virtualized&&!this._usesGroupedSource&&this._dataOptions.length>=this.virtualThreshold}get _allOptions(){let e=Array.from(this.renderRoot.querySelectorAll("lui-option"));return e.length?e:Array.from(this.querySelectorAll("lui-option"))}get _allGroups(){return Array.from(this.querySelectorAll("lui-option-group"))}get _choices(){return this._usesDataOptions?this._dataOptions.map((e,t)=>this._normalizeDataChoice(e,t)).filter(e=>e!=null):this._allOptions.map((e,t)=>({value:e.value,label:e.getTextLabel(),disabled:e.disabled,index:t,raw:void 0,element:e}))}get _selectedValues(){return this.multiple?this.values.length>0?Array.from(new Set(this.values.filter(e=>e!=null&&String(e)!=="").map(e=>String(e)))):this.value?this.value.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]:this.value?[this.value]:[]}get _visibleChoices(){let e=this._searchKeyword.trim().toLowerCase();return!this.searchable||!e?this._choices:this._choices.filter(t=>t.label.toLowerCase().includes(e))}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSlotSync()),this._tagResizeObserver=new ResizeObserver(()=>this._scheduleResponsiveTagLayout()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","label","slot"]}),setTimeout(()=>this._syncSelection())}disconnectedCallback(){this._clearPortalRestoreTimer(),this._restorePanelFromPopoverPortal(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._tagResizeObserver?.disconnect(),this._slotSyncFrame&&cancelAnimationFrame(this._slotSyncFrame),this._tagLayoutFrame&&cancelAnimationFrame(this._tagLayoutFrame)}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(){let e=L(this,"select");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("searchable")&&typeof e.searchable=="boolean"&&this.searchable!==e.searchable&&(this.searchable=e.searchable),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("multiple")&&typeof e.multiple=="boolean"&&this.multiple!==e.multiple&&(this.multiple=e.multiple),!this._explicitAttrs.has("close-on-select")&&typeof e.closeOnSelect=="boolean"&&this.closeOnSelect!==e.closeOnSelect&&(this.closeOnSelect=e.closeOnSelect),!this._explicitAttrs.has("placement")&&typeof e.placement=="string"&&this.placement!==e.placement&&(this.placement=e.placement),!this._explicitAttrs.has("multiple-display")&&typeof e.multipleDisplay=="string"&&this.multipleDisplay!==e.multipleDisplay&&(this.multipleDisplay=e.multipleDisplay),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder),!this._explicitAttrs.has("search-placeholder")&&typeof e.searchPlaceholder=="string"&&!this.searchPlaceholder&&(this.searchPlaceholder=e.searchPlaceholder),!this._explicitAttrs.has("empty-text")&&typeof e.emptyText=="string"&&!this.emptyText&&(this.emptyText=e.emptyText),!this._explicitAttrs.has("max-tag-count")&&(typeof e.maxTagCount=="number"||e.maxTagCount==="responsive"||e.maxTagCount==="auto")&&this.maxTagCount==null&&(this.maxTagCount=e.maxTagCount)}updated(e){super.updated(e),(e.has("value")||e.has("values")||e.has("multiple")||e.has("searchable")||e.has("source")||e.has("labelKey")||e.has("valueKey")||e.has("disabledKey")||e.has("groupKey")||e.has("virtualized")||e.has("virtualThreshold")||e.has("maxTagCount"))&&this._syncSelection(),this._syncResponsiveTagObserver()}_syncSelection(){let e=this._choices,t=new Set(this._selectedValues);if(!e.length){this._displayLabel="",this._currentOptionValue="",this.requestUpdate();return}if(!this._usesDataOptions)for(let n of e)n.element&&(t.has(n.value)?n.element.setAttribute("aria-selected","true"):n.element.removeAttribute("aria-selected"));let r=e.filter(n=>t.has(n.value));r.length>0?(this._displayLabel=this.multiple?r.map(n=>n.label).join(", "):r[0].label,this._currentOptionValue=r.find(n=>n.value===this._currentOptionValue)?.value??r[0].value):(this._displayLabel="",this._currentOptionValue=""),this._applyOptionVisibility(),this._ensureCurrentOptionVisible(),this.requestUpdate()}get _usesResponsiveTagCount(){return this.multiple&&this.multipleDisplay==="tag"&&(this.maxTagCount==="responsive"||this.maxTagCount==="auto")}_syncResponsiveTagObserver(){let e=this._usesResponsiveTagCount?this._valueWrapNode??this._triggerNode:void 0;if(!e){this._tagObservedElement&&(this._tagResizeObserver?.unobserve(this._tagObservedElement),this._tagObservedElement=void 0),!this._usesResponsiveTagCount&&this._responsiveMaxTagCount!==null&&(this._responsiveMaxTagCount=null);return}e!==this._tagObservedElement&&(this._tagObservedElement&&this._tagResizeObserver?.unobserve(this._tagObservedElement),this._tagObservedElement=e,this._tagResizeObserver?.observe(e)),this._scheduleResponsiveTagLayout()}_scheduleResponsiveTagLayout(){this._usesResponsiveTagCount&&(this._tagLayoutFrame&&cancelAnimationFrame(this._tagLayoutFrame),this._tagLayoutFrame=requestAnimationFrame(()=>{this._tagLayoutFrame=0,this._recomputeResponsiveTagCount()}))}_recomputeResponsiveTagCount(){if(!this._usesResponsiveTagCount){this._responsiveMaxTagCount!==null&&(this._responsiveMaxTagCount=null);return}let e=this._valueWrapNode,t=Array.from(this.renderRoot.querySelectorAll("[data-measure-tag-index]"));if(!e||t.length===0){this._responsiveMaxTagCount!==null&&(this._responsiveMaxTagCount=null);return}let r=Math.floor(e.clientWidth||e.getBoundingClientRect().width||0);if(r<=0)return;let n=Number.parseFloat(getComputedStyle(e).columnGap||"0")||0,s=t.map(p=>Math.ceil(p.getBoundingClientRect().width)),d=s.reduce((p,f)=>p+f,0)+Math.max(0,s.length-1)*n,h=s.length;if(d>r){let p=this.renderRoot.querySelector("[data-measure-tag-more]"),f=Math.ceil(p?.getBoundingClientRect().width||34),x=0;h=0;for(let k of s){let C=x+(h>0?n:0)+k;if(C+n+f<=r)x=C,h+=1;else break}h=Math.min(h,Math.max(0,s.length-1))}this._responsiveMaxTagCount!==h&&(this._responsiveMaxTagCount=h)}_scheduleSlotSync(){this.source.length>0||(this._slotSyncFrame&&cancelAnimationFrame(this._slotSyncFrame),this._slotSyncFrame=requestAnimationFrame(()=>{this._slotSyncFrame=0,this._syncSelection()}))}_normalizeDataChoice(e,t){let r=e,n=r[this.valueKey]??e.value;if(n==null)return null;let s=r[this.labelKey]??e.label,d=r[this.disabledKey]??e.disabled,h=this.groupKey?r[this.groupKey]:void 0;return{value:String(n),label:s==null?String(n):String(s),disabled:!!d,group:h==null?void 0:String(h),index:t,raw:e}}_hasNamedSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_eventFromFooter(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.getAttribute("part")?.split(/\s+/).includes("footer"))}_applyOptionVisibility(){if(this._usesDataOptions)return;let e=this._searchKeyword.trim().toLowerCase();for(let t of this._choices)t.element&&(t.element.hidden=!!(this.searchable&&e&&!t.label.toLowerCase().includes(e)));for(let t of this._allGroups){let r=Array.from(t.querySelectorAll("lui-option"));t.hidden=r.length>0&&r.every(n=>n.hidden)}}_ensureCurrentOptionVisible(){let e=this._visibleChoices.filter(r=>!r.disabled);if(!e.length){this._currentOptionValue="";return}e.some(r=>r.value===this._currentOptionValue)||(this._currentOptionValue=e[0].value)}show(){this.disabled||this.open||(this.offsetDistance=Number.parseFloat(getComputedStyle(this).getPropertyValue("--lui-select-panel-gap"))||6,this._searchKeyword="",this._applyOptionVisibility(),this._ensureCurrentOptionVisible(),this._clearPortalRestoreTimer(),super.show(),this.updateComplete.then(()=>{this.portal&&this._movePanelToPopoverPortal(),this.searchable&&this._getSearchInputNode()?.focus(),this._scrollToCurrent()}))}hide(){this.open&&(this._searchKeyword="",this._applyOptionVisibility(),this._currentOptionValue=this._selectedValues[0]??"",super.hide(),this._schedulePortalRestore())}toggle(){this.open?this.hide():this.show()}_clearPortalRestoreTimer(){this._portalRestoreTimer&&(clearTimeout(this._portalRestoreTimer),this._portalRestoreTimer=null)}_schedulePortalRestore(){if(!this.portal){this._restorePanelFromPopoverPortal();return}this._clearPortalRestoreTimer(),this._portalRestoreTimer=setTimeout(()=>{this._portalRestoreTimer=null,this.open||this._restorePanelFromPopoverPortal()},180)}_getPanelNode(){return this._panelNode??this._portaledPanelNode}_getSearchInputNode(){return this._searchInputNode??this._portaledSearchInput}_movePanelToPopoverPortal(){let e=this._panelNode,t=this.portalHostElement,r=this.portalFloatingElement,n=t?.shadowRoot;if(!e||!t||!r||!n)return;this._adoptPortalStyles(n);let s=r.querySelector('[part="surface"]');s&&(s.hidden=!0,s.style.display="none");let d=this._triggerNode?.getBoundingClientRect().width??0;r.style.maxWidth="none",r.style.minWidth=this.sameWidth&&d>0?`${d}px`:"max-content",this.sameWidth&&d>0?(e.style.width=`${d}px`,e.style.minWidth=`${d}px`,e.style.boxSizing="border-box"):(e.style.width="",e.style.minWidth="",e.style.boxSizing=""),!this._portalPanelPlaceholder&&e.parentNode&&(this._portalPanelPlaceholder=this.ownerDocument.createComment("lui-select-panel"),e.parentNode.insertBefore(this._portalPanelPlaceholder,e)),e.parentNode!==r&&r.appendChild(e),this._portalPanelOriginalPart==null&&(this._portalPanelOriginalPart=e.getAttribute("part"));let h=new Set(String(this._portalPanelOriginalPart??e.getAttribute("part")??"").split(/\s+/).map(p=>p.trim()).filter(Boolean));h.delete("content"),h.add("panel"),e.setAttribute("part",Array.from(h).join(" ")),this._portaledPanelNode=e,this._portaledSearchInput=e.querySelector('[part="search-input"]'),this.refreshFloatingPosition()}_restorePanelFromPopoverPortal(){let e=this._portaledPanelNode??this._panelNode,t=this._portalPanelPlaceholder;e&&t?.parentNode&&t.parentNode.insertBefore(e,t),t?.remove(),this._portalPanelPlaceholder=null;let r=this.portalFloatingElement;if(r){r.style.maxWidth="",r.style.minWidth="";let n=r.querySelector('[part="surface"]');n&&(n.hidden=!1,n.style.display="")}e&&(this._portalPanelOriginalPart!=null&&e.setAttribute("part",this._portalPanelOriginalPart),e.style.width="",e.style.minWidth="",e.style.boxSizing=""),this._portaledPanelNode=null,this._portaledSearchInput=null,this._portalPanelOriginalPart=null}_findChoiceByValue(e){return this._choices.find(t=>t.value===e)??null}_commitSelection(e,t=!0){let n=(this.multiple?e:e.slice(0,1)).filter(h=>h!=null&&String(h)!=="").map(h=>String(h)),s=new Set(n),d=this._choices.filter(h=>s.has(h.value));if(this.values=[...n],this.value=this.multiple?n.join(","):n[0]??"",this._displayLabel=this.multiple?d.map(h=>h.label).join(", "):d[0]?.label??"",this._currentOptionValue=d.find(h=>h.value===this._currentOptionValue)?.value??d[0]?.value??"",!this._usesDataOptions)for(let h of this._choices)h.element&&(s.has(h.value)?h.element.setAttribute("aria-selected","true"):h.element.removeAttribute("aria-selected"));t&&this.dispatchEvent(new CustomEvent("change",{detail:{value:this.multiple?this.value:this.value,values:[...this.values]},bubbles:!0,composed:!0}))}_selectChoice(e){if(e.disabled)return;Ja(this);let t=[],r=this._selectedValues.join("|");if(this.multiple){let s=new Set(this._selectedValues);s.has(e.value)?s.delete(e.value):s.add(e.value),t=this._choices.filter(d=>s.has(d.value)).map(d=>d.value)}else t=[e.value];r!==t.join("|")?this._commitSelection(t,!0):this._currentOptionValue=e.value,this.closeOnSelect&&!this.multiple&&(this.hide(),this._triggerNode?.focus())}_handleOpenKey(e){if(!this.open)return;let t=this._visibleChoices.filter(n=>!n.disabled);if(!t.length)return;let r=t.findIndex(n=>n.value===this._currentOptionValue);if(e.key==="ArrowDown"){e.preventDefault();let n=r<t.length-1?r+1:0;this._currentOptionValue=t[n]?.value??t[0].value,this._scrollToCurrent()}else if(e.key==="ArrowUp"){e.preventDefault();let n=r>0?r-1:t.length-1;this._currentOptionValue=t[n]?.value??t[t.length-1].value,this._scrollToCurrent()}else if(e.key==="Enter"&&this._currentOptionValue){e.preventDefault();let n=this._findChoiceByValue(this._currentOptionValue);n&&this._selectChoice(n)}}_scrollToCurrent(){requestAnimationFrame(()=>{let e=this._findChoiceByValue(this._currentOptionValue);if(e){if(this._usesDataOptions){if(this._shouldVirtualizeOptions){let r=this._visibleChoices.findIndex(s=>s.value===e.value);if(r<0)return;this._getPanelNode()?.[Sn]?.element(r)?.scrollIntoView({block:"nearest"});return}let t=this._visibleChoices.findIndex(r=>r.value===e.value);if(t<0)return;this._getPanelNode()?.querySelector(`[data-option-index="${t}"]`)?.scrollIntoView({block:"nearest"});return}e.element?.scrollIntoView({block:"nearest"})}})}_renderGroupedOptions(){let e,t=0;return this._visibleChoices.map(r=>{let n=r.group&&r.group!==e?Le.html`<div part="group-label">${r.group}</div>`:null;e=r.group;let s=this._renderDataOption(r,t);return t+=1,Le.html`${n}${s}`})}render(){let e=this._displayLabel||this.placeholder||"",t=!this._displayLabel&&!!this.placeholder,r=this._choices.filter(H=>this._selectedValues.includes(H.value)),n=typeof this.maxTagCount=="number"&&Number.isFinite(this.maxTagCount)&&this.maxTagCount>=0?Math.floor(this.maxTagCount):void 0,s=this._usesResponsiveTagCount?this._responsiveMaxTagCount??r.length:n,d=typeof s=="number",h=this.multiple&&this.multipleDisplay==="tag"&&d?r.slice(0,s):r,p=r.length-h.length,f=this._visibleChoices,x=this.clearable&&!this.disabled&&r.length>0,k=this._hasNamedSlot("empty"),C=this._hasNamedSlot("panel-footer"),S=Hs(this),z=this._usesDataOptions?this._usesGroupedSource?this._renderGroupedOptions():this._shouldVirtualizeOptions?dn({items:f,scroller:!0,keyFunction:H=>H.value,renderItem:this._renderDataOption}):f.map(this._renderDataOption):null,T=Le.html`
|
|
2831
2840
|
${this.searchable?Le.html`
|
|
2832
2841
|
<div part="search">
|
|
2833
2842
|
<input
|
|
@@ -3259,7 +3268,7 @@
|
|
|
3259
3268
|
padding: 0 38px 0 14px;
|
|
3260
3269
|
font-size: var(--lui-font-size);
|
|
3261
3270
|
}
|
|
3262
|
-
`],a([(0,ie.property)({reflect:!0})],me.prototype,"value",2),a([(0,ie.property)({attribute:!1})],me.prototype,"source",2),a([(0,ie.property)({reflect:!0,attribute:"label-key"})],me.prototype,"labelKey",2),a([(0,ie.property)({reflect:!0,attribute:"value-key"})],me.prototype,"valueKey",2),a([(0,ie.property)({reflect:!0,attribute:"disabled-key"})],me.prototype,"disabledKey",2),a([(0,ie.property)({reflect:!0,attribute:"group-key"})],me.prototype,"groupKey",2),a([(0,ie.property)({attribute:!1})],me.prototype,"renderOption",2),a([(0,ie.property)({attribute:!1})],me.prototype,"renderTag",2),a([(0,ie.property)({type:Boolean,attribute:"virtualized",reflect:!0})],me.prototype,"virtualized",2),a([(0,ie.property)({type:Number,attribute:"virtual-threshold"})],me.prototype,"virtualThreshold",2),a([(0,ie.property)({reflect:!0})],me.prototype,"placeholder",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"disabled",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"noborder",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"multiple",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"searchable",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"clearable",2),a([(0,ie.property)({reflect:!0,attribute:"search-placeholder"})],me.prototype,"searchPlaceholder",2),a([(0,ie.property)({reflect:!0,attribute:"empty-text"})],me.prototype,"emptyText",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"open",2),a([(0,ie.property)({reflect:!0})],me.prototype,"placement",2),a([(0,ie.property)({reflect:!0})],me.prototype,"size",2),a([(0,ie.property)({type:Boolean,attribute:"close-on-select"})],me.prototype,"closeOnSelect",2),a([(0,ie.property)({reflect:!0,attribute:"multiple-display"})],me.prototype,"multipleDisplay",2),a([(0,ie.property)()],me.prototype,"locale",2),a([(0,ie.property)({attribute:!1})],me.prototype,"translations",2),a([(0,ie.property)({attribute:"max-tag-count",converter:{fromAttribute(e){if(e==null||e==="")return;if(e==="responsive"||e==="auto")return e;let t=Number(e);return Number.isFinite(t)?t:void 0},toAttribute(e){return e==null?null:String(e)}}})],me.prototype,"maxTagCount",2),a([(0,ie.property)({attribute:!1})],me.prototype,"values",2),a([(0,ie.state)()],me.prototype,"_displayLabel",2),a([(0,ie.state)()],me.prototype,"_currentOptionValue",2),a([(0,ie.state)()],me.prototype,"_searchKeyword",2),a([(0,ie.state)()],me.prototype,"_responsiveMaxTagCount",2),a([(0,ie.query)('[part~="trigger"]')],me.prototype,"_triggerNode",2),a([(0,ie.query)('[part="value-wrap"]')],me.prototype,"_valueWrapNode",2),a([(0,ie.query)('[part~="panel"]')],me.prototype,"_panelNode",2),a([(0,ie.query)('[part="search-input"]')],me.prototype,"_searchInputNode",2),me=a([(0,ie.customElement)("lui-select")],me);var Ye=class extends xt.LitElement{constructor(){super(...arguments);this.current=1;this.total=0;this.pageSize=10;this.maxVisible=7;this.size="md";this.showSummary=!1;this.showTotal=!1;this.showJumper=!1;this.showSizeChanger=!1;this.showFirstLast=!1;this.hideOnSinglePage=!1;this.simple=!1;this.compact=!1;this.responsive=!1;this.pageSizeOptions=[10,20,50,100];this.selectProps={};this._jumperValue="";this._responsiveMode="normal";this._layoutFrame=0;this._indicatorFrame=0;this._indicatorLastPage=null;this._explicitAttrs=new Set;this._onJumperInput=e=>{e.stopPropagation(),this._jumperValue=e.target.value};this._onPageSizeChange=e=>{e.stopPropagation(),this._setPageSize(Number(e.detail?.value))};this._commitJumper=()=>{let e=Number(this._jumperValue);Number.isFinite(e)&&(this._setPage(e,"jumper"),this._jumperValue="")};this._onJumperKeydown=e=>{e.key==="Enter"&&(e.preventDefault(),this._commitJumper())}}willUpdate(e){let t=L(this,"pagination");this._explicitAttrs.size||(this._explicitAttrs=new Set(this.getAttributeNames())),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("compact")&&typeof t.compact=="boolean"&&this.compact!==t.compact&&(this.compact=t.compact)}updated(e){let t=L(this,"pagination");se(this._sizeSelect,{...t.selectProps??{},...this.selectProps??{}}),this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),(e.has("responsive")||e.has("size")||e.has("showTotal")||e.has("showSummary")||e.has("showJumper")||e.has("showSizeChanger")||e.has("showFirstLast")||e.has("simple")||e.has("compact")||e.has("current")||e.has("total")||e.has("pageSize")||e.has("maxVisible"))&&this._scheduleResponsiveLayout(),this._pagerNode?.setAttribute("data-indicator-still",""),this._schedulePageIndicatorLayout()}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._resizeObserver=new ResizeObserver(()=>this._scheduleResponsiveLayout())}firstUpdated(){this._resizeObserver?.observe(this),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._scheduleResponsiveLayout()}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame)}_t(e,t,r){let n=
|
|
3271
|
+
`],a([(0,ie.property)({reflect:!0})],me.prototype,"value",2),a([(0,ie.property)({attribute:!1})],me.prototype,"source",2),a([(0,ie.property)({reflect:!0,attribute:"label-key"})],me.prototype,"labelKey",2),a([(0,ie.property)({reflect:!0,attribute:"value-key"})],me.prototype,"valueKey",2),a([(0,ie.property)({reflect:!0,attribute:"disabled-key"})],me.prototype,"disabledKey",2),a([(0,ie.property)({reflect:!0,attribute:"group-key"})],me.prototype,"groupKey",2),a([(0,ie.property)({attribute:!1})],me.prototype,"renderOption",2),a([(0,ie.property)({attribute:!1})],me.prototype,"renderTag",2),a([(0,ie.property)({type:Boolean,attribute:"virtualized",reflect:!0})],me.prototype,"virtualized",2),a([(0,ie.property)({type:Number,attribute:"virtual-threshold"})],me.prototype,"virtualThreshold",2),a([(0,ie.property)({reflect:!0})],me.prototype,"placeholder",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"disabled",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"noborder",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"multiple",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"searchable",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"clearable",2),a([(0,ie.property)({reflect:!0,attribute:"search-placeholder"})],me.prototype,"searchPlaceholder",2),a([(0,ie.property)({reflect:!0,attribute:"empty-text"})],me.prototype,"emptyText",2),a([(0,ie.property)({type:Boolean,reflect:!0})],me.prototype,"open",2),a([(0,ie.property)({reflect:!0})],me.prototype,"placement",2),a([(0,ie.property)({reflect:!0})],me.prototype,"size",2),a([(0,ie.property)({type:Boolean,attribute:"close-on-select"})],me.prototype,"closeOnSelect",2),a([(0,ie.property)({reflect:!0,attribute:"multiple-display"})],me.prototype,"multipleDisplay",2),a([(0,ie.property)()],me.prototype,"locale",2),a([(0,ie.property)({attribute:!1})],me.prototype,"translations",2),a([(0,ie.property)({attribute:"max-tag-count",converter:{fromAttribute(e){if(e==null||e==="")return;if(e==="responsive"||e==="auto")return e;let t=Number(e);return Number.isFinite(t)?t:void 0},toAttribute(e){return e==null?null:String(e)}}})],me.prototype,"maxTagCount",2),a([(0,ie.property)({attribute:!1})],me.prototype,"values",2),a([(0,ie.state)()],me.prototype,"_displayLabel",2),a([(0,ie.state)()],me.prototype,"_currentOptionValue",2),a([(0,ie.state)()],me.prototype,"_searchKeyword",2),a([(0,ie.state)()],me.prototype,"_responsiveMaxTagCount",2),a([(0,ie.query)('[part~="trigger"]')],me.prototype,"_triggerNode",2),a([(0,ie.query)('[part="value-wrap"]')],me.prototype,"_valueWrapNode",2),a([(0,ie.query)('[part~="panel"]')],me.prototype,"_panelNode",2),a([(0,ie.query)('[part="search-input"]')],me.prototype,"_searchInputNode",2),me=a([(0,ie.customElement)("lui-select")],me);var Ye=class extends xt.LitElement{constructor(){super(...arguments);this.current=1;this.total=0;this.pageSize=10;this.maxVisible=7;this.size="md";this.showSummary=!1;this.showTotal=!1;this.showJumper=!1;this.showSizeChanger=!1;this.showFirstLast=!1;this.hideOnSinglePage=!1;this.simple=!1;this.compact=!1;this.responsive=!1;this.pageSizeOptions=[10,20,50,100];this.selectProps={};this._jumperValue="";this._responsiveMode="normal";this._layoutFrame=0;this._indicatorFrame=0;this._indicatorLastPage=null;this._explicitAttrs=new Set;this._onJumperInput=e=>{e.stopPropagation(),this._jumperValue=e.target.value};this._onPageSizeChange=e=>{e.stopPropagation(),this._setPageSize(Number(e.detail?.value))};this._commitJumper=()=>{let e=Number(this._jumperValue);Number.isFinite(e)&&(this._setPage(e,"jumper"),this._jumperValue="")};this._onJumperKeydown=e=>{e.key==="Enter"&&(e.preventDefault(),this._commitJumper())}}willUpdate(e){let t=L(this,"pagination");this._explicitAttrs.size||(this._explicitAttrs=new Set(this.getAttributeNames())),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("compact")&&typeof t.compact=="boolean"&&this.compact!==t.compact&&(this.compact=t.compact)}updated(e){let t=L(this,"pagination");se(this._sizeSelect,{...t.selectProps??{},...this.selectProps??{}}),this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),(e.has("responsive")||e.has("size")||e.has("showTotal")||e.has("showSummary")||e.has("showJumper")||e.has("showSizeChanger")||e.has("showFirstLast")||e.has("simple")||e.has("compact")||e.has("current")||e.has("total")||e.has("pageSize")||e.has("maxVisible"))&&this._scheduleResponsiveLayout(),this._pagerNode?.setAttribute("data-indicator-still",""),this._schedulePageIndicatorLayout()}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._resizeObserver=new ResizeObserver(()=>this._scheduleResponsiveLayout())}firstUpdated(){this._resizeObserver?.observe(this),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._scheduleResponsiveLayout()}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame)}_t(e,t,r){let n=at(this,this.locale,this.translations);return ae(ne(n.locale,n.translations),e,t,r)}get _pageSize(){let e=Number(this.pageSize);return Number.isFinite(e)&&e>0?Math.floor(e):10}get _pageCount(){let e=Number(this.total);return Math.max(1,Math.ceil((Number.isFinite(e)?e:0)/this._pageSize))}get _current(){let e=Number(this.current);return Math.min(this._pageCount,Math.max(1,Number.isFinite(e)?Math.floor(e):1))}_scheduleResponsiveLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._updateResponsiveMode(),this._schedulePageIndicatorLayout()})}_schedulePageIndicatorLayout(){this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame),this._indicatorFrame=requestAnimationFrame(()=>{this._indicatorFrame=0,this._updatePageIndicator()})}_updatePageIndicator(){let e=this._pagerNode;if(!e||this._effectiveSimple){e?.style.setProperty("--lui-pagination-indicator-opacity","0"),this._indicatorLastPage=null;return}let t=e.querySelector(`button.page[data-page="${this._current}"]`);if(!t){e.style.setProperty("--lui-pagination-indicator-opacity","0"),this._indicatorLastPage=null;return}let r=Number(this._current);this._indicatorLastPage!==null&&this._indicatorLastPage!==r&&e.removeAttribute("data-indicator-still");let s=e.getBoundingClientRect(),d=t.getBoundingClientRect();e.style.setProperty("--lui-pagination-indicator-x",`${d.left-s.left+e.scrollLeft}px`),e.style.setProperty("--lui-pagination-indicator-y",`${d.top-s.top+e.scrollTop}px`),e.style.setProperty("--lui-pagination-indicator-width",`${d.width}px`),e.style.setProperty("--lui-pagination-indicator-height",`${d.height}px`),e.style.setProperty("--lui-pagination-indicator-opacity","1"),this._indicatorLastPage=r}_getResponsiveAvailableWidth(){let e=Math.floor(this.clientWidth||this.getBoundingClientRect().width||0);if(e>0)return e;let t=this.parentElement;return t?Math.floor(t.clientWidth||t.getBoundingClientRect().width||0):0}_updateResponsiveMode(){if(!this.responsive){this._responsiveMode!=="normal"&&(this._responsiveMode="normal"),this.dataset.responsiveMode="normal";return}let e=Math.floor(this._getResponsiveAvailableWidth()),t=e>0&&e<360?"simple":e>0&&e<860?"compact":"normal";this.dataset.responsiveMode=t,t!==this._responsiveMode&&(this._responsiveMode=t,this._indicatorLastPage=null)}get _effectiveSimple(){return this.simple||this.responsive&&this._responsiveMode==="simple"}get _effectiveMaxVisible(){return this.responsive?this._responsiveMode==="simple"?1:this._responsiveMode==="compact"?Math.min(this.maxVisible||5,5):this.maxVisible:this.maxVisible}get _showAuxiliaryControls(){return!this.responsive||this._responsiveMode==="normal"}get _showCompactSizeChanger(){return!this.responsive||this._responsiveMode==="normal"}get _normalizedPageSizeOptions(){let e=new Set,t=r=>{let n=Number(r);Number.isFinite(n)&&n>0&&e.add(Math.floor(n))};return this.pageSizeOptions.forEach(t),t(this._pageSize),[...e].sort((r,n)=>r-n)}_emitChange(e,t){this.dispatchEvent(new CustomEvent("change",{detail:{page:e,current:e,pageSize:this._pageSize,total:Number.isFinite(Number(this.total))?Number(this.total):0,pageCount:this._pageCount,action:t},bubbles:!0,composed:!0}))}_setPage(e,t){let r=Math.min(this._pageCount,Math.max(1,e));r!==this._current&&(this.current=r,this._emitChange(r,t))}_setPageSize(e){if(!Number.isFinite(e))return;let t=Math.max(1,Math.floor(e));if(t===this.pageSize)return;let r=(this._current-1)*this._pageSize;this.pageSize=t;let n=Math.floor(r/t)+1;this.current=Math.min(Math.max(1,n),Math.max(1,Math.ceil(this.total/t))),this._emitChange(this.current,"page-size")}_buildPages(e=this.maxVisible){let t=this._pageCount,r=this._current,n=Math.max(5,e||7);if(t<=n)return Array.from({length:t},(f,x)=>x+1);let s=[1],d=n-2,h=Math.max(2,r-Math.floor(d/2)),p=h+d-1;p>=t&&(p=t-1,h=p-d+1),h>2&&s.push("ellipsis");for(let f=h;f<=p;f+=1)s.push(f);return p<t-1&&s.push("ellipsis"),s.push(t),s}_renderPager(){let e=this._current,t=this._pageCount,r=this._effectiveSimple,n=this.showFirstLast&&this._showAuxiliaryControls&&!r;return xt.html`
|
|
3263
3272
|
<div class="pager" part="pager" data-indicator-still aria-label=${this._t("pagination.label","Pagination")}>
|
|
3264
3273
|
<span class="page-indicator" part="page-indicator" aria-hidden="true"></span>
|
|
3265
3274
|
${n?xt.html`
|
|
@@ -3598,7 +3607,7 @@
|
|
|
3598
3607
|
transition: none;
|
|
3599
3608
|
}
|
|
3600
3609
|
}
|
|
3601
|
-
`],a([(0,tt.property)({type:Number})],Ye.prototype,"current",2),a([(0,tt.property)({type:Number})],Ye.prototype,"total",2),a([(0,tt.property)({type:Number,attribute:"page-size"})],Ye.prototype,"pageSize",2),a([(0,tt.property)({type:Number,attribute:"max-visible"})],Ye.prototype,"maxVisible",2),a([(0,tt.property)({reflect:!0})],Ye.prototype,"size",2),a([(0,tt.property)({type:Boolean,attribute:"show-summary"})],Ye.prototype,"showSummary",2),a([(0,tt.property)({type:Boolean,attribute:"show-total"})],Ye.prototype,"showTotal",2),a([(0,tt.property)({type:Boolean,attribute:"show-jumper"})],Ye.prototype,"showJumper",2),a([(0,tt.property)({type:Boolean,attribute:"show-size-changer"})],Ye.prototype,"showSizeChanger",2),a([(0,tt.property)({type:Boolean,attribute:"show-first-last"})],Ye.prototype,"showFirstLast",2),a([(0,tt.property)({type:Boolean,attribute:"hide-on-single-page"})],Ye.prototype,"hideOnSinglePage",2),a([(0,tt.property)({type:Boolean,reflect:!0})],Ye.prototype,"simple",2),a([(0,tt.property)({type:Boolean,reflect:!0})],Ye.prototype,"compact",2),a([(0,tt.property)({type:Boolean,reflect:!0})],Ye.prototype,"responsive",2),a([(0,tt.property)()],Ye.prototype,"locale",2),a([(0,tt.property)({attribute:!1})],Ye.prototype,"translations",2),a([(0,tt.property)({attribute:!1})],Ye.prototype,"pageSizeOptions",2),a([(0,tt.property)({attribute:!1})],Ye.prototype,"selectProps",2),a([(0,tt.query)("select")],Ye.prototype,"_sizeSelect",2),a([(0,tt.query)('[part="pager"]')],Ye.prototype,"_pagerNode",2),a([(0,tt.state)()],Ye.prototype,"_jumperValue",2),a([(0,tt.state)()],Ye.prototype,"_responsiveMode",2),Ye=a([(0,tt.customElement)("lui-pagination")],Ye);var $m=new Set(["folder","folder-open","file","image","search","plus","minus","x","check","copy","download","upload","edit","trash","refresh","eye","eye-off","chevron-down","chevron-up","chevron-left","chevron-right","panel-left-open","panel-left-close","settings","info","warning"]),Tm=new Set(["\u72B6\u6001","\u5176\u4ED6"]),Jh=i=>{let o=i.toLowerCase();return $m.has(o)?"\u5E38\u7528":/folder|file|image|video|music|audio|archive|clipboard|copy|trash|download|upload|paperclip|scissors|save|hard-drive|file-/.test(o)?"\u6587\u4EF6":/arrow|chevron|caret|corner|move|turn-|up|down|left|right/.test(o)?"\u65B9\u5411":/plus|minus|search|filter|sort|edit|pen|pencil|brush|crop|menu|more|ellipsis|settings|sliders|cog|wand|sparkles/.test(o)?"\u64CD\u4F5C":/check|alert|warning|info|help|badge|shield|lock|unlock|eye|bell|message-circle-warning|triangle-alert|circle-alert|octagon-alert/.test(o)?"\u72B6\u6001":/panel|sidebar|layout|grid|list|table|columns|rows|square|rectangle|align|justify/.test(o)?"\u5E03\u5C40":/monitor|laptop|tablet|smartphone|phone|camera|printer|server|cpu|usb|router|wifi|bluetooth/.test(o)?"\u8BBE\u5907":"\u5176\u4ED6"},$e=class extends at.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="";this.searchPlaceholder="";this.emptyText="";this.size="md";this.disabled=!1;this.clearable=!0;this.searchable=!0;this.open=!1;this.type="builtin";this.columns=6;this.maxHeight=420;this.pageSize=72;this.source=[];this.triggerProps={};this.dropdownProps={};this.paginationProps={};this._keyword="";this._activeCategory="\u5168\u90E8";this._activeValue="";this._currentPage=1;this._explicitAttrs=new Set;this._handleDropdownOpen=()=>{this.open=!0};this._handleDropdownClose=()=>{this.open=!1,this._keyword&&(this._keyword="")};this._setCategory=e=>{this._activeCategory=e,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onSearchInput=e=>{e.stopPropagation(),this._keyword=e.target.value,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onClear=e=>{e.preventDefault(),e.stopPropagation(),this.value&&this._setValue("",!0)};this._onSelect=e=>{this._setValue(e.value),this._dropdown?.hide()};this._onPanelKeydown=e=>{if(!this.open)return;let t=this._pagedOptions;if(!t.length)return;let r=Math.max(1,this.columns||1);switch(e.key){case"ArrowRight":e.preventDefault(),this._moveActive(1);break;case"ArrowLeft":e.preventDefault(),this._moveActive(-1);break;case"ArrowDown":e.preventDefault(),this._moveActive(r);break;case"ArrowUp":e.preventDefault(),this._moveActive(-r);break;case"Home":e.preventDefault(),this._activeValue=t[0].value,this._ensureActiveVisible();break;case"End":e.preventDefault(),this._activeValue=t[t.length-1].value,this._ensureActiveVisible();break;case"Enter":case" ":e.preventDefault(),this._onSelect(t.find(n=>n.value===this._activeValue)||t[0]);break;case"Escape":e.preventDefault(),this._dropdown?.hide();break;default:break}};this._onPageChange=e=>{let t=e.detail.page??e.detail.current??1;this._currentPage=t;let r=this._pagedOptions;r.length>0&&(this._activeValue=r.find(n=>n.value===this.value)?.value||r[0].value),queueMicrotask(()=>{this._gridWrap?.focus(),this._gridWrap&&(this._gridWrap.scrollTop=0),this._ensureActiveVisible()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t,r){let n=nt(this,this.locale,this.translations);return ae(ne(n.locale,n.translations),e,t,r)}willUpdate(){let e=L(this,"iconPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("searchable")&&typeof e.searchable=="boolean"&&this.searchable!==e.searchable&&(this.searchable=e.searchable),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder),!this._explicitAttrs.has("search-placeholder")&&typeof e.searchPlaceholder=="string"&&!this.searchPlaceholder&&(this.searchPlaceholder=e.searchPlaceholder),!this._explicitAttrs.has("empty-text")&&typeof e.emptyText=="string"&&!this.emptyText&&(this.emptyText=e.emptyText)}get _options(){return(this.source.length>0?this.source:Ya).map(t=>{if(typeof t=="string")return{value:t,label:t,keywords:t.split(/[-:\s]+/g).filter(Boolean),category:Jh(t)};let r=Array.isArray(t.keywords)?t.keywords:t.keywords?[t.keywords]:[];return{value:t.value,label:t.label||t.value,keywords:r,category:t.category||Jh(t.value),type:t.type,name:t.name,src:t.src,svg:t.svg,iconClass:t.iconClass,color:t.color}})}get _selectedOption(){return this._options.find(e=>e.value===this.value)}get _activeOption(){return this._options.find(e=>e.value===this._activeValue)}get _categories(){let e=new Set;for(let t of this._options)e.add(t.category);return["\u5168\u90E8",...e]}get _categoryTabs(){return this._categories.filter(e=>e==="\u5168\u90E8"||!Tm.has(e))}get _filteredOptions(){let e=this._keyword.trim().toLowerCase();return this._options.filter(t=>e?[t.value,t.label,t.category,...t.keywords].join(" ").toLowerCase().includes(e):!0)}get _previewSecondary(){let e=this._selectedOption||this._activeOption;return e&&e.label!==e.value?e.value:""}get _virtualRows(){let e=[],t=Math.max(1,this.columns||1),r=this._pagedOptions;for(let n=0;n<r.length;n+=t){let s=r.slice(n,n+t);for(;s.length<t;)s.push(null);e.push({index:e.length,items:s})}return e}_getRowHeight(){return 46}get _pageCount(){return Math.max(1,Math.ceil(this._filteredOptions.length/Math.max(1,this.pageSize||1)))}get _resolvedPage(){return Math.min(this._pageCount,Math.max(1,this._currentPage||1))}get _pagedOptions(){let e=Math.max(1,this.pageSize||1),t=(this._resolvedPage-1)*e;return this._filteredOptions.slice(t,t+e)}updated(e){let t=L(this,"iconPicker");se(this._triggerEl,{...t.triggerProps??{},...this.triggerProps??{}}),se(this._dropdown,{...t.dropdownProps??{},...this.dropdownProps??{}});for(let r of this._paginationEls??[])se(r,{...t.paginationProps??{},...this.paginationProps??{}});e.has("columns")&&this.style.setProperty("--lui-icon-picker-columns",String(Math.max(1,this.columns||1))),e.has("maxHeight")&&this.style.setProperty("--lui-icon-picker-panel-max-height",`${Math.max(160,this.maxHeight||160)}px`),e.has("source")&&!this._categoryTabs.includes(this._activeCategory)&&(this._activeCategory="\u5168\u90E8"),(e.has("value")||e.has("source"))&&this.value&&this._activeValue!==this.value&&(this._activeValue=this.value),e.has("source")&&this._activeValue&&!this._filteredOptions.some(r=>r.value===this._activeValue)&&(this._activeValue=this._filteredOptions[0]?.value||""),(e.has("source")||e.has("pageSize"))&&(this._currentPage=Math.min(this._resolvedPage,this._pageCount)),e.has("open")&&this.open&&queueMicrotask(()=>{this._activeValue=this.value||this._filteredOptions[0]?.value||"",this._syncPageWithActiveValue(),this._searchInput?this._searchInput.focus():this.renderRoot.querySelector(".grid-wrap")?.focus(),this._ensureActiveVisible()}),(e.has("value")||e.has("columns")||e.has("source")||e.has("open"))&&queueMicrotask(()=>this._ensureActiveVisible())}_setValue(e,t=!1){this.value=e;let r={value:this.value,item:this._selectedOption};this.dispatchEvent(new CustomEvent("change",{detail:r,bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("clear",{detail:r,bubbles:!0,composed:!0}))}_moveActive(e){let t=this._pagedOptions;if(!t.length)return;let r=Math.max(0,t.findIndex(d=>d.value===this._activeValue)),n=Math.min(t.length-1,Math.max(0,r+e)),s=t[n];s&&(this._activeValue=s.value,this._ensureActiveVisible())}_ensureActiveVisible(){let e=this._gridWrap;if(!e||!this.open||!this._activeValue)return;let r=this._pagedOptions.findIndex(k=>k.value===this._activeValue);if(r<0)return;let n=Math.max(1,this.columns||1),s=Math.floor(r/n),d=this._getRowHeight(),h=s*d,p=h+d,f=e.scrollTop,x=f+e.clientHeight;h<f?e.scrollTop=h:p>x&&(e.scrollTop=p-e.clientHeight)}_syncPageWithActiveValue(){if(!this._activeValue)return;let e=this._filteredOptions.findIndex(r=>r.value===this._activeValue);if(e<0)return;let t=Math.max(1,this.pageSize||1);this._currentPage=Math.floor(e/t)+1}_renderOptionIcon(e){return at.html`
|
|
3610
|
+
`],a([(0,rt.property)({type:Number})],Ye.prototype,"current",2),a([(0,rt.property)({type:Number})],Ye.prototype,"total",2),a([(0,rt.property)({type:Number,attribute:"page-size"})],Ye.prototype,"pageSize",2),a([(0,rt.property)({type:Number,attribute:"max-visible"})],Ye.prototype,"maxVisible",2),a([(0,rt.property)({reflect:!0})],Ye.prototype,"size",2),a([(0,rt.property)({type:Boolean,attribute:"show-summary"})],Ye.prototype,"showSummary",2),a([(0,rt.property)({type:Boolean,attribute:"show-total"})],Ye.prototype,"showTotal",2),a([(0,rt.property)({type:Boolean,attribute:"show-jumper"})],Ye.prototype,"showJumper",2),a([(0,rt.property)({type:Boolean,attribute:"show-size-changer"})],Ye.prototype,"showSizeChanger",2),a([(0,rt.property)({type:Boolean,attribute:"show-first-last"})],Ye.prototype,"showFirstLast",2),a([(0,rt.property)({type:Boolean,attribute:"hide-on-single-page"})],Ye.prototype,"hideOnSinglePage",2),a([(0,rt.property)({type:Boolean,reflect:!0})],Ye.prototype,"simple",2),a([(0,rt.property)({type:Boolean,reflect:!0})],Ye.prototype,"compact",2),a([(0,rt.property)({type:Boolean,reflect:!0})],Ye.prototype,"responsive",2),a([(0,rt.property)()],Ye.prototype,"locale",2),a([(0,rt.property)({attribute:!1})],Ye.prototype,"translations",2),a([(0,rt.property)({attribute:!1})],Ye.prototype,"pageSizeOptions",2),a([(0,rt.property)({attribute:!1})],Ye.prototype,"selectProps",2),a([(0,rt.query)("select")],Ye.prototype,"_sizeSelect",2),a([(0,rt.query)('[part="pager"]')],Ye.prototype,"_pagerNode",2),a([(0,rt.state)()],Ye.prototype,"_jumperValue",2),a([(0,rt.state)()],Ye.prototype,"_responsiveMode",2),Ye=a([(0,rt.customElement)("lui-pagination")],Ye);var $m=new Set(["folder","folder-open","file","image","search","plus","minus","x","check","copy","download","upload","edit","trash","refresh","eye","eye-off","chevron-down","chevron-up","chevron-left","chevron-right","panel-left-open","panel-left-close","settings","info","warning"]),Tm=new Set(["\u72B6\u6001","\u5176\u4ED6"]),Jh=i=>{let o=i.toLowerCase();return $m.has(o)?"\u5E38\u7528":/folder|file|image|video|music|audio|archive|clipboard|copy|trash|download|upload|paperclip|scissors|save|hard-drive|file-/.test(o)?"\u6587\u4EF6":/arrow|chevron|caret|corner|move|turn-|up|down|left|right/.test(o)?"\u65B9\u5411":/plus|minus|search|filter|sort|edit|pen|pencil|brush|crop|menu|more|ellipsis|settings|sliders|cog|wand|sparkles/.test(o)?"\u64CD\u4F5C":/check|alert|warning|info|help|badge|shield|lock|unlock|eye|bell|message-circle-warning|triangle-alert|circle-alert|octagon-alert/.test(o)?"\u72B6\u6001":/panel|sidebar|layout|grid|list|table|columns|rows|square|rectangle|align|justify/.test(o)?"\u5E03\u5C40":/monitor|laptop|tablet|smartphone|phone|camera|printer|server|cpu|usb|router|wifi|bluetooth/.test(o)?"\u8BBE\u5907":"\u5176\u4ED6"},$e=class extends st.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="";this.searchPlaceholder="";this.emptyText="";this.size="md";this.disabled=!1;this.clearable=!0;this.searchable=!0;this.open=!1;this.type="builtin";this.columns=6;this.maxHeight=420;this.pageSize=72;this.source=[];this.triggerProps={};this.dropdownProps={};this.paginationProps={};this._keyword="";this._activeCategory="\u5168\u90E8";this._activeValue="";this._currentPage=1;this._explicitAttrs=new Set;this._handleDropdownOpen=()=>{this.open=!0};this._handleDropdownClose=()=>{this.open=!1,this._keyword&&(this._keyword="")};this._setCategory=e=>{this._activeCategory=e,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onSearchInput=e=>{e.stopPropagation(),this._keyword=e.target.value,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onClear=e=>{e.preventDefault(),e.stopPropagation(),this.value&&this._setValue("",!0)};this._onSelect=e=>{this._setValue(e.value),this._dropdown?.hide()};this._onPanelKeydown=e=>{if(!this.open)return;let t=this._pagedOptions;if(!t.length)return;let r=Math.max(1,this.columns||1);switch(e.key){case"ArrowRight":e.preventDefault(),this._moveActive(1);break;case"ArrowLeft":e.preventDefault(),this._moveActive(-1);break;case"ArrowDown":e.preventDefault(),this._moveActive(r);break;case"ArrowUp":e.preventDefault(),this._moveActive(-r);break;case"Home":e.preventDefault(),this._activeValue=t[0].value,this._ensureActiveVisible();break;case"End":e.preventDefault(),this._activeValue=t[t.length-1].value,this._ensureActiveVisible();break;case"Enter":case" ":e.preventDefault(),this._onSelect(t.find(n=>n.value===this._activeValue)||t[0]);break;case"Escape":e.preventDefault(),this._dropdown?.hide();break;default:break}};this._onPageChange=e=>{let t=e.detail.page??e.detail.current??1;this._currentPage=t;let r=this._pagedOptions;r.length>0&&(this._activeValue=r.find(n=>n.value===this.value)?.value||r[0].value),queueMicrotask(()=>{this._gridWrap?.focus(),this._gridWrap&&(this._gridWrap.scrollTop=0),this._ensureActiveVisible()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t,r){let n=at(this,this.locale,this.translations);return ae(ne(n.locale,n.translations),e,t,r)}willUpdate(){let e=L(this,"iconPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("searchable")&&typeof e.searchable=="boolean"&&this.searchable!==e.searchable&&(this.searchable=e.searchable),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder),!this._explicitAttrs.has("search-placeholder")&&typeof e.searchPlaceholder=="string"&&!this.searchPlaceholder&&(this.searchPlaceholder=e.searchPlaceholder),!this._explicitAttrs.has("empty-text")&&typeof e.emptyText=="string"&&!this.emptyText&&(this.emptyText=e.emptyText)}get _options(){return(this.source.length>0?this.source:Ya).map(t=>{if(typeof t=="string")return{value:t,label:t,keywords:t.split(/[-:\s]+/g).filter(Boolean),category:Jh(t)};let r=Array.isArray(t.keywords)?t.keywords:t.keywords?[t.keywords]:[];return{value:t.value,label:t.label||t.value,keywords:r,category:t.category||Jh(t.value),type:t.type,name:t.name,src:t.src,svg:t.svg,iconClass:t.iconClass,color:t.color}})}get _selectedOption(){return this._options.find(e=>e.value===this.value)}get _activeOption(){return this._options.find(e=>e.value===this._activeValue)}get _categories(){let e=new Set;for(let t of this._options)e.add(t.category);return["\u5168\u90E8",...e]}get _categoryTabs(){return this._categories.filter(e=>e==="\u5168\u90E8"||!Tm.has(e))}get _filteredOptions(){let e=this._keyword.trim().toLowerCase();return this._options.filter(t=>e?[t.value,t.label,t.category,...t.keywords].join(" ").toLowerCase().includes(e):!0)}get _previewSecondary(){let e=this._selectedOption||this._activeOption;return e&&e.label!==e.value?e.value:""}get _virtualRows(){let e=[],t=Math.max(1,this.columns||1),r=this._pagedOptions;for(let n=0;n<r.length;n+=t){let s=r.slice(n,n+t);for(;s.length<t;)s.push(null);e.push({index:e.length,items:s})}return e}_getRowHeight(){return 46}get _pageCount(){return Math.max(1,Math.ceil(this._filteredOptions.length/Math.max(1,this.pageSize||1)))}get _resolvedPage(){return Math.min(this._pageCount,Math.max(1,this._currentPage||1))}get _pagedOptions(){let e=Math.max(1,this.pageSize||1),t=(this._resolvedPage-1)*e;return this._filteredOptions.slice(t,t+e)}updated(e){let t=L(this,"iconPicker");se(this._triggerEl,{...t.triggerProps??{},...this.triggerProps??{}}),se(this._dropdown,{...t.dropdownProps??{},...this.dropdownProps??{}});for(let r of this._paginationEls??[])se(r,{...t.paginationProps??{},...this.paginationProps??{}});e.has("columns")&&this.style.setProperty("--lui-icon-picker-columns",String(Math.max(1,this.columns||1))),e.has("maxHeight")&&this.style.setProperty("--lui-icon-picker-panel-max-height",`${Math.max(160,this.maxHeight||160)}px`),e.has("source")&&!this._categoryTabs.includes(this._activeCategory)&&(this._activeCategory="\u5168\u90E8"),(e.has("value")||e.has("source"))&&this.value&&this._activeValue!==this.value&&(this._activeValue=this.value),e.has("source")&&this._activeValue&&!this._filteredOptions.some(r=>r.value===this._activeValue)&&(this._activeValue=this._filteredOptions[0]?.value||""),(e.has("source")||e.has("pageSize"))&&(this._currentPage=Math.min(this._resolvedPage,this._pageCount)),e.has("open")&&this.open&&queueMicrotask(()=>{this._activeValue=this.value||this._filteredOptions[0]?.value||"",this._syncPageWithActiveValue(),this._searchInput?this._searchInput.focus():this.renderRoot.querySelector(".grid-wrap")?.focus(),this._ensureActiveVisible()}),(e.has("value")||e.has("columns")||e.has("source")||e.has("open"))&&queueMicrotask(()=>this._ensureActiveVisible())}_setValue(e,t=!1){this.value=e;let r={value:this.value,item:this._selectedOption};this.dispatchEvent(new CustomEvent("change",{detail:r,bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("clear",{detail:r,bubbles:!0,composed:!0}))}_moveActive(e){let t=this._pagedOptions;if(!t.length)return;let r=Math.max(0,t.findIndex(d=>d.value===this._activeValue)),n=Math.min(t.length-1,Math.max(0,r+e)),s=t[n];s&&(this._activeValue=s.value,this._ensureActiveVisible())}_ensureActiveVisible(){let e=this._gridWrap;if(!e||!this.open||!this._activeValue)return;let r=this._pagedOptions.findIndex(k=>k.value===this._activeValue);if(r<0)return;let n=Math.max(1,this.columns||1),s=Math.floor(r/n),d=this._getRowHeight(),h=s*d,p=h+d,f=e.scrollTop,x=f+e.clientHeight;h<f?e.scrollTop=h:p>x&&(e.scrollTop=p-e.clientHeight)}_syncPageWithActiveValue(){if(!this._activeValue)return;let e=this._filteredOptions.findIndex(r=>r.value===this._activeValue);if(e<0)return;let t=Math.max(1,this.pageSize||1);this._currentPage=Math.floor(e/t)+1}_renderOptionIcon(e){return st.html`
|
|
3602
3611
|
<lui-icon
|
|
3603
3612
|
.type=${e.type||this.type}
|
|
3604
3613
|
.name=${e.name||e.value}
|
|
@@ -3607,9 +3616,9 @@
|
|
|
3607
3616
|
.iconClass=${e.iconClass}
|
|
3608
3617
|
.color=${e.color}
|
|
3609
3618
|
></lui-icon>
|
|
3610
|
-
`}_renderSearch(){return this.searchable?
|
|
3619
|
+
`}_renderSearch(){return this.searchable?st.html`
|
|
3611
3620
|
<div class="panel-header" part="header">
|
|
3612
|
-
${this.searchable?
|
|
3621
|
+
${this.searchable?st.html`
|
|
3613
3622
|
<label class="control-shell search" part="search">
|
|
3614
3623
|
<lui-icon name="search"></lui-icon>
|
|
3615
3624
|
<input
|
|
@@ -3620,9 +3629,9 @@
|
|
|
3620
3629
|
@input=${this._onSearchInput}
|
|
3621
3630
|
/>
|
|
3622
3631
|
</label>
|
|
3623
|
-
`:
|
|
3632
|
+
`:st.nothing}
|
|
3624
3633
|
</div>
|
|
3625
|
-
`:
|
|
3634
|
+
`:st.nothing}_renderOptionButton(e){let t=["option",e.value===this.value?"selected":"",e.value===this._activeValue?"active":""].filter(Boolean).join(" ");return st.html`
|
|
3626
3635
|
<button
|
|
3627
3636
|
class=${t}
|
|
3628
3637
|
part="option"
|
|
@@ -3638,11 +3647,11 @@
|
|
|
3638
3647
|
<lui-icon name="check"></lui-icon>
|
|
3639
3648
|
</span>
|
|
3640
3649
|
</button>
|
|
3641
|
-
`}_renderVirtualRow(e){return
|
|
3650
|
+
`}_renderVirtualRow(e){return st.html`
|
|
3642
3651
|
<div class="grid-row" part="row" data-row-index=${e.index}>
|
|
3643
|
-
${e.items.map(t=>t?this._renderOptionButton(t):
|
|
3652
|
+
${e.items.map(t=>t?this._renderOptionButton(t):st.html`<span class="option-placeholder" aria-hidden="true"></span>`)}
|
|
3644
3653
|
</div>
|
|
3645
|
-
`}render(){let e=this._selectedOption,t=this._activeOption,r=this._filteredOptions,n=this._virtualRows,s=this.clearable&&!this.disabled&&!!this.value,d=e||t,h=Hs(this);return
|
|
3654
|
+
`}render(){let e=this._selectedOption,t=this._activeOption,r=this._filteredOptions,n=this._virtualRows,s=this.clearable&&!this.disabled&&!!this.value,d=e||t,h=Hs(this);return st.html`
|
|
3646
3655
|
<lui-dropdown
|
|
3647
3656
|
.open=${this.open}
|
|
3648
3657
|
.disabled=${this.disabled}
|
|
@@ -3661,7 +3670,7 @@
|
|
|
3661
3670
|
aria-expanded=${this.open?"true":"false"}
|
|
3662
3671
|
>
|
|
3663
3672
|
<span class="preview" part="preview">
|
|
3664
|
-
${e?this._renderOptionIcon(e):
|
|
3673
|
+
${e?this._renderOptionIcon(e):st.html`<lui-icon name="search"></lui-icon>`}
|
|
3665
3674
|
</span>
|
|
3666
3675
|
<span class="value" part="value">
|
|
3667
3676
|
<span class="value-text ${e?"":"placeholder"}">
|
|
@@ -3669,7 +3678,7 @@
|
|
|
3669
3678
|
</span>
|
|
3670
3679
|
</span>
|
|
3671
3680
|
<span class="suffix" part="suffix">
|
|
3672
|
-
${s?
|
|
3681
|
+
${s?st.html`
|
|
3673
3682
|
<button
|
|
3674
3683
|
class="icon-btn"
|
|
3675
3684
|
type="button"
|
|
@@ -3678,14 +3687,14 @@
|
|
|
3678
3687
|
>
|
|
3679
3688
|
<lui-icon name="x"></lui-icon>
|
|
3680
3689
|
</button>
|
|
3681
|
-
`:
|
|
3690
|
+
`:st.nothing}
|
|
3682
3691
|
<lui-icon name=${this.open?"chevron-up":"chevron-down"}></lui-icon>
|
|
3683
3692
|
</span>
|
|
3684
3693
|
</button>
|
|
3685
3694
|
|
|
3686
3695
|
<div class="panel" part="panel" @keydown=${this._onPanelKeydown}>
|
|
3687
3696
|
${this._renderSearch()}
|
|
3688
|
-
${r.length>0?
|
|
3697
|
+
${r.length>0?st.html`
|
|
3689
3698
|
<div
|
|
3690
3699
|
class="grid-wrap"
|
|
3691
3700
|
part="body"
|
|
@@ -3695,23 +3704,23 @@
|
|
|
3695
3704
|
${dn({items:n,renderItem:p=>this._renderVirtualRow(p)})}
|
|
3696
3705
|
</div>
|
|
3697
3706
|
</div>
|
|
3698
|
-
`:
|
|
3707
|
+
`:st.html`<div class="empty" part="empty">${(h?.("iconPicker")??this.emptyText)||this._t("icon_picker.empty","\u6CA1\u6709\u5339\u914D\u7684\u56FE\u6807")}</div>`}
|
|
3699
3708
|
<div class="panel-footer" part="footer">
|
|
3700
3709
|
<div class="panel-footer-main">
|
|
3701
3710
|
<span class="panel-footer-start">
|
|
3702
3711
|
<span class="results">${r.length} / ${this._options.length}</span>
|
|
3703
3712
|
</span>
|
|
3704
3713
|
<span class="footer-preview panel-footer-end">
|
|
3705
|
-
${d?
|
|
3714
|
+
${d?st.html`
|
|
3706
3715
|
${this._renderOptionIcon(d)}
|
|
3707
3716
|
<span class="footer-copy">
|
|
3708
3717
|
<strong>${d.label}</strong>
|
|
3709
|
-
${this._previewSecondary?
|
|
3718
|
+
${this._previewSecondary?st.html`<span>${this._previewSecondary}</span>`:st.nothing}
|
|
3710
3719
|
</span>
|
|
3711
|
-
`:
|
|
3720
|
+
`:st.html`<span>${this._t("icon_picker.unselected","\u672A\u9009\u62E9")}</span>`}
|
|
3712
3721
|
</span>
|
|
3713
3722
|
</div>
|
|
3714
|
-
${r.length>this.pageSize?
|
|
3723
|
+
${r.length>this.pageSize?st.html`
|
|
3715
3724
|
<div class="panel-pagination">
|
|
3716
3725
|
<lui-pagination
|
|
3717
3726
|
size="sm"
|
|
@@ -3722,11 +3731,11 @@
|
|
|
3722
3731
|
@change=${this._onPageChange}
|
|
3723
3732
|
></lui-pagination>
|
|
3724
3733
|
</div>
|
|
3725
|
-
`:
|
|
3734
|
+
`:st.nothing}
|
|
3726
3735
|
</div>
|
|
3727
3736
|
</div>
|
|
3728
3737
|
</lui-dropdown>
|
|
3729
|
-
`}};$e.styles=[A,j,zo,
|
|
3738
|
+
`}};$e.styles=[A,j,zo,st.css`
|
|
3730
3739
|
:host {
|
|
3731
3740
|
display: inline-block;
|
|
3732
3741
|
width: 100%;
|
|
@@ -5430,7 +5439,7 @@
|
|
|
5430
5439
|
justify-content: flex-end;
|
|
5431
5440
|
margin-top: 12px;
|
|
5432
5441
|
}
|
|
5433
|
-
`],a([(0,W.property)({attribute:!1})],Y.prototype,"columns",2),a([(0,W.property)({attribute:!1})],Y.prototype,"data",2),a([(0,W.property)({attribute:!1})],Y.prototype,"dataSource",2),a([(0,W.property)({attribute:!1})],Y.prototype,"source",2),a([(0,W.property)({attribute:"row-key"})],Y.prototype,"rowKey",2),a([(0,W.property)({reflect:!0})],Y.prototype,"size",2),a([(0,W.property)({reflect:!0})],Y.prototype,"selection",2),a([(0,W.property)({attribute:!1,hasChanged:(e,t)=>{if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;let r=new Set(t.map(String));return e.some(n=>!r.has(String(n)))}})],Y.prototype,"selectedRowKeys",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"bordered",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"border",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"noborder"})],Y.prototype,"noBorder",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"striped",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"hoverable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"sticky-header"})],Y.prototype,"stickyHeader",2),a([(0,W.property)({type:Boolean,attribute:"show-header"})],Y.prototype,"showHeader",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-resizable"})],Y.prototype,"columnResizable",2),a([(0,W.property)({reflect:!0,attribute:"resize-mode"})],Y.prototype,"resizeMode",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-reorderable"})],Y.prototype,"columnReorderable",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"loading",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"virtual",2),a([(0,W.property)({attribute:"virtual-height"})],Y.prototype,"virtualHeight",2),a([(0,W.property)({type:Number,attribute:"row-height"})],Y.prototype,"rowHeight",2),a([(0,W.property)({type:Number})],Y.prototype,"overscan",2),a([(0,W.property)({type:Boolean})],Y.prototype,"pagination",2),a([(0,W.property)({type:Boolean,attribute:"remote-pagination"})],Y.prototype,"remotePagination",2),a([(0,W.property)({type:Number})],Y.prototype,"current",2),a([(0,W.property)({type:Number,attribute:"page-size"})],Y.prototype,"pageSize",2),a([(0,W.property)({type:Number})],Y.prototype,"total",2),a([(0,W.property)({type:Boolean,attribute:"show-size-changer"})],Y.prototype,"showSizeChanger",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"show-seq"})],Y.prototype,"showSeq",2),a([(0,W.property)({attribute:"seq-label"})],Y.prototype,"seqLabel",2),a([(0,W.property)({attribute:!1})],Y.prototype,"footerData",2),a([(0,W.property)({type:Boolean,attribute:"show-overflow"})],Y.prototype,"showOverflow",2),a([(0,W.property)({type:Boolean,attribute:"show-header-overflow"})],Y.prototype,"showHeaderOverflow",2),a([(0,W.property)({attribute:"column-widths",converter:{fromAttribute(e){if(!(e==null||e===""))try{let t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).filter(([,r])=>Number.isFinite(Number(r))).map(([r,n])=>[r,Math.round(Number(n))]))}catch{}},toAttribute(e){return e==null?null:JSON.stringify(e)}}})],Y.prototype,"columnWidths",2),a([(0,W.property)()],Y.prototype,"emptyText",2),a([(0,W.property)({attribute:"sort-key"})],Y.prototype,"sortKey",2),a([(0,W.property)({attribute:"sort-order"})],Y.prototype,"sortOrder",2),a([(0,W.property)({attribute:!1})],Y.prototype,"sorter",2),a([(0,W.property)({type:Boolean,attribute:"row-clickable"})],Y.prototype,"rowClickable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"select-on-click"})],Y.prototype,"selectOnClick",2),a([(0,W.property)({reflect:!0,attribute:"row-animation"})],Y.prototype,"rowAnimation",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onCell",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderCell",2),a([(0,W.query)(".scroll")],Y.prototype,"_scrollEl",2),a([(0,W.query)("lit-virtualizer.table-virtualizer")],Y.prototype,"_virtualizerEl",2),a([(0,W.queryAssignedElements)({flatten:!0,selector:"lui-table-column"})],Y.prototype,"_slottedColumns",2),a([(0,W.state)()],Y.prototype,"_responsiveWidth",2),a([(0,W.state)()],Y.prototype,"_columnWidthOverrides",2),a([(0,W.state)()],Y.prototype,"_columnOrderKeys",2),a([(0,W.state)()],Y.prototype,"_virtualStart",2),Y=a([(0,W.customElement)("lui-table")],Y);var Bo=require("lit"),
|
|
5442
|
+
`],a([(0,W.property)({attribute:!1})],Y.prototype,"columns",2),a([(0,W.property)({attribute:!1})],Y.prototype,"data",2),a([(0,W.property)({attribute:!1})],Y.prototype,"dataSource",2),a([(0,W.property)({attribute:!1})],Y.prototype,"source",2),a([(0,W.property)({attribute:"row-key"})],Y.prototype,"rowKey",2),a([(0,W.property)({reflect:!0})],Y.prototype,"size",2),a([(0,W.property)({reflect:!0})],Y.prototype,"selection",2),a([(0,W.property)({attribute:!1,hasChanged:(e,t)=>{if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;let r=new Set(t.map(String));return e.some(n=>!r.has(String(n)))}})],Y.prototype,"selectedRowKeys",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"bordered",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"border",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"noborder"})],Y.prototype,"noBorder",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"striped",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"hoverable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"sticky-header"})],Y.prototype,"stickyHeader",2),a([(0,W.property)({type:Boolean,attribute:"show-header"})],Y.prototype,"showHeader",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-resizable"})],Y.prototype,"columnResizable",2),a([(0,W.property)({reflect:!0,attribute:"resize-mode"})],Y.prototype,"resizeMode",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"column-reorderable"})],Y.prototype,"columnReorderable",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"loading",2),a([(0,W.property)({type:Boolean,reflect:!0})],Y.prototype,"virtual",2),a([(0,W.property)({attribute:"virtual-height"})],Y.prototype,"virtualHeight",2),a([(0,W.property)({type:Number,attribute:"row-height"})],Y.prototype,"rowHeight",2),a([(0,W.property)({type:Number})],Y.prototype,"overscan",2),a([(0,W.property)({type:Boolean})],Y.prototype,"pagination",2),a([(0,W.property)({type:Boolean,attribute:"remote-pagination"})],Y.prototype,"remotePagination",2),a([(0,W.property)({type:Number})],Y.prototype,"current",2),a([(0,W.property)({type:Number,attribute:"page-size"})],Y.prototype,"pageSize",2),a([(0,W.property)({type:Number})],Y.prototype,"total",2),a([(0,W.property)({type:Boolean,attribute:"show-size-changer"})],Y.prototype,"showSizeChanger",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"show-seq"})],Y.prototype,"showSeq",2),a([(0,W.property)({attribute:"seq-label"})],Y.prototype,"seqLabel",2),a([(0,W.property)({attribute:!1})],Y.prototype,"footerData",2),a([(0,W.property)({type:Boolean,attribute:"show-overflow"})],Y.prototype,"showOverflow",2),a([(0,W.property)({type:Boolean,attribute:"show-header-overflow"})],Y.prototype,"showHeaderOverflow",2),a([(0,W.property)({attribute:"column-widths",converter:{fromAttribute(e){if(!(e==null||e===""))try{let t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).filter(([,r])=>Number.isFinite(Number(r))).map(([r,n])=>[r,Math.round(Number(n))]))}catch{}},toAttribute(e){return e==null?null:JSON.stringify(e)}}})],Y.prototype,"columnWidths",2),a([(0,W.property)()],Y.prototype,"emptyText",2),a([(0,W.property)({attribute:"sort-key"})],Y.prototype,"sortKey",2),a([(0,W.property)({attribute:"sort-order"})],Y.prototype,"sortOrder",2),a([(0,W.property)({attribute:!1})],Y.prototype,"sorter",2),a([(0,W.property)({type:Boolean,attribute:"row-clickable"})],Y.prototype,"rowClickable",2),a([(0,W.property)({type:Boolean,reflect:!0,attribute:"select-on-click"})],Y.prototype,"selectOnClick",2),a([(0,W.property)({reflect:!0,attribute:"row-animation"})],Y.prototype,"rowAnimation",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onCell",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderRow",2),a([(0,W.property)({attribute:!1})],Y.prototype,"onHeaderCell",2),a([(0,W.query)(".scroll")],Y.prototype,"_scrollEl",2),a([(0,W.query)("lit-virtualizer.table-virtualizer")],Y.prototype,"_virtualizerEl",2),a([(0,W.queryAssignedElements)({flatten:!0,selector:"lui-table-column"})],Y.prototype,"_slottedColumns",2),a([(0,W.state)()],Y.prototype,"_responsiveWidth",2),a([(0,W.state)()],Y.prototype,"_columnWidthOverrides",2),a([(0,W.state)()],Y.prototype,"_columnOrderKeys",2),a([(0,W.state)()],Y.prototype,"_virtualStart",2),Y=a([(0,W.customElement)("lui-table")],Y);var Bo=require("lit"),ot=require("lit/decorators.js");var hn=require("lit"),Lo=require("lit/decorators.js");var Gr=class extends hn.LitElement{constructor(){super(...arguments);this.content="";this.placement="top";this.disabled=!1;this.showArrow=!0;this.openDelay=120;this.closeDelay=80;this.offsetDistance=8;this.popoverProps={}}updated(){if(this._popover){let e=L(this,"tooltip");se(this._popover,{...e.popoverProps??{},...this.popoverProps??{}})}}render(){let e=this.content.trim().length>0;return hn.html`
|
|
5434
5443
|
<lui-popover
|
|
5435
5444
|
trigger="hover focus"
|
|
5436
5445
|
.portal=${!0}
|
|
@@ -5616,7 +5625,7 @@
|
|
|
5616
5625
|
--lui-icon-size: 14px;
|
|
5617
5626
|
}
|
|
5618
5627
|
|
|
5619
|
-
`],a([(0,rt.property)()],Xe.prototype,"text",2),a([(0,rt.property)({reflect:!0})],Xe.prototype,"type",2),a([(0,rt.property)({reflect:!0})],Xe.prototype,"size",2),a([(0,rt.property)()],Xe.prototype,"weight",2),a([(0,rt.property)({type:Boolean,reflect:!0})],Xe.prototype,"block",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"copyable",2),a([(0,rt.property)({type:Number,attribute:"max-lines"})],Xe.prototype,"maxLines",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"truncate",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"nowrap",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"selectable",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"strikethrough",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"underline",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"italic",2),a([(0,rt.property)({type:Boolean})],Xe.prototype,"monospace",2),a([(0,rt.property)({type:Boolean,reflect:!0})],Xe.prototype,"surface",2),a([(0,rt.property)({type:Boolean,attribute:"popover-on-hover"})],Xe.prototype,"popoverOnHover",2),a([(0,rt.property)({attribute:!1})],Xe.prototype,"tooltipProps",2),a([(0,rt.property)()],Xe.prototype,"tag",2),a([(0,rt.state)()],Xe.prototype,"_copied",2),a([(0,rt.state)()],Xe.prototype,"_overflowing",2),a([(0,rt.query)(".text")],Xe.prototype,"_textEl",2),a([(0,rt.query)("lui-tooltip")],Xe.prototype,"_tooltipEl",2),Xe=a([(0,rt.customElement)("lui-text")],Xe);var we=require("lit"),he=require("lit/decorators.js"),rp=require("lit/directives/repeat.js"),op=xn(ia(),1);var lo=require("lit"),Fe=require("lit/decorators.js");var Re=class extends lo.LitElement{constructor(){super(...arguments);this._overlayStackRegistered=!1;this.x=0;this.y=0;this.open=!1;this.items=[];this.heading="";this.headingIcon="";this.trigger="manual";this.placement="bottom-start";this.closeOnSelect=!0;this.closeOnOutsidePress=!0;this.closeOnEscape=!0;this.backdrop="none";this.backdropStyle="";this.submenuTrigger="hover";this.triggerProps={};this.overlayProps={};this.menuProps={};this._context=null;this._activePath=[];this._openPath=[];this._layoutFrame=0;this._anchorMode="point";this._anchorRect=null;this._source="context-menu";this._explicitAttrs=new Set;this._onTriggerClick=e=>{if(this._hasTrigger("click")){if(e.preventDefault(),e.stopPropagation(),this.open&&this._anchorMode==="element"){this.hide();return}this.showFromTrigger(e.currentTarget,{triggerEvent:e,source:"context-menu"})}};this._onTriggerContextMenu=e=>{this._hasTrigger("contextmenu")&&(e.preventDefault(),e.stopPropagation(),this.showAt(e.clientX,e.clientY,{triggerEvent:e,source:"context-menu"}))};this._onBackdropPointerDown=e=>{if(e.preventDefault(),e.stopPropagation(),!this.open)return;this._emitOutsidePress(e)&&this.closeOnOutsidePress&&this.hide()};this._onOutside=e=>{if(!this.open||this._isEventInsideMenu(e)||this._hasTrigger("click")&&this._isEventOnTrigger(e))return;this._emitOutsidePress(e)&&this.closeOnOutsidePress&&this.hide()};this._onKey=e=>{if(this.open){if(e.key==="Escape"&&this.closeOnEscape){e.preventDefault(),this.hide(),this._getTriggerElement()?.focus();return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(e.preventDefault(),!this._activePath.length){this._focusFirstItem([]);return}this._moveInMenu(Zs(this._activePath),e.key==="ArrowDown"?1:-1);return}if(e.key==="Home"){e.preventDefault(),this._moveToBoundary(Zs(this._activePath),0,1);return}if(e.key==="End"){e.preventDefault();let t=Zs(this._activePath),r=this._menuItemsAt(t);this._moveToBoundary(t,r.length-1,-1);return}if(e.key==="ArrowRight"){e.preventDefault(),this._openActiveSubmenu();return}if(e.key==="ArrowLeft"){if(this._activePath.length>1){e.preventDefault();let t=this._activePath.slice(0,-1);this._activePath=t,this._openPath=t.slice(0,-1)}return}if(e.key==="Enter"||e.key===" "){let t=this._itemAt(this._activePath);t&&Qa(t)?(e.preventDefault(),this._select(t)):t?.children?.length&&(e.preventDefault(),this._setActivePath(this._activePath,"click"),this._openActiveSubmenu())}}};this._onBlur=()=>this.hide();this._onResize=()=>this.hide();this._onScroll=()=>{if(this.open&&this._anchorMode==="element"){let e=this._getTriggerElement();e&&(this._anchorRect=e.getBoundingClientRect(),this._scheduleLayout())}}}_registerOverlayStack(){let e=zn(this);e&&(Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0)}_releaseOverlayStack(){this._overlayStackRegistered&&(Xo(this),this._overlayStackRegistered=!1)}_emitOpenChange(e){this.dispatchEvent(new CustomEvent("open-change",{detail:{open:e},bubbles:!0,composed:!0}))}get _normalizedItems(){return Sh(this.items)}show(e,t,r,n){if(typeof e=="object"){this.showAt(e.x,e.y,e);return}this.showAt(e,t??0,r,n)}showAt(e,t,r,n){Array.isArray(r)||r==null?(r!==void 0&&(this.items=r),n!==void 0&&(this._context=n),this._triggerEvent=void 0,this._source="context-menu"):(r.items!==void 0&&(this.items=r.items),r.context!==void 0&&(this._context=r.context),this._triggerEvent=r.triggerEvent,this._source=r.source??"context-menu"),this._anchorMode="point",this._anchorRect=null,this.x=e,this.y=t,this._activePath=[],this._openPath=[],this.open=!0,this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this._emitOpenChange(!0),this._scheduleLayout()}showFromTrigger(e,t,r){let n=e??this._getTriggerElement();n&&(Array.isArray(t)||t==null?(t!==void 0&&(this.items=t),r!==void 0&&(this._context=r),this._triggerEvent=void 0,this._source="context-menu"):(t.items!==void 0&&(this.items=t.items),t.context!==void 0&&(this._context=t.context),this._triggerEvent=t.triggerEvent,this._source=t.source??"context-menu"),this._anchorMode="element",this._anchorRect=n.getBoundingClientRect(),this._activePath=[],this._openPath=[],this.open=!0,this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this._emitOpenChange(!0),this._scheduleLayout())}hide(){this.open&&(this.open=!1,this._activePath=[],this._openPath=[],this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this._emitOpenChange(!1))}close(){this.hide()}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),document.addEventListener("mousedown",this._onOutside,!0),document.addEventListener("keydown",this._onKey),window.addEventListener("blur",this._onBlur),window.addEventListener("resize",this._onResize),window.addEventListener("scroll",this._onScroll,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),document.removeEventListener("mousedown",this._onOutside,!0),document.removeEventListener("keydown",this._onKey),window.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),window.removeEventListener("scroll",this._onScroll,!0)}updated(e){e.has("open")&&(this.open?(this._registerOverlayStack(),Et(this)):this._releaseOverlayStack()),(e.has("open")||e.has("items")||e.has("_openPath")||e.has("_activePath")||e.has("x")||e.has("y")||e.has("placement"))&&this._scheduleLayout(),this._syncElementProps()}willUpdate(){let e=L(this,"contextMenu");!this._explicitAttrs.has("placement")&&typeof e.placement=="string"&&this.placement!==e.placement&&(this.placement=e.placement),!this._explicitAttrs.has("close-on-select")&&typeof e.closeOnSelect=="boolean"&&this.closeOnSelect!==e.closeOnSelect&&(this.closeOnSelect=e.closeOnSelect),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress),!this._explicitAttrs.has("close-on-escape")&&typeof e.closeOnEscape=="boolean"&&this.closeOnEscape!==e.closeOnEscape&&(this.closeOnEscape=e.closeOnEscape),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("submenu-trigger")&&typeof e.submenuTrigger=="string"&&this.submenuTrigger!==e.submenuTrigger&&(this.submenuTrigger=e.submenuTrigger)}_syncElementProps(){let e=L(this,"contextMenu");se(this._triggerWrapper,{...e.triggerProps??{},...this.triggerProps??{}}),se(this._overlayEl,{...e.overlayProps??{},...this.overlayProps??{}});for(let t of this._menuEls??[])se(t,{...e.menuProps??{},...this.menuProps??{}})}_getTriggerElement(){return(this._triggerSlot?.assignedElements({flatten:!0})??[]).find(t=>t instanceof HTMLElement)??null}_hasTrigger(e){return this.trigger.split(/\s+/).map(t=>t.trim()).filter(Boolean).includes(e)}_isEventInsideMenu(e){return e.composedPath().some(r=>r instanceof HTMLElement&&r.getAttribute("part")?.split(/\s+/).includes("menu"))}_isEventOnTrigger(e){let t=e.composedPath(),r=this.renderRoot.querySelector('[part="trigger"]'),n=this._triggerSlot?.assignedElements({flatten:!0})??[];return t.some(s=>s===r||s instanceof HTMLElement&&n.includes(s))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_scheduleLayout(){this.open&&(this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._adjust()}))}_itemAt(e){return Qn(this._normalizedItems,e)}_menuItemsAt(e){return $h(this._normalizedItems,e)}_setActivePath(e,t="keyboard"){if(this._activePath=e.slice(),!this._itemAt(e)?.children?.length){this._openPath=e.slice(0,-1);return}if(t==="click"){this._openPath=e.slice();return}if(t==="hover"&&this.submenuTrigger==="hover"){this._openPath=e.slice();return}this._openPath=e.slice(0,-1)}_focusFirstItem(e){let t=this._menuItemsAt(e),r=wc(t);r>=0&&this._setActivePath([...e,r],"keyboard")}_moveInMenu(e,t){let r=this._menuItemsAt(e);if(!r.length)return;let n=this._activePath.length===e.length+1&&e.every((d,h)=>this._activePath[h]===d)?this._activePath[this._activePath.length-1]:-1,s=jh(r,n,t);s>=0&&this._setActivePath([...e,s],"keyboard")}_moveToBoundary(e,t,r){let n=this._menuItemsAt(e);if(!n.length)return;let s=Oh(n,t,r);s>=0&&this._setActivePath([...e,s],"keyboard")}_openActiveSubmenu(){let e=this._itemAt(this._activePath);if(!e?.children?.length)return;let t=wc(e.children);this._openPath=this._activePath.slice(),t>=0&&(this._activePath=[...this._activePath,t])}_getOverlayRect(){return this._overlayEl?.getBoundingClientRect()??new DOMRect(0,0,window.innerWidth,window.innerHeight)}_getRootPosition(e,t){if(this._anchorMode==="element"&&this._anchorRect){let r=this._anchorRect;switch(this.placement){case"bottom":return{x:r.left-t.left+r.width/2-e.width/2,y:r.bottom-t.top+6,originX:"left",originY:"top"};case"bottom-end":return{x:r.right-t.left-e.width,y:r.bottom-t.top+6,originX:"right",originY:"top"};case"top-start":return{x:r.left-t.left,y:r.top-t.top-e.height-6,originX:"left",originY:"bottom"};case"top":return{x:r.left-t.left+r.width/2-e.width/2,y:r.top-t.top-e.height-6,originX:"left",originY:"bottom"};case"top-end":return{x:r.right-t.left-e.width,y:r.top-t.top-e.height-6,originX:"right",originY:"bottom"};case"right-start":return{x:r.right-t.left+6,y:r.top-t.top,originX:"left",originY:"top"};case"right":return{x:r.right-t.left+6,y:r.top-t.top+r.height/2-e.height/2,originX:"left",originY:"top"};case"right-end":return{x:r.right-t.left+6,y:r.bottom-t.top-e.height,originX:"left",originY:"bottom"};case"left-start":return{x:r.left-t.left-e.width-6,y:r.top-t.top,originX:"right",originY:"top"};case"left":return{x:r.left-t.left-e.width-6,y:r.top-t.top+r.height/2-e.height/2,originX:"right",originY:"top"};case"left-end":return{x:r.left-t.left-e.width-6,y:r.bottom-t.top-e.height,originX:"right",originY:"bottom"};case"bottom-start":default:return{x:r.left-t.left,y:r.bottom-t.top+6,originX:"left",originY:"top"}}}return{x:this.x-t.left,y:this.y-t.top,originX:"left",originY:"top"}}_adjust(){let e=this.renderRoot.querySelector(`[data-menu-path="${Mn([])}"]`);if(!e)return;let t=this._getOverlayRect(),r=t.width||window.innerWidth,n=t.height||window.innerHeight,s=e.getBoundingClientRect(),d=this._getRootPosition(s,t),h=d.x,p=d.y,f=d.originX,x=d.originY;h+s.width>r-4&&(h=Math.max(4,r-s.width-4),f="right"),p+s.height>n-4&&(p=Math.max(4,n-s.height-4),x="bottom"),p<4&&(p=4),h<4&&(h=4),e.style.left=`${h}px`,e.style.top=`${p}px`,e.style.setProperty("--lui-menu-origin-x",f),e.style.setProperty("--lui-menu-origin-y",x),xc(this._openPath).slice(1).forEach(k=>{let C=this.renderRoot.querySelector(`[data-menu-path="${Mn(k)}"]`),S=this.renderRoot.querySelector(`[data-item-path="${Mn(k)}"]`);if(!C||!S)return;let z=S.getBoundingClientRect(),T=C.getBoundingClientRect(),P=z.right-t.left-3,H=z.top-t.top-8,I="left",B="top";P+T.width>r-4&&(P=z.left-t.left-T.width+3,I="right"),H+T.height>n-4&&(H=Math.max(4,n-T.height-4),B="bottom"),H<4&&(H=4),C.style.left=`${P}px`,C.style.top=`${H}px`,C.style.setProperty("--lui-menu-origin-x",I),C.style.setProperty("--lui-menu-origin-y",B)})}_createActionDetail(e,t){let r=this._triggerEvent instanceof MouseEvent?this._triggerEvent:null;return{key:e.key,value:e.value??e.key,item:e.raw??e,path:t,source:this._source,triggerEvent:this._triggerEvent,x:r?.clientX??this.x,y:r?.clientY??this.y,context:this._context}}async _select(e,t=this._activePath.slice()){if(!Qa(e))return;let r=this._createActionDetail(e,t);this.dispatchEvent(new CustomEvent("select",{detail:r,bubbles:!0,composed:!0})),e.onSelect?.(r),e.action?.(this._context),this.closeOnSelect&&this.hide()}_renderMenu(e){let t=Mn(e),r=e.length?this._menuItemsAt(e):this._normalizedItems,n=e.length===0&&!!this.heading;return lo.html`
|
|
5628
|
+
`],a([(0,ot.property)()],Xe.prototype,"text",2),a([(0,ot.property)({reflect:!0})],Xe.prototype,"type",2),a([(0,ot.property)({reflect:!0})],Xe.prototype,"size",2),a([(0,ot.property)()],Xe.prototype,"weight",2),a([(0,ot.property)({type:Boolean,reflect:!0})],Xe.prototype,"block",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"copyable",2),a([(0,ot.property)({type:Number,attribute:"max-lines"})],Xe.prototype,"maxLines",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"truncate",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"nowrap",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"selectable",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"strikethrough",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"underline",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"italic",2),a([(0,ot.property)({type:Boolean})],Xe.prototype,"monospace",2),a([(0,ot.property)({type:Boolean,reflect:!0})],Xe.prototype,"surface",2),a([(0,ot.property)({type:Boolean,attribute:"popover-on-hover"})],Xe.prototype,"popoverOnHover",2),a([(0,ot.property)({attribute:!1})],Xe.prototype,"tooltipProps",2),a([(0,ot.property)()],Xe.prototype,"tag",2),a([(0,ot.state)()],Xe.prototype,"_copied",2),a([(0,ot.state)()],Xe.prototype,"_overflowing",2),a([(0,ot.query)(".text")],Xe.prototype,"_textEl",2),a([(0,ot.query)("lui-tooltip")],Xe.prototype,"_tooltipEl",2),Xe=a([(0,ot.customElement)("lui-text")],Xe);var we=require("lit"),he=require("lit/decorators.js"),rp=require("lit/directives/repeat.js"),op=xn(ia(),1);var lo=require("lit"),Fe=require("lit/decorators.js");var Re=class extends lo.LitElement{constructor(){super(...arguments);this._overlayStackRegistered=!1;this.x=0;this.y=0;this.open=!1;this.items=[];this.heading="";this.headingIcon="";this.trigger="manual";this.placement="bottom-start";this.closeOnSelect=!0;this.closeOnOutsidePress=!0;this.closeOnEscape=!0;this.backdrop="none";this.backdropStyle="";this.submenuTrigger="hover";this.triggerProps={};this.overlayProps={};this.menuProps={};this._context=null;this._activePath=[];this._openPath=[];this._layoutFrame=0;this._anchorMode="point";this._anchorRect=null;this._source="context-menu";this._explicitAttrs=new Set;this._onTriggerClick=e=>{if(this._hasTrigger("click")){if(e.preventDefault(),e.stopPropagation(),this.open&&this._anchorMode==="element"){this.hide();return}this.showFromTrigger(e.currentTarget,{triggerEvent:e,source:"context-menu"})}};this._onTriggerContextMenu=e=>{this._hasTrigger("contextmenu")&&(e.preventDefault(),e.stopPropagation(),this.showAt(e.clientX,e.clientY,{triggerEvent:e,source:"context-menu"}))};this._onBackdropPointerDown=e=>{if(e.preventDefault(),e.stopPropagation(),!this.open)return;this._emitOutsidePress(e)&&this.closeOnOutsidePress&&this.hide()};this._onOutside=e=>{if(!this.open||this._isEventInsideMenu(e)||this._hasTrigger("click")&&this._isEventOnTrigger(e))return;this._emitOutsidePress(e)&&this.closeOnOutsidePress&&this.hide()};this._onKey=e=>{if(this.open){if(e.key==="Escape"&&this.closeOnEscape){e.preventDefault(),this.hide(),this._getTriggerElement()?.focus();return}if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(e.preventDefault(),!this._activePath.length){this._focusFirstItem([]);return}this._moveInMenu(Zs(this._activePath),e.key==="ArrowDown"?1:-1);return}if(e.key==="Home"){e.preventDefault(),this._moveToBoundary(Zs(this._activePath),0,1);return}if(e.key==="End"){e.preventDefault();let t=Zs(this._activePath),r=this._menuItemsAt(t);this._moveToBoundary(t,r.length-1,-1);return}if(e.key==="ArrowRight"){e.preventDefault(),this._openActiveSubmenu();return}if(e.key==="ArrowLeft"){if(this._activePath.length>1){e.preventDefault();let t=this._activePath.slice(0,-1);this._activePath=t,this._openPath=t.slice(0,-1)}return}if(e.key==="Enter"||e.key===" "){let t=this._itemAt(this._activePath);t&&Qa(t)?(e.preventDefault(),this._select(t)):t?.children?.length&&(e.preventDefault(),this._setActivePath(this._activePath,"click"),this._openActiveSubmenu())}}};this._onBlur=()=>this.hide();this._onResize=()=>this.hide();this._onScroll=()=>{if(this.open&&this._anchorMode==="element"){let e=this._getTriggerElement();e&&(this._anchorRect=e.getBoundingClientRect(),this._scheduleLayout())}}}_registerOverlayStack(){let e=zn(this);e&&(Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0)}_releaseOverlayStack(){this._overlayStackRegistered&&(Xo(this),this._overlayStackRegistered=!1)}_emitOpenChange(e){this.dispatchEvent(new CustomEvent("open-change",{detail:{open:e},bubbles:!0,composed:!0}))}get _normalizedItems(){return Sh(this.items)}show(e,t,r,n){if(typeof e=="object"){this.showAt(e.x,e.y,e);return}this.showAt(e,t??0,r,n)}showAt(e,t,r,n){Array.isArray(r)||r==null?(r!==void 0&&(this.items=r),n!==void 0&&(this._context=n),this._triggerEvent=void 0,this._source="context-menu"):(r.items!==void 0&&(this.items=r.items),r.context!==void 0&&(this._context=r.context),this._triggerEvent=r.triggerEvent,this._source=r.source??"context-menu"),this._anchorMode="point",this._anchorRect=null,this.x=e,this.y=t,this._activePath=[],this._openPath=[],this.open=!0,this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this._emitOpenChange(!0),this._scheduleLayout()}showFromTrigger(e,t,r){let n=e??this._getTriggerElement();n&&(Array.isArray(t)||t==null?(t!==void 0&&(this.items=t),r!==void 0&&(this._context=r),this._triggerEvent=void 0,this._source="context-menu"):(t.items!==void 0&&(this.items=t.items),t.context!==void 0&&(this._context=t.context),this._triggerEvent=t.triggerEvent,this._source=t.source??"context-menu"),this._anchorMode="element",this._anchorRect=n.getBoundingClientRect(),this._activePath=[],this._openPath=[],this.open=!0,this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this._emitOpenChange(!0),this._scheduleLayout())}hide(){this.open&&(this.open=!1,this._activePath=[],this._openPath=[],this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this._emitOpenChange(!1))}close(){this.hide()}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),document.addEventListener("mousedown",this._onOutside,!0),document.addEventListener("keydown",this._onKey),window.addEventListener("blur",this._onBlur),window.addEventListener("resize",this._onResize),window.addEventListener("scroll",this._onScroll,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),document.removeEventListener("mousedown",this._onOutside,!0),document.removeEventListener("keydown",this._onKey),window.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),window.removeEventListener("scroll",this._onScroll,!0)}updated(e){e.has("open")&&(this.open?(this._registerOverlayStack(),Et(this)):this._releaseOverlayStack()),(e.has("open")||e.has("items")||e.has("_openPath")||e.has("_activePath")||e.has("x")||e.has("y")||e.has("placement"))&&this._scheduleLayout(),this._syncElementProps()}willUpdate(){let e=L(this,"contextMenu");!this._explicitAttrs.has("placement")&&typeof e.placement=="string"&&this.placement!==e.placement&&(this.placement=e.placement),!this._explicitAttrs.has("close-on-select")&&typeof e.closeOnSelect=="boolean"&&this.closeOnSelect!==e.closeOnSelect&&(this.closeOnSelect=e.closeOnSelect),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress),!this._explicitAttrs.has("close-on-escape")&&typeof e.closeOnEscape=="boolean"&&this.closeOnEscape!==e.closeOnEscape&&(this.closeOnEscape=e.closeOnEscape),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("submenu-trigger")&&typeof e.submenuTrigger=="string"&&this.submenuTrigger!==e.submenuTrigger&&(this.submenuTrigger=e.submenuTrigger)}_syncElementProps(){let e=L(this,"contextMenu");se(this._triggerWrapper,{...e.triggerProps??{},...this.triggerProps??{}}),se(this._overlayEl,{...e.overlayProps??{},...this.overlayProps??{}});for(let t of this._menuEls??[])se(t,{...e.menuProps??{},...this.menuProps??{}})}_getTriggerElement(){return(this._triggerSlot?.assignedElements({flatten:!0})??[]).find(t=>t instanceof HTMLElement)??null}_hasTrigger(e){return this.trigger.split(/\s+/).map(t=>t.trim()).filter(Boolean).includes(e)}_isEventInsideMenu(e){return e.composedPath().some(r=>r instanceof HTMLElement&&r.getAttribute("part")?.split(/\s+/).includes("menu"))}_isEventOnTrigger(e){let t=e.composedPath(),r=this.renderRoot.querySelector('[part="trigger"]'),n=this._triggerSlot?.assignedElements({flatten:!0})??[];return t.some(s=>s===r||s instanceof HTMLElement&&n.includes(s))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_scheduleLayout(){this.open&&(this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._adjust()}))}_itemAt(e){return Qn(this._normalizedItems,e)}_menuItemsAt(e){return $h(this._normalizedItems,e)}_setActivePath(e,t="keyboard"){if(this._activePath=e.slice(),!this._itemAt(e)?.children?.length){this._openPath=e.slice(0,-1);return}if(t==="click"){this._openPath=e.slice();return}if(t==="hover"&&this.submenuTrigger==="hover"){this._openPath=e.slice();return}this._openPath=e.slice(0,-1)}_focusFirstItem(e){let t=this._menuItemsAt(e),r=wc(t);r>=0&&this._setActivePath([...e,r],"keyboard")}_moveInMenu(e,t){let r=this._menuItemsAt(e);if(!r.length)return;let n=this._activePath.length===e.length+1&&e.every((d,h)=>this._activePath[h]===d)?this._activePath[this._activePath.length-1]:-1,s=jh(r,n,t);s>=0&&this._setActivePath([...e,s],"keyboard")}_moveToBoundary(e,t,r){let n=this._menuItemsAt(e);if(!n.length)return;let s=Oh(n,t,r);s>=0&&this._setActivePath([...e,s],"keyboard")}_openActiveSubmenu(){let e=this._itemAt(this._activePath);if(!e?.children?.length)return;let t=wc(e.children);this._openPath=this._activePath.slice(),t>=0&&(this._activePath=[...this._activePath,t])}_getOverlayRect(){return this._overlayEl?.getBoundingClientRect()??new DOMRect(0,0,window.innerWidth,window.innerHeight)}_getRootPosition(e,t){if(this._anchorMode==="element"&&this._anchorRect){let r=this._anchorRect;switch(this.placement){case"bottom":return{x:r.left-t.left+r.width/2-e.width/2,y:r.bottom-t.top+6,originX:"left",originY:"top"};case"bottom-end":return{x:r.right-t.left-e.width,y:r.bottom-t.top+6,originX:"right",originY:"top"};case"top-start":return{x:r.left-t.left,y:r.top-t.top-e.height-6,originX:"left",originY:"bottom"};case"top":return{x:r.left-t.left+r.width/2-e.width/2,y:r.top-t.top-e.height-6,originX:"left",originY:"bottom"};case"top-end":return{x:r.right-t.left-e.width,y:r.top-t.top-e.height-6,originX:"right",originY:"bottom"};case"right-start":return{x:r.right-t.left+6,y:r.top-t.top,originX:"left",originY:"top"};case"right":return{x:r.right-t.left+6,y:r.top-t.top+r.height/2-e.height/2,originX:"left",originY:"top"};case"right-end":return{x:r.right-t.left+6,y:r.bottom-t.top-e.height,originX:"left",originY:"bottom"};case"left-start":return{x:r.left-t.left-e.width-6,y:r.top-t.top,originX:"right",originY:"top"};case"left":return{x:r.left-t.left-e.width-6,y:r.top-t.top+r.height/2-e.height/2,originX:"right",originY:"top"};case"left-end":return{x:r.left-t.left-e.width-6,y:r.bottom-t.top-e.height,originX:"right",originY:"bottom"};case"bottom-start":default:return{x:r.left-t.left,y:r.bottom-t.top+6,originX:"left",originY:"top"}}}return{x:this.x-t.left,y:this.y-t.top,originX:"left",originY:"top"}}_adjust(){let e=this.renderRoot.querySelector(`[data-menu-path="${Mn([])}"]`);if(!e)return;let t=this._getOverlayRect(),r=t.width||window.innerWidth,n=t.height||window.innerHeight,s=e.getBoundingClientRect(),d=this._getRootPosition(s,t),h=d.x,p=d.y,f=d.originX,x=d.originY;h+s.width>r-4&&(h=Math.max(4,r-s.width-4),f="right"),p+s.height>n-4&&(p=Math.max(4,n-s.height-4),x="bottom"),p<4&&(p=4),h<4&&(h=4),e.style.left=`${h}px`,e.style.top=`${p}px`,e.style.setProperty("--lui-menu-origin-x",f),e.style.setProperty("--lui-menu-origin-y",x),xc(this._openPath).slice(1).forEach(k=>{let C=this.renderRoot.querySelector(`[data-menu-path="${Mn(k)}"]`),S=this.renderRoot.querySelector(`[data-item-path="${Mn(k)}"]`);if(!C||!S)return;let z=S.getBoundingClientRect(),T=C.getBoundingClientRect(),P=z.right-t.left-3,H=z.top-t.top-8,I="left",B="top";P+T.width>r-4&&(P=z.left-t.left-T.width+3,I="right"),H+T.height>n-4&&(H=Math.max(4,n-T.height-4),B="bottom"),H<4&&(H=4),C.style.left=`${P}px`,C.style.top=`${H}px`,C.style.setProperty("--lui-menu-origin-x",I),C.style.setProperty("--lui-menu-origin-y",B)})}_createActionDetail(e,t){let r=this._triggerEvent instanceof MouseEvent?this._triggerEvent:null;return{key:e.key,value:e.value??e.key,item:e.raw??e,path:t,source:this._source,triggerEvent:this._triggerEvent,x:r?.clientX??this.x,y:r?.clientY??this.y,context:this._context}}async _select(e,t=this._activePath.slice()){if(!Qa(e))return;let r=this._createActionDetail(e,t);this.dispatchEvent(new CustomEvent("select",{detail:r,bubbles:!0,composed:!0})),e.onSelect?.(r),e.action?.(this._context),this.closeOnSelect&&this.hide()}_renderMenu(e){let t=Mn(e),r=e.length?this._menuItemsAt(e):this._normalizedItems,n=e.length===0&&!!this.heading;return lo.html`
|
|
5620
5629
|
<div
|
|
5621
5630
|
part="menu"
|
|
5622
5631
|
data-menu-path=${t}
|
|
@@ -6714,7 +6723,7 @@
|
|
|
6714
6723
|
.value-skeleton { width: 150px; height: calc(var(--lui-statistic-value-size) * 1.05); }
|
|
6715
6724
|
.desc-skeleton { width: 120px; height: 13px; }
|
|
6716
6725
|
@keyframes lui-statistic-shimmer { to { transform: translateX(100%); } }
|
|
6717
|
-
`],a([(0,dr.property)()],St.prototype,"title",2),a([(0,dr.property)()],St.prototype,"value",2),a([(0,dr.property)()],St.prototype,"prefix",2),a([(0,dr.property)()],St.prototype,"suffix",2),a([(0,dr.property)()],St.prototype,"description",2),a([(0,dr.property)({type:Number})],St.prototype,"precision",2),a([(0,dr.property)({attribute:"group-separator"})],St.prototype,"groupSeparator",2),a([(0,dr.property)({attribute:"decimal-separator"})],St.prototype,"decimalSeparator",2),a([(0,dr.property)({reflect:!0})],St.prototype,"size",2),a([(0,dr.property)({reflect:!0})],St.prototype,"align",2),a([(0,dr.property)({reflect:!0})],St.prototype,"trend",2),a([(0,dr.property)({attribute:"trend-value"})],St.prototype,"trendValue",2),a([(0,dr.property)({reflect:!0})],St.prototype,"status",2),a([(0,dr.property)({attribute:"value-color"})],St.prototype,"valueColor",2),a([(0,dr.property)({type:Boolean,reflect:!0})],St.prototype,"loading",2),a([(0,dr.property)({attribute:!1})],St.prototype,"formatter",2),St=a([(0,dr.customElement)("lui-statistic")],St);var
|
|
6726
|
+
`],a([(0,dr.property)()],St.prototype,"title",2),a([(0,dr.property)()],St.prototype,"value",2),a([(0,dr.property)()],St.prototype,"prefix",2),a([(0,dr.property)()],St.prototype,"suffix",2),a([(0,dr.property)()],St.prototype,"description",2),a([(0,dr.property)({type:Number})],St.prototype,"precision",2),a([(0,dr.property)({attribute:"group-separator"})],St.prototype,"groupSeparator",2),a([(0,dr.property)({attribute:"decimal-separator"})],St.prototype,"decimalSeparator",2),a([(0,dr.property)({reflect:!0})],St.prototype,"size",2),a([(0,dr.property)({reflect:!0})],St.prototype,"align",2),a([(0,dr.property)({reflect:!0})],St.prototype,"trend",2),a([(0,dr.property)({attribute:"trend-value"})],St.prototype,"trendValue",2),a([(0,dr.property)({reflect:!0})],St.prototype,"status",2),a([(0,dr.property)({attribute:"value-color"})],St.prototype,"valueColor",2),a([(0,dr.property)({type:Boolean,reflect:!0})],St.prototype,"loading",2),a([(0,dr.property)({attribute:!1})],St.prototype,"formatter",2),St=a([(0,dr.customElement)("lui-statistic")],St);var Je=require("lit"),Ze=require("lit/decorators.js");var Jo=require("lit"),Pr=require("lit/decorators.js");var rr=class extends Jo.LitElement{constructor(){super(...arguments);this.variant="danger";this.size="md";this.radius="full";this.placement="top-right";this.count="";this.max=99;this.showZero=!1;this.dot=!1;this.processing=!1;this.text="";this.color="";this.offset="";this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=L(this,"badge");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("max")&&typeof t.max=="number"&&this.max!==t.max&&(this.max=t.max),!this._explicitAttrs.has("show-zero")&&typeof t.showZero=="boolean"&&this.showZero!==t.showZero&&(this.showZero=t.showZero)}_hasContent(){return(this._assignedElements?.length??0)>0||Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE&&!e.hasAttribute("slot"))}_displayCount(){let e=this.count;if(typeof e=="number")return e>this.max?`${this.max}+`:String(e);let t=String(e??"").trim();if(!t)return"";let r=Number(t);return Number.isFinite(r)&&t!==""&&r>this.max?`${this.max}+`:t}_isZero(){return Number(this.count)===0&&String(this.count).trim()!==""}_visible(){return this.dot||this.processing?!0:!(!this._displayCount()||this._isZero()&&!this.showZero)}_style(){let[e="",t=""]=this.offset.split(/[\s,]+/).filter(Boolean),r=[this.color?`--lui-badge-bg:${this.color}`:"",e?`--lui-badge-offset-x:${e}`:"",t?`--lui-badge-offset-y:${t}`:""].filter(Boolean);return r.length?r.join(";"):Jo.nothing}_renderBadge(e){if(!this._visible())return Jo.nothing;let t=this._displayCount(),r=["badge",this.dot?"dot":"",e?"standalone":"floating"].filter(Boolean).join(" ");return Jo.html`<span class=${r} part="badge" style=${this._style()} aria-label=${this.dot?this.text||this.variant:t}>${this.dot?Jo.nothing:t}</span>`}render(){let e=this._hasContent(),t=!e;return t&&this.text?Jo.html`
|
|
6718
6727
|
<span class="status-row" part="status" style=${this._style()}>
|
|
6719
6728
|
${this._renderBadge(!0)}
|
|
6720
6729
|
<span part="text">${this.text}</span>
|
|
@@ -6884,7 +6893,7 @@
|
|
|
6884
6893
|
transform: scale(2.4);
|
|
6885
6894
|
}
|
|
6886
6895
|
}
|
|
6887
|
-
`],a([(0,Pr.property)({reflect:!0})],rr.prototype,"variant",2),a([(0,Pr.property)({reflect:!0})],rr.prototype,"size",2),a([(0,Pr.property)({reflect:!0})],rr.prototype,"radius",2),a([(0,Pr.property)({reflect:!0})],rr.prototype,"placement",2),a([(0,Pr.property)()],rr.prototype,"count",2),a([(0,Pr.property)({type:Number})],rr.prototype,"max",2),a([(0,Pr.property)({type:Boolean,attribute:"show-zero"})],rr.prototype,"showZero",2),a([(0,Pr.property)({type:Boolean,reflect:!0})],rr.prototype,"dot",2),a([(0,Pr.property)({type:Boolean,reflect:!0})],rr.prototype,"processing",2),a([(0,Pr.property)()],rr.prototype,"text",2),a([(0,Pr.property)()],rr.prototype,"color",2),a([(0,Pr.property)()],rr.prototype,"offset",2),a([(0,Pr.queryAssignedElements)({flatten:!0})],rr.prototype,"_assignedElements",2),rr=a([(0,Pr.customElement)("lui-badge")],rr);function Ki(i,o){return String(i.key??i.value??o)}function Rm(i,o){return i.length===o.length&&i.every((e,t)=>e===o[t])}var So=class extends
|
|
6896
|
+
`],a([(0,Pr.property)({reflect:!0})],rr.prototype,"variant",2),a([(0,Pr.property)({reflect:!0})],rr.prototype,"size",2),a([(0,Pr.property)({reflect:!0})],rr.prototype,"radius",2),a([(0,Pr.property)({reflect:!0})],rr.prototype,"placement",2),a([(0,Pr.property)()],rr.prototype,"count",2),a([(0,Pr.property)({type:Number})],rr.prototype,"max",2),a([(0,Pr.property)({type:Boolean,attribute:"show-zero"})],rr.prototype,"showZero",2),a([(0,Pr.property)({type:Boolean,reflect:!0})],rr.prototype,"dot",2),a([(0,Pr.property)({type:Boolean,reflect:!0})],rr.prototype,"processing",2),a([(0,Pr.property)()],rr.prototype,"text",2),a([(0,Pr.property)()],rr.prototype,"color",2),a([(0,Pr.property)()],rr.prototype,"offset",2),a([(0,Pr.queryAssignedElements)({flatten:!0})],rr.prototype,"_assignedElements",2),rr=a([(0,Pr.customElement)("lui-badge")],rr);function Ki(i,o){return String(i.key??i.value??o)}function Rm(i,o){return i.length===o.length&&i.every((e,t)=>e===o[t])}var So=class extends Je.LitElement{constructor(){super(...arguments);this.key="";this.value="";this.label="";this.icon="";this.badge="";this.disabled=!1;this.closable=!1}get tabKey(){return this.key||this.value}render(){return Je.html`<slot></slot>`}};So.styles=[A,j,Je.css`
|
|
6888
6897
|
:host {
|
|
6889
6898
|
display: block;
|
|
6890
6899
|
min-width: 0;
|
|
@@ -6892,24 +6901,24 @@
|
|
|
6892
6901
|
:host([hidden]) {
|
|
6893
6902
|
display: none !important;
|
|
6894
6903
|
}
|
|
6895
|
-
`],a([(0,Ze.property)()],So.prototype,"key",2),a([(0,Ze.property)()],So.prototype,"value",2),a([(0,Ze.property)()],So.prototype,"label",2),a([(0,Ze.property)()],So.prototype,"icon",2),a([(0,Ze.property)()],So.prototype,"badge",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],So.prototype,"disabled",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],So.prototype,"closable",2),So=a([(0,Ze.customElement)("lui-tab-panel")],So);var It=class extends
|
|
6904
|
+
`],a([(0,Ze.property)()],So.prototype,"key",2),a([(0,Ze.property)()],So.prototype,"value",2),a([(0,Ze.property)()],So.prototype,"label",2),a([(0,Ze.property)()],So.prototype,"icon",2),a([(0,Ze.property)()],So.prototype,"badge",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],So.prototype,"disabled",2),a([(0,Ze.property)({type:Boolean,reflect:!0})],So.prototype,"closable",2),So=a([(0,Ze.customElement)("lui-tab-panel")],So);var It=class extends Je.LitElement{constructor(){super(...arguments);this.activeKey="";this.size="md";this.variant="line";this.placement="top";this.closable=!1;this.disabled=!1;this.collapse="none";this.overflowLabel="\u66F4\u591A";this.overflowIcon="more-horizontal";this._overflowIndexes=[];this._explicitAttrs=new Set;this._observedTabButtons=new Set;this._layoutFrame=0;this._indicatorFrame=0;this._indicatorLastKey=null;this._onExtraSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE?!0:!!n.textContent?.trim());this.toggleAttribute("has-extra",r)};this._onKeyDown=e=>{let t=this._tabs(),r=t.map((k,C)=>({item:k,index:C})).filter(({item:k})=>!k.disabled);if(!r.length)return;let n=this._resolvedActiveKey(t),s=Math.max(0,r.findIndex(({item:k,index:C})=>Ki(k,C)===n)),d=this.placement==="top"||this.placement==="bottom",h=d?"ArrowLeft":"ArrowUp",p=d?"ArrowRight":"ArrowDown",f=s;if(e.key===p)f=(s+1)%r.length;else if(e.key===h)f=(s-1+r.length)%r.length;else if(e.key==="Home")f=0;else if(e.key==="End")f=r.length-1;else return;e.preventDefault();let x=r[f];this._select(x.item,x.index),this.updateComplete.then(()=>{this.renderRoot.querySelector(`button[data-key="${CSS.escape(Ki(x.item,x.index))}"]`)?.focus()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._resizeObserver=new ResizeObserver(()=>this._scheduleLayout())}firstUpdated(){this._resizeObserver?.observe(this),this._navEl&&this._resizeObserver?.observe(this._navEl),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._syncObservedTabButtons(),this._scheduleLayout()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame)}willUpdate(e){let t=L(this,"tab");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("closable")&&typeof t.closable=="boolean"&&this.closable!==t.closable&&(this.closable=t.closable)}updated(e){this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement));let t=this._resolvedActiveKey();t&&this.getAttribute("active-key")!==t&&this.setAttribute("active-key",t),this._syncPanels(),this._syncObservedTabButtons(),(e.has("items")||e.has("size")||e.has("variant")||e.has("placement")||e.has("closable")||e.has("disabled")||e.has("collapse")||e.has("activeKey"))&&this._scheduleLayout(),this._navEl?.setAttribute("data-indicator-still",""),this._scheduleActiveIndicatorLayout()}_syncObservedTabButtons(){if(!this._resizeObserver)return;let e=new Set(Array.from(this.renderRoot.querySelectorAll(".tab-button, .overflow-trigger")));for(let t of this._observedTabButtons)e.has(t)||this._resizeObserver.unobserve(t);for(let t of e)this._observedTabButtons.has(t)||this._resizeObserver.observe(t);this._observedTabButtons=e}_panelElements(){return(this._defaultSlot?.assignedElements({flatten:!0})??this._assignedElements??[]).filter(t=>t.tagName.toLowerCase()==="lui-tab-panel")}_itemsFromPanels(){return this._panelElements().map((e,t)=>({key:e.tabKey||String(t),label:e.label||e.getAttribute("label")||e.tabKey||`Tab ${t+1}`,icon:e.icon,badge:e.badge,disabled:e.disabled,closable:e.closable}))}_tabs(){return this.items?.length?this.items:this._itemsFromPanels()}_resolvedActiveKey(e=this._tabs()){let t=e.filter(r=>!r.disabled);return t.length?this.activeKey&&t.some((r,n)=>Ki(r,e.indexOf(r)>=0?e.indexOf(r):n)===this.activeKey)?this.activeKey:Ki(t[0],e.indexOf(t[0])):""}_syncPanels(){if(this.items?.length)return;let e=this._panelElements(),t=this._itemsFromPanels(),r=this._resolvedActiveKey(t);r&&this.activeKey!==r&&(this.activeKey=r),r&&this.getAttribute("active-key")!==r&&this.setAttribute("active-key",r),e.forEach((n,s)=>{let d=n.tabKey||String(s);n.hidden=d!==r})}_select(e,t){if(this.disabled||e.disabled)return;let r=Ki(e,t),n=this._resolvedActiveKey();r===n&&this.activeKey||(this.activeKey=r,this.dispatchEvent(new CustomEvent("change",{detail:{key:r,previousKey:n,item:e,index:t},bubbles:!0,composed:!0})))}_close(e,t,r){e.preventDefault(),e.stopPropagation();let n=Ki(t,r);this.dispatchEvent(new CustomEvent("close",{detail:{key:n,item:t,index:r,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0}))}_scheduleLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._recomputeOverflow(),this._scheduleActiveIndicatorLayout()})}_scheduleActiveIndicatorLayout(){this._indicatorFrame&&cancelAnimationFrame(this._indicatorFrame),this._indicatorFrame=requestAnimationFrame(()=>{this._indicatorFrame=0,this._updateActiveIndicator()})}_updateActiveIndicator(){let e=this._navEl;if(!e)return;let t=this._resolvedActiveKey(),r=t?e.querySelector(`button.tab-button[data-key="${CSS.escape(t)}"]`):null;if(!r){e.style.setProperty("--lui-tab-indicator-opacity","0");return}let n=e.getBoundingClientRect(),s=r.getBoundingClientRect(),d=r.offsetWidth||s.width,h=r.offsetHeight||s.height;this._indicatorLastKey!==null&&this._indicatorLastKey!==t&&e.removeAttribute("data-indicator-still"),e.style.setProperty("--lui-tab-indicator-x",`${s.left-n.left+e.scrollLeft}px`),e.style.setProperty("--lui-tab-indicator-y",`${s.top-n.top+e.scrollTop}px`),e.style.setProperty("--lui-tab-indicator-width",`${d}px`),e.style.setProperty("--lui-tab-indicator-height",`${h}px`),e.style.setProperty("--lui-tab-indicator-opacity","1"),this._indicatorLastKey=t}_isHorizontal(){return this.placement==="top"||this.placement==="bottom"}_tabWidthBudget(){return Math.floor(this._navEl?.clientWidth??0)}_visibleIndexesForAuto(e){if(this.collapse!=="auto"||!this._isHorizontal()||e.length<=1)return e.map((k,C)=>C);let t=this._tabWidthBudget(),r=Array.from(this.renderRoot.querySelectorAll("[data-measure-tab-index]")),n=this.renderRoot.querySelector("[data-measure-overflow-trigger]");if(!t||r.length!==e.length||!n)return e.map((k,C)=>C);let s=Number.parseFloat(getComputedStyle(this._navEl).columnGap||"0")||0,d=r.map(k=>Math.ceil(k.getBoundingClientRect().width)),h=Math.ceil(n.getBoundingClientRect().width);if(d.reduce((k,C)=>k+C,0)+Math.max(0,e.length-1)*s<=t)return e.map((k,C)=>C);let f=[],x=h;for(let k=0;k<e.length;k+=1){let C=d[k]??0,S=x+(f.length>0?s:0)+C;S<=t&&(f.push(k),x=S)}return f}_recomputeOverflow(){let e=this._tabs(),t=new Set(this._visibleIndexesForAuto(e)),r=e.map((n,s)=>s).filter(n=>!t.has(n));Rm(r,this._overflowIndexes)||(this._overflowIndexes=r)}_overflowMenuItems(e,t){return this._overflowIndexes.flatMap(r=>{let n=e[r];if(!n)return[];let s=Ki(n,r);return[{key:s,value:String(r),label:n.label??s,icon:n.icon,disabled:this.disabled||n.disabled,active:s===t}]})}_onOverflowSelect(e,t){let r=Number(e.detail?.value),n=t[r];n&&this._select(n,r)}_renderTab(e,t,r){let n=Ki(e,t),s=n===r,d=e.closable??this.closable;return Je.html`
|
|
6896
6905
|
<button
|
|
6897
6906
|
class=${`tab-button ${s?"active":""}`}
|
|
6898
6907
|
part="tab"
|
|
6899
6908
|
data-key=${n}
|
|
6900
6909
|
role="tab"
|
|
6901
6910
|
aria-selected=${s?"true":"false"}
|
|
6902
|
-
aria-disabled=${this.disabled||e.disabled?"true":
|
|
6911
|
+
aria-disabled=${this.disabled||e.disabled?"true":Je.nothing}
|
|
6903
6912
|
tabindex=${s?"0":"-1"}
|
|
6904
6913
|
?disabled=${this.disabled||e.disabled}
|
|
6905
6914
|
@click=${()=>this._select(e,t)}
|
|
6906
6915
|
>
|
|
6907
|
-
${e.icon?
|
|
6916
|
+
${e.icon?Je.html`<lui-icon name=${e.icon}></lui-icon>`:Je.nothing}
|
|
6908
6917
|
<span class="label">${e.label??n}</span>
|
|
6909
|
-
${e.badge!=null&&String(e.badge)!==""?
|
|
6910
|
-
${d&&!e.disabled?
|
|
6918
|
+
${e.badge!=null&&String(e.badge)!==""?Je.html`<lui-badge count=${e.badge} size="sm"></lui-badge>`:Je.nothing}
|
|
6919
|
+
${d&&!e.disabled?Je.html`<span class="close" role="button" tabindex="-1" @click=${h=>this._close(h,e,t)}><lui-icon name="x"></lui-icon></span>`:Je.nothing}
|
|
6911
6920
|
</button>
|
|
6912
|
-
`}_renderOverflow(e,t){let r=this._overflowMenuItems(e,t);return r.length?
|
|
6921
|
+
`}_renderOverflow(e,t){let r=this._overflowMenuItems(e,t);return r.length?Je.html`
|
|
6913
6922
|
<span class="overflow" part="overflow">
|
|
6914
6923
|
<lui-dropmenu
|
|
6915
6924
|
.items=${r}
|
|
@@ -6931,9 +6940,9 @@
|
|
|
6931
6940
|
</button>
|
|
6932
6941
|
</lui-dropmenu>
|
|
6933
6942
|
</span>
|
|
6934
|
-
`:
|
|
6943
|
+
`:Je.nothing}_renderMeasure(e,t){return this.collapse!=="auto"||!this._isHorizontal()?Je.nothing:Je.html`
|
|
6935
6944
|
<div class="measure" aria-hidden="true">
|
|
6936
|
-
${e.map((r,n)=>
|
|
6945
|
+
${e.map((r,n)=>Je.html`
|
|
6937
6946
|
<span data-measure-tab-index=${n}>
|
|
6938
6947
|
${this._renderTab(r,n,t)}
|
|
6939
6948
|
</span>
|
|
@@ -6942,12 +6951,12 @@
|
|
|
6942
6951
|
<lui-icon name=${this.overflowIcon}></lui-icon>
|
|
6943
6952
|
</button>
|
|
6944
6953
|
</div>
|
|
6945
|
-
`}_renderDataPanel(e,t){let r=e.find((n,s)=>Ki(n,s)===t);return r?r.content:
|
|
6954
|
+
`}_renderDataPanel(e,t){let r=e.find((n,s)=>Ki(n,s)===t);return r?r.content:Je.nothing}render(){let e=this._tabs(),t=this._resolvedActiveKey(e),r=new Set(this._overflowIndexes),n=this.items?.length?e.some(s=>s.content!=null):!0;return Je.html`
|
|
6946
6955
|
<div class="tabs" part="tabs">
|
|
6947
6956
|
<div class="nav-wrap" part="nav-wrap">
|
|
6948
|
-
<div class="nav" part="nav" role="tablist" aria-orientation=${this.placement==="left"||this.placement==="right"?"vertical":"horizontal"} @keydown=${this._onKeyDown}>
|
|
6957
|
+
<div class="nav" part="nav" role="tablist" aria-orientation=${this.placement==="left"||this.placement==="right"?"vertical":"horizontal"} data-indicator-still @keydown=${this._onKeyDown}>
|
|
6949
6958
|
<span class="active-indicator" part="active-indicator" aria-hidden="true"></span>
|
|
6950
|
-
${e.map((
|
|
6959
|
+
${e.map((s,d)=>r.has(d)?Je.nothing:this._renderTab(s,d,t))}
|
|
6951
6960
|
${this._renderOverflow(e,t)}
|
|
6952
6961
|
</div>
|
|
6953
6962
|
${this._renderMeasure(e,t)}
|
|
@@ -6955,11 +6964,13 @@
|
|
|
6955
6964
|
<slot name="extra" @slotchange=${this._onExtraSlotChange}></slot>
|
|
6956
6965
|
</div>
|
|
6957
6966
|
</div>
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6967
|
+
${n?Je.html`
|
|
6968
|
+
<div class="panel" part="panel" role="tabpanel">
|
|
6969
|
+
${this.items?.length?this._renderDataPanel(e,t):Je.html`<slot @slotchange=${()=>{this._syncPanels(),this._scheduleLayout(),this.requestUpdate()}}></slot>`}
|
|
6970
|
+
</div>
|
|
6971
|
+
`:Je.nothing}
|
|
6961
6972
|
</div>
|
|
6962
|
-
`}};It.styles=[A,j,
|
|
6973
|
+
`}};It.styles=[A,j,Je.css`
|
|
6963
6974
|
:host {
|
|
6964
6975
|
display: block;
|
|
6965
6976
|
min-width: 0;
|
|
@@ -7154,6 +7165,11 @@
|
|
|
7154
7165
|
will-change: transform, width, height;
|
|
7155
7166
|
z-index: 0;
|
|
7156
7167
|
}
|
|
7168
|
+
/* 初始挂载/重建时禁过渡:指示器从 0,0 滑到激活项不是用户要的切换反馈;
|
|
7169
|
+
真实 activeKey 切换在 _updateActiveIndicator 里移除该标记 */
|
|
7170
|
+
[data-indicator-still] .active-indicator {
|
|
7171
|
+
transition: none;
|
|
7172
|
+
}
|
|
7157
7173
|
:host([placement="bottom"]) .tab-button {
|
|
7158
7174
|
border-radius: 0 0 var(--lui-tab-radius) var(--lui-tab-radius);
|
|
7159
7175
|
}
|
|
@@ -7276,10 +7292,6 @@
|
|
|
7276
7292
|
box-shadow: var(--lui-tab-indicator-shadow);
|
|
7277
7293
|
transform: translate3d(var(--lui-tab-indicator-x, 0px), var(--lui-tab-indicator-y, 0px), 0);
|
|
7278
7294
|
}
|
|
7279
|
-
/* 无面板内容时不占位(拿来做纯分段选择器) */
|
|
7280
|
-
:host([variant="segment"]) .panel:empty {
|
|
7281
|
-
display: none;
|
|
7282
|
-
}
|
|
7283
7295
|
.overflow {
|
|
7284
7296
|
display: inline-flex;
|
|
7285
7297
|
align-items: center;
|
|
@@ -7878,7 +7890,7 @@
|
|
|
7878
7890
|
font-size: var(--lui-font-size-xs);
|
|
7879
7891
|
color: var(--lui-color-muted);
|
|
7880
7892
|
}
|
|
7881
|
-
`],a([(0,kr.property)({reflect:!0})],ir.prototype,"size",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"radius",2),a([(0,kr.property)({type:Number})],ir.prototype,"max",2),a([(0,kr.property)({type:Number})],ir.prototype,"overlap",2),a([(0,kr.property)({type:Number})],ir.prototype,"total",2),a([(0,kr.property)({attribute:!1})],ir.prototype,"items",2),a([(0,kr.property)({type:Boolean})],ir.prototype,"bordered",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"summaryColor",2),a([(0,kr.property)({reflect:!0,attribute:"expand-trigger"})],ir.prototype,"expandTrigger",2),a([(0,kr.property)({attribute:"summary-text"})],ir.prototype,"summaryText",2),a([(0,kr.property)({reflect:!0,attribute:"status-position"})],ir.prototype,"statusPosition",2),a([(0,kr.queryAssignedElements)({flatten:!0})],ir.prototype,"_assignedElements",2),a([(0,kr.state)()],ir.prototype,"_slotHiddenCount",2),ir=a([(0,kr.customElement)("lui-avatar-group")],ir);var wr=require("lit");typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(o,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var t=document.createEvent("CustomEvent");return t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail),t}));var Im=typeof document<"u"&&!!document.documentMode,Nc;function Vm(){return Nc||(Nc=document.createElement("div").style)}var sp=["webkit","moz","ms"],pl={};function Uc(i){if(pl[i])return pl[i];let o=Vm();if(i in o)return pl[i]=i;let e=i[0].toUpperCase()+i.slice(1),t=sp.length;for(;t--;){let r=`${sp[t]}${e}`;if(r in o)return pl[i]=r}}function ml(i,o){return parseFloat(o[Uc(i)])||0}function gl(i,o,e=window.getComputedStyle(i)){let t=o==="border"?"Width":"";return{left:ml(`${o}Left${t}`,e),right:ml(`${o}Right${t}`,e),top:ml(`${o}Top${t}`,e),bottom:ml(`${o}Bottom${t}`,e)}}function da(i,o,e){i.style[Uc(o)]=e}function Dm(i,o){let e=Uc("transform");da(i,"transition",`${e} ${o.duration}ms ${o.easing}`)}function Fm(i,{x:o,y:e,scale:t,isSVG:r},n){if(da(i,"transform",`scale(${t}) translate(${o}px, ${e}px)`),r&&Im){let s=window.getComputedStyle(i).getPropertyValue("transform");i.setAttribute("transform",s)}}function Lc(i){let o=i.parentNode;(!o||o.nodeType!==1)&&(o=document.documentElement);let e=window.getComputedStyle(i),t=window.getComputedStyle(o),r=i.getBoundingClientRect(),n=o.getBoundingClientRect();return{elem:{style:e,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:gl(i,"margin",e),border:gl(i,"border",e)},parent:{style:t,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,padding:gl(o,"padding",t),border:gl(o,"border",t)}}}var ls={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?ls={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(ls={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Bc(i,o,e,t){ls[i].split(" ").forEach(r=>{o.addEventListener(r,e,t)})}function qc(i,o,e){ls[i].split(" ").forEach(t=>{o.removeEventListener(t,e)})}function cp(i,o){let e=i.length;for(;e--;)if(i[e].pointerId===o.pointerId)return e;return-1}function Wc(i,o){let e;if(o.touches){e=0;for(let t of o.touches)t.pointerId=e++,Wc(i,t);return}e=cp(i,o),e>-1&&i.splice(e,1),i.push(o)}function Nm(i,o){if(o.touches){for(;i.length;)i.pop();return}let e=cp(i,o);e>-1&&i.splice(e,1)}function lp(i){i=i.slice(0);let o=i.pop(),e;for(;e=i.pop();)o={clientX:(e.clientX-o.clientX)/2+o.clientX,clientY:(e.clientY-o.clientY)/2+o.clientY};return o}function Kc(i){if(i.length<2)return 0;let o=i[0],e=i[1];return Math.sqrt(Math.pow(Math.abs(e.clientX-o.clientX),2)+Math.pow(Math.abs(e.clientY-o.clientY),2))}function Lm(i){let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1}function Bm(i){return(i.getAttribute("class")||"").trim()}function qm(i,o){return i.nodeType===1&&` ${Bm(i)} `.indexOf(` ${o} `)>-1}function Km(i,o){for(let e=i;e!=null;e=e.parentNode)if(qm(e,o.excludeClass)||o.exclude.indexOf(e)>-1)return!0;return!1}var Wm=/^http:[\w\.\/]+svg$/;function Um(i){return Wm.test(i.namespaceURI)&&i.nodeName.toLowerCase()!=="svg"}function Gm(i){let o={};for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}var dp={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:i=>{i.preventDefault(),i.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:Fm,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Gc(i,o){if(!i)throw new Error("Panzoom requires an element as an argument");if(i.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!Lm(i))throw new Error("Panzoom should be called on elements that have been attached to the DOM");o={...dp,...o};let e=Um(i),t=i.parentNode;t.style.overflow=o.overflow,t.style.userSelect="none",t.style.touchAction=o.touchAction,(o.canvas?t:i).style.cursor=o.cursor,i.style.userSelect="none",i.style.touchAction=o.touchAction,da(i,"transformOrigin",typeof o.origin=="string"?o.origin:e?"0 0":"50% 50%");function r(){t.style.overflow="",t.style.userSelect="",t.style.touchAction="",t.style.cursor="",i.style.cursor="",i.style.userSelect="",i.style.touchAction="",da(i,"transformOrigin","")}function n(q={}){for(let ee in q)q.hasOwnProperty(ee)&&(o[ee]=q[ee]);(q.hasOwnProperty("cursor")||q.hasOwnProperty("canvas"))&&(t.style.cursor=i.style.cursor="",(o.canvas?t:i).style.cursor=o.cursor),q.hasOwnProperty("overflow")&&(t.style.overflow=q.overflow),q.hasOwnProperty("touchAction")&&(t.style.touchAction=q.touchAction,i.style.touchAction=q.touchAction)}let s=0,d=0,h=1,p=!1;z(o.startScale,{animate:!1,force:!0}),setTimeout(()=>{S(o.startX,o.startY,{animate:!1,force:!0})});function f(q,ee,fe){if(fe.silent)return;let Ne=new CustomEvent(q,{detail:ee});i.dispatchEvent(Ne)}function x(q,ee,fe){let Ne={x:s,y:d,scale:h,isSVG:e,originalEvent:fe};return requestAnimationFrame(()=>{typeof ee.animate=="boolean"&&(ee.animate?Dm(i,ee):da(i,"transition","none")),ee.setTransform(i,Ne,ee),f(q,Ne,ee),f("panzoomchange",Ne,ee)}),Ne}function k(q,ee,fe,Ne){let Z={...o,...Ne},Ae={x:s,y:d,opts:Z};if(!Ne?.force&&(Z.disablePan||Z.panOnlyWhenZoomed&&h===Z.startScale))return Ae;if(q=parseFloat(q),ee=parseFloat(ee),Z.disableXAxis||(Ae.x=(Z.relative?s:0)+q),Z.disableYAxis||(Ae.y=(Z.relative?d:0)+ee),Z.contain){let ce=Lc(i),wo=ce.elem.width/h,U=ce.elem.height/h,en=wo*fe,li=U*fe,Yo=(en-wo)/2,ci=(li-U)/2;if(Z.contain==="inside"){let tn=(-ce.elem.margin.left-ce.parent.padding.left+Yo)/fe,ji=(ce.parent.width-en-ce.parent.padding.left-ce.elem.margin.left-ce.parent.border.left-ce.parent.border.right+Yo)/fe;Ae.x=Math.max(Math.min(Ae.x,ji),tn);let di=(-ce.elem.margin.top-ce.parent.padding.top+ci)/fe,qn=(ce.parent.height-li-ce.parent.padding.top-ce.elem.margin.top-ce.parent.border.top-ce.parent.border.bottom+ci)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),di)}else if(Z.contain==="outside"){let tn=(-(en-ce.parent.width)-ce.parent.padding.left-ce.parent.border.left-ce.parent.border.right+Yo)/fe,ji=(Yo-ce.parent.padding.left)/fe;Ae.x=Math.max(Math.min(Ae.x,ji),tn);let di=(-(li-ce.parent.height)-ce.parent.padding.top-ce.parent.border.top-ce.parent.border.bottom+ci)/fe,qn=(ci-ce.parent.padding.top)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),di)}}return Z.roundPixels&&(Ae.x=Math.round(Ae.x),Ae.y=Math.round(Ae.y)),Ae}function C(q,ee){let fe={...o,...ee},Ne={scale:h,opts:fe};if(!ee?.force&&fe.disableZoom)return Ne;let Z=o.minScale,Ae=o.maxScale;if(fe.contain){let ce=Lc(i),wo=ce.elem.width/h,U=ce.elem.height/h;if(wo>1&&U>1){let en=ce.parent.width-ce.parent.border.left-ce.parent.border.right,li=ce.parent.height-ce.parent.border.top-ce.parent.border.bottom,Yo=en/wo,ci=li/U;o.contain==="inside"?Ae=Math.min(Ae,Yo,ci):o.contain==="outside"&&(Z=Math.max(Z,Yo,ci))}}return Ne.scale=Math.min(Math.max(q,Z),Ae),Ne}function S(q,ee,fe,Ne){let Z=k(q,ee,h,fe);return s!==Z.x||d!==Z.y?(s=Z.x,d=Z.y,x("panzoompan",Z.opts,Ne)):{x:s,y:d,scale:h,isSVG:e,originalEvent:Ne}}function z(q,ee,fe){let Ne=C(q,ee),Z=Ne.opts;if(!ee?.force&&Z.disableZoom)return;q=Ne.scale;let Ae=s,ce=d;if(Z.focal){let U=Z.focal;Ae=(U.x/q-U.x/h+s*q)/q,ce=(U.y/q-U.y/h+d*q)/q}let wo=k(Ae,ce,q,{relative:!1,force:!0});return s=wo.x,d=wo.y,h=q,x("panzoomzoom",Z,fe)}function T(q,ee){let fe={...o,animate:!0,...ee};return z(h*Math.exp((q?1:-1)*fe.step),fe)}function P(q){return T(!0,q)}function H(q){return T(!1,q)}function I(q,ee,fe,Ne){let Z=Lc(i),Ae={width:Z.parent.width-Z.parent.padding.left-Z.parent.padding.right-Z.parent.border.left-Z.parent.border.right,height:Z.parent.height-Z.parent.padding.top-Z.parent.padding.bottom-Z.parent.border.top-Z.parent.border.bottom},ce=ee.clientX-Z.parent.left-Z.parent.padding.left-Z.parent.border.left-Z.elem.margin.left,wo=ee.clientY-Z.parent.top-Z.parent.padding.top-Z.parent.border.top-Z.elem.margin.top;e||(ce-=Z.elem.width/h/2,wo-=Z.elem.height/h/2);let U={x:ce/Ae.width*(Ae.width*q),y:wo/Ae.height*(Ae.height*q)};return z(q,{...fe,animate:!1,focal:U},Ne)}function B(q,ee){q.preventDefault();let fe={...o,...ee,animate:!1},Z=(q.deltaY===0&&q.deltaX?q.deltaX:q.deltaY)<0?1:-1,Ae=C(h*Math.exp(Z*fe.step/3),fe).scale;return I(Ae,q,fe,q)}function $(q){let ee={...o,animate:!0,force:!0,...q};h=C(ee.startScale,ee).scale;let fe=k(ee.startX,ee.startY,h,ee);return s=fe.x,d=fe.y,x("panzoomreset",ee)}let Q,ye,De,yt,Ee,ai,et=[];function qr(q){if(Km(q.target,o))return;Wc(et,q),p=!0,o.handleStartEvent(q),Q=s,ye=d,f("panzoomstart",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o);let ee=lp(et);De=ee.clientX,yt=ee.clientY,Ee=h,ai=Kc(et)}function io(q){if(!p||Q===void 0||ye===void 0||De===void 0||yt===void 0)return;Wc(et,q);let ee=lp(et),fe=et.length>1,Ne=h;if(fe){ai===0&&(ai=Kc(et));let Z=Kc(et)-ai;Ne=C(Z*o.step/80+Ee).scale,I(Ne,ee,{animate:!1},q)}(!fe||o.pinchAndPan)&&S(Q+(ee.clientX-De)/Ne,ye+(ee.clientY-yt)/Ne,{animate:!1},q)}function si(q){et.length===1&&f("panzoomend",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o),Nm(et,q),p&&(p=!1,Q=ye=De=yt=void 0)}let Bn=!1;function Go(){Bn||(Bn=!0,Bc("down",o.canvas?t:i,qr),Bc("move",document,io,{passive:!0}),Bc("up",document,si,{passive:!0}))}function zi(){Bn=!1,qc("down",o.canvas?t:i,qr),qc("move",document,io),qc("up",document,si)}return o.noBind||Go(),{bind:Go,destroy:zi,eventNames:ls,getPan:()=>({x:s,y:d}),getScale:()=>h,getOptions:()=>Gm(o),handleDown:qr,handleMove:io,handleUp:si,pan:S,reset:$,resetStyle:r,setOptions:n,setStyle:(q,ee)=>da(i,q,ee),zoom:z,zoomIn:P,zoomOut:H,zoomToPoint:I,zoomWithWheel:B}}Gc.defaultOptions=dp;var Be=require("lit/decorators.js");var co=require("lit"),Ko=require("lit/decorators.js");var up={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}};function fl(i){return i==null||i===""?"":Ot(i)}var jr=class extends co.LitElement{constructor(){super(...arguments);this.loading=!0;this.active=!0;this.variant="text";this.size="md";this.radius="md";this.rows=3;this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=L(this,"skeleton");!this._explicitAttrs.has("active")&&typeof t.active=="boolean"&&this.active!==t.active&&(this.active=t.active),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("rows")&&typeof t.rows=="number"&&this.rows!==t.rows&&(this.rows=t.rows)}_hostStyle(){let e=[this.width!=null&&this.variant!=="text"?`--lui-skeleton-width:${fl(this.width)}`:"",this.height!=null?`--lui-skeleton-height:${fl(this.height)}`:""].filter(Boolean);return e.length?e.join(";"):co.nothing}_lineWidth(e,t){let r=this.widths?.[e];return r!=null?fl(r):this.width!=null&&t===1?fl(this.width):e===t-1&&t>1?"68%":e===0&&t>2?"92%":"100%"}_renderText(e=this.rows){let t=Math.max(1,Math.floor(e||1));return co.html`
|
|
7893
|
+
`],a([(0,kr.property)({reflect:!0})],ir.prototype,"size",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"radius",2),a([(0,kr.property)({type:Number})],ir.prototype,"max",2),a([(0,kr.property)({type:Number})],ir.prototype,"overlap",2),a([(0,kr.property)({type:Number})],ir.prototype,"total",2),a([(0,kr.property)({attribute:!1})],ir.prototype,"items",2),a([(0,kr.property)({type:Boolean})],ir.prototype,"bordered",2),a([(0,kr.property)({reflect:!0})],ir.prototype,"summaryColor",2),a([(0,kr.property)({reflect:!0,attribute:"expand-trigger"})],ir.prototype,"expandTrigger",2),a([(0,kr.property)({attribute:"summary-text"})],ir.prototype,"summaryText",2),a([(0,kr.property)({reflect:!0,attribute:"status-position"})],ir.prototype,"statusPosition",2),a([(0,kr.queryAssignedElements)({flatten:!0})],ir.prototype,"_assignedElements",2),a([(0,kr.state)()],ir.prototype,"_slotHiddenCount",2),ir=a([(0,kr.customElement)("lui-avatar-group")],ir);var wr=require("lit");typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(o,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var t=document.createEvent("CustomEvent");return t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail),t}));var Im=typeof document<"u"&&!!document.documentMode,Nc;function Vm(){return Nc||(Nc=document.createElement("div").style)}var sp=["webkit","moz","ms"],pl={};function Uc(i){if(pl[i])return pl[i];let o=Vm();if(i in o)return pl[i]=i;let e=i[0].toUpperCase()+i.slice(1),t=sp.length;for(;t--;){let r=`${sp[t]}${e}`;if(r in o)return pl[i]=r}}function ml(i,o){return parseFloat(o[Uc(i)])||0}function gl(i,o,e=window.getComputedStyle(i)){let t=o==="border"?"Width":"";return{left:ml(`${o}Left${t}`,e),right:ml(`${o}Right${t}`,e),top:ml(`${o}Top${t}`,e),bottom:ml(`${o}Bottom${t}`,e)}}function da(i,o,e){i.style[Uc(o)]=e}function Dm(i,o){let e=Uc("transform");da(i,"transition",`${e} ${o.duration}ms ${o.easing}`)}function Fm(i,{x:o,y:e,scale:t,isSVG:r},n){if(da(i,"transform",`scale(${t}) translate(${o}px, ${e}px)`),r&&Im){let s=window.getComputedStyle(i).getPropertyValue("transform");i.setAttribute("transform",s)}}function Lc(i){let o=i.parentNode;(!o||o.nodeType!==1)&&(o=document.documentElement);let e=window.getComputedStyle(i),t=window.getComputedStyle(o),r=i.getBoundingClientRect(),n=o.getBoundingClientRect();return{elem:{style:e,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:gl(i,"margin",e),border:gl(i,"border",e)},parent:{style:t,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,padding:gl(o,"padding",t),border:gl(o,"border",t)}}}var ls={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?ls={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(ls={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Bc(i,o,e,t){ls[i].split(" ").forEach(r=>{o.addEventListener(r,e,t)})}function qc(i,o,e){ls[i].split(" ").forEach(t=>{o.removeEventListener(t,e)})}function cp(i,o){let e=i.length;for(;e--;)if(i[e].pointerId===o.pointerId)return e;return-1}function Wc(i,o){let e;if(o.touches){e=0;for(let t of o.touches)t.pointerId=e++,Wc(i,t);return}e=cp(i,o),e>-1&&i.splice(e,1),i.push(o)}function Nm(i,o){if(o.touches){for(;i.length;)i.pop();return}let e=cp(i,o);e>-1&&i.splice(e,1)}function lp(i){i=i.slice(0);let o=i.pop(),e;for(;e=i.pop();)o={clientX:(e.clientX-o.clientX)/2+o.clientX,clientY:(e.clientY-o.clientY)/2+o.clientY};return o}function Kc(i){if(i.length<2)return 0;let o=i[0],e=i[1];return Math.sqrt(Math.pow(Math.abs(e.clientX-o.clientX),2)+Math.pow(Math.abs(e.clientY-o.clientY),2))}function Lm(i){let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1}function Bm(i){return(i.getAttribute("class")||"").trim()}function qm(i,o){return i.nodeType===1&&` ${Bm(i)} `.indexOf(` ${o} `)>-1}function Km(i,o){for(let e=i;e!=null;e=e.parentNode)if(qm(e,o.excludeClass)||o.exclude.indexOf(e)>-1)return!0;return!1}var Wm=/^http:[\w\.\/]+svg$/;function Um(i){return Wm.test(i.namespaceURI)&&i.nodeName.toLowerCase()!=="svg"}function Gm(i){let o={};for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}var dp={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:i=>{i.preventDefault(),i.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:Fm,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Gc(i,o){if(!i)throw new Error("Panzoom requires an element as an argument");if(i.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!Lm(i))throw new Error("Panzoom should be called on elements that have been attached to the DOM");o={...dp,...o};let e=Um(i),t=i.parentNode;t.style.overflow=o.overflow,t.style.userSelect="none",t.style.touchAction=o.touchAction,(o.canvas?t:i).style.cursor=o.cursor,i.style.userSelect="none",i.style.touchAction=o.touchAction,da(i,"transformOrigin",typeof o.origin=="string"?o.origin:e?"0 0":"50% 50%");function r(){t.style.overflow="",t.style.userSelect="",t.style.touchAction="",t.style.cursor="",i.style.cursor="",i.style.userSelect="",i.style.touchAction="",da(i,"transformOrigin","")}function n(q={}){for(let ee in q)q.hasOwnProperty(ee)&&(o[ee]=q[ee]);(q.hasOwnProperty("cursor")||q.hasOwnProperty("canvas"))&&(t.style.cursor=i.style.cursor="",(o.canvas?t:i).style.cursor=o.cursor),q.hasOwnProperty("overflow")&&(t.style.overflow=q.overflow),q.hasOwnProperty("touchAction")&&(t.style.touchAction=q.touchAction,i.style.touchAction=q.touchAction)}let s=0,d=0,h=1,p=!1;z(o.startScale,{animate:!1,force:!0}),setTimeout(()=>{S(o.startX,o.startY,{animate:!1,force:!0})});function f(q,ee,fe){if(fe.silent)return;let Ne=new CustomEvent(q,{detail:ee});i.dispatchEvent(Ne)}function x(q,ee,fe){let Ne={x:s,y:d,scale:h,isSVG:e,originalEvent:fe};return requestAnimationFrame(()=>{typeof ee.animate=="boolean"&&(ee.animate?Dm(i,ee):da(i,"transition","none")),ee.setTransform(i,Ne,ee),f(q,Ne,ee),f("panzoomchange",Ne,ee)}),Ne}function k(q,ee,fe,Ne){let Z={...o,...Ne},Ae={x:s,y:d,opts:Z};if(!Ne?.force&&(Z.disablePan||Z.panOnlyWhenZoomed&&h===Z.startScale))return Ae;if(q=parseFloat(q),ee=parseFloat(ee),Z.disableXAxis||(Ae.x=(Z.relative?s:0)+q),Z.disableYAxis||(Ae.y=(Z.relative?d:0)+ee),Z.contain){let ce=Lc(i),wo=ce.elem.width/h,U=ce.elem.height/h,en=wo*fe,li=U*fe,Yo=(en-wo)/2,ci=(li-U)/2;if(Z.contain==="inside"){let tn=(-ce.elem.margin.left-ce.parent.padding.left+Yo)/fe,ji=(ce.parent.width-en-ce.parent.padding.left-ce.elem.margin.left-ce.parent.border.left-ce.parent.border.right+Yo)/fe;Ae.x=Math.max(Math.min(Ae.x,ji),tn);let di=(-ce.elem.margin.top-ce.parent.padding.top+ci)/fe,qn=(ce.parent.height-li-ce.parent.padding.top-ce.elem.margin.top-ce.parent.border.top-ce.parent.border.bottom+ci)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),di)}else if(Z.contain==="outside"){let tn=(-(en-ce.parent.width)-ce.parent.padding.left-ce.parent.border.left-ce.parent.border.right+Yo)/fe,ji=(Yo-ce.parent.padding.left)/fe;Ae.x=Math.max(Math.min(Ae.x,ji),tn);let di=(-(li-ce.parent.height)-ce.parent.padding.top-ce.parent.border.top-ce.parent.border.bottom+ci)/fe,qn=(ci-ce.parent.padding.top)/fe;Ae.y=Math.max(Math.min(Ae.y,qn),di)}}return Z.roundPixels&&(Ae.x=Math.round(Ae.x),Ae.y=Math.round(Ae.y)),Ae}function C(q,ee){let fe={...o,...ee},Ne={scale:h,opts:fe};if(!ee?.force&&fe.disableZoom)return Ne;let Z=o.minScale,Ae=o.maxScale;if(fe.contain){let ce=Lc(i),wo=ce.elem.width/h,U=ce.elem.height/h;if(wo>1&&U>1){let en=ce.parent.width-ce.parent.border.left-ce.parent.border.right,li=ce.parent.height-ce.parent.border.top-ce.parent.border.bottom,Yo=en/wo,ci=li/U;o.contain==="inside"?Ae=Math.min(Ae,Yo,ci):o.contain==="outside"&&(Z=Math.max(Z,Yo,ci))}}return Ne.scale=Math.min(Math.max(q,Z),Ae),Ne}function S(q,ee,fe,Ne){let Z=k(q,ee,h,fe);return s!==Z.x||d!==Z.y?(s=Z.x,d=Z.y,x("panzoompan",Z.opts,Ne)):{x:s,y:d,scale:h,isSVG:e,originalEvent:Ne}}function z(q,ee,fe){let Ne=C(q,ee),Z=Ne.opts;if(!ee?.force&&Z.disableZoom)return;q=Ne.scale;let Ae=s,ce=d;if(Z.focal){let U=Z.focal;Ae=(U.x/q-U.x/h+s*q)/q,ce=(U.y/q-U.y/h+d*q)/q}let wo=k(Ae,ce,q,{relative:!1,force:!0});return s=wo.x,d=wo.y,h=q,x("panzoomzoom",Z,fe)}function T(q,ee){let fe={...o,animate:!0,...ee};return z(h*Math.exp((q?1:-1)*fe.step),fe)}function P(q){return T(!0,q)}function H(q){return T(!1,q)}function I(q,ee,fe,Ne){let Z=Lc(i),Ae={width:Z.parent.width-Z.parent.padding.left-Z.parent.padding.right-Z.parent.border.left-Z.parent.border.right,height:Z.parent.height-Z.parent.padding.top-Z.parent.padding.bottom-Z.parent.border.top-Z.parent.border.bottom},ce=ee.clientX-Z.parent.left-Z.parent.padding.left-Z.parent.border.left-Z.elem.margin.left,wo=ee.clientY-Z.parent.top-Z.parent.padding.top-Z.parent.border.top-Z.elem.margin.top;e||(ce-=Z.elem.width/h/2,wo-=Z.elem.height/h/2);let U={x:ce/Ae.width*(Ae.width*q),y:wo/Ae.height*(Ae.height*q)};return z(q,{...fe,animate:!1,focal:U},Ne)}function B(q,ee){q.preventDefault();let fe={...o,...ee,animate:!1},Z=(q.deltaY===0&&q.deltaX?q.deltaX:q.deltaY)<0?1:-1,Ae=C(h*Math.exp(Z*fe.step/3),fe).scale;return I(Ae,q,fe,q)}function $(q){let ee={...o,animate:!0,force:!0,...q};h=C(ee.startScale,ee).scale;let fe=k(ee.startX,ee.startY,h,ee);return s=fe.x,d=fe.y,x("panzoomreset",ee)}let Q,ye,De,yt,Ee,ai,tt=[];function qr(q){if(Km(q.target,o))return;Wc(tt,q),p=!0,o.handleStartEvent(q),Q=s,ye=d,f("panzoomstart",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o);let ee=lp(tt);De=ee.clientX,yt=ee.clientY,Ee=h,ai=Kc(tt)}function io(q){if(!p||Q===void 0||ye===void 0||De===void 0||yt===void 0)return;Wc(tt,q);let ee=lp(tt),fe=tt.length>1,Ne=h;if(fe){ai===0&&(ai=Kc(tt));let Z=Kc(tt)-ai;Ne=C(Z*o.step/80+Ee).scale,I(Ne,ee,{animate:!1},q)}(!fe||o.pinchAndPan)&&S(Q+(ee.clientX-De)/Ne,ye+(ee.clientY-yt)/Ne,{animate:!1},q)}function si(q){tt.length===1&&f("panzoomend",{x:s,y:d,scale:h,isSVG:e,originalEvent:q},o),Nm(tt,q),p&&(p=!1,Q=ye=De=yt=void 0)}let Bn=!1;function Go(){Bn||(Bn=!0,Bc("down",o.canvas?t:i,qr),Bc("move",document,io,{passive:!0}),Bc("up",document,si,{passive:!0}))}function zi(){Bn=!1,qc("down",o.canvas?t:i,qr),qc("move",document,io),qc("up",document,si)}return o.noBind||Go(),{bind:Go,destroy:zi,eventNames:ls,getPan:()=>({x:s,y:d}),getScale:()=>h,getOptions:()=>Gm(o),handleDown:qr,handleMove:io,handleUp:si,pan:S,reset:$,resetStyle:r,setOptions:n,setStyle:(q,ee)=>da(i,q,ee),zoom:z,zoomIn:P,zoomOut:H,zoomToPoint:I,zoomWithWheel:B}}Gc.defaultOptions=dp;var Be=require("lit/decorators.js");var co=require("lit"),Ko=require("lit/decorators.js");var up={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}};function fl(i){return i==null||i===""?"":Ot(i)}var jr=class extends co.LitElement{constructor(){super(...arguments);this.loading=!0;this.active=!0;this.variant="text";this.size="md";this.radius="md";this.rows=3;this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=L(this,"skeleton");!this._explicitAttrs.has("active")&&typeof t.active=="boolean"&&this.active!==t.active&&(this.active=t.active),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("rows")&&typeof t.rows=="number"&&this.rows!==t.rows&&(this.rows=t.rows)}_hostStyle(){let e=[this.width!=null&&this.variant!=="text"?`--lui-skeleton-width:${fl(this.width)}`:"",this.height!=null?`--lui-skeleton-height:${fl(this.height)}`:""].filter(Boolean);return e.length?e.join(";"):co.nothing}_lineWidth(e,t){let r=this.widths?.[e];return r!=null?fl(r):this.width!=null&&t===1?fl(this.width):e===t-1&&t>1?"68%":e===0&&t>2?"92%":"100%"}_renderText(e=this.rows){let t=Math.max(1,Math.floor(e||1));return co.html`
|
|
7882
7894
|
<div class="text" part="text">
|
|
7883
7895
|
${Array.from({length:t},(r,n)=>co.html`
|
|
7884
7896
|
<div class="piece line" part="line" style=${`width:${this._lineWidth(n,t)}`}></div>
|
|
@@ -9337,7 +9349,7 @@
|
|
|
9337
9349
|
slot {
|
|
9338
9350
|
display: contents;
|
|
9339
9351
|
}
|
|
9340
|
-
`],a([(0,Mr.property)({type:Number})],po.prototype,"span",2),a([(0,Mr.property)({type:Number})],po.prototype,"xs",2),a([(0,Mr.property)({type:Number})],po.prototype,"sm",2),a([(0,Mr.property)({type:Number})],po.prototype,"md",2),a([(0,Mr.property)({type:Number})],po.prototype,"lg",2),a([(0,Mr.property)({type:Number})],po.prototype,"xl",2),a([(0,Mr.property)({type:Number})],po.prototype,"offset",2),a([(0,Mr.property)({type:Number,attribute:"order"})],po.prototype,"colOrder",2),po=a([(0,Mr.customElement)("lui-col")],po);var F=require("lit"),Wo=require("lit/decorators.js"),qp=require("lit/directives/keyed.js"),fs=require("lit/directives/ref.js"),Kp=require("lit/directives/repeat.js"),Ca=require("@tanstack/lit-form");var vn=require("lit"),Ke=require("lit/decorators.js");var He=class extends vn.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="";this.type="text";this.size="md";this.disabled=!1;this.readonly=!1;this.autofocus=!1;this.clearable=!1;this.revealable=!1;this.invalid=!1;this.noborder=!1;this.spellcheck=!1;this.autocapitalize="";this._focused=!1;this._revealed=!1;this._explicitAttrs=new Set;this._keepFocus=e=>{e.preventDefault()};this._clearValue=()=>{this.disabled||this.readonly||(this.value="",this._revealed=!1,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this.focus()))};this._toggleReveal=()=>{this.disabled||this.type!=="password"||(this._revealed=!this._revealed,this.requestUpdate(),this.updateComplete.then(()=>this.focus()))};this._onInput=e=>{e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onChange=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{if(e.key==="Enter"){let t=e.composedPath().find(r=>r.localName==="form");if(t){if(!t.reportValidity())return;t.requestSubmit()}}}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t){let r=
|
|
9352
|
+
`],a([(0,Mr.property)({type:Number})],po.prototype,"span",2),a([(0,Mr.property)({type:Number})],po.prototype,"xs",2),a([(0,Mr.property)({type:Number})],po.prototype,"sm",2),a([(0,Mr.property)({type:Number})],po.prototype,"md",2),a([(0,Mr.property)({type:Number})],po.prototype,"lg",2),a([(0,Mr.property)({type:Number})],po.prototype,"xl",2),a([(0,Mr.property)({type:Number})],po.prototype,"offset",2),a([(0,Mr.property)({type:Number,attribute:"order"})],po.prototype,"colOrder",2),po=a([(0,Mr.customElement)("lui-col")],po);var F=require("lit"),Wo=require("lit/decorators.js"),qp=require("lit/directives/keyed.js"),fs=require("lit/directives/ref.js"),Kp=require("lit/directives/repeat.js"),Ca=require("@tanstack/lit-form");var vn=require("lit"),Ke=require("lit/decorators.js");var He=class extends vn.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="";this.type="text";this.size="md";this.disabled=!1;this.readonly=!1;this.autofocus=!1;this.clearable=!1;this.revealable=!1;this.invalid=!1;this.noborder=!1;this.spellcheck=!1;this.autocapitalize="";this._focused=!1;this._revealed=!1;this._explicitAttrs=new Set;this._keepFocus=e=>{e.preventDefault()};this._clearValue=()=>{this.disabled||this.readonly||(this.value="",this._revealed=!1,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this.focus()))};this._toggleReveal=()=>{this.disabled||this.type!=="password"||(this._revealed=!this._revealed,this.requestUpdate(),this.updateComplete.then(()=>this.focus()))};this._onInput=e=>{e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onChange=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{if(e.key==="Enter"){let t=e.composedPath().find(r=>r.localName==="form");if(t){if(!t.reportValidity())return;t.requestSubmit()}}}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(){let e=L(this,"input");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("revealable")&&typeof e.revealable=="boolean"&&this.revealable!==e.revealable&&(this.revealable=e.revealable),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this._input?.focus()}blur(){this._input?.blur()}insertText(e){let t=this._input;if(!t){this.value=`${this.value}${e}`;return}let r=t.selectionStart??t.value.length,n=t.selectionEnd??r;t.setRangeText(e,r,n,"end"),this.value=t.value,t.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),t.focus()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this.clearable&&!this.disabled&&!this.readonly&&this.value.length>0,r=this.revealable&&this.type==="password"&&!this.disabled;return vn.html`
|
|
9341
9353
|
<div class=${e.join(" ")} part="wrapper">
|
|
9342
9354
|
<slot name="prefix"></slot>
|
|
9343
9355
|
<input
|
|
@@ -10978,7 +10990,7 @@
|
|
|
10978
10990
|
--lui-input-height: var(--lui-control-height-lg, 44px);
|
|
10979
10991
|
--lui-input-font-size: var(--lui-font-size);
|
|
10980
10992
|
}
|
|
10981
|
-
`],a([(0,Zt.property)()],_t.prototype,"value",2),a([(0,Zt.property)({attribute:"selection-mode"})],_t.prototype,"selectionMode",2),a([(0,Zt.property)()],_t.prototype,"placeholder",2),a([(0,Zt.property)({reflect:!0})],_t.prototype,"size",2),a([(0,Zt.property)()],_t.prototype,"mode",2),a([(0,Zt.property)({attribute:"type"})],_t.prototype,"type",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"disabled",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"readonly",2),a([(0,Zt.property)({type:Boolean,reflect:!0})],_t.prototype,"invalid",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"clearable",2),a([(0,Zt.property)()],_t.prototype,"min",2),a([(0,Zt.property)()],_t.prototype,"max",2),a([(0,Zt.property)()],_t.prototype,"name",2),a([(0,Zt.property)()],_t.prototype,"locale",2),a([(0,Zt.property)({attribute:!1})],_t.prototype,"translations",2),a([(0,Zt.query)(".input")],_t.prototype,"_inputEl",2),a([(0,Zt.query)(".wrapper")],_t.prototype,"_wrapperEl",2),_t=a([(0,Zt.customElement)("lui-datepicker")],_t);var Vr=require("lit"),ft=require("lit/decorators.js");var Sg=["#111827","#6b7280","#ef4444","#f97316","#f59e0b","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899"],Je=(i,o,e)=>Math.min(e,Math.max(o,i)),Mi=(i,o=0)=>{let e=10**o;return Math.round(i*e)/e},wl=i=>Je(Math.round(i),0,255).toString(16).padStart(2,"0"),gs=i=>(i%360+360)%360;function $g(i){let o=gs(i.h),e=Je(i.s,0,100)/100,t=Je(i.v,0,100)/100,r=t*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Je(i.a,0,1)}}function ps(i){let o=Je(i.r,0,255)/255,e=Je(i.g,0,255)/255,t=Je(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=0;return s!==0&&(r===o?d=60*((e-t)/s%6):r===e?d=60*((t-o)/s+2):d=60*((o-e)/s+4)),{h:gs(d),s:r===0?0:s/r*100,v:r*100,a:Je(i.a,0,1)}}function Tg(i){let o=Je(i.r,0,255)/255,e=Je(i.g,0,255)/255,t=Je(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=(r+n)/2,h=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*d-1)),r===o?h=60*((e-t)/s%6):r===e?h=60*((t-o)/s+2):h=60*((o-e)/s+4)),{h:gs(h),s:p*100,l:d*100,a:Je(i.a,0,1)}}function Bp(i){let o=gs(i.h),e=Je(i.s,0,100)/100,t=Je(i.l,0,100)/100,r=(1-Math.abs(2*t-1))*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r/2,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Je(i.a,0,1)}}function _a(i,o=i.a<1){let e=`#${wl(i.r)}${wl(i.g)}${wl(i.b)}`;return o?`${e}${wl(i.a*255)}`:e}function Ag(i){let o=i.trim().replace(/^#/,"");if(![3,4,6,8].includes(o.length)||/[^0-9a-f]/i.test(o))return null;let e=o.length<=4?o.split("").map(d=>d+d).join(""):o,t=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),s=e.length===8?parseInt(e.slice(6,8),16)/255:1;return{r:t,g:r,b:n,a:s}}function ms(i){let o=i.trim();if(!o)return null;if(o.startsWith("#")||/^[0-9a-f]{3,8}$/i.test(o))return Ag(o);let e=o.match(/^rgba?\((.+)\)$/i);if(e){let r=e[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1]),d=Number.parseFloat(r[2]),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return{r:Je(n,0,255),g:Je(s,0,255),b:Je(d,0,255),a:Je(h,0,1)}}}let t=o.match(/^hsla?\((.+)\)$/i);if(t){let r=t[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1].replace("%","")),d=Number.parseFloat(r[2].replace("%","")),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return Bp({h:n,s,l:d,a:h})}}return null}var ot=class extends Vr.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u989C\u8272";this.size="md";this.format="hex";this.open=!1;this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this.backdrop="none";this.backdropStyle="";this.closeOnOutsidePress=!0;this.showAlpha=!0;this.placement="bottom-start";this.presetColors=Sg.join(",");this._hsv={h:217,s:76,v:96,a:1};this._internalValueUpdate=!1;this._explicitAttrs=new Set;this._onOpen=()=>{this.open=!0};this._onClose=()=>{this.open=!1,this._emitChange()};this._clear=e=>{if(e.preventDefault(),e.stopPropagation(),this.disabled||this.readonly)return;this.value="";let t=this._detail();this.dispatchEvent(new CustomEvent("input",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{...t,value:""},bubbles:!0,composed:!0}))};this._onSvPointerDown=e=>{this.disabled||this.readonly||(e.preventDefault(),this._svEl?.setPointerCapture?.(e.pointerId),this._updateSv(e))};this._onSvPointerMove=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&this._updateSv(e)};this._onSvPointerUp=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&(this._svEl.releasePointerCapture(e.pointerId),this._emitChange())};this._onHueInput=e=>{let t=Number(e.target.value);this._commit({...this._hsv,h:t},"input")};this._onAlphaInput=e=>{let t=Number(e.target.value)/100;this._commit({...this._hsv,a:t},"input")};this._onRangeChange=()=>this._emitChange();this._onHexChange=e=>{let t=e.target,r=ms(t.value);if(!r){t.value=this._hex;return}this._commit(ps(r),"input"),this._emitChange()};this._onRgbChange=(e,t)=>{let n={...this._rgb,[e]:Je(Number(t.target.value)||0,0,255)};this._commit(ps(n),"input"),this._emitChange()};this._onHslChange=(e,t)=>{let r=this._hsl,n=e==="h"?360:100,s={...r,[e]:Je(Number(t.target.value)||0,0,n)};this._commit(ps(Bp(s)),"input"),this._emitChange()};this._onAlphaFieldChange=e=>{let t=Je(Number(e.target.value)||0,0,100)/100;this._commit({...this._hsv,a:t},"input"),this._emitChange()};this._choosePreset=e=>{if(this.disabled||this.readonly)return;let t=ms(e);t&&(this._commit(ps(t),"input"),this._emitChange())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._syncFromValue(this.value)}willUpdate(){let e=L(this,"colorPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("format")&&typeof e.format=="string"&&this.format!==e.format&&(this.format=e.format),!this._explicitAttrs.has("show-alpha")&&typeof e.showAlpha=="boolean"&&this.showAlpha!==e.showAlpha&&(this.showAlpha=e.showAlpha),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress)}updated(e){e.has("value")&&(this._internalValueUpdate||this._syncFromValue(this.value),this._internalValueUpdate=!1)}focus(){this.shadowRoot?.querySelector(".trigger")?.focus()}blur(){this.shadowRoot?.querySelector(".trigger")?.blur()}show(){this.disabled||this.readonly||this._dropdown?.show()}hide(){this._dropdown?.hide()}toggle(){this.disabled||this.readonly||this._dropdown?.toggle()}get _rgb(){return $g(this._effectiveHsv())}get _hsl(){return Tg(this._rgb)}get _hex(){return _a(this._rgb,!1)}get _displayValue(){return this.value?this._formatValue():""}_effectiveHsv(){return{...this._hsv,a:this.showAlpha?Je(this._hsv.a,0,1):1}}_syncFromValue(e){let t=ms(e);t&&(this._hsv=ps({...t,a:this.showAlpha?t.a:1}))}_formatValue(e=this.format){let t=this._rgb,r=this._hsl,n=this.showAlpha?t.a:1;switch(e){case"rgb":return`rgb(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)})`;case"rgba":return`rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${Mi(n,2)})`;case"hsl":return`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;case"hsla":return`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${Mi(n,2)})`;case"hex":default:return _a({...t,a:n},this.showAlpha&&n<1)}}_detail(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv();return{value:this._formatValue(),hex:_a(e,this.showAlpha&&e.a<1),rgb:{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b),a:Mi(e.a,3)},hsl:{h:Math.round(t.h),s:Math.round(t.s),l:Math.round(t.l),a:Mi(t.a,3)},hsv:{h:Math.round(r.h),s:Math.round(r.s),v:Math.round(r.v),a:Mi(r.a,3)},alpha:Mi(e.a,3)}}_commit(e,t="input"){this._hsv={h:gs(e.h),s:Je(e.s,0,100),v:Je(e.v,0,100),a:this.showAlpha?Je(e.a,0,1):1};let r=this._detail();this._internalValueUpdate=!0,this.value=r.value,this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:this._detail(),bubbles:!0,composed:!0}))}_updateSv(e){let t=this._svEl?.getBoundingClientRect();if(!t)return;let r=Je((e.clientX-t.left)/t.width*100,0,100),n=Je(100-(e.clientY-t.top)/t.height*100,0,100);this._commit({...this._hsv,s:r,v:n},"input")}async _copyValue(){let e=this._detail();try{await navigator.clipboard?.writeText(e.value),this.dispatchEvent(new CustomEvent("copy",{detail:e,bubbles:!0,composed:!0}))}catch{this.dispatchEvent(new CustomEvent("copy",{detail:{...e,error:!0},bubbles:!0,composed:!0}))}}_presetList(){return(this.swatches??this.presetColors.split(",")).map(t=>t.trim()).filter(Boolean).filter(t=>ms(t))}_panel(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv(),n=this.value?`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${Mi(e.a,3)})`:"transparent",s=`rgb(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)})`,d=`--hue:${Mi(r.h,2)};--sat:${Mi(r.s,2)}%;--val-y:${Mi(100-r.v,2)}%;--current-color:${n};--opaque-color:${s};`,h=this._presetList(),p=_a(e,!1).toLowerCase();return Vr.html`
|
|
10993
|
+
`],a([(0,Zt.property)()],_t.prototype,"value",2),a([(0,Zt.property)({attribute:"selection-mode"})],_t.prototype,"selectionMode",2),a([(0,Zt.property)()],_t.prototype,"placeholder",2),a([(0,Zt.property)({reflect:!0})],_t.prototype,"size",2),a([(0,Zt.property)()],_t.prototype,"mode",2),a([(0,Zt.property)({attribute:"type"})],_t.prototype,"type",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"disabled",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"readonly",2),a([(0,Zt.property)({type:Boolean,reflect:!0})],_t.prototype,"invalid",2),a([(0,Zt.property)({type:Boolean})],_t.prototype,"clearable",2),a([(0,Zt.property)()],_t.prototype,"min",2),a([(0,Zt.property)()],_t.prototype,"max",2),a([(0,Zt.property)()],_t.prototype,"name",2),a([(0,Zt.property)()],_t.prototype,"locale",2),a([(0,Zt.property)({attribute:!1})],_t.prototype,"translations",2),a([(0,Zt.query)(".input")],_t.prototype,"_inputEl",2),a([(0,Zt.query)(".wrapper")],_t.prototype,"_wrapperEl",2),_t=a([(0,Zt.customElement)("lui-datepicker")],_t);var Vr=require("lit"),ft=require("lit/decorators.js");var Sg=["#111827","#6b7280","#ef4444","#f97316","#f59e0b","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899"],et=(i,o,e)=>Math.min(e,Math.max(o,i)),Mi=(i,o=0)=>{let e=10**o;return Math.round(i*e)/e},wl=i=>et(Math.round(i),0,255).toString(16).padStart(2,"0"),gs=i=>(i%360+360)%360;function $g(i){let o=gs(i.h),e=et(i.s,0,100)/100,t=et(i.v,0,100)/100,r=t*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:et(i.a,0,1)}}function ps(i){let o=et(i.r,0,255)/255,e=et(i.g,0,255)/255,t=et(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=0;return s!==0&&(r===o?d=60*((e-t)/s%6):r===e?d=60*((t-o)/s+2):d=60*((o-e)/s+4)),{h:gs(d),s:r===0?0:s/r*100,v:r*100,a:et(i.a,0,1)}}function Tg(i){let o=et(i.r,0,255)/255,e=et(i.g,0,255)/255,t=et(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=(r+n)/2,h=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*d-1)),r===o?h=60*((e-t)/s%6):r===e?h=60*((t-o)/s+2):h=60*((o-e)/s+4)),{h:gs(h),s:p*100,l:d*100,a:et(i.a,0,1)}}function Bp(i){let o=gs(i.h),e=et(i.s,0,100)/100,t=et(i.l,0,100)/100,r=(1-Math.abs(2*t-1))*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r/2,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:et(i.a,0,1)}}function _a(i,o=i.a<1){let e=`#${wl(i.r)}${wl(i.g)}${wl(i.b)}`;return o?`${e}${wl(i.a*255)}`:e}function Ag(i){let o=i.trim().replace(/^#/,"");if(![3,4,6,8].includes(o.length)||/[^0-9a-f]/i.test(o))return null;let e=o.length<=4?o.split("").map(d=>d+d).join(""):o,t=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),s=e.length===8?parseInt(e.slice(6,8),16)/255:1;return{r:t,g:r,b:n,a:s}}function ms(i){let o=i.trim();if(!o)return null;if(o.startsWith("#")||/^[0-9a-f]{3,8}$/i.test(o))return Ag(o);let e=o.match(/^rgba?\((.+)\)$/i);if(e){let r=e[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1]),d=Number.parseFloat(r[2]),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return{r:et(n,0,255),g:et(s,0,255),b:et(d,0,255),a:et(h,0,1)}}}let t=o.match(/^hsla?\((.+)\)$/i);if(t){let r=t[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1].replace("%","")),d=Number.parseFloat(r[2].replace("%","")),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return Bp({h:n,s,l:d,a:h})}}return null}var it=class extends Vr.LitElement{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u989C\u8272";this.size="md";this.format="hex";this.open=!1;this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this.backdrop="none";this.backdropStyle="";this.closeOnOutsidePress=!0;this.showAlpha=!0;this.placement="bottom-start";this.presetColors=Sg.join(",");this._hsv={h:217,s:76,v:96,a:1};this._internalValueUpdate=!1;this._explicitAttrs=new Set;this._onOpen=()=>{this.open=!0};this._onClose=()=>{this.open=!1,this._emitChange()};this._clear=e=>{if(e.preventDefault(),e.stopPropagation(),this.disabled||this.readonly)return;this.value="";let t=this._detail();this.dispatchEvent(new CustomEvent("input",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{...t,value:""},bubbles:!0,composed:!0}))};this._onSvPointerDown=e=>{this.disabled||this.readonly||(e.preventDefault(),this._svEl?.setPointerCapture?.(e.pointerId),this._updateSv(e))};this._onSvPointerMove=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&this._updateSv(e)};this._onSvPointerUp=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&(this._svEl.releasePointerCapture(e.pointerId),this._emitChange())};this._onHueInput=e=>{let t=Number(e.target.value);this._commit({...this._hsv,h:t},"input")};this._onAlphaInput=e=>{let t=Number(e.target.value)/100;this._commit({...this._hsv,a:t},"input")};this._onRangeChange=()=>this._emitChange();this._onHexChange=e=>{let t=e.target,r=ms(t.value);if(!r){t.value=this._hex;return}this._commit(ps(r),"input"),this._emitChange()};this._onRgbChange=(e,t)=>{let n={...this._rgb,[e]:et(Number(t.target.value)||0,0,255)};this._commit(ps(n),"input"),this._emitChange()};this._onHslChange=(e,t)=>{let r=this._hsl,n=e==="h"?360:100,s={...r,[e]:et(Number(t.target.value)||0,0,n)};this._commit(ps(Bp(s)),"input"),this._emitChange()};this._onAlphaFieldChange=e=>{let t=et(Number(e.target.value)||0,0,100)/100;this._commit({...this._hsv,a:t},"input"),this._emitChange()};this._choosePreset=e=>{if(this.disabled||this.readonly)return;let t=ms(e);t&&(this._commit(ps(t),"input"),this._emitChange())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._syncFromValue(this.value)}willUpdate(){let e=L(this,"colorPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("format")&&typeof e.format=="string"&&this.format!==e.format&&(this.format=e.format),!this._explicitAttrs.has("show-alpha")&&typeof e.showAlpha=="boolean"&&this.showAlpha!==e.showAlpha&&(this.showAlpha=e.showAlpha),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress)}updated(e){e.has("value")&&(this._internalValueUpdate||this._syncFromValue(this.value),this._internalValueUpdate=!1)}focus(){this.shadowRoot?.querySelector(".trigger")?.focus()}blur(){this.shadowRoot?.querySelector(".trigger")?.blur()}show(){this.disabled||this.readonly||this._dropdown?.show()}hide(){this._dropdown?.hide()}toggle(){this.disabled||this.readonly||this._dropdown?.toggle()}get _rgb(){return $g(this._effectiveHsv())}get _hsl(){return Tg(this._rgb)}get _hex(){return _a(this._rgb,!1)}get _displayValue(){return this.value?this._formatValue():""}_effectiveHsv(){return{...this._hsv,a:this.showAlpha?et(this._hsv.a,0,1):1}}_syncFromValue(e){let t=ms(e);t&&(this._hsv=ps({...t,a:this.showAlpha?t.a:1}))}_formatValue(e=this.format){let t=this._rgb,r=this._hsl,n=this.showAlpha?t.a:1;switch(e){case"rgb":return`rgb(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)})`;case"rgba":return`rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${Mi(n,2)})`;case"hsl":return`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;case"hsla":return`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${Mi(n,2)})`;case"hex":default:return _a({...t,a:n},this.showAlpha&&n<1)}}_detail(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv();return{value:this._formatValue(),hex:_a(e,this.showAlpha&&e.a<1),rgb:{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b),a:Mi(e.a,3)},hsl:{h:Math.round(t.h),s:Math.round(t.s),l:Math.round(t.l),a:Mi(t.a,3)},hsv:{h:Math.round(r.h),s:Math.round(r.s),v:Math.round(r.v),a:Mi(r.a,3)},alpha:Mi(e.a,3)}}_commit(e,t="input"){this._hsv={h:gs(e.h),s:et(e.s,0,100),v:et(e.v,0,100),a:this.showAlpha?et(e.a,0,1):1};let r=this._detail();this._internalValueUpdate=!0,this.value=r.value,this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:this._detail(),bubbles:!0,composed:!0}))}_updateSv(e){let t=this._svEl?.getBoundingClientRect();if(!t)return;let r=et((e.clientX-t.left)/t.width*100,0,100),n=et(100-(e.clientY-t.top)/t.height*100,0,100);this._commit({...this._hsv,s:r,v:n},"input")}async _copyValue(){let e=this._detail();try{await navigator.clipboard?.writeText(e.value),this.dispatchEvent(new CustomEvent("copy",{detail:e,bubbles:!0,composed:!0}))}catch{this.dispatchEvent(new CustomEvent("copy",{detail:{...e,error:!0},bubbles:!0,composed:!0}))}}_presetList(){return(this.swatches??this.presetColors.split(",")).map(t=>t.trim()).filter(Boolean).filter(t=>ms(t))}_panel(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv(),n=this.value?`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${Mi(e.a,3)})`:"transparent",s=`rgb(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)})`,d=`--hue:${Mi(r.h,2)};--sat:${Mi(r.s,2)}%;--val-y:${Mi(100-r.v,2)}%;--current-color:${n};--opaque-color:${s};`,h=this._presetList(),p=_a(e,!1).toLowerCase();return Vr.html`
|
|
10982
10994
|
<div class="panel" part="panel" style=${d} @click=${f=>f.stopPropagation()}>
|
|
10983
10995
|
<div class="hero">
|
|
10984
10996
|
<div class="preview" part="preview"><div class="preview-inner"></div></div>
|
|
@@ -11109,7 +11121,7 @@
|
|
|
11109
11121
|
${this._panel()}
|
|
11110
11122
|
</lui-dropdown>
|
|
11111
11123
|
${this.name?Vr.html`<input type="hidden" name=${this.name} .value=${this.value} />`:Vr.nothing}
|
|
11112
|
-
`}};
|
|
11124
|
+
`}};it.styles=[A,j,zo,Vr.css`
|
|
11113
11125
|
:host {
|
|
11114
11126
|
display: inline-block;
|
|
11115
11127
|
width: 100%;
|
|
@@ -11471,7 +11483,7 @@
|
|
|
11471
11483
|
:host([readonly]) .panel {
|
|
11472
11484
|
pointer-events: none;
|
|
11473
11485
|
}
|
|
11474
|
-
`],a([(0,ft.property)()],
|
|
11486
|
+
`],a([(0,ft.property)()],it.prototype,"value",2),a([(0,ft.property)()],it.prototype,"placeholder",2),a([(0,ft.property)({reflect:!0})],it.prototype,"size",2),a([(0,ft.property)({reflect:!0})],it.prototype,"format",2),a([(0,ft.property)({type:Boolean,reflect:!0})],it.prototype,"open",2),a([(0,ft.property)({type:Boolean,reflect:!0})],it.prototype,"disabled",2),a([(0,ft.property)({type:Boolean,reflect:!0})],it.prototype,"readonly",2),a([(0,ft.property)({type:Boolean,reflect:!0})],it.prototype,"invalid",2),a([(0,ft.property)({type:Boolean})],it.prototype,"clearable",2),a([(0,ft.property)({reflect:!0})],it.prototype,"backdrop",2),a([(0,ft.property)({attribute:"backdrop-style"})],it.prototype,"backdropStyle",2),a([(0,ft.property)({type:Boolean,attribute:"close-on-outside-press"})],it.prototype,"closeOnOutsidePress",2),a([(0,ft.property)({attribute:"show-alpha",type:Boolean})],it.prototype,"showAlpha",2),a([(0,ft.property)()],it.prototype,"placement",2),a([(0,ft.property)()],it.prototype,"name",2),a([(0,ft.property)({attribute:"preset-colors"})],it.prototype,"presetColors",2),a([(0,ft.property)({attribute:!1})],it.prototype,"swatches",2),a([(0,ft.query)("lui-dropdown")],it.prototype,"_dropdown",2),a([(0,ft.query)(".sv")],it.prototype,"_svEl",2),a([(0,ft.state)()],it.prototype,"_hsv",2),it=a([(0,ft.customElement)("lui-color-picker")],it);var Pt=require("lit"),eo=require("lit/decorators.js");var sr=class extends Pt.LitElement{constructor(){super(...arguments);this.label="";this.required=!1;this.description="";this.help="";this.extra="";this.tooltip="";this.errors=[];this.invalid=!1;this.hiddenLabel=!1;this.inline=!1;this.size="md";this.labelPlacement="top";this.labelWidth="120px";this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(){let e=L(this,"formItem");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("label-placement")&&typeof e.labelPlacement=="string"&&this.labelPlacement!==e.labelPlacement&&(this.labelPlacement=e.labelPlacement),!this._explicitAttrs.has("label-width")&&(typeof e.labelWidth=="string"||typeof e.labelWidth=="number")&&this.labelWidth!==e.labelWidth&&(this.labelWidth=e.labelWidth)}_onLabelClick(){this.dispatchEvent(new CustomEvent("label-click",{bubbles:!0,composed:!0}))}_normalizedPlacement(){return this.labelPlacement==="left"||this.labelPlacement==="horizontal"?"left":"top"}_renderLabel(){let t=!this.hiddenLabel&&this.label?Pt.html`
|
|
11475
11487
|
<span class=${`label-row ${this.inline?"clickable":""}`} @click=${this._onLabelClick}>
|
|
11476
11488
|
<slot name="label">${this.label}</slot>
|
|
11477
11489
|
${this.required?Pt.html`<span class="required">*</span>`:Pt.nothing}
|
|
@@ -12528,7 +12540,7 @@
|
|
|
12528
12540
|
.clearable=${this.clearable}
|
|
12529
12541
|
@change=${this._onChange}
|
|
12530
12542
|
></lui-datepicker>
|
|
12531
|
-
`}};Ro.styles=[A,j,Xi.css`:host{display:block;width:100%;}`],a([(0,Bt.property)()],Ro.prototype,"value",2),a([(0,Bt.property)()],Ro.prototype,"placeholder",2),a([(0,Bt.property)({reflect:!0})],Ro.prototype,"size",2),a([(0,Bt.property)()],Ro.prototype,"min",2),a([(0,Bt.property)()],Ro.prototype,"max",2),a([(0,Bt.property)({type:Boolean})],Ro.prototype,"disabled",2),a([(0,Bt.property)({type:Boolean})],Ro.prototype,"clearable",2),Ro=a([(0,Bt.customElement)("lui-date-range-picker")],Ro);var hr=require("lit"),Te=require("lit/decorators.js");var Xp=xn(ia(),1);function kd(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px")}function Zp(i){let{target:o,handle:e,visibleMarginX:t=72,visibleMarginY:r=48,ignoreFrom:n="button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle]",initialState:s,onStart:d,onMove:h}=i,p={left:s?.left??o.getBoundingClientRect().left,top:s?.top??o.getBoundingClientRect().top},f=(0,Xp.default)(e).draggable({ignoreFrom:n,listeners:{start(){d?.()},move(x){let k=o.getBoundingClientRect(),C=t-k.width,S=window.innerWidth-t,z=r-k.height,T=window.innerHeight-r,P=Math.min(S,Math.max(C,p.left+x.dx)),H=Math.min(T,Math.max(z,p.top+x.dy));p={left:P,top:H},kd(o,p),h?.(p)}}});return{dispose(){f.unset()},reset(){p={left:0,top:0},kd(o,p),h?.(p)},getState(){return{...p}},setState(x,k){p={left:x.left??p.left,top:x.top??p.top},k?.apply!==!1&&kd(o,p),k?.notify!==!1&&h?.(p)}}}var xd=xn(ia(),1);function Ml(i){let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function za(i,o,e){return Math.min(e,Math.max(o,i))}function Hg(i){return i.top&&i.left?"nw":i.top&&i.right?"ne":i.bottom&&i.left?"sw":i.bottom&&i.right?"se":i.top?"n":i.right?"e":i.bottom?"s":"w"}function Rg(i,o,e){let r=window.getComputedStyle(i),n=Ml(r.minWidth)??o,s=Ml(r.minHeight)??e,d=Math.max(n,window.innerWidth-16*2),h=Math.max(s,window.innerHeight-16*2),p=Math.min(Ml(r.maxWidth)??d,d),f=Math.min(Ml(r.maxHeight)??h,h);return{minWidth:n,minHeight:s,maxWidth:p,maxHeight:f,viewportMargin:16}}function Qp(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px"),i.style.setProperty("--lui-dialog-width",`${o.width}px`),i.style.setProperty("--lui-dialog-height",`${o.height}px`)}function Jp(i){let{target:o,left:e,top:t,width:r,height:n,minWidth:s=320,minHeight:d=220,onStart:h,onEnd:p,onMove:f}=i,x=o.getBoundingClientRect(),k={left:e??x.left,top:t??x.top,width:r??x.width,height:n??x.height},C=(0,xd.default)(o).resizable({edges:{top:'[data-resize-handle="n"], [data-resize-handle="nw"], [data-resize-handle="ne"]',right:'[data-resize-handle="e"], [data-resize-handle="ne"], [data-resize-handle="se"]',bottom:'[data-resize-handle="s"], [data-resize-handle="sw"], [data-resize-handle="se"]',left:'[data-resize-handle="w"], [data-resize-handle="nw"], [data-resize-handle="sw"]'},invert:"reposition",modifiers:[xd.default.modifiers.restrictSize({min:{width:s,height:d}})],listeners:{start(S){h?.(Hg(S.edges))},move(S){let z=Rg(o,s,d),T=k.left,P=k.top,H=k.width,I=k.height;if(S.edges?.left){let B=k.left+k.width,$=B-z.minWidth;T=za(k.left+S.deltaRect.left,z.viewportMargin,$),H=za(B-T,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-T)),T=B-H}else S.edges?.right&&(H=za(S.rect.width,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-k.left)));if(S.edges?.top){let B=k.top+k.height,$=B-z.minHeight;P=za(k.top+S.deltaRect.top,z.viewportMargin,$),I=za(B-P,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-P)),P=B-I}else S.edges?.bottom&&(I=za(S.rect.height,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-k.top)));k={left:T,top:P,width:H,height:I},Qp(o,k),f?.({...k})},end(){p?.()}}});return{dispose(){C.unset()},getState(){return{...k}},setState(S,z){k={left:S.left??k.left,top:S.top??k.top,width:S.width??k.width,height:S.height??k.height},z?.apply!==!1&&Qp(o,k),z?.notify!==!1&&f?.({...k})}}}var Ig=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),Vg=new Set(["lui-input","lui-select","lui-textarea","lui-switch","lui-checkbox","lui-radio","lui-input-number","lui-datepicker","lui-color-picker","lui-input-opt","lui-file-input"]),bs=0,e1={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}};function Cl(i,o){let e=o;for(;e;){if(e===i)return!0;let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=e.parentNode}return!1}function Dg(i){let o=i.activeElement;for(;o&&o.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}function Fg(i){return i.hasAttribute("disabled")||i.getAttribute("aria-hidden")||i.tabIndex===-1||i.hidden?!1:i.matches(Ig)?!0:Vg.has(i.tagName.toLowerCase())}function Ng(i,o){if(!(i instanceof HTMLElement)||i===o||!Cl(o,i)||!i.hasAttribute("open"))return!1;let e=i.tagName.toLowerCase();return e==="lui-popover"||e==="lui-select"||e==="lui-dropdown"||e==="lui-datepicker"||e==="lui-context-menu"}var Me=class extends hr.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.noClose=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.noHeader=!1;this.noFooter=!1;this.draggable=!1;this.resizable=!1;this.destroyOnClose=!1;this.fullscreen=!1;this.placement="center";this.offset="";this.backdrop="opaque";this.backdropStyle="";this.portal=!1;this.overlayLayer="modal";this._shaking=!1;this._opening=!1;this._resizing=!1;this._activeResizeHandle=null;this._shakeTimer=0;this._openingTimer=0;this._draggableHandle=null;this._resizableHandle=null;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._suppressBackdropClickUntil=0;this._previousActiveElement=null;this._bodyScrollLocked=!1;this._bodyUserSelect="";this._bodyWebkitUserSelect="";this._interactiveRect=null;this._destroyOnCloseTemplate=[];this._isSyncingDestroyOnCloseContent=!1;this._onDocumentKeyDown=e=>{if(!this.open||!this._isTopmostDialog())return;if(e.key==="Escape"){let h=e.composedPath();if(Cn(h,this)||h.some(p=>Ng(p,this)))return;e.preventDefault(),this.close();return}if(e.key!=="Tab"||!this._dialog)return;let t=this._getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus({preventScroll:!0});return}let r=Dg(this.ownerDocument),n=t.findIndex(h=>h===r||Cl(h,r)),s=t[0],d=t[t.length-1];if(e.shiftKey){n<=0&&(e.preventDefault(),d.focus({preventScroll:!0}));return}(n===-1||n===t.length-1)&&(e.preventDefault(),s.focus({preventScroll:!0}))};this._onDialogClick=e=>{if(e.target!==this._dialog||!this._isTopmostDialog())return;let t=e.composedPath();if(t.some(s=>s instanceof Node&&s!==this._dialog&&Cl(this,s))||Cn(t,this)||Date.now()<this._suppressBackdropClickUntil||es(this))return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onBackdropClick=e=>{if(e.stopPropagation(),!this._isTopmostDialog())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onNativeClose=e=>{e.target===this._dialog&&this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))};this._onDocumentPointerDown=e=>{if(!this.open||!this._dialog){this._suppressBackdropClickUntil=0;return}let t=e.composedPath(),r=t[0]===this._dialog,n=t.some(d=>d instanceof Node&&d!==this._dialog&&Cl(this,d)),s=Cn(t,this);this._suppressBackdropClickUntil=!r&&(n||s)?Date.now()+320:0}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._captureDestroyOnCloseTemplate(),this._lightDomObserver=new MutationObserver(()=>{!this._isSyncingDestroyOnCloseContent&&!(this.destroyOnClose&&!this.open&&this.childNodes.length===0)&&this._captureDestroyOnCloseTemplate(),this.requestUpdate()}),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]}),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown,!0),this._unlockBodyScroll(),this._setResizing(!1),this._teardownDraggable(),this._teardownResizable(),window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(e){(e.has("open")||e.has("destroyOnClose"))&&this._syncDestroyOnCloseContent(),this._dialog&&this.open&&!this._dialog.open&&(this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},300)),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1);let t=L(this,"dialog");!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&this.noClose!==t.noClose&&(this.noClose=t.noClose),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==t.closeOnOutsidePress&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&this.shakeOnOutsideClick!==t.shakeOnOutsideClick&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&this.noHeader!==t.noHeader&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&this.noFooter!==t.noFooter&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("draggable")&&typeof t.draggable=="boolean"&&this.draggable!==t.draggable&&(this.draggable=t.draggable),!this._explicitAttrs.has("resizable")&&typeof t.resizable=="boolean"&&this.resizable!==t.resizable&&(this.resizable=t.resizable),!this._explicitAttrs.has("destroy-on-close")&&typeof t.destroyOnClose=="boolean"&&this.destroyOnClose!==t.destroyOnClose&&(this.destroyOnClose=t.destroyOnClose),!this._explicitAttrs.has("fullscreen")&&typeof t.fullscreen=="boolean"&&this.fullscreen!==t.fullscreen&&(this.fullscreen=t.fullscreen),!this._explicitAttrs.has("width")&&(typeof t.width=="string"||typeof t.width=="number")&&this.width!==t.width&&(this.width=t.width),!this._explicitAttrs.has("drag-visible-margin-x")&&typeof t.dragVisibleMarginX=="number"&&this.dragVisibleMarginX!==t.dragVisibleMarginX&&(this.dragVisibleMarginX=t.dragVisibleMarginX),!this._explicitAttrs.has("drag-visible-margin-y")&&typeof t.dragVisibleMarginY=="number"&&this.dragVisibleMarginY!==t.dragVisibleMarginY&&(this.dragVisibleMarginY=t.dragVisibleMarginY),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("offset")&&typeof t.offset=="string"&&this.offset!==t.offset&&(this.offset=t.offset),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&this.backdrop!==t.backdrop&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&this.backdropStyle!==t.backdropStyle&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&this.portal!==t.portal&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&this.overlayLayer!==t.overlayLayer&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");if(this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this)),e.has("open")&&this._dialog)if(this.open&&!this._dialog.open){try{this._dialog.show()}catch{this._dialog.setAttribute("open","")}this._previousActiveElement=this.ownerDocument.activeElement instanceof HTMLElement?this.ownerDocument.activeElement:null,this._lockBodyScroll(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._focusInitialElement()})}else!this.open&&this._dialog.open&&(this._unlockBodyScroll(),this._dialog.close(),this._restoreFocus());e.has("open")&&!this.open&&(this._releaseOverlayStack(),this._restorePortalPlacement(),this._resetInteractiveLayout()),e.has("width")&&this._interactiveRect&&!this._resizing&&(this._interactiveRect.width=void 0),(e.has("draggable")||e.has("fullscreen")||e.has("noHeader")||e.has("open")||e.has("dragHandle"))&&queueMicrotask(()=>this._syncDraggable()),(e.has("resizable")||e.has("fullscreen")||e.has("open")||e.has("width")||e.has("placement"))&&queueMicrotask(()=>this._syncResizable())}show(){this.portal&&this._moveToPortalLayer(),this.open=!0}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_getFocusableElements(){if(!this._dialog)return[];let e=this.ownerDocument.createTreeWalker(this._dialog,NodeFilter.SHOW_ELEMENT),t=[],r=e.currentNode;for(;r;)r!==this._dialog&&Fg(r)&&!t.includes(r)&&t.push(r),r=e.nextNode();return t}_focusInitialElement(){if(!this.open||!this._dialog)return;let t=this._getFocusableElements()[0]??this._dialog;t===this._dialog&&(this._dialog.tabIndex=-1),t.focus({preventScroll:!0})}_restoreFocus(){let e=this._previousActiveElement;this._previousActiveElement=null,e&&e.isConnected&&e.focus({preventScroll:!0})}_lockBodyScroll(){this._bodyScrollLocked||!this.ownerDocument?.body||(bs===0&&(this.ownerDocument.body.style.overflow="hidden"),bs+=1,this._bodyScrollLocked=!0)}_unlockBodyScroll(){!this._bodyScrollLocked||!this.ownerDocument?.body||(bs=Math.max(0,bs-1),bs===0&&(this.ownerDocument.body.style.overflow=""),this._bodyScrollLocked=!1)}_shake(){!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),this._shaking=!1,this.updateComplete.then(()=>{this._dialog?.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_hasFooterContent(){return this.noFooter?!1:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="footer")}_shouldRenderHeader(){return this.noHeader?!1:this.title||!this.noClose?!0:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="title")}_isTopmostDialog(){return!this._overlayStackRegistered||rs(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Xo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Ar(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-dialog-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder,t=e.parentNode;this._isPortalMoving=!0;try{t&&t.insertBefore(this,e),e.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}_teardownDraggable(){this._draggableHandle?.dispose(),this._draggableHandle=null}_syncDestroyOnCloseContent(){if(!this.destroyOnClose){this._restoreDestroyOnCloseContent();return}if(this.open){this._restoreDestroyOnCloseContent();return}this._stashDestroyOnCloseContent()}_captureDestroyOnCloseTemplate(){this._isSyncingDestroyOnCloseContent||(this._destroyOnCloseTemplate=Array.from(this.childNodes).map(e=>e.cloneNode(!0)))}_restoreDestroyOnCloseContent(){if(!(this.childNodes.length>0||this._destroyOnCloseTemplate.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren(...this._destroyOnCloseTemplate.map(e=>e.cloneNode(!0)))}finally{this._isSyncingDestroyOnCloseContent=!1}}}_stashDestroyOnCloseContent(){if(!(!this.destroyOnClose||this.childNodes.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren()}finally{this._isSyncingDestroyOnCloseContent=!1}}}_teardownResizable(){this._resizableHandle?.dispose(),this._resizableHandle=null,this._activeResizeHandle=null,this._setResizing(!1)}_setResizing(e){if(this._resizing===e)return;this._resizing=e;let t=this.ownerDocument?.body;if(t){if(e){this._bodyUserSelect=t.style.userSelect,this._bodyWebkitUserSelect=t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none";return}t.style.userSelect=this._bodyUserSelect,t.style.webkitUserSelect=this._bodyWebkitUserSelect}}_resetInteractiveLayout(){this._interactiveRect=null}_materializeInteractiveRect(){if(!this.open||!this._dialog)return null;let e=this._dialog.getBoundingClientRect();return this._interactiveRect={left:Math.round(e.left),top:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},this.requestUpdate(),this._interactiveRect}_syncDraggable(){if(this._teardownDraggable(),this.fullscreen||!this.open||!this.draggable||!this._dialog)return;let e=null;this.dragHandle?e=this._dialog.querySelector(this.dragHandle)||this.querySelector(this.dragHandle):!this.noHeader&&this._headerEl&&(e=this._headerEl),e&&(this._draggableHandle=Zp({target:this._dialog,handle:e,initialState:this._interactiveRect?{left:this._interactiveRect.left,top:this._interactiveRect.top}:void 0,visibleMarginX:typeof this.dragVisibleMarginX=="number"&&Number.isFinite(this.dragVisibleMarginX)?this.dragVisibleMarginX:void 0,visibleMarginY:typeof this.dragVisibleMarginY=="number"&&Number.isFinite(this.dragVisibleMarginY)?this.dragVisibleMarginY:void 0,ignoreFrom:'[part="close"], button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle], .resize-handle',onStart:()=>{let t=this._materializeInteractiveRect();t&&(this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1}),this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}))},onMove:t=>{let r=this._interactiveRect??this._materializeInteractiveRect();r&&(this._interactiveRect={...r,left:t.left,top:t.top},this._resizableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1}),this.requestUpdate())}}))}syncDraggable(){this._syncDraggable()}_syncResizable(){this._teardownResizable(),!(this.fullscreen||!this.open||!this.resizable||!this._dialog)&&(this._resizableHandle=Jp({target:this._dialog,left:this._interactiveRect?.left,top:this._interactiveRect?.top,width:this._interactiveRect?.width,height:this._interactiveRect?.height,minWidth:320,minHeight:220,onStart:e=>{let t=this._materializeInteractiveRect();t&&(this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}),this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1})),this._activeResizeHandle=e,this._setResizing(!0)},onEnd:()=>{this._activeResizeHandle=null,this._setResizing(!1)},onMove:e=>{this._interactiveRect={left:e.left,top:e.top,width:e.width,height:e.height},this._draggableHandle?.setState({left:e.left,top:e.top},{notify:!1,apply:!1}),this.requestUpdate()}}))}_dialogStyle(){let e=this._interactiveRect?.width!=null?`${this._interactiveRect.width}px`:Ot(this.width),t=this._interactiveRect?.height!=null?`${this._interactiveRect.height}px`:"",r=[this._interactiveRect?`--lui-dialog-left:${this._interactiveRect.left}px`:"",this._interactiveRect?`--lui-dialog-top:${this._interactiveRect.top}px`:"",this._interactiveRect?"--lui-dialog-right:auto":"",this._interactiveRect?"--lui-dialog-bottom:auto":"",this._interactiveRect?"--lui-dialog-base-translate-x:0px":"",this._interactiveRect?"--lui-dialog-base-translate-y:0px":"",this.offset?`--lui-dialog-offset:${this.offset}`:"",e?`--lui-dialog-width:${e}`:"",t?`--lui-dialog-height:${t}`:""].filter(Boolean);return r.length?r.join(";"):hr.nothing}render(){let e=this.open||!this.destroyOnClose,t=this._hasFooterContent();return hr.html`
|
|
12543
|
+
`}};Ro.styles=[A,j,Xi.css`:host{display:block;width:100%;}`],a([(0,Bt.property)()],Ro.prototype,"value",2),a([(0,Bt.property)()],Ro.prototype,"placeholder",2),a([(0,Bt.property)({reflect:!0})],Ro.prototype,"size",2),a([(0,Bt.property)()],Ro.prototype,"min",2),a([(0,Bt.property)()],Ro.prototype,"max",2),a([(0,Bt.property)({type:Boolean})],Ro.prototype,"disabled",2),a([(0,Bt.property)({type:Boolean})],Ro.prototype,"clearable",2),Ro=a([(0,Bt.customElement)("lui-date-range-picker")],Ro);var hr=require("lit"),Te=require("lit/decorators.js");var Xp=xn(ia(),1);function kd(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px")}function Zp(i){let{target:o,handle:e,visibleMarginX:t=72,visibleMarginY:r=48,ignoreFrom:n="button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle]",initialState:s,onStart:d,onMove:h}=i,p={left:s?.left??o.getBoundingClientRect().left,top:s?.top??o.getBoundingClientRect().top},f=(0,Xp.default)(e).draggable({ignoreFrom:n,listeners:{start(){d?.()},move(x){let k=o.getBoundingClientRect(),C=t-k.width,S=window.innerWidth-t,z=r-k.height,T=window.innerHeight-r,P=Math.min(S,Math.max(C,p.left+x.dx)),H=Math.min(T,Math.max(z,p.top+x.dy));p={left:P,top:H},kd(o,p),h?.(p)}}});return{dispose(){f.unset()},reset(){p={left:0,top:0},kd(o,p),h?.(p)},getState(){return{...p}},setState(x,k){p={left:x.left??p.left,top:x.top??p.top},k?.apply!==!1&&kd(o,p),k?.notify!==!1&&h?.(p)}}}var xd=xn(ia(),1);function Ml(i){let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function za(i,o,e){return Math.min(e,Math.max(o,i))}function Hg(i){return i.top&&i.left?"nw":i.top&&i.right?"ne":i.bottom&&i.left?"sw":i.bottom&&i.right?"se":i.top?"n":i.right?"e":i.bottom?"s":"w"}function Rg(i,o,e){let r=window.getComputedStyle(i),n=Ml(r.minWidth)??o,s=Ml(r.minHeight)??e,d=Math.max(n,window.innerWidth-16*2),h=Math.max(s,window.innerHeight-16*2),p=Math.min(Ml(r.maxWidth)??d,d),f=Math.min(Ml(r.maxHeight)??h,h);return{minWidth:n,minHeight:s,maxWidth:p,maxHeight:f,viewportMargin:16}}function Qp(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px"),i.style.setProperty("--lui-dialog-width",`${o.width}px`),i.style.setProperty("--lui-dialog-height",`${o.height}px`)}function Jp(i){let{target:o,left:e,top:t,width:r,height:n,minWidth:s=320,minHeight:d=220,onStart:h,onEnd:p,onMove:f}=i,x=o.getBoundingClientRect(),k={left:e??x.left,top:t??x.top,width:r??x.width,height:n??x.height},C=(0,xd.default)(o).resizable({edges:{top:'[data-resize-handle="n"], [data-resize-handle="nw"], [data-resize-handle="ne"]',right:'[data-resize-handle="e"], [data-resize-handle="ne"], [data-resize-handle="se"]',bottom:'[data-resize-handle="s"], [data-resize-handle="sw"], [data-resize-handle="se"]',left:'[data-resize-handle="w"], [data-resize-handle="nw"], [data-resize-handle="sw"]'},invert:"reposition",modifiers:[xd.default.modifiers.restrictSize({min:{width:s,height:d}})],listeners:{start(S){h?.(Hg(S.edges))},move(S){let z=Rg(o,s,d),T=k.left,P=k.top,H=k.width,I=k.height;if(S.edges?.left){let B=k.left+k.width,$=B-z.minWidth;T=za(k.left+S.deltaRect.left,z.viewportMargin,$),H=za(B-T,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-T)),T=B-H}else S.edges?.right&&(H=za(S.rect.width,z.minWidth,Math.min(z.maxWidth,window.innerWidth-z.viewportMargin-k.left)));if(S.edges?.top){let B=k.top+k.height,$=B-z.minHeight;P=za(k.top+S.deltaRect.top,z.viewportMargin,$),I=za(B-P,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-P)),P=B-I}else S.edges?.bottom&&(I=za(S.rect.height,z.minHeight,Math.min(z.maxHeight,window.innerHeight-z.viewportMargin-k.top)));k={left:T,top:P,width:H,height:I},Qp(o,k),f?.({...k})},end(){p?.()}}});return{dispose(){C.unset()},getState(){return{...k}},setState(S,z){k={left:S.left??k.left,top:S.top??k.top,width:S.width??k.width,height:S.height??k.height},z?.apply!==!1&&Qp(o,k),z?.notify!==!1&&f?.({...k})}}}var Ig=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),Vg=new Set(["lui-input","lui-select","lui-textarea","lui-switch","lui-checkbox","lui-radio","lui-input-number","lui-datepicker","lui-color-picker","lui-input-opt","lui-file-input"]),bs=0,e1={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}};function Cl(i,o){let e=o;for(;e;){if(e===i)return!0;let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=e.parentNode}return!1}function Dg(i){let o=i.activeElement;for(;o&&o.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}function Fg(i){return i.hasAttribute("disabled")||i.getAttribute("aria-hidden")||i.tabIndex===-1||i.hidden?!1:i.matches(Ig)?!0:Vg.has(i.tagName.toLowerCase())}function Ng(i,o){if(!(i instanceof HTMLElement)||i===o||!Cl(o,i)||!i.hasAttribute("open"))return!1;let e=i.tagName.toLowerCase();return e==="lui-popover"||e==="lui-select"||e==="lui-dropdown"||e==="lui-datepicker"||e==="lui-context-menu"}var Me=class extends hr.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.noClose=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.noHeader=!1;this.noFooter=!1;this.draggable=!1;this.resizable=!1;this.destroyOnClose=!1;this.fullscreen=!1;this.placement="center";this.offset="";this.backdrop="opaque";this.backdropStyle="";this.portal=!1;this.overlayLayer="modal";this._shaking=!1;this._opening=!1;this._resizing=!1;this._activeResizeHandle=null;this._shakeTimer=0;this._openingTimer=0;this._draggableHandle=null;this._resizableHandle=null;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._suppressBackdropClickUntil=0;this._previousActiveElement=null;this._bodyScrollLocked=!1;this._bodyUserSelect="";this._bodyWebkitUserSelect="";this._interactiveRect=null;this._destroyOnCloseTemplate=[];this._isSyncingDestroyOnCloseContent=!1;this._onDocumentKeyDown=e=>{if(!this.open||!this._isTopmostDialog())return;if(e.key==="Escape"){let h=e.composedPath();if(Cn(h,this)||h.some(p=>Ng(p,this)))return;e.preventDefault(),this.close();return}if(e.key!=="Tab"||!this._dialog)return;let t=this._getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus({preventScroll:!0});return}let r=Dg(this.ownerDocument),n=t.findIndex(h=>h===r||Cl(h,r)),s=t[0],d=t[t.length-1];if(e.shiftKey){n<=0&&(e.preventDefault(),d.focus({preventScroll:!0}));return}(n===-1||n===t.length-1)&&(e.preventDefault(),s.focus({preventScroll:!0}))};this._onDialogClick=e=>{if(e.target!==this._dialog||!this._isTopmostDialog())return;let t=e.composedPath();if(t.some(s=>s instanceof Node&&s!==this._dialog&&Cl(this,s))||Cn(t,this)||Date.now()<this._suppressBackdropClickUntil||es(this))return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onBackdropClick=e=>{if(e.stopPropagation(),!this._isTopmostDialog())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onNativeClose=e=>{e.target===this._dialog&&this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))};this._onDocumentPointerDown=e=>{if(!this.open||!this._dialog){this._suppressBackdropClickUntil=0;return}let t=e.composedPath(),r=t[0]===this._dialog,n=t.some(d=>d instanceof Node&&d!==this._dialog&&Cl(this,d)),s=Cn(t,this);this._suppressBackdropClickUntil=!r&&(n||s)?Date.now()+320:0}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._captureDestroyOnCloseTemplate(),this._lightDomObserver=new MutationObserver(()=>{!this._isSyncingDestroyOnCloseContent&&!(this.destroyOnClose&&!this.open&&this.childNodes.length===0)&&this._captureDestroyOnCloseTemplate(),this.requestUpdate()}),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]}),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown,!0),this._unlockBodyScroll(),this._setResizing(!1),this._teardownDraggable(),this._teardownResizable(),window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}willUpdate(e){(e.has("open")||e.has("destroyOnClose"))&&this._syncDestroyOnCloseContent(),this._dialog&&this.open&&!this._dialog.open&&(this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},300)),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1);let t=L(this,"dialog");!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&this.noClose!==t.noClose&&(this.noClose=t.noClose),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==t.closeOnOutsidePress&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&this.shakeOnOutsideClick!==t.shakeOnOutsideClick&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&this.noHeader!==t.noHeader&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&this.noFooter!==t.noFooter&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("draggable")&&typeof t.draggable=="boolean"&&this.draggable!==t.draggable&&(this.draggable=t.draggable),!this._explicitAttrs.has("resizable")&&typeof t.resizable=="boolean"&&this.resizable!==t.resizable&&(this.resizable=t.resizable),!this._explicitAttrs.has("destroy-on-close")&&typeof t.destroyOnClose=="boolean"&&this.destroyOnClose!==t.destroyOnClose&&(this.destroyOnClose=t.destroyOnClose),!this._explicitAttrs.has("fullscreen")&&typeof t.fullscreen=="boolean"&&this.fullscreen!==t.fullscreen&&(this.fullscreen=t.fullscreen),!this._explicitAttrs.has("width")&&(typeof t.width=="string"||typeof t.width=="number")&&this.width!==t.width&&(this.width=t.width),!this._explicitAttrs.has("drag-visible-margin-x")&&typeof t.dragVisibleMarginX=="number"&&this.dragVisibleMarginX!==t.dragVisibleMarginX&&(this.dragVisibleMarginX=t.dragVisibleMarginX),!this._explicitAttrs.has("drag-visible-margin-y")&&typeof t.dragVisibleMarginY=="number"&&this.dragVisibleMarginY!==t.dragVisibleMarginY&&(this.dragVisibleMarginY=t.dragVisibleMarginY),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("offset")&&typeof t.offset=="string"&&this.offset!==t.offset&&(this.offset=t.offset),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&this.backdrop!==t.backdrop&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&this.backdropStyle!==t.backdropStyle&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&this.portal!==t.portal&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&this.overlayLayer!==t.overlayLayer&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");if(this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this)),e.has("open")&&this._dialog)if(this.open&&!this._dialog.open){try{this._dialog.show()}catch{this._dialog.setAttribute("open","")}this._previousActiveElement=this.ownerDocument.activeElement instanceof HTMLElement?this.ownerDocument.activeElement:null,this._lockBodyScroll(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._focusInitialElement()})}else!this.open&&this._dialog.open&&(this._unlockBodyScroll(),this._dialog.close(),this._restoreFocus());e.has("open")&&!this.open&&(this._releaseOverlayStack(),this._restorePortalPlacement(),this._resetInteractiveLayout()),e.has("width")&&this._interactiveRect&&!this._resizing&&(this._interactiveRect.width=void 0),(e.has("draggable")||e.has("fullscreen")||e.has("noHeader")||e.has("open")||e.has("dragHandle"))&&queueMicrotask(()=>this._syncDraggable()),(e.has("resizable")||e.has("fullscreen")||e.has("open")||e.has("width")||e.has("placement"))&&queueMicrotask(()=>this._syncResizable())}show(){this.portal&&this._moveToPortalLayer(),this.open=!0}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_getFocusableElements(){if(!this._dialog)return[];let e=this.ownerDocument.createTreeWalker(this._dialog,NodeFilter.SHOW_ELEMENT),t=[],r=e.currentNode;for(;r;)r!==this._dialog&&Fg(r)&&!t.includes(r)&&t.push(r),r=e.nextNode();return t}_focusInitialElement(){if(!this.open||!this._dialog)return;let t=this._getFocusableElements()[0]??this._dialog;t===this._dialog&&(this._dialog.tabIndex=-1),t.focus({preventScroll:!0})}_restoreFocus(){let e=this._previousActiveElement;this._previousActiveElement=null,e&&e.isConnected&&e.focus({preventScroll:!0})}_lockBodyScroll(){this._bodyScrollLocked||!this.ownerDocument?.body||(bs===0&&(this.ownerDocument.body.style.overflow="hidden"),bs+=1,this._bodyScrollLocked=!0)}_unlockBodyScroll(){!this._bodyScrollLocked||!this.ownerDocument?.body||(bs=Math.max(0,bs-1),bs===0&&(this.ownerDocument.body.style.overflow=""),this._bodyScrollLocked=!1)}_shake(){!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),this._shaking=!1,this.updateComplete.then(()=>{this._dialog?.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_hasFooterContent(){return this.noFooter?!1:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="footer")}_shouldRenderHeader(){return this.noHeader?!1:this.title||!this.noClose?!0:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="title")}_isTopmostDialog(){return!this._overlayStackRegistered||rs(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Xo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Ar(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-dialog-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder,t=e.parentNode;this._isPortalMoving=!0;try{t&&t.insertBefore(this,e),e.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}_teardownDraggable(){this._draggableHandle?.dispose(),this._draggableHandle=null}_syncDestroyOnCloseContent(){if(!this.destroyOnClose){this._restoreDestroyOnCloseContent();return}if(this.open){this._restoreDestroyOnCloseContent();return}this._stashDestroyOnCloseContent()}_captureDestroyOnCloseTemplate(){this._isSyncingDestroyOnCloseContent||(this._destroyOnCloseTemplate=Array.from(this.childNodes).map(e=>e.cloneNode(!0)))}_restoreDestroyOnCloseContent(){if(!(this.childNodes.length>0||this._destroyOnCloseTemplate.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren(...this._destroyOnCloseTemplate.map(e=>e.cloneNode(!0)))}finally{this._isSyncingDestroyOnCloseContent=!1}}}_stashDestroyOnCloseContent(){if(!(!this.destroyOnClose||this.childNodes.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren()}finally{this._isSyncingDestroyOnCloseContent=!1}}}_teardownResizable(){this._resizableHandle?.dispose(),this._resizableHandle=null,this._activeResizeHandle=null,this._setResizing(!1)}_setResizing(e){if(this._resizing===e)return;this._resizing=e;let t=this.ownerDocument?.body;if(t){if(e){this._bodyUserSelect=t.style.userSelect,this._bodyWebkitUserSelect=t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none";return}t.style.userSelect=this._bodyUserSelect,t.style.webkitUserSelect=this._bodyWebkitUserSelect}}_resetInteractiveLayout(){this._interactiveRect=null}_materializeInteractiveRect(){if(!this.open||!this._dialog)return null;let e=this._dialog.getBoundingClientRect();return this._interactiveRect={left:Math.round(e.left),top:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},this.requestUpdate(),this._interactiveRect}_syncDraggable(){if(this._teardownDraggable(),this.fullscreen||!this.open||!this.draggable||!this._dialog)return;let e=null;this.dragHandle?e=this._dialog.querySelector(this.dragHandle)||this.querySelector(this.dragHandle):!this.noHeader&&this._headerEl&&(e=this._headerEl),e&&(this._draggableHandle=Zp({target:this._dialog,handle:e,initialState:this._interactiveRect?{left:this._interactiveRect.left,top:this._interactiveRect.top}:void 0,visibleMarginX:typeof this.dragVisibleMarginX=="number"&&Number.isFinite(this.dragVisibleMarginX)?this.dragVisibleMarginX:void 0,visibleMarginY:typeof this.dragVisibleMarginY=="number"&&Number.isFinite(this.dragVisibleMarginY)?this.dragVisibleMarginY:void 0,ignoreFrom:'[part="close"], button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle], .resize-handle',onStart:()=>{let t=this._materializeInteractiveRect();t&&(this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1}),this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}))},onMove:t=>{let r=this._interactiveRect??this._materializeInteractiveRect();r&&(this._interactiveRect={...r,left:t.left,top:t.top},this._resizableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1}),this.requestUpdate())}}))}syncDraggable(){this._syncDraggable()}_syncResizable(){this._teardownResizable(),!(this.fullscreen||!this.open||!this.resizable||!this._dialog)&&(this._resizableHandle=Jp({target:this._dialog,left:this._interactiveRect?.left,top:this._interactiveRect?.top,width:this._interactiveRect?.width,height:this._interactiveRect?.height,minWidth:320,minHeight:220,onStart:e=>{let t=this._materializeInteractiveRect();t&&(this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}),this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1})),this._activeResizeHandle=e,this._setResizing(!0)},onEnd:()=>{this._activeResizeHandle=null,this._setResizing(!1)},onMove:e=>{this._interactiveRect={left:e.left,top:e.top,width:e.width,height:e.height},this._draggableHandle?.setState({left:e.left,top:e.top},{notify:!1,apply:!1}),this.requestUpdate()}}))}_dialogStyle(){let e=this._interactiveRect?.width!=null?`${this._interactiveRect.width}px`:Ot(this.width),t=this._interactiveRect?.height!=null?`${this._interactiveRect.height}px`:"",r=[this._interactiveRect?`--lui-dialog-left:${this._interactiveRect.left}px`:"",this._interactiveRect?`--lui-dialog-top:${this._interactiveRect.top}px`:"",this._interactiveRect?"--lui-dialog-right:auto":"",this._interactiveRect?"--lui-dialog-bottom:auto":"",this._interactiveRect?"--lui-dialog-base-translate-x:0px":"",this._interactiveRect?"--lui-dialog-base-translate-y:0px":"",this.offset?`--lui-dialog-offset:${this.offset}`:"",e?`--lui-dialog-width:${e}`:"",t?`--lui-dialog-height:${t}`:""].filter(Boolean);return r.length?r.join(";"):hr.nothing}render(){let e=this.open||!this.destroyOnClose,t=this._hasFooterContent();return hr.html`
|
|
12532
12544
|
<div
|
|
12533
12545
|
part="custom-backdrop"
|
|
12534
12546
|
style=${this.backdropStyle||hr.nothing}
|
|
@@ -13067,7 +13079,7 @@
|
|
|
13067
13079
|
0 0 0 2px color-mix(in srgb, var(--lui-color-primary) 24%, transparent);
|
|
13068
13080
|
}
|
|
13069
13081
|
}
|
|
13070
|
-
`],a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"open",2),a([(0,Te.property)()],Me.prototype,"title",2),a([(0,Te.property)({type:Boolean,attribute:"no-close"})],Me.prototype,"noClose",2),a([(0,Te.property)({attribute:"close-on-outside-press",reflect:!0,converter:e1})],Me.prototype,"closeOnOutsidePress",2),a([(0,Te.property)({attribute:"shake-on-outside-click",reflect:!0,converter:e1})],Me.prototype,"shakeOnOutsideClick",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-header"})],Me.prototype,"noHeader",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-footer"})],Me.prototype,"noFooter",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"draggable",2),a([(0,Te.property)({attribute:"drag-handle"})],Me.prototype,"dragHandle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"resizable",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"destroy-on-close"})],Me.prototype,"destroyOnClose",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"fullscreen",2),a([(0,Te.property)()],Me.prototype,"width",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-x"})],Me.prototype,"dragVisibleMarginX",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-y"})],Me.prototype,"dragVisibleMarginY",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"placement",2),a([(0,Te.property)()],Me.prototype,"offset",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"backdrop",2),a([(0,Te.property)({attribute:"backdrop-style"})],Me.prototype,"backdropStyle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"portal",2),a([(0,Te.property)({attribute:"overlay-layer"})],Me.prototype,"overlayLayer",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"container",2),a([(0,Te.property)()],Me.prototype,"locale",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"translations",2),a([(0,Te.query)("dialog")],Me.prototype,"_dialog",2),a([(0,Te.query)('[part="header"]')],Me.prototype,"_headerEl",2),a([(0,Te.state)()],Me.prototype,"_shaking",2),a([(0,Te.state)()],Me.prototype,"_opening",2),a([(0,Te.state)()],Me.prototype,"_resizing",2),a([(0,Te.state)()],Me.prototype,"_activeResizeHandle",2),Me=a([(0,Te.customElement)("lui-dialog")],Me);var Io=require("lit"),vt=require("lit/decorators.js");var t1={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}},
|
|
13082
|
+
`],a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"open",2),a([(0,Te.property)()],Me.prototype,"title",2),a([(0,Te.property)({type:Boolean,attribute:"no-close"})],Me.prototype,"noClose",2),a([(0,Te.property)({attribute:"close-on-outside-press",reflect:!0,converter:e1})],Me.prototype,"closeOnOutsidePress",2),a([(0,Te.property)({attribute:"shake-on-outside-click",reflect:!0,converter:e1})],Me.prototype,"shakeOnOutsideClick",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-header"})],Me.prototype,"noHeader",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"no-footer"})],Me.prototype,"noFooter",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"draggable",2),a([(0,Te.property)({attribute:"drag-handle"})],Me.prototype,"dragHandle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"resizable",2),a([(0,Te.property)({type:Boolean,reflect:!0,attribute:"destroy-on-close"})],Me.prototype,"destroyOnClose",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"fullscreen",2),a([(0,Te.property)()],Me.prototype,"width",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-x"})],Me.prototype,"dragVisibleMarginX",2),a([(0,Te.property)({type:Number,attribute:"drag-visible-margin-y"})],Me.prototype,"dragVisibleMarginY",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"placement",2),a([(0,Te.property)()],Me.prototype,"offset",2),a([(0,Te.property)({reflect:!0})],Me.prototype,"backdrop",2),a([(0,Te.property)({attribute:"backdrop-style"})],Me.prototype,"backdropStyle",2),a([(0,Te.property)({type:Boolean,reflect:!0})],Me.prototype,"portal",2),a([(0,Te.property)({attribute:"overlay-layer"})],Me.prototype,"overlayLayer",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"container",2),a([(0,Te.property)()],Me.prototype,"locale",2),a([(0,Te.property)({attribute:!1})],Me.prototype,"translations",2),a([(0,Te.query)("dialog")],Me.prototype,"_dialog",2),a([(0,Te.query)('[part="header"]')],Me.prototype,"_headerEl",2),a([(0,Te.state)()],Me.prototype,"_shaking",2),a([(0,Te.state)()],Me.prototype,"_opening",2),a([(0,Te.state)()],Me.prototype,"_resizing",2),a([(0,Te.state)()],Me.prototype,"_activeResizeHandle",2),Me=a([(0,Te.customElement)("lui-dialog")],Me);var Io=require("lit"),vt=require("lit/decorators.js");var t1={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}},nt=class extends Io.LitElement{constructor(){super(...arguments);this.open=!1;this.title="";this.placement="right";this.radius="lg";this.backdrop="opaque";this.backdropStyle="";this.noClose=!1;this.noHeader=!1;this.noFooter=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.portal=!1;this.overlayLayer="modal";this._present=!1;this._opening=!1;this._shaking=!1;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._shakeTimer=0;this._shakeAnimation=null;this._openingTimer=0;this._closeTimer=0;this._onBackdropPointerDown=e=>{if(e.preventDefault(),e.stopPropagation(),!this._isTopmost())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),window.clearTimeout(this._shakeTimer),this._shakeAnimation?.cancel(),this._shakeAnimation=null,window.clearTimeout(this._openingTimer),window.clearTimeout(this._closeTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}willUpdate(e){e.has("open")&&(window.clearTimeout(this._closeTimer),this.open&&(this._present=!0,this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},280)));let t=L(this,"drawer");!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&(this.placement=t.placement),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&(this.radius=t.radius),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&(this.noClose=t.noClose),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),Et(this),e.has("open")&&this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1,window.clearTimeout(this._closeTimer),this._closeTimer=window.setTimeout(()=>{this.open||(this._present=!1,this._releaseOverlayStack(),this._restorePortalPlacement())},280))}show(){this.open||(this.portal&&this._moveToPortalLayer(),this._present=!0,this.open=!0)}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}_isTopmost(){return!this._overlayStackRegistered||rs(this)}_registerOverlayStack(){let e=zn(this);if(!e){this._releaseOverlayStack();return}Jt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(Xo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Ar(this.overlayLayer||"modal",this.container??ln(this)??sn(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-drawer-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder.parentNode;this._isPortalMoving=!0;try{e&&e.insertBefore(this,this._portalPlaceholder),this._portalPlaceholder.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}async _shake(){if(!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._opening=!1,this._shaking=!1,await this.updateComplete,!this.open))return;let e=this._panelEl;if(!e)return;this._shakeAnimation?.cancel();let r=this.placement==="left"||this.placement==="right"?[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(-10px, 0, 0)",offset:.18},{transform:"translate3d(10px, 0, 0)",offset:.36},{transform:"translate3d(-6px, 0, 0)",offset:.54},{transform:"translate3d(6px, 0, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}]:[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(0, -10px, 0)",offset:.18},{transform:"translate3d(0, 10px, 0)",offset:.36},{transform:"translate3d(0, -6px, 0)",offset:.54},{transform:"translate3d(0, 6px, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}];if(typeof e.animate=="function"){this._shakeAnimation=e.animate(r,{duration:380,easing:"cubic-bezier(0.36, 0.07, 0.19, 0.97)"}),this._shakeAnimation.onfinish=()=>{this._shakeAnimation=null},this._shakeAnimation.oncancel=()=>{this._shakeAnimation=null};return}e.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}render(){if(!this.open&&!this._present)return Io.nothing;let e=Array.from(this.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE&&t.slot==="footer");return Io.html`
|
|
13071
13083
|
<div class="backdrop" part="backdrop" @pointerdown=${this._onBackdropPointerDown}></div>
|
|
13072
13084
|
<div class="custom-backdrop" part="custom-backdrop" style=${this.backdropStyle||Io.nothing} ?hidden=${this.backdrop!=="custom"} @pointerdown=${this._onBackdropPointerDown}>
|
|
13073
13085
|
<slot name="backdrop"></slot>
|
|
@@ -13080,7 +13092,7 @@
|
|
|
13080
13092
|
<main part="body"><slot></slot></main>
|
|
13081
13093
|
${e&&!this.noFooter?Io.html`<footer part="footer"><slot name="footer"></slot></footer>`:Io.nothing}
|
|
13082
13094
|
</section>
|
|
13083
|
-
`}};
|
|
13095
|
+
`}};nt.styles=[A,j,Io.css`
|
|
13084
13096
|
:host {
|
|
13085
13097
|
position: fixed;
|
|
13086
13098
|
inset: 0;
|
|
@@ -13311,7 +13323,7 @@
|
|
|
13311
13323
|
animation: none;
|
|
13312
13324
|
}
|
|
13313
13325
|
}
|
|
13314
|
-
`],a([(0,vt.property)({type:Boolean,reflect:!0})],
|
|
13326
|
+
`],a([(0,vt.property)({type:Boolean,reflect:!0})],nt.prototype,"open",2),a([(0,vt.property)()],nt.prototype,"title",2),a([(0,vt.property)({reflect:!0})],nt.prototype,"placement",2),a([(0,vt.property)({reflect:!0})],nt.prototype,"radius",2),a([(0,vt.property)({reflect:!0})],nt.prototype,"backdrop",2),a([(0,vt.property)({attribute:"backdrop-style"})],nt.prototype,"backdropStyle",2),a([(0,vt.property)({type:Boolean,attribute:"no-close"})],nt.prototype,"noClose",2),a([(0,vt.property)({type:Boolean,reflect:!0,attribute:"no-header"})],nt.prototype,"noHeader",2),a([(0,vt.property)({type:Boolean,reflect:!0,attribute:"no-footer"})],nt.prototype,"noFooter",2),a([(0,vt.property)({attribute:"close-on-outside-press",reflect:!0,converter:t1})],nt.prototype,"closeOnOutsidePress",2),a([(0,vt.property)({attribute:"shake-on-outside-click",reflect:!0,converter:t1})],nt.prototype,"shakeOnOutsideClick",2),a([(0,vt.property)({reflect:!0})],nt.prototype,"portal",2),a([(0,vt.property)({attribute:"overlay-layer"})],nt.prototype,"overlayLayer",2),a([(0,vt.property)({attribute:!1})],nt.prototype,"container",2),a([(0,vt.property)()],nt.prototype,"locale",2),a([(0,vt.property)({attribute:!1})],nt.prototype,"translations",2),a([(0,vt.query)(".panel")],nt.prototype,"_panelEl",2),a([(0,vt.state)()],nt.prototype,"_present",2),a([(0,vt.state)()],nt.prototype,"_opening",2),a([(0,vt.state)()],nt.prototype,"_shaking",2),nt=a([(0,vt.customElement)("lui-drawer")],nt);var qt=require("lit"),Sr=require("lit/decorators.js"),r1=require("lit/directives/repeat.js");function wd(i){return String(i??"").trim().toLowerCase()}function Lg(i){return i?Array.isArray(i)?i:i.split(/[+\s]/).filter(Boolean):[]}function Bg(i,o){let e=o.toLowerCase().split("+").map(d=>d.trim()).filter(Boolean),t=e.find(d=>!["mod","cmd","meta","ctrl","control","alt","shift"].includes(d)),r=e.includes("mod"),n=e.includes("cmd")||e.includes("meta")||r&&/mac|iphone|ipad|ipod/i.test(navigator.platform),s=e.includes("ctrl")||e.includes("control")||r&&!/mac|iphone|ipad|ipod/i.test(navigator.platform);return!!i.metaKey!==n||!!i.ctrlKey!==s||!!i.altKey!==e.includes("alt")||!!i.shiftKey!==e.includes("shift")?!1:t?wd(i.key)===t:!0}var lr=class extends qt.LitElement{constructor(){super(...arguments);this.open=!1;this.items=[];this.size="md";this.backdrop="blur";this.placeholder="\u641C\u7D22\u547D\u4EE4\u3001\u6587\u4EF6\u6216\u64CD\u4F5C...";this.emptyText="\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u547D\u4EE4";this.hotkey="mod+k";this.closeOnSelect=!0;this.closeOnOutsidePress=!0;this.showFooter=!0;this._query="";this._activeIndex=0;this._onGlobalKeyDown=e=>{if(this.hotkey&&Bg(e,this.hotkey)){e.preventDefault(),this.toggle();return}this.open&&e.key==="Escape"&&(e.preventDefault(),this.close())};this._onInput=e=>{this._query=e.target.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this._query},bubbles:!0,composed:!0})),this._activeIndex=this._firstEnabledIndex(this._flatFiltered())};this._onKeyDown=e=>{if(e.key==="ArrowDown")e.preventDefault(),this._moveActive(1);else if(e.key==="ArrowUp")e.preventDefault(),this._moveActive(-1);else if(e.key==="Enter"){e.preventDefault();let t=this._flatFiltered()[this._activeIndex];t&&this._select(t)}};this._onLayerClick=e=>{if(e.target!==e.currentTarget)return;this._emitOutsidePress(e)&&this.closeOnOutsidePress&&this.close()}}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this._onGlobalKeyDown)}disconnectedCallback(){window.removeEventListener("keydown",this._onGlobalKeyDown),super.disconnectedCallback()}updated(e){e.has("open")&&(this.open?(this._activeIndex=this._firstEnabledIndex(this._flatFiltered()),requestAnimationFrame(()=>this._inputEl?.focus()),this.dispatchEvent(new CustomEvent("open",{detail:{open:!0},bubbles:!0,composed:!0}))):this.dispatchEvent(new CustomEvent("close",{detail:{open:!1},bubbles:!0,composed:!0})))}show(){this.open=!0}close(){this.open=!1}toggle(){this.open=!this.open}clear(){this._query="",this._activeIndex=this._firstEnabledIndex(this._flatFiltered())}_score(e,t){if(!t)return 1;let r=[e.label,e.description,e.group,e.id,...e.keywords??[]].map(wd),n=0;for(let s of r)if(s)if(s===t)n=Math.max(n,100);else if(s.startsWith(t))n=Math.max(n,80);else if(s.includes(t))n=Math.max(n,50);else{let d=0,h=0;for(let p of t){let f=s.indexOf(p,d);if(f===-1)break;h+=1,d=f+1}h===t.length&&(n=Math.max(n,20+h))}return n}_filtered(){let e=wd(this._query),t=this.items.map((n,s)=>({item:n,index:s,score:this._score(n,e)})).filter(n=>!e||n.score>0).sort((n,s)=>e&&s.score-n.score||n.index-s.index),r=new Map;for(let{item:n}of t){let s=n.group||"Commands",d=r.get(s)??[];d.push(n),r.set(s,d)}return[...r.entries()].map(([n,s])=>({group:n,items:s}))}_flatFiltered(){return this._filtered().flatMap(e=>e.items)}_firstEnabledIndex(e){let t=e.findIndex(r=>!r.disabled);return t>=0?t:0}_moveActive(e){let t=this._flatFiltered();if(!t.length)return;let r=this._activeIndex;for(let n=0;n<t.length;n+=1)if(r=(r+e+t.length)%t.length,!t[r]?.disabled){this._activeIndex=r,requestAnimationFrame(()=>{this.renderRoot.querySelector(`[data-command-index="${r}"]`)?.scrollIntoView({block:"nearest"})});return}}_select(e){if(e.disabled)return;let t={item:e,id:e.id,value:e.value,query:this._query};this.dispatchEvent(new CustomEvent("select",{detail:t,bubbles:!0,composed:!0})),this.closeOnSelect&&this.close()}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_renderShortcut(e){let t=Lg(e);return t.length?qt.html`<span class="shortcut">${t.map(r=>qt.html`<kbd>${r==="mod"?"\u2318/Ctrl":r}</kbd>`)}</span>`:qt.nothing}_renderItem(e,t){let r=t===this._activeIndex,n=["item",r?"active":"",e.disabled?"disabled":"",e.danger?"danger":""].filter(Boolean).join(" ");return qt.html`
|
|
13315
13327
|
<button
|
|
13316
13328
|
class=${n}
|
|
13317
13329
|
type="button"
|
|
@@ -13592,7 +13604,7 @@
|
|
|
13592
13604
|
.panel { max-height: calc(100vh - 28px); }
|
|
13593
13605
|
.footer { display: none; }
|
|
13594
13606
|
}
|
|
13595
|
-
`],a([(0,Sr.property)({type:Boolean,reflect:!0})],lr.prototype,"open",2),a([(0,Sr.property)({attribute:!1})],lr.prototype,"items",2),a([(0,Sr.property)({reflect:!0})],lr.prototype,"size",2),a([(0,Sr.property)({reflect:!0})],lr.prototype,"backdrop",2),a([(0,Sr.property)()],lr.prototype,"placeholder",2),a([(0,Sr.property)({attribute:"empty-text"})],lr.prototype,"emptyText",2),a([(0,Sr.property)()],lr.prototype,"hotkey",2),a([(0,Sr.property)({type:Boolean,attribute:"close-on-select"})],lr.prototype,"closeOnSelect",2),a([(0,Sr.property)({type:Boolean,attribute:"close-on-outside-press"})],lr.prototype,"closeOnOutsidePress",2),a([(0,Sr.property)({type:Boolean,attribute:"show-footer"})],lr.prototype,"showFooter",2),a([(0,Sr.state)()],lr.prototype,"_query",2),a([(0,Sr.state)()],lr.prototype,"_activeIndex",2),a([(0,Sr.query)("input")],lr.prototype,"_inputEl",2),lr=a([(0,Sr.customElement)("lui-command-palette")],lr);var ko=require("lit"),yo=require("lit/decorators.js");var qg={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},Kg={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Nn(i){return i?qg[i]??null:null}function Pi(i){let o=Nn(i);return o?Kg[o]:""}function o1(i,o=!1){let e=Nn(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function Wg(i,o=!1){let e=o1(i,o);return e?`var(${e})`:""}var Ug=Object.freeze(["info","success","warning","danger"]);var $r=class extends ko.LitElement{constructor(){super(...arguments);this.status="info";this.variant="soft";this.radius="md";this.title="";this.description="";this.icon="";this.noIcon=!1;this.closable=!1;this._hasActions=!1;this._onActionsSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);this._hasActions!==r&&(this._hasActions=r)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=
|
|
13607
|
+
`],a([(0,Sr.property)({type:Boolean,reflect:!0})],lr.prototype,"open",2),a([(0,Sr.property)({attribute:!1})],lr.prototype,"items",2),a([(0,Sr.property)({reflect:!0})],lr.prototype,"size",2),a([(0,Sr.property)({reflect:!0})],lr.prototype,"backdrop",2),a([(0,Sr.property)()],lr.prototype,"placeholder",2),a([(0,Sr.property)({attribute:"empty-text"})],lr.prototype,"emptyText",2),a([(0,Sr.property)()],lr.prototype,"hotkey",2),a([(0,Sr.property)({type:Boolean,attribute:"close-on-select"})],lr.prototype,"closeOnSelect",2),a([(0,Sr.property)({type:Boolean,attribute:"close-on-outside-press"})],lr.prototype,"closeOnOutsidePress",2),a([(0,Sr.property)({type:Boolean,attribute:"show-footer"})],lr.prototype,"showFooter",2),a([(0,Sr.state)()],lr.prototype,"_query",2),a([(0,Sr.state)()],lr.prototype,"_activeIndex",2),a([(0,Sr.query)("input")],lr.prototype,"_inputEl",2),lr=a([(0,Sr.customElement)("lui-command-palette")],lr);var ko=require("lit"),yo=require("lit/decorators.js");var qg={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},Kg={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Nn(i){return i?qg[i]??null:null}function Pi(i){let o=Nn(i);return o?Kg[o]:""}function o1(i,o=!1){let e=Nn(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function Wg(i,o=!1){let e=o1(i,o);return e?`var(${e})`:""}var Ug=Object.freeze(["info","success","warning","danger"]);var $r=class extends ko.LitElement{constructor(){super(...arguments);this.status="info";this.variant="soft";this.radius="md";this.title="";this.description="";this.icon="";this.noIcon=!1;this.closable=!1;this._hasActions=!1;this._onActionsSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);this._hasActions!==r&&(this._hasActions=r)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}close(){let e=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e)&&(this.hidden=!0)}render(){let e=L(this,"alert"),t=Nn(this.status)??"info",r=e.variant??this.variant,n=this.icon||Pi(t),s=!this.noIcon&&n!=="";return ko.html`
|
|
13596
13608
|
<div
|
|
13597
13609
|
class="alert"
|
|
13598
13610
|
part="base"
|
|
@@ -13720,7 +13732,7 @@
|
|
|
13720
13732
|
--lui-color-fg: #fff;
|
|
13721
13733
|
--lui-color-bg-hover: color-mix(in srgb, #fff 18%, transparent);
|
|
13722
13734
|
}
|
|
13723
|
-
`],a([(0,yo.property)({reflect:!0})],$r.prototype,"status",2),a([(0,yo.property)({reflect:!0})],$r.prototype,"variant",2),a([(0,yo.property)({reflect:!0})],$r.prototype,"radius",2),a([(0,yo.property)()],$r.prototype,"title",2),a([(0,yo.property)()],$r.prototype,"description",2),a([(0,yo.property)()],$r.prototype,"icon",2),a([(0,yo.property)({type:Boolean,attribute:"no-icon",reflect:!0})],$r.prototype,"noIcon",2),a([(0,yo.property)({type:Boolean,reflect:!0})],$r.prototype,"closable",2),a([(0,yo.property)({reflect:!0})],$r.prototype,"locale",2),a([(0,yo.property)({attribute:!1})],$r.prototype,"translations",2),a([(0,yo.state)()],$r.prototype,"_hasActions",2),$r=a([(0,yo.customElement)("lui-alert")],$r);var Uo=require("lit"),jt=require("lit/decorators.js");var bt=class extends Uo.LitElement{constructor(){super(...arguments);this.title="";this.description="";this.status="warning";this.icon="";this.noIcon=!1;this.placement="top";this.confirmText="";this.cancelText="";this.disabled=!1;this.portal=!0;this.offsetDistance=8;this._loading=!1;this._onCancel=()=>{this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0})),this.hide()};this._onConfirmClick=async()=>{if(this._loading)return;let e=new CustomEvent("confirm",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(e)){if(!this.onConfirm){this.hide();return}this._loading=!0;try{await this.onConfirm(),this.hide()}catch(t){this.dispatchEvent(new CustomEvent("confirm-error",{bubbles:!0,composed:!0,detail:{error:t}}))}finally{this._loading=!1}}}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=
|
|
13735
|
+
`],a([(0,yo.property)({reflect:!0})],$r.prototype,"status",2),a([(0,yo.property)({reflect:!0})],$r.prototype,"variant",2),a([(0,yo.property)({reflect:!0})],$r.prototype,"radius",2),a([(0,yo.property)()],$r.prototype,"title",2),a([(0,yo.property)()],$r.prototype,"description",2),a([(0,yo.property)()],$r.prototype,"icon",2),a([(0,yo.property)({type:Boolean,attribute:"no-icon",reflect:!0})],$r.prototype,"noIcon",2),a([(0,yo.property)({type:Boolean,reflect:!0})],$r.prototype,"closable",2),a([(0,yo.property)({reflect:!0})],$r.prototype,"locale",2),a([(0,yo.property)({attribute:!1})],$r.prototype,"translations",2),a([(0,yo.state)()],$r.prototype,"_hasActions",2),$r=a([(0,yo.customElement)("lui-alert")],$r);var Uo=require("lit"),jt=require("lit/decorators.js");var bt=class extends Uo.LitElement{constructor(){super(...arguments);this.title="";this.description="";this.status="warning";this.icon="";this.noIcon=!1;this.placement="top";this.confirmText="";this.cancelText="";this.disabled=!1;this.portal=!0;this.offsetDistance=8;this._loading=!1;this._onCancel=()=>{this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0})),this.hide()};this._onConfirmClick=async()=>{if(this._loading)return;let e=new CustomEvent("confirm",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(e)){if(!this.onConfirm){this.hide();return}this._loading=!0;try{await this.onConfirm(),this.hide()}catch(t){this.dispatchEvent(new CustomEvent("confirm-error",{bubbles:!0,composed:!0,detail:{error:t}}))}finally{this._loading=!1}}}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}show(){this._popover?.show()}hide(){this._popover?.hide()}render(){let e=L(this,"popconfirm"),t=Nn(this.status)??"warning",r=this.icon||Pi(t),n=!this.noIcon&&r!=="",s=this.confirmVariant??e.confirmVariant??(t==="danger"?"danger":"primary"),d=this.cancelVariant??e.cancelVariant??"ghost";return Uo.html`
|
|
13724
13736
|
<lui-popover
|
|
13725
13737
|
trigger="click"
|
|
13726
13738
|
.placement=${this.placement}
|
|
@@ -14050,7 +14062,7 @@
|
|
|
14050
14062
|
inset-inline-start: 100%;
|
|
14051
14063
|
}
|
|
14052
14064
|
}
|
|
14053
|
-
`],a([(0,Nr.property)({reflect:!0})],Qt.prototype,"type",2),a([(0,Nr.property)({type:Number})],Qt.prototype,"percent",2),a([(0,Nr.property)({reflect:!0})],Qt.prototype,"status",2),a([(0,Nr.property)({reflect:!0})],Qt.prototype,"size",2),a([(0,Nr.property)({reflect:!0})],Qt.prototype,"radius",2),a([(0,Nr.property)({type:Number,attribute:"stroke-width"})],Qt.prototype,"strokeWidth",2),a([(0,Nr.property)({attribute:"show-text",converter:Gg})],Qt.prototype,"showText",2),a([(0,Nr.property)({type:Boolean,reflect:!0,attribute:"text-inside"})],Qt.prototype,"textInside",2),a([(0,Nr.property)({type:Boolean,reflect:!0})],Qt.prototype,"striped",2),a([(0,Nr.property)({type:Boolean,reflect:!0})],Qt.prototype,"indeterminate",2),a([(0,Nr.property)({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),a([(0,Nr.property)()],Qt.prototype,"label",2),a([(0,Nr.property)({attribute:!1})],Qt.prototype,"format",2),a([(0,Nr.property)({type:Boolean,attribute:"pause-when-hidden"})],Qt.prototype,"pauseWhenHidden",2),Qt=a([(0,Nr.customElement)("lui-progress")],Qt);var Lr=require("lit"),Mt=require("lit/decorators.js");var ht=class extends Lr.LitElement{constructor(){super(...arguments);this.nodes=[];this.value=[];this.size="md";this.placeholder="";this.separator=" / ";this.expandTrigger="click";this.changeOnSelect=!1;this.disabled=!1;this.clearable=!1;this.invalid=!1;this.portal=!0;this.open=!1;this._activePath=[];this._loadingKey="";this._loaded={};this._onTriggerClick=()=>{this._setOpen(!this.open)};this._onTriggerKeyDown=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),this._setOpen(!this.open);return}if(e.key==="ArrowDown"&&!this.open){e.preventDefault(),this._setOpen(!0);return}e.key==="Escape"&&this.open&&(e.stopPropagation(),this._setOpen(!1))};this._clear=e=>{e.stopPropagation(),this._activePath=[],this._commit([])}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate()),this._activePath=[...this.value]}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}willUpdate(e){e.has("value")&&(this._activePath=[...this.value])}_t(e,t){let r=
|
|
14065
|
+
`],a([(0,Nr.property)({reflect:!0})],Qt.prototype,"type",2),a([(0,Nr.property)({type:Number})],Qt.prototype,"percent",2),a([(0,Nr.property)({reflect:!0})],Qt.prototype,"status",2),a([(0,Nr.property)({reflect:!0})],Qt.prototype,"size",2),a([(0,Nr.property)({reflect:!0})],Qt.prototype,"radius",2),a([(0,Nr.property)({type:Number,attribute:"stroke-width"})],Qt.prototype,"strokeWidth",2),a([(0,Nr.property)({attribute:"show-text",converter:Gg})],Qt.prototype,"showText",2),a([(0,Nr.property)({type:Boolean,reflect:!0,attribute:"text-inside"})],Qt.prototype,"textInside",2),a([(0,Nr.property)({type:Boolean,reflect:!0})],Qt.prototype,"striped",2),a([(0,Nr.property)({type:Boolean,reflect:!0})],Qt.prototype,"indeterminate",2),a([(0,Nr.property)({type:Boolean,reflect:!0})],Qt.prototype,"disabled",2),a([(0,Nr.property)()],Qt.prototype,"label",2),a([(0,Nr.property)({attribute:!1})],Qt.prototype,"format",2),a([(0,Nr.property)({type:Boolean,attribute:"pause-when-hidden"})],Qt.prototype,"pauseWhenHidden",2),Qt=a([(0,Nr.customElement)("lui-progress")],Qt);var Lr=require("lit"),Mt=require("lit/decorators.js");var ht=class extends Lr.LitElement{constructor(){super(...arguments);this.nodes=[];this.value=[];this.size="md";this.placeholder="";this.separator=" / ";this.expandTrigger="click";this.changeOnSelect=!1;this.disabled=!1;this.clearable=!1;this.invalid=!1;this.portal=!0;this.open=!1;this._activePath=[];this._loadingKey="";this._loaded={};this._onTriggerClick=()=>{this._setOpen(!this.open)};this._onTriggerKeyDown=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),this._setOpen(!this.open);return}if(e.key==="ArrowDown"&&!this.open){e.preventDefault(),this._setOpen(!0);return}e.key==="Escape"&&this.open&&(e.stopPropagation(),this._setOpen(!1))};this._clear=e=>{e.stopPropagation(),this._activePath=[],this._commit([])}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate()),this._activePath=[...this.value]}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}willUpdate(e){e.has("value")&&(this._activePath=[...this.value])}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}_childrenOf(e,t){let r=e.children;return Array.isArray(r)&&r.length?r:this._loaded[t.join("\0")]??[]}_hasChildren(e,t){return this._childrenOf(e,t).length>0?!0:!!e.hasChildren&&!e.isLeaf}get _columns(){let e=[this.nodes],t=this.nodes;for(let r=0;r<this._activePath.length;r+=1){let n=this._activePath[r],s=t.find(h=>br(h)===n);if(!s)break;let d=this._childrenOf(s,this._activePath.slice(0,r+1));if(!d.length)break;e.push(d),t=d}return e}_nodesForPath(e){let t=[],r=this.nodes;for(let n of e){let s=r.find(d=>br(d)===n);if(!s)break;t.push(s),r=this._childrenOf(s,e.slice(0,t.length))}return t}get _displayLabel(){let e=this._nodesForPath(this.value);return e.length!==this.value.length||!e.length?"":e.map($i).join(this.separator)}_setOpen(e){this.disabled||this.open===e||(this.open=e,e?(this._activePath=[...this.value],this._popover?.show()):this._popover?.hide())}_commit(e){this.value=e;let t=this._nodesForPath(e);this.dispatchEvent(new CustomEvent("change",{detail:{value:e,nodes:t,label:t.map($i).join(this.separator)},bubbles:!0,composed:!0}))}async _openNode(e,t){this._activePath=t;let r=br(e);if(!(this._childrenOf(e,t).length>0||!this.childrenLoader||!this._hasChildren(e,t))){this._loadingKey=r;try{let s=await this.childrenLoader(e,t);this._loaded={...this._loaded,[t.join("\0")]:s}}finally{this._loadingKey=""}}}async _onOptionClick(e,t){if(e.disabled)return;let r=[...this._activePath.slice(0,t),br(e)];if(this._hasChildren(e,r)){await this._openNode(e,r),this.changeOnSelect&&this._commit(r);return}this._activePath=r,this._commit(r),this._setOpen(!1)}_onOptionEnter(e,t){if(this.expandTrigger!=="hover"||e.disabled)return;let r=[...this._activePath.slice(0,t),br(e)];this._hasChildren(e,r)?this._openNode(e,r):this._activePath=r}render(){let t=L(this,"cascader").size??this.size,r=this._displayLabel,n=r!=="",s=this.clearable&&n&&!this.disabled,d=this._columns;return Lr.html`
|
|
14054
14066
|
<lui-popover
|
|
14055
14067
|
trigger="manual"
|
|
14056
14068
|
placement="bottom-start"
|
|
@@ -14217,7 +14229,7 @@
|
|
|
14217
14229
|
font-size: var(--lui-font-size-sm);
|
|
14218
14230
|
text-align: center;
|
|
14219
14231
|
}
|
|
14220
|
-
`],a([(0,Mt.property)({attribute:!1})],ht.prototype,"nodes",2),a([(0,Mt.property)({attribute:!1})],ht.prototype,"value",2),a([(0,Mt.property)({reflect:!0})],ht.prototype,"size",2),a([(0,Mt.property)()],ht.prototype,"placeholder",2),a([(0,Mt.property)()],ht.prototype,"separator",2),a([(0,Mt.property)({reflect:!0,attribute:"expand-trigger"})],ht.prototype,"expandTrigger",2),a([(0,Mt.property)({type:Boolean,attribute:"change-on-select"})],ht.prototype,"changeOnSelect",2),a([(0,Mt.property)({type:Boolean,reflect:!0})],ht.prototype,"disabled",2),a([(0,Mt.property)({type:Boolean,reflect:!0})],ht.prototype,"clearable",2),a([(0,Mt.property)({type:Boolean,reflect:!0})],ht.prototype,"invalid",2),a([(0,Mt.property)({attribute:!1})],ht.prototype,"childrenLoader",2),a([(0,Mt.property)({type:Boolean})],ht.prototype,"portal",2),a([(0,Mt.property)({type:Boolean,reflect:!0,attribute:"open"})],ht.prototype,"open",2),a([(0,Mt.property)({reflect:!0})],ht.prototype,"locale",2),a([(0,Mt.property)({attribute:!1})],ht.prototype,"translations",2),a([(0,Mt.state)()],ht.prototype,"_activePath",2),a([(0,Mt.state)()],ht.prototype,"_loadingKey",2),a([(0,Mt.state)()],ht.prototype,"_loaded",2),a([(0,Mt.query)("lui-popover")],ht.prototype,"_popover",2),ht=a([(0,Mt.customElement)("lui-cascader")],ht);var ii=require("lit"),Ct=require("lit/decorators.js");var pt=class extends ii.LitElement{constructor(){super(...arguments);this.nodes=[];this.value="";this.mode="single";this.size="md";this.placeholder="";this.disabled=!1;this.clearable=!1;this.invalid=!1;this.filterable=!1;this.checkStrictly=!1;this.portal=!0;this.open=!1;this._keys=[];this._onTreeSelect=e=>{if(this.mode!=="single")return;e.stopPropagation();let t=e.detail;t?.key&&this._commit([t.key],!0)};this._onTreeCheck=e=>{if(this.mode!=="multiple")return;e.stopPropagation();let t=e.detail;this._commit(t?.checkedKeys??[],!0)};this._onTriggerClick=()=>{this._setOpen(!this.open)};this._onTriggerKeyDown=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),this._setOpen(!this.open);return}if(e.key==="ArrowDown"&&!this.open){e.preventDefault(),this._setOpen(!0);return}e.key==="Escape"&&this.open&&(e.stopPropagation(),this._setOpen(!1))};this._clear=e=>{e.stopPropagation(),this._commit([],!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate()),this._keys=this._keysFromValue()}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}willUpdate(e){if(e.has("value")||e.has("mode")){this._keys=this._keysFromValue();let t=this.mode==="multiple"?this._keys:this._keys[0]??"";Array.isArray(t)!==Array.isArray(this.value)&&(this.value=t)}}_keysFromValue(){return Array.isArray(this.value)?this.value.filter(Boolean):this.value?[this.value]:[]}_t(e,t){let r=
|
|
14232
|
+
`],a([(0,Mt.property)({attribute:!1})],ht.prototype,"nodes",2),a([(0,Mt.property)({attribute:!1})],ht.prototype,"value",2),a([(0,Mt.property)({reflect:!0})],ht.prototype,"size",2),a([(0,Mt.property)()],ht.prototype,"placeholder",2),a([(0,Mt.property)()],ht.prototype,"separator",2),a([(0,Mt.property)({reflect:!0,attribute:"expand-trigger"})],ht.prototype,"expandTrigger",2),a([(0,Mt.property)({type:Boolean,attribute:"change-on-select"})],ht.prototype,"changeOnSelect",2),a([(0,Mt.property)({type:Boolean,reflect:!0})],ht.prototype,"disabled",2),a([(0,Mt.property)({type:Boolean,reflect:!0})],ht.prototype,"clearable",2),a([(0,Mt.property)({type:Boolean,reflect:!0})],ht.prototype,"invalid",2),a([(0,Mt.property)({attribute:!1})],ht.prototype,"childrenLoader",2),a([(0,Mt.property)({type:Boolean})],ht.prototype,"portal",2),a([(0,Mt.property)({type:Boolean,reflect:!0,attribute:"open"})],ht.prototype,"open",2),a([(0,Mt.property)({reflect:!0})],ht.prototype,"locale",2),a([(0,Mt.property)({attribute:!1})],ht.prototype,"translations",2),a([(0,Mt.state)()],ht.prototype,"_activePath",2),a([(0,Mt.state)()],ht.prototype,"_loadingKey",2),a([(0,Mt.state)()],ht.prototype,"_loaded",2),a([(0,Mt.query)("lui-popover")],ht.prototype,"_popover",2),ht=a([(0,Mt.customElement)("lui-cascader")],ht);var ii=require("lit"),Ct=require("lit/decorators.js");var pt=class extends ii.LitElement{constructor(){super(...arguments);this.nodes=[];this.value="";this.mode="single";this.size="md";this.placeholder="";this.disabled=!1;this.clearable=!1;this.invalid=!1;this.filterable=!1;this.checkStrictly=!1;this.portal=!0;this.open=!1;this._keys=[];this._onTreeSelect=e=>{if(this.mode!=="single")return;e.stopPropagation();let t=e.detail;t?.key&&this._commit([t.key],!0)};this._onTreeCheck=e=>{if(this.mode!=="multiple")return;e.stopPropagation();let t=e.detail;this._commit(t?.checkedKeys??[],!0)};this._onTriggerClick=()=>{this._setOpen(!this.open)};this._onTriggerKeyDown=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),this._setOpen(!this.open);return}if(e.key==="ArrowDown"&&!this.open){e.preventDefault(),this._setOpen(!0);return}e.key==="Escape"&&this.open&&(e.stopPropagation(),this._setOpen(!1))};this._clear=e=>{e.stopPropagation(),this._commit([],!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate()),this._keys=this._keysFromValue()}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}willUpdate(e){if(e.has("value")||e.has("mode")){this._keys=this._keysFromValue();let t=this.mode==="multiple"?this._keys:this._keys[0]??"";Array.isArray(t)!==Array.isArray(this.value)&&(this.value=t)}}_keysFromValue(){return Array.isArray(this.value)?this.value.filter(Boolean):this.value?[this.value]:[]}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}_findNodes(e){if(!e.length)return[];let t=new Set(e),r=[],n=s=>{for(let d of s){t.has(br(d))&&r.push(d);let h=d.children;Array.isArray(h)&&h.length&&n(h)}};return n(this.nodes),r}get _selectedNodes(){return this._findNodes(this._keys)}_setOpen(e){this.disabled||this.open===e||(this.open=e,e?this._popover?.show():this._popover?.hide())}_shouldCloseAfterPick(){return this.closeOnSelect??this.mode==="single"}_commit(e,t){this._keys=e;let r=this._findNodes(e),n=this.mode==="multiple"?e:e[0]??"";this.value=n,this.dispatchEvent(new CustomEvent("change",{detail:{value:n,keys:e,nodes:r},bubbles:!0,composed:!0})),t&&this._shouldCloseAfterPick()&&this._setOpen(!1)}_removeKey(e,t){t.stopPropagation(),this._commit(this._keys.filter(r=>r!==e),!1)}render(){let t=L(this,"treeSelect").size??this.size,r=this._selectedNodes,n=r.length>0,s=this.clearable&&n&&!this.disabled;return ii.html`
|
|
14221
14233
|
<lui-popover
|
|
14222
14234
|
trigger="manual"
|
|
14223
14235
|
placement="bottom-start"
|
|
@@ -14366,7 +14378,7 @@
|
|
|
14366
14378
|
overscroll-behavior: contain;
|
|
14367
14379
|
scrollbar-width: thin;
|
|
14368
14380
|
}
|
|
14369
|
-
`],a([(0,Ct.property)({attribute:!1})],pt.prototype,"nodes",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"value",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"mode",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"size",2),a([(0,Ct.property)()],pt.prototype,"placeholder",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"disabled",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"clearable",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"invalid",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"filterable",2),a([(0,Ct.property)({type:Boolean,attribute:"check-strictly"})],pt.prototype,"checkStrictly",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"childrenLoader",2),a([(0,Ct.property)({type:Boolean,attribute:"close-on-select"})],pt.prototype,"closeOnSelect",2),a([(0,Ct.property)({type:Boolean})],pt.prototype,"portal",2),a([(0,Ct.property)({type:Boolean,reflect:!0,attribute:"open"})],pt.prototype,"open",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"locale",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"translations",2),a([(0,Ct.state)()],pt.prototype,"_keys",2),a([(0,Ct.query)("lui-popover")],pt.prototype,"_popover",2),a([(0,Ct.query)("lui-tree")],pt.prototype,"_tree",2),pt=a([(0,Ct.customElement)("lui-tree-select")],pt);var Vo=require("lit"),zt=require("lit/decorators.js");function Yg(i){return typeof i=="string"?{label:i,value:i}:i}var mt=class extends Vo.LitElement{constructor(){super(...arguments);this.options=[];this.value="";this.placeholder="";this.size="md";this.disabled=!1;this.readonly=!1;this.clearable=!1;this.invalid=!1;this.minChars=1;this.maxItems=0;this.portal=!0;this._matches=[];this._activeIndex=-1;this._open=!1;this._queryToken=0;this._onInput=async e=>{e.stopPropagation();let t=e.target.value??"";this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),await this._recompute(t),this._setOpen(this._shouldOpen(t)&&this._matches.length>0)};this._onFocus=async()=>{this.minChars>0&&!this.value||(await this._recompute(this.value),this._setOpen(this._shouldOpen(this.value)&&this._matches.length>0))};this._onKeyDown=e=>{if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(!this._open){this._onFocus();return}e.preventDefault();let t=this._matches.length;if(!t)return;let r=e.key==="ArrowDown"?1:-1,n=this._activeIndex;for(let s=0;s<t&&(n=(n+r+t)%t,!!this._matches[n]?.disabled);s+=1);this._activeIndex=n;return}if(e.key==="Enter"){let t=this._matches[this._activeIndex];this._open&&t&&(e.preventDefault(),this._commit(t));return}if(e.key==="Escape"){this._open&&(e.stopPropagation(),this._setOpen(!1));return}e.key==="Tab"&&this._setOpen(!1)};this._onClear=()=>{this.value="",this._matches=[],this._setOpen(!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=
|
|
14381
|
+
`],a([(0,Ct.property)({attribute:!1})],pt.prototype,"nodes",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"value",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"mode",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"size",2),a([(0,Ct.property)()],pt.prototype,"placeholder",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"disabled",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"clearable",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"invalid",2),a([(0,Ct.property)({type:Boolean,reflect:!0})],pt.prototype,"filterable",2),a([(0,Ct.property)({type:Boolean,attribute:"check-strictly"})],pt.prototype,"checkStrictly",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"childrenLoader",2),a([(0,Ct.property)({type:Boolean,attribute:"close-on-select"})],pt.prototype,"closeOnSelect",2),a([(0,Ct.property)({type:Boolean})],pt.prototype,"portal",2),a([(0,Ct.property)({type:Boolean,reflect:!0,attribute:"open"})],pt.prototype,"open",2),a([(0,Ct.property)({reflect:!0})],pt.prototype,"locale",2),a([(0,Ct.property)({attribute:!1})],pt.prototype,"translations",2),a([(0,Ct.state)()],pt.prototype,"_keys",2),a([(0,Ct.query)("lui-popover")],pt.prototype,"_popover",2),a([(0,Ct.query)("lui-tree")],pt.prototype,"_tree",2),pt=a([(0,Ct.customElement)("lui-tree-select")],pt);var Vo=require("lit"),zt=require("lit/decorators.js");function Yg(i){return typeof i=="string"?{label:i,value:i}:i}var mt=class extends Vo.LitElement{constructor(){super(...arguments);this.options=[];this.value="";this.placeholder="";this.size="md";this.disabled=!1;this.readonly=!1;this.clearable=!1;this.invalid=!1;this.minChars=1;this.maxItems=0;this.portal=!0;this._matches=[];this._activeIndex=-1;this._open=!1;this._queryToken=0;this._onInput=async e=>{e.stopPropagation();let t=e.target.value??"";this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),await this._recompute(t),this._setOpen(this._shouldOpen(t)&&this._matches.length>0)};this._onFocus=async()=>{this.minChars>0&&!this.value||(await this._recompute(this.value),this._setOpen(this._shouldOpen(this.value)&&this._matches.length>0))};this._onKeyDown=e=>{if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(!this._open){this._onFocus();return}e.preventDefault();let t=this._matches.length;if(!t)return;let r=e.key==="ArrowDown"?1:-1,n=this._activeIndex;for(let s=0;s<t&&(n=(n+r+t)%t,!!this._matches[n]?.disabled);s+=1);this._activeIndex=n;return}if(e.key==="Enter"){let t=this._matches[this._activeIndex];this._open&&t&&(e.preventDefault(),this._commit(t));return}if(e.key==="Escape"){this._open&&(e.stopPropagation(),this._setOpen(!1));return}e.key==="Tab"&&this._setOpen(!1)};this._onClear=()=>{this.value="",this._matches=[],this._setOpen(!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _pool(){return this.options.map(Yg)}_defaultFilter(e,t){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.label.toLowerCase().includes(r))}async _recompute(e){let t=++this._queryToken,r=this._pool,n=this.filter?await this.filter(e,r):this._defaultFilter(e,r);if(t!==this._queryToken)return;let s=this.maxItems>0?n.slice(0,this.maxItems):n;this._matches=s,this._activeIndex=s.length?0:-1}_shouldOpen(e){return this.disabled||this.readonly?!1:e.length>=this.minChars}_setOpen(e){this._open!==e&&(this._open=e,e?this._popover?.show():this._popover?.hide())}_commit(e){e.disabled||(this.value=e.value,this._setOpen(!1),this.dispatchEvent(new CustomEvent("select",{detail:{value:e.value,option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0})))}_renderLabel(e){let t=this.value.trim();if(!t)return e;let r=e.toLowerCase().indexOf(t.toLowerCase());return r<0?e:Vo.html`${e.slice(0,r)}<span class="match"
|
|
14370
14382
|
>${e.slice(r,r+t.length)}</span
|
|
14371
14383
|
>${e.slice(r+t.length)}`}render(){let t=L(this,"autocomplete").size??this.size;return Vo.html`
|
|
14372
14384
|
<lui-popover
|
|
@@ -14577,7 +14589,7 @@
|
|
|
14577
14589
|
user-select: none;
|
|
14578
14590
|
pointer-events: none;
|
|
14579
14591
|
}
|
|
14580
|
-
`],a([(0,Do.property)({reflect:!0})],ro.prototype,"orientation",2),a([(0,Do.property)({type:Number})],ro.prototype,"percent",2),a([(0,Do.property)({attribute:"min-first"})],ro.prototype,"minFirst",2),a([(0,Do.property)({attribute:"min-second"})],ro.prototype,"minSecond",2),a([(0,Do.property)({type:Boolean,reflect:!0})],ro.prototype,"disabled",2),a([(0,Do.property)({type:Boolean,attribute:"no-grip",reflect:!0})],ro.prototype,"noGrip",2),a([(0,Do.state)()],ro.prototype,"_dragging",2),a([(0,Do.query)('[part="gutter"]')],ro.prototype,"_gutter",2),a([(0,Do.query)(".root")],ro.prototype,"_root",2),ro=a([(0,Do.customElement)("lui-splitter")],ro);var xo=require("lit"),oo=require("lit/decorators.js");var i1=["L","M","Q","H"],n1=[[[7,1,19,0,0],[10,1,16,0,0],[13,1,13,0,0],[17,1,9,0,0]],[[10,1,34,0,0],[16,1,28,0,0],[22,1,22,0,0],[28,1,16,0,0]],[[15,1,55,0,0],[26,1,44,0,0],[18,2,17,0,0],[22,2,13,0,0]],[[20,1,80,0,0],[18,2,32,0,0],[26,2,24,0,0],[16,4,9,0,0]],[[26,1,108,0,0],[24,2,43,0,0],[18,2,15,2,16],[22,2,11,2,12]],[[18,2,68,0,0],[16,4,27,0,0],[24,4,19,0,0],[28,4,15,0,0]],[[20,2,78,0,0],[18,4,31,0,0],[18,2,14,4,15],[26,4,13,1,14]],[[24,2,97,0,0],[22,2,38,2,39],[22,4,18,2,19],[26,4,14,2,15]],[[30,2,116,0,0],[22,3,36,2,37],[20,4,16,4,17],[24,4,12,4,13]],[[18,2,68,2,69],[26,4,43,1,44],[24,6,19,2,20],[28,6,15,2,16]],[[20,4,81,0,0],[30,1,50,4,51],[28,4,22,4,23],[24,3,12,8,13]],[[24,2,92,2,93],[22,6,36,2,37],[26,4,20,6,21],[28,7,14,4,15]],[[26,4,107,0,0],[22,8,37,1,38],[24,8,20,4,21],[22,12,11,4,12]],[[30,3,115,1,116],[24,4,40,5,41],[20,11,16,5,17],[24,11,12,5,13]],[[22,5,87,1,88],[24,5,41,5,42],[30,5,24,7,25],[24,11,12,7,13]],[[24,5,98,1,99],[28,7,45,3,46],[24,15,19,2,20],[30,3,15,13,16]],[[28,1,107,5,108],[28,10,46,1,47],[28,1,22,15,23],[28,2,14,17,15]],[[30,5,120,1,121],[26,9,43,4,44],[28,17,22,1,23],[28,2,14,19,15]],[[28,3,113,4,114],[26,3,44,11,45],[26,17,21,4,22],[26,9,13,16,14]],[[28,3,107,5,108],[26,3,41,13,42],[30,15,24,5,25],[28,15,15,10,16]],[[28,4,116,4,117],[26,17,42,0,0],[28,17,22,6,23],[30,19,16,6,17]],[[28,2,111,7,112],[28,17,46,0,0],[30,7,24,16,25],[24,34,13,0,0]],[[30,4,121,5,122],[28,4,47,14,48],[30,11,24,14,25],[30,16,15,14,16]],[[30,6,117,4,118],[28,6,45,14,46],[30,11,24,16,25],[30,30,16,2,17]],[[26,8,106,4,107],[28,8,47,13,48],[30,7,24,22,25],[30,22,15,13,16]],[[28,10,114,2,115],[28,19,46,4,47],[28,28,22,6,23],[30,33,16,4,17]],[[30,8,122,4,123],[28,22,45,3,46],[30,8,23,26,24],[30,12,15,28,16]],[[30,3,117,10,118],[28,3,45,23,46],[30,4,24,31,25],[30,11,15,31,16]],[[30,7,116,7,117],[28,21,45,7,46],[30,1,23,37,24],[30,19,15,26,16]],[[30,5,115,10,116],[28,19,47,10,48],[30,15,24,25,25],[30,23,15,25,16]],[[30,13,115,3,116],[28,2,46,29,47],[30,42,24,1,25],[30,23,15,28,16]],[[30,17,115,0,0],[28,10,46,23,47],[30,10,24,35,25],[30,19,15,35,16]],[[30,17,115,1,116],[28,14,46,21,47],[30,29,24,19,25],[30,11,15,46,16]],[[30,13,115,6,116],[28,14,46,23,47],[30,44,24,7,25],[30,59,16,1,17]],[[30,12,121,7,122],[28,12,47,26,48],[30,39,24,14,25],[30,22,15,41,16]],[[30,6,121,14,122],[28,6,47,34,48],[30,46,24,10,25],[30,2,15,64,16]],[[30,17,122,4,123],[28,29,46,14,47],[30,49,24,10,25],[30,24,15,46,16]],[[30,4,122,18,123],[28,13,46,32,47],[30,48,24,14,25],[30,42,15,32,16]],[[30,20,117,4,118],[28,40,47,7,48],[30,43,24,22,25],[30,10,15,67,16]],[[30,19,118,6,119],[28,18,47,31,48],[30,34,24,34,25],[30,20,15,61,16]]],Xg=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Zg=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],Qg=21522,Jg={L:1,M:0,Q:3,H:2},ys=new Uint8Array(512),Cd=new Uint8Array(256);{let i=1;for(let o=0;o<255;o+=1)ys[o]=i,Cd[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o+=1)ys[o]=ys[o-255]}function a1(i,o){return i===0||o===0?0:ys[Cd[i]+Cd[o]]}function ef(i){let o=new Uint8Array([1]);for(let e=0;e<i;e+=1){let t=new Uint8Array(o.length+1);for(let r=0;r<o.length;r+=1)t[r]^=o[r],t[r+1]^=a1(o[r],ys[e]);o=t}return o}function tf(i,o){let e=ef(o),t=new Uint8Array(o);for(let r of i){let n=r^t[0];t.copyWithin(0,1),t[o-1]=0;for(let s=0;s<o;s+=1)t[s]^=a1(e[s+1],n)}return t}var zd=class{constructor(){this._bits=[]}get length(){return this._bits.length}push(o,e){for(let t=e-1;t>=0;t-=1)this._bits.push(o>>>t&1)}toBytes(){let o=new Uint8Array(Math.ceil(this._bits.length/8));return this._bits.forEach((e,t)=>{e&&(o[t>>>3]|=128>>>(t&7))}),o}};function Ed(i,o){let[,e,t,r,n]=n1[i-1][i1.indexOf(o)];return e*t+r*n}function Sd(i){return i<10?8:16}function rf(i,o){for(let e=1;e<=40;e+=1)if(4+Sd(e)+i*8<=Ed(e,o)*8)return e;throw new Error(`qrcode: ${i} bytes exceeds the capacity of a version 40 symbol at error correction level ${o}`)}function of(i,o,e){let t=Ed(o,e)*8,r=new zd;r.push(4,4),r.push(i.length,Sd(o));for(let z of i)r.push(z,8);r.push(0,Math.min(4,t-r.length)),r.length%8!==0&&r.push(0,8-r.length%8);let n=Array.from(r.toBytes());for(let z=0;n.length<t/8;z+=1)n.push(z%2===0?236:17);let[s,d,h,p,f]=n1[o-1][i1.indexOf(e)],x=[],k=0;for(let[z,T]of[[d,h],[p,f]])for(let P=0;P<z;P+=1){let H=new Uint8Array(n.slice(k,k+T));k+=T,x.push({data:H,ec:tf(H,s)})}let C=[],S=Math.max(...x.map(z=>z.data.length));for(let z=0;z<S;z+=1)for(let T of x)z<T.data.length&&C.push(T.data[z]);for(let z=0;z<s;z+=1)for(let T of x)C.push(T.ec[z]);return new Uint8Array(C)}function nf(i){let o=i*4+17;return{size:o,modules:Array.from({length:o},()=>Array(o).fill(null)),reserved:Array.from({length:o},()=>Array(o).fill(!1))}}function Ci(i,o,e,t){i.modules[e][o]=t,i.reserved[e][o]=!0}function Md(i,o,e){for(let t=-1;t<=7;t+=1)for(let r=-1;r<=7;r+=1){let n=o+r,s=e+t;if(n<0||s<0||n>=i.size||s>=i.size)continue;let d=r>=0&&r<=6&&t>=0&&t<=6,h=Math.max(Math.abs(r-3),Math.abs(t-3));Ci(i,n,s,d&&h!==2)}}function af(i,o){Md(i,0,0),Md(i,i.size-7,0),Md(i,0,i.size-7);for(let t=8;t<i.size-8;t+=1){let r=t%2===0;Ci(i,t,6,r),Ci(i,6,t,r)}let e=Xg[o-1];for(let t of e)for(let r of e)if(!(r===6&&t===6||r===6&&t===i.size-7||r===i.size-7&&t===6))for(let s=-2;s<=2;s+=1)for(let d=-2;d<=2;d+=1){let h=Math.max(Math.abs(d),Math.abs(s));Ci(i,r+d,t+s,h!==1)}for(let t=0;t<9;t+=1)t!==6&&(Ci(i,t,8,!1),Ci(i,8,t,!1));for(let t=0;t<8;t+=1)Ci(i,i.size-1-t,8,!1);for(let t=0;t<7;t+=1)Ci(i,8,i.size-1-t,!1);if(Ci(i,8,i.size-8,!0),o>=7){let t=Zg[o-7];for(let r=0;r<18;r+=1){let n=(t>>>r&1)===1,s=Math.floor(r/3),d=r%3+i.size-11;Ci(i,s,d,n),Ci(i,d,s,n)}}}function sf(i,o){let e=0,t=!0;for(let r=i.size-1;r>=1;r-=2){let n=r===6?5:r;for(let s=0;s<i.size;s+=1){let d=t?i.size-1-s:s;for(let h of[n,n-1]){if(i.reserved[d][h])continue;let p=o[e>>>3]??0;i.modules[d][h]=(p>>>7-(e&7)&1)===1,e+=1}}t=!t}}function lf(i,o,e){switch(i){case 0:return(o+e)%2===0;case 1:return e%2===0;case 2:return o%3===0;case 3:return(o+e)%3===0;case 4:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case 5:return o*e%2+o*e%3===0;case 6:return(o*e%2+o*e%3)%2===0;default:return((o+e)%2+o*e%3)%2===0}}function cf(i,o,e){let t=Jg[o]<<3|e,r=t;for(let s=0;s<10;s+=1)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^Qg;for(let s=0;s<=5;s+=1)i.modules[8][s]=(n>>>s&1)===1;i.modules[8][7]=(n>>>6&1)===1,i.modules[8][8]=(n>>>7&1)===1,i.modules[7][8]=(n>>>8&1)===1;for(let s=9;s<15;s+=1)i.modules[14-s][8]=(n>>>s&1)===1;for(let s=0;s<7;s+=1)i.modules[i.size-1-s][8]=(n>>>s&1)===1;for(let s=8;s<15;s+=1)i.modules[8][i.size-15+s]=(n>>>s&1)===1}function df(i){let o=i.length,e=0,t=h=>{let p=0,f=1;for(let x=1;x<o;x+=1)h[x]===h[x-1]?(f+=1,f===5?p+=3:f>5&&(p+=1)):f=1;return p};for(let h=0;h<o;h+=1)e+=t(i[h]),e+=t(i.map(p=>p[h]));for(let h=0;h<o-1;h+=1)for(let p=0;p<o-1;p+=1){let f=i[h][p];f===i[h][p+1]&&f===i[h+1][p]&&f===i[h+1][p+1]&&(e+=3)}let r=[!0,!1,!0,!0,!0,!1,!0],n=(h,p)=>r.every((f,x)=>h[p+x]===f);for(let h=0;h<o;h+=1){let p=i[h],f=i.map(x=>x[h]);for(let x=0;x+7<=o;x+=1)n(p,x)&&(e+=40),n(f,x)&&(e+=40)}let d=i.flat().filter(Boolean).length*100/(o*o);return e+=Math.floor(Math.abs(d-50)/5)*10,e}function zl(i,o={}){let e=o.errorCorrection??"M",t=new TextEncoder().encode(i),r=o.version??rf(t.length,e);if(r<1||r>40||!Number.isInteger(r))throw new Error(`qrcode: version must be an integer from 1 to 40, received ${r}`);if(4+Sd(r)+t.length*8>Ed(r,e)*8)throw new Error(`qrcode: ${t.length} bytes does not fit a version ${r} symbol at error correction level ${e}`);let s=of(t,r,e),d=nf(r);af(d,r),sf(d,s);let h=null;for(let p=0;p<8;p+=1){let f=d.modules.map((S,z)=>S.map((T,P)=>d.reserved[z][P]?!!T:!!T!==lf(p,P,z))),x={...d,modules:f};cf(x,e,p);let k=x.modules.map(S=>S.map(Boolean)),C=df(k);(!h||C<h.score)&&(h={matrix:k,score:C})}return{matrix:h.matrix,size:d.size,version:r,errorCorrection:e}}var pr=class extends xo.LitElement{constructor(){super(...arguments);this.value="";this.errorCorrection="M";this.margin=4;this.logo="";this.logoRatio=.2;this._error=""}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _effectiveErrorCorrection(){if(!this.logo)return this.errorCorrection;let e=this._cappedLogoRatio>.22?"H":"Q",t=["L","M","Q","H"];return t.indexOf(this.errorCorrection)>=t.indexOf(e)?this.errorCorrection:e}get _cappedLogoRatio(){return Math.min(Math.max(this.logoRatio,0),.3)}get _cssSize(){return this.size===void 0||this.size===""?"":Ot(this.size)}toDataUrl(){let e=this._svgMarkup();return e?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:""}_svgMarkup(){try{let{matrix:e,size:t}=zl(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version}),r=Math.max(0,Math.floor(this.margin)),n=t+r*2,s=this.color||"currentColor",d=this.background||"transparent",h="";return e.forEach((p,f)=>{p.forEach((x,k)=>{x&&(h+=`M${k+r} ${f+r}h1v1h-1z`)})}),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}"`,' shape-rendering="crispEdges">',`<rect width="${n}" height="${n}" fill="${d}"/>`,`<path d="${h}" fill="${s}"/>`,"</svg>"].join("")}catch{return""}}render(){let e=L(this,"qrcode"),t=Math.max(0,Math.floor(this.margin)),r=this._cssSize||e.size||"",n=null,s="";if(!this.value)s=this._t("qrcode.empty","\u65E0\u5185\u5BB9");else try{n=zl(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version})}catch(p){s=p instanceof Error?p.message:String(p)}s!==this._error&&(this._error=s,s&&this.value&&this.dispatchEvent(new CustomEvent("error",{detail:{message:s},bubbles:!0,composed:!0})));let d=[r?`--lui-qrcode-size:${r}`:"",this.background?`--lui-qrcode-bg:${this.background}`:"",this.color?`--lui-qrcode-fg:${this.color}`:"",this.logo?`--lui-qrcode-logo-size:${this._cappedLogoRatio*100}%`:""].filter(Boolean).join(";");if(!n)return xo.html`
|
|
14592
|
+
`],a([(0,Do.property)({reflect:!0})],ro.prototype,"orientation",2),a([(0,Do.property)({type:Number})],ro.prototype,"percent",2),a([(0,Do.property)({attribute:"min-first"})],ro.prototype,"minFirst",2),a([(0,Do.property)({attribute:"min-second"})],ro.prototype,"minSecond",2),a([(0,Do.property)({type:Boolean,reflect:!0})],ro.prototype,"disabled",2),a([(0,Do.property)({type:Boolean,attribute:"no-grip",reflect:!0})],ro.prototype,"noGrip",2),a([(0,Do.state)()],ro.prototype,"_dragging",2),a([(0,Do.query)('[part="gutter"]')],ro.prototype,"_gutter",2),a([(0,Do.query)(".root")],ro.prototype,"_root",2),ro=a([(0,Do.customElement)("lui-splitter")],ro);var xo=require("lit"),oo=require("lit/decorators.js");var i1=["L","M","Q","H"],n1=[[[7,1,19,0,0],[10,1,16,0,0],[13,1,13,0,0],[17,1,9,0,0]],[[10,1,34,0,0],[16,1,28,0,0],[22,1,22,0,0],[28,1,16,0,0]],[[15,1,55,0,0],[26,1,44,0,0],[18,2,17,0,0],[22,2,13,0,0]],[[20,1,80,0,0],[18,2,32,0,0],[26,2,24,0,0],[16,4,9,0,0]],[[26,1,108,0,0],[24,2,43,0,0],[18,2,15,2,16],[22,2,11,2,12]],[[18,2,68,0,0],[16,4,27,0,0],[24,4,19,0,0],[28,4,15,0,0]],[[20,2,78,0,0],[18,4,31,0,0],[18,2,14,4,15],[26,4,13,1,14]],[[24,2,97,0,0],[22,2,38,2,39],[22,4,18,2,19],[26,4,14,2,15]],[[30,2,116,0,0],[22,3,36,2,37],[20,4,16,4,17],[24,4,12,4,13]],[[18,2,68,2,69],[26,4,43,1,44],[24,6,19,2,20],[28,6,15,2,16]],[[20,4,81,0,0],[30,1,50,4,51],[28,4,22,4,23],[24,3,12,8,13]],[[24,2,92,2,93],[22,6,36,2,37],[26,4,20,6,21],[28,7,14,4,15]],[[26,4,107,0,0],[22,8,37,1,38],[24,8,20,4,21],[22,12,11,4,12]],[[30,3,115,1,116],[24,4,40,5,41],[20,11,16,5,17],[24,11,12,5,13]],[[22,5,87,1,88],[24,5,41,5,42],[30,5,24,7,25],[24,11,12,7,13]],[[24,5,98,1,99],[28,7,45,3,46],[24,15,19,2,20],[30,3,15,13,16]],[[28,1,107,5,108],[28,10,46,1,47],[28,1,22,15,23],[28,2,14,17,15]],[[30,5,120,1,121],[26,9,43,4,44],[28,17,22,1,23],[28,2,14,19,15]],[[28,3,113,4,114],[26,3,44,11,45],[26,17,21,4,22],[26,9,13,16,14]],[[28,3,107,5,108],[26,3,41,13,42],[30,15,24,5,25],[28,15,15,10,16]],[[28,4,116,4,117],[26,17,42,0,0],[28,17,22,6,23],[30,19,16,6,17]],[[28,2,111,7,112],[28,17,46,0,0],[30,7,24,16,25],[24,34,13,0,0]],[[30,4,121,5,122],[28,4,47,14,48],[30,11,24,14,25],[30,16,15,14,16]],[[30,6,117,4,118],[28,6,45,14,46],[30,11,24,16,25],[30,30,16,2,17]],[[26,8,106,4,107],[28,8,47,13,48],[30,7,24,22,25],[30,22,15,13,16]],[[28,10,114,2,115],[28,19,46,4,47],[28,28,22,6,23],[30,33,16,4,17]],[[30,8,122,4,123],[28,22,45,3,46],[30,8,23,26,24],[30,12,15,28,16]],[[30,3,117,10,118],[28,3,45,23,46],[30,4,24,31,25],[30,11,15,31,16]],[[30,7,116,7,117],[28,21,45,7,46],[30,1,23,37,24],[30,19,15,26,16]],[[30,5,115,10,116],[28,19,47,10,48],[30,15,24,25,25],[30,23,15,25,16]],[[30,13,115,3,116],[28,2,46,29,47],[30,42,24,1,25],[30,23,15,28,16]],[[30,17,115,0,0],[28,10,46,23,47],[30,10,24,35,25],[30,19,15,35,16]],[[30,17,115,1,116],[28,14,46,21,47],[30,29,24,19,25],[30,11,15,46,16]],[[30,13,115,6,116],[28,14,46,23,47],[30,44,24,7,25],[30,59,16,1,17]],[[30,12,121,7,122],[28,12,47,26,48],[30,39,24,14,25],[30,22,15,41,16]],[[30,6,121,14,122],[28,6,47,34,48],[30,46,24,10,25],[30,2,15,64,16]],[[30,17,122,4,123],[28,29,46,14,47],[30,49,24,10,25],[30,24,15,46,16]],[[30,4,122,18,123],[28,13,46,32,47],[30,48,24,14,25],[30,42,15,32,16]],[[30,20,117,4,118],[28,40,47,7,48],[30,43,24,22,25],[30,10,15,67,16]],[[30,19,118,6,119],[28,18,47,31,48],[30,34,24,34,25],[30,20,15,61,16]]],Xg=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],Zg=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],Qg=21522,Jg={L:1,M:0,Q:3,H:2},ys=new Uint8Array(512),Cd=new Uint8Array(256);{let i=1;for(let o=0;o<255;o+=1)ys[o]=i,Cd[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o+=1)ys[o]=ys[o-255]}function a1(i,o){return i===0||o===0?0:ys[Cd[i]+Cd[o]]}function ef(i){let o=new Uint8Array([1]);for(let e=0;e<i;e+=1){let t=new Uint8Array(o.length+1);for(let r=0;r<o.length;r+=1)t[r]^=o[r],t[r+1]^=a1(o[r],ys[e]);o=t}return o}function tf(i,o){let e=ef(o),t=new Uint8Array(o);for(let r of i){let n=r^t[0];t.copyWithin(0,1),t[o-1]=0;for(let s=0;s<o;s+=1)t[s]^=a1(e[s+1],n)}return t}var zd=class{constructor(){this._bits=[]}get length(){return this._bits.length}push(o,e){for(let t=e-1;t>=0;t-=1)this._bits.push(o>>>t&1)}toBytes(){let o=new Uint8Array(Math.ceil(this._bits.length/8));return this._bits.forEach((e,t)=>{e&&(o[t>>>3]|=128>>>(t&7))}),o}};function Ed(i,o){let[,e,t,r,n]=n1[i-1][i1.indexOf(o)];return e*t+r*n}function Sd(i){return i<10?8:16}function rf(i,o){for(let e=1;e<=40;e+=1)if(4+Sd(e)+i*8<=Ed(e,o)*8)return e;throw new Error(`qrcode: ${i} bytes exceeds the capacity of a version 40 symbol at error correction level ${o}`)}function of(i,o,e){let t=Ed(o,e)*8,r=new zd;r.push(4,4),r.push(i.length,Sd(o));for(let z of i)r.push(z,8);r.push(0,Math.min(4,t-r.length)),r.length%8!==0&&r.push(0,8-r.length%8);let n=Array.from(r.toBytes());for(let z=0;n.length<t/8;z+=1)n.push(z%2===0?236:17);let[s,d,h,p,f]=n1[o-1][i1.indexOf(e)],x=[],k=0;for(let[z,T]of[[d,h],[p,f]])for(let P=0;P<z;P+=1){let H=new Uint8Array(n.slice(k,k+T));k+=T,x.push({data:H,ec:tf(H,s)})}let C=[],S=Math.max(...x.map(z=>z.data.length));for(let z=0;z<S;z+=1)for(let T of x)z<T.data.length&&C.push(T.data[z]);for(let z=0;z<s;z+=1)for(let T of x)C.push(T.ec[z]);return new Uint8Array(C)}function nf(i){let o=i*4+17;return{size:o,modules:Array.from({length:o},()=>Array(o).fill(null)),reserved:Array.from({length:o},()=>Array(o).fill(!1))}}function Ci(i,o,e,t){i.modules[e][o]=t,i.reserved[e][o]=!0}function Md(i,o,e){for(let t=-1;t<=7;t+=1)for(let r=-1;r<=7;r+=1){let n=o+r,s=e+t;if(n<0||s<0||n>=i.size||s>=i.size)continue;let d=r>=0&&r<=6&&t>=0&&t<=6,h=Math.max(Math.abs(r-3),Math.abs(t-3));Ci(i,n,s,d&&h!==2)}}function af(i,o){Md(i,0,0),Md(i,i.size-7,0),Md(i,0,i.size-7);for(let t=8;t<i.size-8;t+=1){let r=t%2===0;Ci(i,t,6,r),Ci(i,6,t,r)}let e=Xg[o-1];for(let t of e)for(let r of e)if(!(r===6&&t===6||r===6&&t===i.size-7||r===i.size-7&&t===6))for(let s=-2;s<=2;s+=1)for(let d=-2;d<=2;d+=1){let h=Math.max(Math.abs(d),Math.abs(s));Ci(i,r+d,t+s,h!==1)}for(let t=0;t<9;t+=1)t!==6&&(Ci(i,t,8,!1),Ci(i,8,t,!1));for(let t=0;t<8;t+=1)Ci(i,i.size-1-t,8,!1);for(let t=0;t<7;t+=1)Ci(i,8,i.size-1-t,!1);if(Ci(i,8,i.size-8,!0),o>=7){let t=Zg[o-7];for(let r=0;r<18;r+=1){let n=(t>>>r&1)===1,s=Math.floor(r/3),d=r%3+i.size-11;Ci(i,s,d,n),Ci(i,d,s,n)}}}function sf(i,o){let e=0,t=!0;for(let r=i.size-1;r>=1;r-=2){let n=r===6?5:r;for(let s=0;s<i.size;s+=1){let d=t?i.size-1-s:s;for(let h of[n,n-1]){if(i.reserved[d][h])continue;let p=o[e>>>3]??0;i.modules[d][h]=(p>>>7-(e&7)&1)===1,e+=1}}t=!t}}function lf(i,o,e){switch(i){case 0:return(o+e)%2===0;case 1:return e%2===0;case 2:return o%3===0;case 3:return(o+e)%3===0;case 4:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case 5:return o*e%2+o*e%3===0;case 6:return(o*e%2+o*e%3)%2===0;default:return((o+e)%2+o*e%3)%2===0}}function cf(i,o,e){let t=Jg[o]<<3|e,r=t;for(let s=0;s<10;s+=1)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^Qg;for(let s=0;s<=5;s+=1)i.modules[8][s]=(n>>>s&1)===1;i.modules[8][7]=(n>>>6&1)===1,i.modules[8][8]=(n>>>7&1)===1,i.modules[7][8]=(n>>>8&1)===1;for(let s=9;s<15;s+=1)i.modules[14-s][8]=(n>>>s&1)===1;for(let s=0;s<7;s+=1)i.modules[i.size-1-s][8]=(n>>>s&1)===1;for(let s=8;s<15;s+=1)i.modules[8][i.size-15+s]=(n>>>s&1)===1}function df(i){let o=i.length,e=0,t=h=>{let p=0,f=1;for(let x=1;x<o;x+=1)h[x]===h[x-1]?(f+=1,f===5?p+=3:f>5&&(p+=1)):f=1;return p};for(let h=0;h<o;h+=1)e+=t(i[h]),e+=t(i.map(p=>p[h]));for(let h=0;h<o-1;h+=1)for(let p=0;p<o-1;p+=1){let f=i[h][p];f===i[h][p+1]&&f===i[h+1][p]&&f===i[h+1][p+1]&&(e+=3)}let r=[!0,!1,!0,!0,!0,!1,!0],n=(h,p)=>r.every((f,x)=>h[p+x]===f);for(let h=0;h<o;h+=1){let p=i[h],f=i.map(x=>x[h]);for(let x=0;x+7<=o;x+=1)n(p,x)&&(e+=40),n(f,x)&&(e+=40)}let d=i.flat().filter(Boolean).length*100/(o*o);return e+=Math.floor(Math.abs(d-50)/5)*10,e}function zl(i,o={}){let e=o.errorCorrection??"M",t=new TextEncoder().encode(i),r=o.version??rf(t.length,e);if(r<1||r>40||!Number.isInteger(r))throw new Error(`qrcode: version must be an integer from 1 to 40, received ${r}`);if(4+Sd(r)+t.length*8>Ed(r,e)*8)throw new Error(`qrcode: ${t.length} bytes does not fit a version ${r} symbol at error correction level ${e}`);let s=of(t,r,e),d=nf(r);af(d,r),sf(d,s);let h=null;for(let p=0;p<8;p+=1){let f=d.modules.map((S,z)=>S.map((T,P)=>d.reserved[z][P]?!!T:!!T!==lf(p,P,z))),x={...d,modules:f};cf(x,e,p);let k=x.modules.map(S=>S.map(Boolean)),C=df(k);(!h||C<h.score)&&(h={matrix:k,score:C})}return{matrix:h.matrix,size:d.size,version:r,errorCorrection:e}}var pr=class extends xo.LitElement{constructor(){super(...arguments);this.value="";this.errorCorrection="M";this.margin=4;this.logo="";this.logoRatio=.2;this._error=""}connectedCallback(){super.connectedCallback(),this._localeCleanup=xe(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}get _effectiveErrorCorrection(){if(!this.logo)return this.errorCorrection;let e=this._cappedLogoRatio>.22?"H":"Q",t=["L","M","Q","H"];return t.indexOf(this.errorCorrection)>=t.indexOf(e)?this.errorCorrection:e}get _cappedLogoRatio(){return Math.min(Math.max(this.logoRatio,0),.3)}get _cssSize(){return this.size===void 0||this.size===""?"":Ot(this.size)}toDataUrl(){let e=this._svgMarkup();return e?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:""}_svgMarkup(){try{let{matrix:e,size:t}=zl(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version}),r=Math.max(0,Math.floor(this.margin)),n=t+r*2,s=this.color||"currentColor",d=this.background||"transparent",h="";return e.forEach((p,f)=>{p.forEach((x,k)=>{x&&(h+=`M${k+r} ${f+r}h1v1h-1z`)})}),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}"`,' shape-rendering="crispEdges">',`<rect width="${n}" height="${n}" fill="${d}"/>`,`<path d="${h}" fill="${s}"/>`,"</svg>"].join("")}catch{return""}}render(){let e=L(this,"qrcode"),t=Math.max(0,Math.floor(this.margin)),r=this._cssSize||e.size||"",n=null,s="";if(!this.value)s=this._t("qrcode.empty","\u65E0\u5185\u5BB9");else try{n=zl(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version})}catch(p){s=p instanceof Error?p.message:String(p)}s!==this._error&&(this._error=s,s&&this.value&&this.dispatchEvent(new CustomEvent("error",{detail:{message:s},bubbles:!0,composed:!0})));let d=[r?`--lui-qrcode-size:${r}`:"",this.background?`--lui-qrcode-bg:${this.background}`:"",this.color?`--lui-qrcode-fg:${this.color}`:"",this.logo?`--lui-qrcode-logo-size:${this._cappedLogoRatio*100}%`:""].filter(Boolean).join(";");if(!n)return xo.html`
|
|
14581
14593
|
<div class="frame" part="base" style=${d||xo.nothing}>
|
|
14582
14594
|
<div part="error" role="img" aria-label=${s}>
|
|
14583
14595
|
<lui-icon name="circle-x"></lui-icon>
|
|
@@ -14676,7 +14688,7 @@
|
|
|
14676
14688
|
color: var(--lui-color-danger);
|
|
14677
14689
|
--lui-icon-size: 20px;
|
|
14678
14690
|
}
|
|
14679
|
-
`],a([(0,oo.property)()],pr.prototype,"value",2),a([(0,oo.property)()],pr.prototype,"size",2),a([(0,oo.property)({attribute:"error-correction"})],pr.prototype,"errorCorrection",2),a([(0,oo.property)({type:Number})],pr.prototype,"margin",2),a([(0,oo.property)({type:Number})],pr.prototype,"version",2),a([(0,oo.property)()],pr.prototype,"logo",2),a([(0,oo.property)({type:Number,attribute:"logo-ratio"})],pr.prototype,"logoRatio",2),a([(0,oo.property)()],pr.prototype,"color",2),a([(0,oo.property)()],pr.prototype,"background",2),a([(0,oo.property)({reflect:!0})],pr.prototype,"locale",2),a([(0,oo.property)({attribute:!1})],pr.prototype,"translations",2),a([(0,oo.state)()],pr.prototype,"_error",2),pr=a([(0,oo.customElement)("lui-qrcode")],pr);var Qi=require("lit"),Br=require("lit/decorators.js"),d1=require("lit/directives/repeat.js");var uf=0,$d=new WeakSet,El=new Map,s1=500,hf=56,l1=12,pf=.048,c1=6,cr=class extends Qi.LitElement{constructor(){super(...arguments);this.position="top-right";this.radius="lg";this.duration=3e3;this.max=5;this.listen=!0;this.pauseOnHover=!0;this.showProgress=!1;this.stacked=!1;this.stackMaxVisible=4;this.stackGap=c1;this._explicitAttrs=new Set;this._items=[];this._stackExpanded=!1;this._pendingQueue=new Map;this._toastHeights=new Map;this._observedToastElements=new Map;this._progressFrame=0;this._onStackMouseEnter=()=>{this._pauseAllToasts(),this.stacked&&this._setStackExpanded(!0)};this._onStackMouseLeave=()=>{this._resumeAllToasts(),this.stacked&&(this._stackCollapseTimer=setTimeout(()=>{this._stackExpanded=!1,this._stackCollapseTimer=void 0},120))};this._onNotify=e=>{let t=e;if(t.defaultPrevented||$d.has(t))return;let r=t.detail;if(!r?.message)return;let n=`${r.type??"info"}:${r.message}`,s=Date.now();for(let[h,p]of El)s-p>=s1&&El.delete(h);let d=El.get(n)??0;if(s-d<s1){$d.add(t);return}El.set(n,s),$d.add(t),this.show({level:r.type,message:r.message})}}_t(e,t){let r=nt(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this.listen&&document.addEventListener("notify",this._onNotify)}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),document.removeEventListener("notify",this._onNotify),this._items.forEach(e=>{e.timer&&clearTimeout(e.timer)}),this._pendingQueue.forEach(({timer:e})=>clearTimeout(e)),this._pendingQueue.clear(),this._stackCollapseTimer&&clearTimeout(this._stackCollapseTimer),this._cancelProgressTicker(),this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this._observedToastElements.clear(),this._toastHeights.clear()}firstUpdated(){this._resizeObserver=new ResizeObserver(e=>{let t=!1;for(let r of e){let n=r.target,s=Number(n.dataset.id);if(!Number.isFinite(s))continue;let h=(Array.isArray(r.borderBoxSize)?r.borderBoxSize[0]:r.borderBoxSize)?.blockSize||n.getBoundingClientRect().height||r.contentRect.height,p=Math.max(1,Math.ceil(h));this._toastHeights.get(s)!==p&&(this._toastHeights.set(s,p),t=!0)}t&&this.requestUpdate()}),this._syncToastObservers()}willUpdate(){let e=L(this,"toast");!this._explicitAttrs.has("position")&&typeof e.position=="string"&&this.position!==e.position&&(this.position=e.position),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("duration")&&typeof e.duration=="number"&&this.duration!==e.duration&&(this.duration=e.duration),!this._explicitAttrs.has("max")&&typeof e.max=="number"&&this.max!==e.max&&(this.max=e.max),!this._explicitAttrs.has("pause-on-hover")&&typeof e.pauseOnHover=="boolean"&&this.pauseOnHover!==e.pauseOnHover&&(this.pauseOnHover=e.pauseOnHover),!this._explicitAttrs.has("show-progress")&&typeof e.showProgress=="boolean"&&this.showProgress!==e.showProgress&&(this.showProgress=e.showProgress),!this._explicitAttrs.has("stacked")&&typeof e.stacked=="boolean"&&this.stacked!==e.stacked&&(this.stacked=e.stacked),!this._explicitAttrs.has("stack-max-visible")&&typeof e.stackMaxVisible=="number"&&this.stackMaxVisible!==e.stackMaxVisible&&(this.stackMaxVisible=e.stackMaxVisible),!this._explicitAttrs.has("stack-gap")&&typeof e.stackGap=="number"&&this.stackGap!==e.stackGap&&(this.stackGap=e.stackGap)}updated(){this._syncToastObservers(),this._syncProgressTicker()}show(e){let t=++uf,r=()=>{this._pendingQueue.delete(t),e.radius!=null&&(this.radius=e.radius),e.stacked!=null&&(this.stacked=e.stacked),e.stackMaxVisible!=null&&(this.stackMaxVisible=e.stackMaxVisible),e.stackGap!=null&&(this.stackGap=e.stackGap);let d=e.level??e.type??"info",h=e.duration??this.duration,p={id:t,level:d,message:e.message,duration:h,pauseOnHover:e.pauseOnHover??this.pauseOnHover,showProgress:e.showProgress??this.showProgress,action:e.action,startTime:Date.now(),remainingTime:h,paused:!1},f=[...this._items,p];if(f.length>this.max){let x=f.shift();x?.timer&&clearTimeout(x.timer),x&&this._toastHeights.delete(x.id)}this._items=f,this.requestUpdate(),p.duration>0&&this._startTimer(p),this._syncProgressTicker()},n=Math.max(0,e.delay??0),s=setTimeout(r,n);return this._pendingQueue.set(t,{timer:s,payload:{...e}}),t}has(e){return this._items.some(t=>t.id===e)||this._pendingQueue.has(e)}close(e){let t=this._pendingQueue.get(e);return t?(clearTimeout(t.timer),this._pendingQueue.delete(e),this.requestUpdate(),this._emitEmptyIfNeeded(),!0):this._items.some(r=>r.id===e)?(this._dismiss(e),!0):!1}clear(){this._items.forEach(e=>{e.timer&&clearTimeout(e.timer)}),this._pendingQueue.forEach(({timer:e})=>clearTimeout(e)),this._pendingQueue.clear(),this._items=[],this._toastHeights.clear(),this._cancelProgressTicker(),this.requestUpdate(),this._emitEmptyIfNeeded()}updateToast(e,t){let r=this._pendingQueue.get(e);if(r)return r.payload={...r.payload,...t,level:t.level??t.type??r.payload.level},this._pendingQueue.set(e,r),!0;let n=this._items.find(s=>s.id===e);return n?((t.level!=null||t.type!=null)&&(n.level=t.level??t.type),t.message!=null&&(n.message=t.message),t.pauseOnHover!=null&&(n.pauseOnHover=t.pauseOnHover),t.showProgress!=null&&(n.showProgress=t.showProgress),t.action!==void 0&&(n.action=t.action),t.duration!=null&&(n.timer&&(clearTimeout(n.timer),n.timer=void 0),n.duration=t.duration,n.remainingTime=t.duration,n.startTime=Date.now(),n.paused=!1,t.duration>0&&this._startTimer(n)),this._syncProgressTicker(),this.requestUpdate(),!0):!1}_startTimer(e){e.timer&&clearTimeout(e.timer),e.startTime=Date.now(),e.timer=setTimeout(()=>this._dismiss(e.id),Math.max(0,e.remainingTime??0))}_pauseToast(e){return!e.pauseOnHover||e.paused||e.duration===0?!1:(e.paused=!0,e.timer&&(clearTimeout(e.timer),e.timer=void 0),e.remainingTime=Math.max(0,(e.remainingTime??e.duration)-(Date.now()-(e.startTime??Date.now()))),!0)}_resumeToast(e){return!e.pauseOnHover||!e.paused||e.duration===0?!1:(e.paused=!1,e.startTime=Date.now(),this._startTimer(e),!0)}_pauseAllToasts(){let e=!1;for(let t of this._items)e=this._pauseToast(t)||e;e&&(this._syncProgressTicker(),this.requestUpdate())}_resumeAllToasts(){let e=!1;for(let t of this._items)e=this._resumeToast(t)||e;e&&(this._syncProgressTicker(),this.requestUpdate())}_setStackExpanded(e){this._stackCollapseTimer&&(clearTimeout(this._stackCollapseTimer),this._stackCollapseTimer=void 0),this._stackExpanded!==e&&(this._stackExpanded=e)}_dismiss(e){let t=this._items.find(r=>r.id===e);t?.timer&&clearTimeout(t.timer),this._items=this._items.filter(r=>r.id!==e),this._toastHeights.delete(e),this._syncProgressTicker(),this.requestUpdate(),this._emitEmptyIfNeeded()}_hasActiveProgress(){return this._items.some(e=>!!e.showProgress&&e.duration>0&&!e.paused&&this._getRemainingTime(e)>0)}_cancelProgressTicker(){this._progressFrame&&(cancelAnimationFrame(this._progressFrame),this._progressFrame=0)}_syncProgressTicker(){if(!this._hasActiveProgress()){this._cancelProgressTicker();return}if(this._progressFrame)return;let e=()=>{this._progressFrame=0,!(!this.isConnected||!this._hasActiveProgress())&&(this.requestUpdate(),this._progressFrame=requestAnimationFrame(e))};this._progressFrame=requestAnimationFrame(e)}_emitEmptyIfNeeded(){this._items.length>0||this._pendingQueue.size>0||this.dispatchEvent(new CustomEvent("empty",{bubbles:!0,composed:!0}))}_syncToastObservers(){if(!this._resizeObserver)return;let e=Array.from(this.renderRoot.querySelectorAll(".toast[data-id]")),t=new Set;for(let r of e){let n=Number(r.dataset.id);if(!Number.isFinite(n)||(t.add(n),this._observedToastElements.get(n)===r))continue;let s=this._observedToastElements.get(n);s&&this._resizeObserver.unobserve(s),this._observedToastElements.set(n,r),this._resizeObserver.observe(r)}for(let[r,n]of this._observedToastElements)t.has(r)||(this._resizeObserver.unobserve(n),this._observedToastElements.delete(r),this._toastHeights.delete(r))}_getToastHeight(e){return this._toastHeights.get(e)??hf}_resolvedStackGap(){return Math.max(0,Number.isFinite(this.stackGap)?this.stackGap:c1)}_buildLayout(e){let t=this.position.startsWith("top")?1:-1,r=!this.stacked||this._stackExpanded,n=this._resolvedStackGap(),s=Math.max(1,this.stackMaxVisible),d=0;return e.map((h,p)=>{let f=this._getToastHeight(h.id),x=Math.min(p,s-1),k=Math.max(.84,1-x*pf),C=p>=s?0:p===0?1:Math.max(.24,1-x*.18),z=`translateY(${r?t*d:t*x*l1}px) scale(${r?1:k})`,T=r?1:C,P=r||p===0?"auto":"none";return r&&(d+=f+n),{item:h,depth:p,height:f,transform:z,opacity:T,zIndex:1e3-p,pointerEvents:P}})}_getStackHeight(e){if(e.length===0)return 0;if(!this.stacked||this._stackExpanded){let n=this._resolvedStackGap();return e.reduce((s,d,h)=>s+d.height+(h<e.length-1?n:0),0)}let r=Math.min(e.length,Math.max(1,this.stackMaxVisible));return e[0].height+l1*Math.max(0,r-1)}_getRemainingTime(e){if(e.duration<=0)return 0;if(e.paused)return Math.max(0,e.remainingTime??e.duration);let t=e.remainingTime??e.duration,r=Date.now()-(e.startTime??Date.now());return Math.max(0,t-r)}_progressState(e){let t=Math.max(1,e.duration),r=this._getRemainingTime(e);return{ratio:Math.min(1,r/t),remaining:r,paused:!!e.paused}}render(){let e=[...this._items].reverse(),t=this._buildLayout(e),r=this._getStackHeight(t);return Qi.html`
|
|
14691
|
+
`],a([(0,oo.property)()],pr.prototype,"value",2),a([(0,oo.property)()],pr.prototype,"size",2),a([(0,oo.property)({attribute:"error-correction"})],pr.prototype,"errorCorrection",2),a([(0,oo.property)({type:Number})],pr.prototype,"margin",2),a([(0,oo.property)({type:Number})],pr.prototype,"version",2),a([(0,oo.property)()],pr.prototype,"logo",2),a([(0,oo.property)({type:Number,attribute:"logo-ratio"})],pr.prototype,"logoRatio",2),a([(0,oo.property)()],pr.prototype,"color",2),a([(0,oo.property)()],pr.prototype,"background",2),a([(0,oo.property)({reflect:!0})],pr.prototype,"locale",2),a([(0,oo.property)({attribute:!1})],pr.prototype,"translations",2),a([(0,oo.state)()],pr.prototype,"_error",2),pr=a([(0,oo.customElement)("lui-qrcode")],pr);var Qi=require("lit"),Br=require("lit/decorators.js"),d1=require("lit/directives/repeat.js");var uf=0,$d=new WeakSet,El=new Map,s1=500,hf=56,l1=12,pf=.048,c1=6,cr=class extends Qi.LitElement{constructor(){super(...arguments);this.position="top-right";this.radius="lg";this.duration=3e3;this.max=5;this.listen=!0;this.pauseOnHover=!0;this.showProgress=!1;this.stacked=!1;this.stackMaxVisible=4;this.stackGap=c1;this._explicitAttrs=new Set;this._items=[];this._stackExpanded=!1;this._pendingQueue=new Map;this._toastHeights=new Map;this._observedToastElements=new Map;this._progressFrame=0;this._onStackMouseEnter=()=>{this._pauseAllToasts(),this.stacked&&this._setStackExpanded(!0)};this._onStackMouseLeave=()=>{this._resumeAllToasts(),this.stacked&&(this._stackCollapseTimer=setTimeout(()=>{this._stackExpanded=!1,this._stackCollapseTimer=void 0},120))};this._onNotify=e=>{let t=e;if(t.defaultPrevented||$d.has(t))return;let r=t.detail;if(!r?.message)return;let n=`${r.type??"info"}:${r.message}`,s=Date.now();for(let[h,p]of El)s-p>=s1&&El.delete(h);let d=El.get(n)??0;if(s-d<s1){$d.add(t);return}El.set(n,s),$d.add(t),this.show({level:r.type,message:r.message})}}_t(e,t){let r=at(this,this.locale,this.translations);return ae(ne(r.locale,r.translations),e,t)}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=xe(()=>this.requestUpdate()),this.listen&&document.addEventListener("notify",this._onNotify)}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),document.removeEventListener("notify",this._onNotify),this._items.forEach(e=>{e.timer&&clearTimeout(e.timer)}),this._pendingQueue.forEach(({timer:e})=>clearTimeout(e)),this._pendingQueue.clear(),this._stackCollapseTimer&&clearTimeout(this._stackCollapseTimer),this._cancelProgressTicker(),this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this._observedToastElements.clear(),this._toastHeights.clear()}firstUpdated(){this._resizeObserver=new ResizeObserver(e=>{let t=!1;for(let r of e){let n=r.target,s=Number(n.dataset.id);if(!Number.isFinite(s))continue;let h=(Array.isArray(r.borderBoxSize)?r.borderBoxSize[0]:r.borderBoxSize)?.blockSize||n.getBoundingClientRect().height||r.contentRect.height,p=Math.max(1,Math.ceil(h));this._toastHeights.get(s)!==p&&(this._toastHeights.set(s,p),t=!0)}t&&this.requestUpdate()}),this._syncToastObservers()}willUpdate(){let e=L(this,"toast");!this._explicitAttrs.has("position")&&typeof e.position=="string"&&this.position!==e.position&&(this.position=e.position),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("duration")&&typeof e.duration=="number"&&this.duration!==e.duration&&(this.duration=e.duration),!this._explicitAttrs.has("max")&&typeof e.max=="number"&&this.max!==e.max&&(this.max=e.max),!this._explicitAttrs.has("pause-on-hover")&&typeof e.pauseOnHover=="boolean"&&this.pauseOnHover!==e.pauseOnHover&&(this.pauseOnHover=e.pauseOnHover),!this._explicitAttrs.has("show-progress")&&typeof e.showProgress=="boolean"&&this.showProgress!==e.showProgress&&(this.showProgress=e.showProgress),!this._explicitAttrs.has("stacked")&&typeof e.stacked=="boolean"&&this.stacked!==e.stacked&&(this.stacked=e.stacked),!this._explicitAttrs.has("stack-max-visible")&&typeof e.stackMaxVisible=="number"&&this.stackMaxVisible!==e.stackMaxVisible&&(this.stackMaxVisible=e.stackMaxVisible),!this._explicitAttrs.has("stack-gap")&&typeof e.stackGap=="number"&&this.stackGap!==e.stackGap&&(this.stackGap=e.stackGap)}updated(){this._syncToastObservers(),this._syncProgressTicker()}show(e){let t=++uf,r=()=>{this._pendingQueue.delete(t),e.radius!=null&&(this.radius=e.radius),e.stacked!=null&&(this.stacked=e.stacked),e.stackMaxVisible!=null&&(this.stackMaxVisible=e.stackMaxVisible),e.stackGap!=null&&(this.stackGap=e.stackGap);let d=e.level??e.type??"info",h=e.duration??this.duration,p={id:t,level:d,message:e.message,duration:h,pauseOnHover:e.pauseOnHover??this.pauseOnHover,showProgress:e.showProgress??this.showProgress,action:e.action,startTime:Date.now(),remainingTime:h,paused:!1},f=[...this._items,p];if(f.length>this.max){let x=f.shift();x?.timer&&clearTimeout(x.timer),x&&this._toastHeights.delete(x.id)}this._items=f,this.requestUpdate(),p.duration>0&&this._startTimer(p),this._syncProgressTicker()},n=Math.max(0,e.delay??0),s=setTimeout(r,n);return this._pendingQueue.set(t,{timer:s,payload:{...e}}),t}has(e){return this._items.some(t=>t.id===e)||this._pendingQueue.has(e)}close(e){let t=this._pendingQueue.get(e);return t?(clearTimeout(t.timer),this._pendingQueue.delete(e),this.requestUpdate(),this._emitEmptyIfNeeded(),!0):this._items.some(r=>r.id===e)?(this._dismiss(e),!0):!1}clear(){this._items.forEach(e=>{e.timer&&clearTimeout(e.timer)}),this._pendingQueue.forEach(({timer:e})=>clearTimeout(e)),this._pendingQueue.clear(),this._items=[],this._toastHeights.clear(),this._cancelProgressTicker(),this.requestUpdate(),this._emitEmptyIfNeeded()}updateToast(e,t){let r=this._pendingQueue.get(e);if(r)return r.payload={...r.payload,...t,level:t.level??t.type??r.payload.level},this._pendingQueue.set(e,r),!0;let n=this._items.find(s=>s.id===e);return n?((t.level!=null||t.type!=null)&&(n.level=t.level??t.type),t.message!=null&&(n.message=t.message),t.pauseOnHover!=null&&(n.pauseOnHover=t.pauseOnHover),t.showProgress!=null&&(n.showProgress=t.showProgress),t.action!==void 0&&(n.action=t.action),t.duration!=null&&(n.timer&&(clearTimeout(n.timer),n.timer=void 0),n.duration=t.duration,n.remainingTime=t.duration,n.startTime=Date.now(),n.paused=!1,t.duration>0&&this._startTimer(n)),this._syncProgressTicker(),this.requestUpdate(),!0):!1}_startTimer(e){e.timer&&clearTimeout(e.timer),e.startTime=Date.now(),e.timer=setTimeout(()=>this._dismiss(e.id),Math.max(0,e.remainingTime??0))}_pauseToast(e){return!e.pauseOnHover||e.paused||e.duration===0?!1:(e.paused=!0,e.timer&&(clearTimeout(e.timer),e.timer=void 0),e.remainingTime=Math.max(0,(e.remainingTime??e.duration)-(Date.now()-(e.startTime??Date.now()))),!0)}_resumeToast(e){return!e.pauseOnHover||!e.paused||e.duration===0?!1:(e.paused=!1,e.startTime=Date.now(),this._startTimer(e),!0)}_pauseAllToasts(){let e=!1;for(let t of this._items)e=this._pauseToast(t)||e;e&&(this._syncProgressTicker(),this.requestUpdate())}_resumeAllToasts(){let e=!1;for(let t of this._items)e=this._resumeToast(t)||e;e&&(this._syncProgressTicker(),this.requestUpdate())}_setStackExpanded(e){this._stackCollapseTimer&&(clearTimeout(this._stackCollapseTimer),this._stackCollapseTimer=void 0),this._stackExpanded!==e&&(this._stackExpanded=e)}_dismiss(e){let t=this._items.find(r=>r.id===e);t?.timer&&clearTimeout(t.timer),this._items=this._items.filter(r=>r.id!==e),this._toastHeights.delete(e),this._syncProgressTicker(),this.requestUpdate(),this._emitEmptyIfNeeded()}_hasActiveProgress(){return this._items.some(e=>!!e.showProgress&&e.duration>0&&!e.paused&&this._getRemainingTime(e)>0)}_cancelProgressTicker(){this._progressFrame&&(cancelAnimationFrame(this._progressFrame),this._progressFrame=0)}_syncProgressTicker(){if(!this._hasActiveProgress()){this._cancelProgressTicker();return}if(this._progressFrame)return;let e=()=>{this._progressFrame=0,!(!this.isConnected||!this._hasActiveProgress())&&(this.requestUpdate(),this._progressFrame=requestAnimationFrame(e))};this._progressFrame=requestAnimationFrame(e)}_emitEmptyIfNeeded(){this._items.length>0||this._pendingQueue.size>0||this.dispatchEvent(new CustomEvent("empty",{bubbles:!0,composed:!0}))}_syncToastObservers(){if(!this._resizeObserver)return;let e=Array.from(this.renderRoot.querySelectorAll(".toast[data-id]")),t=new Set;for(let r of e){let n=Number(r.dataset.id);if(!Number.isFinite(n)||(t.add(n),this._observedToastElements.get(n)===r))continue;let s=this._observedToastElements.get(n);s&&this._resizeObserver.unobserve(s),this._observedToastElements.set(n,r),this._resizeObserver.observe(r)}for(let[r,n]of this._observedToastElements)t.has(r)||(this._resizeObserver.unobserve(n),this._observedToastElements.delete(r),this._toastHeights.delete(r))}_getToastHeight(e){return this._toastHeights.get(e)??hf}_resolvedStackGap(){return Math.max(0,Number.isFinite(this.stackGap)?this.stackGap:c1)}_buildLayout(e){let t=this.position.startsWith("top")?1:-1,r=!this.stacked||this._stackExpanded,n=this._resolvedStackGap(),s=Math.max(1,this.stackMaxVisible),d=0;return e.map((h,p)=>{let f=this._getToastHeight(h.id),x=Math.min(p,s-1),k=Math.max(.84,1-x*pf),C=p>=s?0:p===0?1:Math.max(.24,1-x*.18),z=`translateY(${r?t*d:t*x*l1}px) scale(${r?1:k})`,T=r?1:C,P=r||p===0?"auto":"none";return r&&(d+=f+n),{item:h,depth:p,height:f,transform:z,opacity:T,zIndex:1e3-p,pointerEvents:P}})}_getStackHeight(e){if(e.length===0)return 0;if(!this.stacked||this._stackExpanded){let n=this._resolvedStackGap();return e.reduce((s,d,h)=>s+d.height+(h<e.length-1?n:0),0)}let r=Math.min(e.length,Math.max(1,this.stackMaxVisible));return e[0].height+l1*Math.max(0,r-1)}_getRemainingTime(e){if(e.duration<=0)return 0;if(e.paused)return Math.max(0,e.remainingTime??e.duration);let t=e.remainingTime??e.duration,r=Date.now()-(e.startTime??Date.now());return Math.max(0,t-r)}_progressState(e){let t=Math.max(1,e.duration),r=this._getRemainingTime(e);return{ratio:Math.min(1,r/t),remaining:r,paused:!!e.paused}}render(){let e=[...this._items].reverse(),t=this._buildLayout(e),r=this._getStackHeight(t);return Qi.html`
|
|
14680
14692
|
<div
|
|
14681
14693
|
class="stack"
|
|
14682
14694
|
style=${`height:${r}px;`}
|