lituix 0.1.14 → 0.1.16
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 +1 -1
- package/dist/components/lui-button-group-item.d.ts +2 -0
- package/dist/components/lui-button-group-item.d.ts.map +1 -1
- package/dist/index.browser.js +50 -50
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -506,12 +506,12 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
506
506
|
--lui-button-icon-size: var(--lui-icon-size, 18px);
|
|
507
507
|
/* Color palette lives on :host (not the inner button) so consumers can
|
|
508
508
|
* theme buttons from the outside via these custom properties. */
|
|
509
|
-
--lui-button-bg: var(--lui-color-bg);
|
|
509
|
+
--lui-button-bg: var(--lui-color-bg-subtle);
|
|
510
510
|
--lui-button-border: transparent;
|
|
511
511
|
--lui-button-fg: var(--lui-color-fg);
|
|
512
512
|
--lui-button-hover-bg: color-mix(
|
|
513
513
|
in srgb,
|
|
514
|
-
var(--lui-color-bg-
|
|
514
|
+
var(--lui-color-bg-hover) 55%,
|
|
515
515
|
var(--lui-color-bg)
|
|
516
516
|
);
|
|
517
517
|
--lui-button-hover-border: transparent;
|
|
@@ -751,7 +751,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
751
751
|
transform: translate(-50%, -50%) scale(2.4);
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
`],a([Ao({reflect:!0})],kt.prototype,"variant",2),a([Ao({reflect:!0})],kt.prototype,"size",2),a([Ao({reflect:!0})],kt.prototype,"radius",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"loading",2),a([Ao({type:Boolean,reflect:!0,attribute:"icon-only"})],kt.prototype,"iconOnly",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"block",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"ripple",2),a([Ao()],kt.prototype,"icon",2),a([Ao()],kt.prototype,"type",2),a([zs()],kt.prototype,"_ripples",2),a([zs()],kt.prototype,"_hasPrefixSlot",2),a([zs()],kt.prototype,"_hasDefaultSlot",2),a([zs()],kt.prototype,"_hasSuffixSlot",2),kt=a([hg("lui-button")],kt);import{css as pf,html as bn,LitElement as mf,nothing as bi}from"lit";import{customElement as gf,property as Lt,query as fp,queryAssignedElements as ff,state as vp}from"lit/decorators.js";function re(i,o){if(!i||!o)return;let{style:e,className:t,class:r,...n}=o;if(Object.assign(i,n),typeof t=="string"&&(i.className=t),typeof r=="string"&&i.setAttribute("class",r),typeof e=="string"){i.setAttribute("style",e);return}if(e&&typeof e=="object"){for(let[s,d]of Object.entries(e))if(d!=null)if(s.includes("-"))i.style.setProperty(s,String(d));else try{i.style[s]=String(d)}catch{i.style.setProperty(s,String(d))}}}function Xh(i){let{selection:o,currentValue:e,currentValues:t,nextValue:r}=i;return o==="none"?{value:e,values:t.slice()}:o==="single"?{value:r,values:[r]}:{value:void 0,values:t.includes(r)?t.filter(s=>s!==r):[...t,r]}}function Zh(i){let{itemWidths:o,containerWidth:e,overflowTriggerWidth:t,minVisibleItems:r=0}=i;if(!o.length)return{visibleIndexes:[],overflowIndexes:[],needsOverflow:!1};let n=Math.max(0,e),s=Math.max(0,t),d=k=>o.slice(0,k).map((C,S)=>S),h=k=>o.slice(k).map((C,S)=>k+S);if(o.reduce((k,C)=>k+Math.max(0,C),0)<=n)return{visibleIndexes:d(o.length),overflowIndexes:[],needsOverflow:!1};let f=Math.min(Math.max(0,r),o.length),x=o.length;for(;x>f&&!(o.slice(0,x).reduce((C,S)=>C+Math.max(0,S),0)+s<=n);)x-=1;return{visibleIndexes:d(x),overflowIndexes:h(x),needsOverflow:x<o.length}}import{css as pg,html as Qh,LitElement as mg}from"lit";import{customElement as gg,property as Tr,state as fg}from"lit/decorators.js";var mt=class extends mg{constructor(){super(...arguments);this.variant="default";this.size="md";this.radius="md";this.value="";this.pressed=!1;this.disabled=!1;this.grouped=!1;this.first=!1;this.last=!1;this.vertical=!1;this.indicatorSelected=!1;this.dividerHidden=!1;this.interactionActive=!1;this.ripple=!1;this._ripples=[];this._rippleId=0;this._emitActivate=()=>{this.disabled||this.dispatchEvent(new CustomEvent("button-group-item-activate",{detail:{value:this.value,item:this},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitActivate())};this._onPointerDown=e=>{if(!this.ripple||this.disabled)return;let t=e.currentTarget;if(!t)return;let r=t.getBoundingClientRect(),n=Math.max(r.width,r.height)*1.15,s=e.clientX-r.left,d=e.clientY-r.top,h=++this._rippleId;this._ripples=[...this._ripples,{id:h,x:s,y:d,size:n}],window.setTimeout(()=>{this._ripples=this._ripples.filter(p=>p.id!==h)},560)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}trigger(){this._emitActivate()}render(){return Qh`
|
|
754
|
+
`],a([Ao({reflect:!0})],kt.prototype,"variant",2),a([Ao({reflect:!0})],kt.prototype,"size",2),a([Ao({reflect:!0})],kt.prototype,"radius",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"loading",2),a([Ao({type:Boolean,reflect:!0,attribute:"icon-only"})],kt.prototype,"iconOnly",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"block",2),a([Ao({type:Boolean,reflect:!0})],kt.prototype,"ripple",2),a([Ao()],kt.prototype,"icon",2),a([Ao()],kt.prototype,"type",2),a([zs()],kt.prototype,"_ripples",2),a([zs()],kt.prototype,"_hasPrefixSlot",2),a([zs()],kt.prototype,"_hasDefaultSlot",2),a([zs()],kt.prototype,"_hasSuffixSlot",2),kt=a([hg("lui-button")],kt);import{css as pf,html as bn,LitElement as mf,nothing as bi}from"lit";import{customElement as gf,property as Lt,query as fp,queryAssignedElements as ff,state as vp}from"lit/decorators.js";function re(i,o){if(!i||!o)return;let{style:e,className:t,class:r,...n}=o;if(Object.assign(i,n),typeof t=="string"&&(i.className=t),typeof r=="string"&&i.setAttribute("class",r),typeof e=="string"){i.setAttribute("style",e);return}if(e&&typeof e=="object"){for(let[s,d]of Object.entries(e))if(d!=null)if(s.includes("-"))i.style.setProperty(s,String(d));else try{i.style[s]=String(d)}catch{i.style.setProperty(s,String(d))}}}function Xh(i){let{selection:o,currentValue:e,currentValues:t,nextValue:r}=i;return o==="none"?{value:e,values:t.slice()}:o==="single"?{value:r,values:[r]}:{value:void 0,values:t.includes(r)?t.filter(s=>s!==r):[...t,r]}}function Zh(i){let{itemWidths:o,containerWidth:e,overflowTriggerWidth:t,minVisibleItems:r=0}=i;if(!o.length)return{visibleIndexes:[],overflowIndexes:[],needsOverflow:!1};let n=Math.max(0,e),s=Math.max(0,t),d=k=>o.slice(0,k).map((C,S)=>S),h=k=>o.slice(k).map((C,S)=>k+S);if(o.reduce((k,C)=>k+Math.max(0,C),0)<=n)return{visibleIndexes:d(o.length),overflowIndexes:[],needsOverflow:!1};let f=Math.min(Math.max(0,r),o.length),x=o.length;for(;x>f&&!(o.slice(0,x).reduce((C,S)=>C+Math.max(0,S),0)+s<=n);)x-=1;return{visibleIndexes:d(x),overflowIndexes:h(x),needsOverflow:x<o.length}}import{css as pg,html as Qh,LitElement as mg}from"lit";import{customElement as gg,property as Tr,state as fg}from"lit/decorators.js";var mt=class extends mg{constructor(){super(...arguments);this.variant="default";this.size="md";this.radius="md";this.value="";this.pressed=!1;this.disabled=!1;this.grouped=!1;this.first=!1;this.last=!1;this.vertical=!1;this.indicatorSelected=!1;this.dividerHidden=!1;this.interactionActive=!1;this.ripple=!1;this._ripples=[];this._rippleId=0;this._explicitAttrs=new Set;this._emitActivate=()=>{this.disabled||this.dispatchEvent(new CustomEvent("button-group-item-activate",{detail:{value:this.value,item:this},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitActivate())};this._onPointerDown=e=>{if(!this.ripple||this.disabled)return;let t=e.currentTarget;if(!t)return;let r=t.getBoundingClientRect(),n=Math.max(r.width,r.height)*1.15,s=e.clientX-r.left,d=e.clientY-r.top,h=++this._rippleId;this._ripples=[...this._ripples,{id:h,x:s,y:d,size:n}],window.setTimeout(()=>{this._ripples=this._ripples.filter(p=>p.id!==h)},560)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation"),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(){let e=F(this,"button");!this._explicitAttrs.has("ripple")&&typeof e.ripple=="boolean"&&this.ripple!==e.ripple&&(this.ripple=e.ripple)}trigger(){this._emitActivate()}render(){return Qh`
|
|
755
755
|
<button
|
|
756
756
|
part="button"
|
|
757
757
|
type="button"
|
|
@@ -2587,7 +2587,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
2587
2587
|
color: var(--lui-color-fg);
|
|
2588
2588
|
background: color-mix(in srgb, var(--lui-color-fg) 8%, transparent);
|
|
2589
2589
|
}
|
|
2590
|
-
`;var zp={"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"},Ks={"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"},Ep={en:zp,"en-us":zp,zh:Ks,"zh-cn":Ks},za="zh-cn",Oc=new Map,Ws="locale-change";function Af(i){if(!i)return Ks;let o=i.trim().toLowerCase();return Ep[o]??Ep[o.split("-")[0]]??Ks}function oe(i,o){let e=(i||za).trim().toLowerCase();return{...Af(e),...Oc.get(e)??{},...o??{}}}function ie(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 F3(){return za}function Sp(i){let o=i.trim().toLowerCase();!o||o===za||(za=o,globalThis.dispatchEvent(new CustomEvent(Ws,{detail:{locale:o}})))}function $p(i,o){let e=i.trim().toLowerCase();e&&(Oc.set(e,{...Oc.get(e)??{},...o}),e===za&&globalThis.dispatchEvent(new CustomEvent(Ws,{detail:{locale:e}})))}function ye(i){return globalThis.addEventListener(Ws,i),()=>globalThis.removeEventListener(Ws,i)}function N3(i,o,e,t,r){return ie(oe(t,r),i,o,e)}import{css as If,html as fo,LitElement as Vf,nothing as Fi}from"lit";import{customElement as Df,property as Ht,query as jp,state as Pp}from"lit/decorators.js";import{css as Hc,html as lt,LitElement as Ap}from"lit";import{customElement as Rc,property as Ee,query as Us,state as Gs}from"lit/decorators.js";import{css as jf}from"lit";var Vi=jf`
|
|
2590
|
+
`;var zp={"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"},Ks={"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"},Ep={en:zp,"en-us":zp,zh:Ks,"zh-cn":Ks},za="zh-cn",Oc=new Map,Ws="locale-change";function Af(i){if(!i)return Ks;let o=i.trim().toLowerCase();return Ep[o]??Ep[o.split("-")[0]]??Ks}function oe(i,o){let e=(i||za).trim().toLowerCase();return{...Af(e),...Oc.get(e)??{},...o??{}}}function ie(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 N3(){return za}function Sp(i){let o=i.trim().toLowerCase();!o||o===za||(za=o,globalThis.dispatchEvent(new CustomEvent(Ws,{detail:{locale:o}})))}function $p(i,o){let e=i.trim().toLowerCase();e&&(Oc.set(e,{...Oc.get(e)??{},...o}),e===za&&globalThis.dispatchEvent(new CustomEvent(Ws,{detail:{locale:e}})))}function ye(i){return globalThis.addEventListener(Ws,i),()=>globalThis.removeEventListener(Ws,i)}function L3(i,o,e,t,r){return ie(oe(t,r),i,o,e)}import{css as If,html as fo,LitElement as Vf,nothing as Fi}from"lit";import{customElement as Df,property as Ht,query as jp,state as Pp}from"lit/decorators.js";import{css as Hc,html as lt,LitElement as Ap}from"lit";import{customElement as Rc,property as Ee,query as Us,state as Gs}from"lit/decorators.js";import{css as jf}from"lit";var Vi=jf`
|
|
2591
2591
|
.option-row {
|
|
2592
2592
|
align-items: center;
|
|
2593
2593
|
gap: var(--lui-option-gap);
|
|
@@ -13509,7 +13509,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13509
13509
|
.panel { max-height: calc(100vh - 28px); }
|
|
13510
13510
|
.footer { display: none; }
|
|
13511
13511
|
}
|
|
13512
|
-
`],a([Fo({type:Boolean,reflect:!0})],jt.prototype,"open",2),a([Fo({attribute:!1})],jt.prototype,"items",2),a([Fo({reflect:!0})],jt.prototype,"size",2),a([Fo({reflect:!0})],jt.prototype,"backdrop",2),a([Fo()],jt.prototype,"placeholder",2),a([Fo({attribute:"empty-text"})],jt.prototype,"emptyText",2),a([Fo()],jt.prototype,"hotkey",2),a([Fo({type:Boolean,attribute:"close-on-select"})],jt.prototype,"closeOnSelect",2),a([Fo({type:Boolean,attribute:"close-on-outside-press"})],jt.prototype,"closeOnOutsidePress",2),a([Fo({type:Boolean,attribute:"show-footer"})],jt.prototype,"showFooter",2),a([a0()],jt.prototype,"_query",2),a([a0()],jt.prototype,"_activeIndex",2),a([r4("input")],jt.prototype,"_inputEl",2),jt=a([t4("lui-command-palette")],jt);import{css as c4,html as Xa,LitElement as d4,nothing as kl}from"lit";import{customElement as u4,property as No}from"lit/decorators.js";var a4={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},s4={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Un(i){return i?a4[i]??null:null}function ni(i){let o=Un(i);return o?s4[o]:""}function l4(i,o=!1){let e=Un(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function
|
|
13512
|
+
`],a([Fo({type:Boolean,reflect:!0})],jt.prototype,"open",2),a([Fo({attribute:!1})],jt.prototype,"items",2),a([Fo({reflect:!0})],jt.prototype,"size",2),a([Fo({reflect:!0})],jt.prototype,"backdrop",2),a([Fo()],jt.prototype,"placeholder",2),a([Fo({attribute:"empty-text"})],jt.prototype,"emptyText",2),a([Fo()],jt.prototype,"hotkey",2),a([Fo({type:Boolean,attribute:"close-on-select"})],jt.prototype,"closeOnSelect",2),a([Fo({type:Boolean,attribute:"close-on-outside-press"})],jt.prototype,"closeOnOutsidePress",2),a([Fo({type:Boolean,attribute:"show-footer"})],jt.prototype,"showFooter",2),a([a0()],jt.prototype,"_query",2),a([a0()],jt.prototype,"_activeIndex",2),a([r4("input")],jt.prototype,"_inputEl",2),jt=a([t4("lui-command-palette")],jt);import{css as c4,html as Xa,LitElement as d4,nothing as kl}from"lit";import{customElement as u4,property as No}from"lit/decorators.js";var a4={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},s4={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Un(i){return i?a4[i]??null:null}function ni(i){let o=Un(i);return o?s4[o]:""}function l4(i,o=!1){let e=Un(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function lE(i,o=!1){let e=l4(i,o);return e?`var(${e})`:""}var cE=Object.freeze(["info","success","warning","danger"]);var cr=class extends d4{constructor(){super(...arguments);this.status="info";this.variant="soft";this.radius="md";this.title="";this.description="";this.icon="";this.noIcon=!1;this.closable=!1}connectedCallback(){super.connectedCallback(),this._localeCleanup=ye(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(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=F(this,"alert"),t=Un(this.status)??"info",r=e.variant??this.variant,n=this.icon||ni(t),s=!this.noIcon&&n!=="";return Xa`
|
|
13513
13513
|
<div
|
|
13514
13514
|
class="alert"
|
|
13515
13515
|
part="base"
|
|
@@ -14851,7 +14851,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14851
14851
|
@keyframes lui-dialog-loading-spin {
|
|
14852
14852
|
to { transform: rotate(360deg); }
|
|
14853
14853
|
}
|
|
14854
|
-
`,document.head.appendChild(r)}return o}function H5(i){let o=typeof i=="string"?{message:i}:i,e=nu({title:o.title??Zn("dialog.loading_title","\u8BF7\u7A0D\u5019"),message:void 0,noClose:o.noClose??!0,closeOnOutsidePress:o.closeOnOutsidePress??!1,shakeOnOutsideClick:o.shakeOnOutsideClick,placement:o.placement,offset:o.offset,backdrop:o.backdrop,backdropStyle:o.backdropStyle,backdropContent:o.backdropContent,noHeader:o.noHeader,noFooter:o.noFooter,draggable:o.draggable,destroyOnClose:o.destroyOnClose,fullscreen:o.fullscreen,width:o.width,portal:o.portal,overlayLayer:o.overlayLayer,container:o.container}),t=O5(o.message??Zn("dialog.loading_message","\u5904\u7406\u4E2D..."));return e.appendChild(t),e.show(),{close:()=>au(e),update(r){let n=typeof r=="string"?{message:r}:r;n.title!=null&&(e.title=n.title,e.requestUpdate());let s=t.querySelector('[data-role="message"]');n.message!=null&&s&&(s.textContent=n.message)}}}function R5(){[...El].forEach(i=>i.close?.())}var I5={create:Ja,open:su,alert:A5,confirm:j5,prompt:P5,loading:H5,closeAll:R5};function b0(i,o){let e=ho();return ie(oe(e.locale,e.translations),i,o)}function y0(i,o="default"){let e=document.createElement("lui-button");return re(e,ht("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function cu(i){return{...i,source:i.source?[...i.source]:void 0,fields:i.fields?i.fields.map(cu):void 0,condition:i.condition?{...i.condition}:void 0}}function V5(i){return{...i,fields:i.fields.map(cu)}}function $l(i,o){return{...i,fields:i.fields?i.fields.map(cu):void 0,steps:i.steps?i.steps.map(V5):void 0,defaultValues:i.defaultValues?{...i.defaultValues}:void 0,onSubmit:o??i.onSubmit}}function du(i){let o="schema"in i?i.schema:i,e=document.createElement("lui-form");re(e,ht("form")),e.schema=$l(o);let t=!1;return{el:e,get mounted(){return t&&e.isConnected},get visible(){return!e.hidden},mount(n){return n&&!e.isConnected&&(n.appendChild(e),t=!0),this},unmount(){return e.isConnected&&e.remove(),t=!1,this},show(){return e.hidden=!1,this},hide(){return e.hidden=!0,this},update(n){let s=e.schema??$l(o);return e.schema=$l({...s,...n,onSubmit:n.onSubmit??s.onSubmit}),this},destroy(){this.unmount()},submit(){return Promise.resolve(e.submit())},validate(){return e.validate()},reset(n){e.reset(n)},getValues(){return e.getValues()},setValues(n){e.setValues(n)},getValue(n){return e.getValue(n)},setValue(n,s){e.setValue(n,s)},focusField(n){return e.focusField(n)},scrollToField(n){return e.scrollToField(n)}}}var D5=du;function k0(i){let o=i.schema.onSubmit,e=$l(i.schema,async x=>{await o?.(x),h(x)}),t=du(e),r,n=!1,s=new Promise(x=>{r=x}),d=Ja({...i,content:t.el,showCancel:!1}),h=x=>{n||(n=!0,r(x),d.destroy())},p=!!e.steps?.length;if(t.el.showActions=p,!p){let x=y0(i.cancelText??e.cancelLabel??b0("common.cancel","\u53D6\u6D88")),k=y0(i.submitText??e.submitLabel??b0("common.submit","\u63D0\u4EA4"),"primary");x.addEventListener("click",()=>h(null),{once:!0}),k.addEventListener("click",()=>t.submit(),{once:!1}),d.el.append(x,k)}return d.el.addEventListener("close",x=>{x.target===d.el&&h(null)}),{el:d.el,form:t,submit(){return t.submit()},validate(){return t.validate()},reset(x){t.reset(x)},getValues(){return t.getValues()},setValues(x){t.setValues(x)},getValue(x){return t.getValue(x)},setValue(x,k){t.setValue(x,k)},focusField(x){return t.focusField(x)},scrollToField(x){return t.scrollToField(x)},get mounted(){return d.mounted},get visible(){return d.visible},get closed(){return s},mount(x){return d.mount(x),this},unmount(){return d.unmount(),this},show(){return d.show(),this},hide(){return d.hide(),this},close(x){h(x??null)},update(x){return d.update(x),this},destroy(){d.destroy()}}}function lu(i){let o=k0(i);return o.show(),o}function F5(i){return"onSubmit"in i?lu({schema:i}):lu(i)}var N5={create:du,open:lu,prompt:F5};function L5(){let i=document.createElement("lui-context-menu");return re(i,ht("contextMenu")),i.trigger="manual",i}function uu(i,o){i.heading=o.heading??"",i.headingIcon=o.headingIcon??"",i.placement=o.placement??"bottom-start","items"in o&&o.items!==void 0&&(i.items=o.items),i.closeOnSelect=o.closeOnSelect??!0,i.closeOnOutsidePress=o.closeOnOutsidePress??!0,i.closeOnEscape=o.closeOnEscape??!0,i.submenuTrigger=o.submenuTrigger??"hover",i.backdrop=o.backdrop??"none",i.backdropStyle=o.backdropStyle??""}function Tl(i={}){let o=L5(),e=null,t=!1,r=s=>{e&&(o.removeEventListener("select",e),e=null),s&&(e=d=>{s(d.detail)},o.addEventListener("select",e))},n={el:o,get mounted(){return t&&o.isConnected},get visible(){return o.open},mount(s){if(o.isConnected)return this;let d=Zt("menu",s??i.container??Uo()??Wo());return d.appendChild(o),zt(o,d,"menu"),t=!0,this},unmount(){return o.isConnected&&o.remove(),t=!1,this},show(s){o.isConnected||this.mount();let d={...i,...s};uu(o,d),nt(o),r(d.onSelect),o.showAt(d.x,d.y,{items:d.items,context:d.context,triggerEvent:d.triggerEvent,source:d.source??"api"})},hide(){return o.hide(),this},update(s){return Object.assign(i,s),uu(o,{x:0,y:0,...i}),this},destroy(){r(void 0),o.hide(),this.unmount()}};return(i.items||i.heading||i.headingIcon||i.placement)&&uu(o,{x:0,y:0,...i}),n}var on=null,x0=new WeakMap;function w0(i){if(i.container){let o=x0.get(i.container);return(!o||!o.el.isConnected)&&(o=Tl({container:i.container}),x0.set(i.container,o)),o.show(i),o}return(!on||!on.el.isConnected)&&(on=Tl()),on.show(i),on}function _0(){document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.()})}function B5(){on?.destroy(),on=null,document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.(),i.remove()})}var q5={create:Tl,show:w0,hideAll:_0,destroyAll:B5};function es(i,o,e){if(e==null)return;let t=typeof e=="function"?e():e;if(typeof t=="string"){let n=document.createElement("div");n.slot=o,n.textContent=t,i.appendChild(n);return}if(t instanceof DocumentFragment){let n=document.createElement("div");n.slot=o,n.appendChild(t),i.appendChild(n);return}if(t instanceof HTMLElement||t instanceof SVGElement){t.setAttribute("slot",o),i.appendChild(t);return}let r=document.createElement("div");r.slot=o,r.appendChild(t),i.appendChild(r)}function K5(i){let o=document.createElement("lui-popover");return re(o,ht("popover")),i.trigger!=null&&(o.trigger=i.trigger),i.placement!=null&&(o.placement=i.placement),i.disabled!=null&&(o.disabled=i.disabled),i.interactive!=null&&(o.interactive=i.interactive),i.showArrow!=null&&(o.showArrow=i.showArrow),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.closeOnEsc!=null&&(o.closeOnEsc=i.closeOnEsc),i.openDelay!=null&&(o.openDelay=i.openDelay),i.closeDelay!=null&&(o.closeDelay=i.closeDelay),i.offsetDistance!=null&&(o.offsetDistance=i.offsetDistance),i.autoFlip!=null&&(o.autoFlip=i.autoFlip),i.autoShift!=null&&(o.autoShift=i.autoShift),i.sameWidth!=null&&(o.sameWidth=i.sameWidth),i.maxWidth!=null&&(o.maxWidth=i.maxWidth),i.maxHeight!=null&&(o.maxHeight=i.maxHeight),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),es(o,"trigger",i.triggerContent),es(o,"header",i.header),es(o,"content",i.content),es(o,"footer",i.footer),es(o,"backdrop",i.backdropContent),o}function hu(i={}){let o=K5(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=()=>{t||(t=!0,r({action:"close"}))};return o.addEventListener("close",h=>{h.target===o&&s()}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.portal&&o._portalHost&&nt(o._portalHost),o.show(),this},hide(){return o.hide(),this},close(){o.hide(),s()},update(h){return Object.assign(o,h),this},destroy(){t||s(),this.unmount()}}}function W5(i={}){let o=hu({...i,trigger:"manual"});return o.show(),o}function U5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.()})}function G5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.(),i.remove()})}var Y5={create:hu,open:W5,closeAll:U5,destroyAll:G5};var io=new Map;function X5(){return Zt("toast",Uo()??Wo())}function z0(i){let o=ht("toast"),e=typeof o.position=="string"?o.position:void 0;return i??e??"top-right"}function pu(i){let o=ho();i.locale=o.locale,i.translations=o.translations,re(i,ht("toast"))}function jl(){for(let[i,o]of io)o?.isConnected||io.delete(i)}function Z5(i){let o=io.get(i);o&&(io.delete(i),o.isConnected&&o.remove())}function Q5(i,o,e,t,r,n){jl();let s=z0(i),d=io.get(s);if(d?.isConnected)return pu(d),nt(d),d.position=s,typeof o=="number"&&(d.max=o),typeof e=="string"&&(d.radius=e),typeof t=="boolean"&&(d.stacked=t),typeof r=="number"&&(d.stackMaxVisible=r),typeof n=="number"&&(d.stackGap=n),d;let h=document.createElement("lui-toast");h.listen=!1,pu(h),h.position=s,typeof o=="number"&&(h.max=o),typeof e=="string"&&(h.radius=e),typeof t=="boolean"&&(h.stacked=t),typeof r=="number"&&(h.stackMaxVisible=r),typeof n=="number"&&(h.stackGap=n),h.addEventListener("empty",()=>Z5(s));let p=X5();return p.appendChild(h),zt(h,p,"toast"),io.set(s,h),h}function E0(i={}){let o=!1,e=null,t=r=>{if(e?.isConnected)return e;let n=z0(i.position);e=document.createElement("lui-toast"),e.listen=!1,pu(e),e.position=n,typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap);let s=Zt("toast",r??Uo()??Wo());return s.appendChild(e),zt(e,s,"toast"),o=!0,e};return{get el(){return t()},get mounted(){return o&&!!e?.isConnected},get visible(){return!!e?.isConnected},mount(r){return t(r),this},unmount(){return e?.isConnected&&e.remove(),o=!1,this},show(r){let n=typeof r=="string"?{message:r}:r;return t().show({level:n.level??i.level,message:n.message,duration:n.duration??i.duration,radius:n.radius??i.radius,pauseOnHover:n.pauseOnHover??i.pauseOnHover,showProgress:n.showProgress??i.showProgress,action:n.action,delay:n.delay,stacked:n.stacked??i.stacked,stackMaxVisible:n.stackMaxVisible??i.stackMaxVisible,stackGap:n.stackGap??i.stackGap})},hide(){return e?.clear(),this},update(r){return Object.assign(i,r),e&&(typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap)),this},destroy(){this.unmount()},close(r){return e?e.close(r):!1},updateToast(r,n){if(!e)return!1;let s=typeof n=="string"?{message:n}:n;return e.updateToast(r,s)},clear(){e?.clear()}}}function J5(){jl();for(let i of io.values())i.clear()}function mu(i){let o=typeof i=="string"?{message:i}:i;return Q5(o.position,o.max,o.radius,o.stacked,o.stackMaxVisible,o.stackGap).show({level:o.level,message:o.message,duration:o.duration,radius:o.radius,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap})}function M0(i){jl();for(let o of io.values())if(o.has(i))return o;return null}function Al(i,o,e){let t=typeof o=="string"?{message:o,duration:e}:o;return mu({...t,level:i,duration:t.duration??e})}function C0(i,o,e){return i==null?{message:o}:typeof i=="string"?{message:i}:typeof i=="function"?{message:i(e)}:i}var Ai={create:E0,show:mu,clearAll:J5,close(i){let o=M0(i);return o?o.close(i):!1},update(i,o){let e=M0(i);if(!e)return!1;let t=typeof o=="string"?{message:o}:o;return e.updateToast(i,t)},loading(i){let o=typeof i=="string"?{message:i}:i,e=mu({level:o.level??"info",message:o.message,duration:0,position:o.position,max:o.max,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress??!1,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap});return{id:e,close:()=>Ai.close(e),update:t=>{let r=typeof t=="string"?{message:t}:t;return Ai.update(e,r)},info:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"info",duration:2500,...r})},warning:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"warning",duration:3e3,...r})},success:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"success",duration:2500,...r})},error:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"error",duration:3500,...r})}}},async promise(i,o){let e=Ai.loading(o.loading);try{let t=await(typeof i=="function"?i():i),r=C0(o.success,"Completed successfully",t);return(o.successStrategy??(o.closeOnSuccess?"close":"update"))==="close"?e.close():e.update({level:"success",duration:o.successDuration??2500,...r}),t}catch(t){let r=C0(o.error,t instanceof Error?t.message:"Something went wrong",t);throw(o.errorStrategy??(o.closeOnError?"close":"update"))==="close"?e.close():e.update({level:"error",duration:o.errorDuration??3500,...r}),t}},closeAll(i){if(jl(),i){let o=io.get(i);if(!o?.isConnected){io.delete(i);return}o.clear();return}for(let[o,e]of io){if(!e?.isConnected){io.delete(o);continue}e.clear()}},info(i,o){return Al("info",i,o)},success(i,o){return Al("success",i,o)},warning(i,o){return Al("warning",i,o)},error(i,o){return Al("error",i,o)}};function gu(i,o){o.columns!=null&&(i.columns=o.columns),o.data!=null&&(i.data=o.data),o.dataSource!=null&&(i.dataSource=o.dataSource),o.source!=null&&(i.source=o.source),o.rowKey!=null&&(i.rowKey=o.rowKey),o.size!=null&&(i.size=o.size),o.selection!=null&&(i.selection=o.selection),o.selectedRowKeys!=null&&(i.selectedRowKeys=[...o.selectedRowKeys]),o.bordered!=null&&(i.bordered=o.bordered),o.border!=null&&(i.border=o.border),o.noBorder!=null&&(i.noBorder=o.noBorder),o.striped!=null&&(i.striped=o.striped),o.hoverable!=null&&(i.hoverable=o.hoverable),o.stickyHeader!=null&&(i.stickyHeader=o.stickyHeader),o.showHeader!=null&&(i.showHeader=o.showHeader),o.columnResizable!=null&&(i.columnResizable=o.columnResizable),o.columnReorderable!=null&&(i.columnReorderable=o.columnReorderable),o.loading!=null&&(i.loading=o.loading),o.virtual!=null&&(i.virtual=o.virtual),o.virtualHeight!=null&&(i.virtualHeight=o.virtualHeight),o.rowHeight!=null&&(i.rowHeight=o.rowHeight),o.overscan!=null&&(i.overscan=o.overscan),o.pagination!=null&&(i.pagination=o.pagination),o.current!=null&&(i.current=o.current),o.pageSize!=null&&(i.pageSize=o.pageSize),o.total!=null&&(i.total=o.total),o.showSizeChanger!=null&&(i.showSizeChanger=o.showSizeChanger),o.emptyText!=null&&(i.emptyText=o.emptyText),o.sortKey!=null&&(i.sortKey=o.sortKey),o.sortOrder!=null&&(i.sortOrder=o.sortOrder),o.rowClickable!=null&&(i.rowClickable=o.rowClickable),o.selectOnClick!=null&&(i.selectOnClick=o.selectOnClick),o.rowAnimation!=null&&(i.rowAnimation=o.rowAnimation),o.onRow!=null&&(i.onRow=o.onRow),o.onCell!=null&&(i.onCell=o.onCell),o.onHeaderRow!=null&&(i.onHeaderRow=o.onHeaderRow),o.onHeaderCell!=null&&(i.onHeaderCell=o.onHeaderCell)}function S0(i={}){let o=document.createElement("lui-table");re(o,ht("table")),gu(o,i);let e=!1;return{el:o,get mounted(){return e&&o.isConnected},get visible(){return!o.hidden},mount(r){return r&&!o.isConnected&&(r.appendChild(o),e=!0),this},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.hidden=!1,this},hide(){return o.hidden=!0,this},update(r){return gu(o,r),this},destroy(){this.unmount()},setData(r){return o.dataSource=r,this},setColumns(r){return o.columns=r,this},getData(){return o.dataSource??o.source??o.data??[]},getColumns(){return o.columns??[]},setLoading(r){return o.loading=r,this},getSelectedRowKeys(){return[...o.selectedRowKeys??[]]},setSelectedRowKeys(r){return o.selectedRowKeys=[...r],this},setSelection(r,n=o.selectedRowKeys??[]){return o.selection=r,o.selectedRowKeys=[...n],this},setPagination(r){return gu(o,r),this}}}var ex={create:S0};export{N1 as BP,cr as LuiAlert,Qe as LuiAutocomplete,dt as LuiAvatar,$t as LuiAvatarGroup,We as LuiBackground,St as LuiBadge,Mt as LuiBreadcrumb,Wt as LuiBreadcrumbItem,kt as LuiButton,He as LuiButtonGroup,mt as LuiButtonGroupItem,sr as LuiCalendar,wt as LuiCard,Xe as LuiCascader,xt as LuiCheckbox,Ut as LuiCheckboxGroup,Ir as LuiCol,Kr as LuiCollapse,br as LuiCollapseItem,Be as LuiColorPicker,jt as LuiCommandPalette,Dt as LuiConfigProvider,Pe as LuiContextMenu,Gr as LuiDateRangePicker,it as LuiDatepicker,xe as LuiDialog,or as LuiDivider,qe as LuiDrawer,fi as LuiDropdown,ze as LuiDropmenu,Qr as LuiEmptyState,Wr as LuiFileInput,yt as LuiForm,At as LuiFormItem,Ce as LuiIcon,Me as LuiIconPicker,Te as LuiImage,ot as LuiImageCropper,Se as LuiInput,bt as LuiInputNumber,nr as LuiInputOpt,go as LuiMenu,fn as LuiMenuDivider,Ot as LuiMenuItem,jo as LuiOption,Di as LuiOptionGroup,ka as LuiOverlayRoot,Re as LuiPagination,rt as LuiPopconfirm,Q as LuiPopover,Ct as LuiProgress,Nt as LuiQrcode,Gt as LuiRadio,ar as LuiRadioGroup,Mo as LuiRow,vt as LuiScrollArea,pe as LuiSelect,er as LuiSkeleton,Ye as LuiSlider,Lr as LuiSpinner,Sr as LuiSplitter,ct as LuiStatistic,Vr as LuiSwitch,ft as LuiTab,qr as LuiTabPanel,Z as LuiTable,Bt as LuiTableColumn,Aa as LuiTabs,Pr as LuiTag,Ie as LuiText,Ge as LuiTextarea,Pt as LuiToast,fr as LuiTooltip,ae as LuiTree,Ze as LuiTreeSelect,P as baseStyles,nt as bringOverlayStackToFront,mc as builtinIconCollection,Ms as builtinIconNames,dn as builtinIconPrefix,Ep as builtinTranslations,f5 as commandPalette,q5 as contextMenu,ou as createCommandPalette,Tl as createContextMenu,Ja as createDialog,k0 as createDialogForm,iu as createDrawer,D5 as createForm,hu as createPopover,S0 as createTable,E0 as createToastHost,I5 as dialog,E5 as drawer,eu as encodeQr,Zt as ensureOverlayExternalLayer,xc as ensureOverlayLayer,kc as ensureOverlayRoot,mn as eventPathContainsOwnedOverlay,N5 as form,Sx as formatDate,Ex as formatSize,F3 as getLocale,Hs as hasRecentOverlayInteraction,_0 as hideAllContextMenus,gc as isImageIconSource,Rs as isOverlayTopmost,Os as markOverlayInteraction,oe as mergeTranslations,Un as normalizeStatus,ye as onLocaleChange,Y5 as popover,Ek as registerFormField,zt as registerOverlayStack,$p as registerTranslations,va as resolveBuiltinIcon,Af as resolveBuiltinTranslations,gn as resolveOverlayLayerRegistration,Sp as setLocale,dp as setOverlayOwner,Cs as setupBuiltinIcons,w0 as showContextMenu,l4 as statusColorToken,sE as statusColorVar,ni as statusIcon,lE as statusOrder,N3 as t,ex as table,pt as toCssLength,Ai as toast,A as tokens,ie as translate,Sk as unregisterFormField,mo as unregisterOverlayStack};
|
|
14854
|
+
`,document.head.appendChild(r)}return o}function H5(i){let o=typeof i=="string"?{message:i}:i,e=nu({title:o.title??Zn("dialog.loading_title","\u8BF7\u7A0D\u5019"),message:void 0,noClose:o.noClose??!0,closeOnOutsidePress:o.closeOnOutsidePress??!1,shakeOnOutsideClick:o.shakeOnOutsideClick,placement:o.placement,offset:o.offset,backdrop:o.backdrop,backdropStyle:o.backdropStyle,backdropContent:o.backdropContent,noHeader:o.noHeader,noFooter:o.noFooter,draggable:o.draggable,destroyOnClose:o.destroyOnClose,fullscreen:o.fullscreen,width:o.width,portal:o.portal,overlayLayer:o.overlayLayer,container:o.container}),t=O5(o.message??Zn("dialog.loading_message","\u5904\u7406\u4E2D..."));return e.appendChild(t),e.show(),{close:()=>au(e),update(r){let n=typeof r=="string"?{message:r}:r;n.title!=null&&(e.title=n.title,e.requestUpdate());let s=t.querySelector('[data-role="message"]');n.message!=null&&s&&(s.textContent=n.message)}}}function R5(){[...El].forEach(i=>i.close?.())}var I5={create:Ja,open:su,alert:A5,confirm:j5,prompt:P5,loading:H5,closeAll:R5};function b0(i,o){let e=ho();return ie(oe(e.locale,e.translations),i,o)}function y0(i,o="default"){let e=document.createElement("lui-button");return re(e,ht("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function cu(i){return{...i,source:i.source?[...i.source]:void 0,fields:i.fields?i.fields.map(cu):void 0,condition:i.condition?{...i.condition}:void 0}}function V5(i){return{...i,fields:i.fields.map(cu)}}function $l(i,o){return{...i,fields:i.fields?i.fields.map(cu):void 0,steps:i.steps?i.steps.map(V5):void 0,defaultValues:i.defaultValues?{...i.defaultValues}:void 0,onSubmit:o??i.onSubmit}}function du(i){let o="schema"in i?i.schema:i,e=document.createElement("lui-form");re(e,ht("form")),e.schema=$l(o);let t=!1;return{el:e,get mounted(){return t&&e.isConnected},get visible(){return!e.hidden},mount(n){return n&&!e.isConnected&&(n.appendChild(e),t=!0),this},unmount(){return e.isConnected&&e.remove(),t=!1,this},show(){return e.hidden=!1,this},hide(){return e.hidden=!0,this},update(n){let s=e.schema??$l(o);return e.schema=$l({...s,...n,onSubmit:n.onSubmit??s.onSubmit}),this},destroy(){this.unmount()},submit(){return Promise.resolve(e.submit())},validate(){return e.validate()},reset(n){e.reset(n)},getValues(){return e.getValues()},setValues(n){e.setValues(n)},getValue(n){return e.getValue(n)},setValue(n,s){e.setValue(n,s)},focusField(n){return e.focusField(n)},scrollToField(n){return e.scrollToField(n)}}}var D5=du;function k0(i){let o=i.schema.onSubmit,e=$l(i.schema,async x=>{await o?.(x),h(x)}),t=du(e),r,n=!1,s=new Promise(x=>{r=x}),d=Ja({...i,content:t.el,showCancel:!1}),h=x=>{n||(n=!0,r(x),d.destroy())},p=!!e.steps?.length;if(t.el.showActions=p,!p){let x=y0(i.cancelText??e.cancelLabel??b0("common.cancel","\u53D6\u6D88")),k=y0(i.submitText??e.submitLabel??b0("common.submit","\u63D0\u4EA4"),"primary");x.addEventListener("click",()=>h(null),{once:!0}),k.addEventListener("click",()=>t.submit(),{once:!1}),d.el.append(x,k)}return d.el.addEventListener("close",x=>{x.target===d.el&&h(null)}),{el:d.el,form:t,submit(){return t.submit()},validate(){return t.validate()},reset(x){t.reset(x)},getValues(){return t.getValues()},setValues(x){t.setValues(x)},getValue(x){return t.getValue(x)},setValue(x,k){t.setValue(x,k)},focusField(x){return t.focusField(x)},scrollToField(x){return t.scrollToField(x)},get mounted(){return d.mounted},get visible(){return d.visible},get closed(){return s},mount(x){return d.mount(x),this},unmount(){return d.unmount(),this},show(){return d.show(),this},hide(){return d.hide(),this},close(x){h(x??null)},update(x){return d.update(x),this},destroy(){d.destroy()}}}function lu(i){let o=k0(i);return o.show(),o}function F5(i){return"onSubmit"in i?lu({schema:i}):lu(i)}var N5={create:du,open:lu,prompt:F5};function L5(){let i=document.createElement("lui-context-menu");return re(i,ht("contextMenu")),i.trigger="manual",i}function uu(i,o){i.heading=o.heading??"",i.headingIcon=o.headingIcon??"",i.placement=o.placement??"bottom-start","items"in o&&o.items!==void 0&&(i.items=o.items),i.closeOnSelect=o.closeOnSelect??!0,i.closeOnOutsidePress=o.closeOnOutsidePress??!0,i.closeOnEscape=o.closeOnEscape??!0,i.submenuTrigger=o.submenuTrigger??"hover",i.backdrop=o.backdrop??"none",i.backdropStyle=o.backdropStyle??""}function Tl(i={}){let o=L5(),e=null,t=!1,r=s=>{e&&(o.removeEventListener("select",e),e=null),s&&(e=d=>{s(d.detail)},o.addEventListener("select",e))},n={el:o,get mounted(){return t&&o.isConnected},get visible(){return o.open},mount(s){if(o.isConnected)return this;let d=Zt("menu",s??i.container??Uo()??Wo());return d.appendChild(o),zt(o,d,"menu"),t=!0,this},unmount(){return o.isConnected&&o.remove(),t=!1,this},show(s){o.isConnected||this.mount();let d={...i,...s};uu(o,d),nt(o),r(d.onSelect),o.showAt(d.x,d.y,{items:d.items,context:d.context,triggerEvent:d.triggerEvent,source:d.source??"api"})},hide(){return o.hide(),this},update(s){return Object.assign(i,s),uu(o,{x:0,y:0,...i}),this},destroy(){r(void 0),o.hide(),this.unmount()}};return(i.items||i.heading||i.headingIcon||i.placement)&&uu(o,{x:0,y:0,...i}),n}var on=null,x0=new WeakMap;function w0(i){if(i.container){let o=x0.get(i.container);return(!o||!o.el.isConnected)&&(o=Tl({container:i.container}),x0.set(i.container,o)),o.show(i),o}return(!on||!on.el.isConnected)&&(on=Tl()),on.show(i),on}function _0(){document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.()})}function B5(){on?.destroy(),on=null,document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.(),i.remove()})}var q5={create:Tl,show:w0,hideAll:_0,destroyAll:B5};function es(i,o,e){if(e==null)return;let t=typeof e=="function"?e():e;if(typeof t=="string"){let n=document.createElement("div");n.slot=o,n.textContent=t,i.appendChild(n);return}if(t instanceof DocumentFragment){let n=document.createElement("div");n.slot=o,n.appendChild(t),i.appendChild(n);return}if(t instanceof HTMLElement||t instanceof SVGElement){t.setAttribute("slot",o),i.appendChild(t);return}let r=document.createElement("div");r.slot=o,r.appendChild(t),i.appendChild(r)}function K5(i){let o=document.createElement("lui-popover");return re(o,ht("popover")),i.trigger!=null&&(o.trigger=i.trigger),i.placement!=null&&(o.placement=i.placement),i.disabled!=null&&(o.disabled=i.disabled),i.interactive!=null&&(o.interactive=i.interactive),i.showArrow!=null&&(o.showArrow=i.showArrow),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.closeOnEsc!=null&&(o.closeOnEsc=i.closeOnEsc),i.openDelay!=null&&(o.openDelay=i.openDelay),i.closeDelay!=null&&(o.closeDelay=i.closeDelay),i.offsetDistance!=null&&(o.offsetDistance=i.offsetDistance),i.autoFlip!=null&&(o.autoFlip=i.autoFlip),i.autoShift!=null&&(o.autoShift=i.autoShift),i.sameWidth!=null&&(o.sameWidth=i.sameWidth),i.maxWidth!=null&&(o.maxWidth=i.maxWidth),i.maxHeight!=null&&(o.maxHeight=i.maxHeight),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),es(o,"trigger",i.triggerContent),es(o,"header",i.header),es(o,"content",i.content),es(o,"footer",i.footer),es(o,"backdrop",i.backdropContent),o}function hu(i={}){let o=K5(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=()=>{t||(t=!0,r({action:"close"}))};return o.addEventListener("close",h=>{h.target===o&&s()}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.portal&&o._portalHost&&nt(o._portalHost),o.show(),this},hide(){return o.hide(),this},close(){o.hide(),s()},update(h){return Object.assign(o,h),this},destroy(){t||s(),this.unmount()}}}function W5(i={}){let o=hu({...i,trigger:"manual"});return o.show(),o}function U5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.()})}function G5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.(),i.remove()})}var Y5={create:hu,open:W5,closeAll:U5,destroyAll:G5};var io=new Map;function X5(){return Zt("toast",Uo()??Wo())}function z0(i){let o=ht("toast"),e=typeof o.position=="string"?o.position:void 0;return i??e??"top-right"}function pu(i){let o=ho();i.locale=o.locale,i.translations=o.translations,re(i,ht("toast"))}function jl(){for(let[i,o]of io)o?.isConnected||io.delete(i)}function Z5(i){let o=io.get(i);o&&(io.delete(i),o.isConnected&&o.remove())}function Q5(i,o,e,t,r,n){jl();let s=z0(i),d=io.get(s);if(d?.isConnected)return pu(d),nt(d),d.position=s,typeof o=="number"&&(d.max=o),typeof e=="string"&&(d.radius=e),typeof t=="boolean"&&(d.stacked=t),typeof r=="number"&&(d.stackMaxVisible=r),typeof n=="number"&&(d.stackGap=n),d;let h=document.createElement("lui-toast");h.listen=!1,pu(h),h.position=s,typeof o=="number"&&(h.max=o),typeof e=="string"&&(h.radius=e),typeof t=="boolean"&&(h.stacked=t),typeof r=="number"&&(h.stackMaxVisible=r),typeof n=="number"&&(h.stackGap=n),h.addEventListener("empty",()=>Z5(s));let p=X5();return p.appendChild(h),zt(h,p,"toast"),io.set(s,h),h}function E0(i={}){let o=!1,e=null,t=r=>{if(e?.isConnected)return e;let n=z0(i.position);e=document.createElement("lui-toast"),e.listen=!1,pu(e),e.position=n,typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap);let s=Zt("toast",r??Uo()??Wo());return s.appendChild(e),zt(e,s,"toast"),o=!0,e};return{get el(){return t()},get mounted(){return o&&!!e?.isConnected},get visible(){return!!e?.isConnected},mount(r){return t(r),this},unmount(){return e?.isConnected&&e.remove(),o=!1,this},show(r){let n=typeof r=="string"?{message:r}:r;return t().show({level:n.level??i.level,message:n.message,duration:n.duration??i.duration,radius:n.radius??i.radius,pauseOnHover:n.pauseOnHover??i.pauseOnHover,showProgress:n.showProgress??i.showProgress,action:n.action,delay:n.delay,stacked:n.stacked??i.stacked,stackMaxVisible:n.stackMaxVisible??i.stackMaxVisible,stackGap:n.stackGap??i.stackGap})},hide(){return e?.clear(),this},update(r){return Object.assign(i,r),e&&(typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap)),this},destroy(){this.unmount()},close(r){return e?e.close(r):!1},updateToast(r,n){if(!e)return!1;let s=typeof n=="string"?{message:n}:n;return e.updateToast(r,s)},clear(){e?.clear()}}}function J5(){jl();for(let i of io.values())i.clear()}function mu(i){let o=typeof i=="string"?{message:i}:i;return Q5(o.position,o.max,o.radius,o.stacked,o.stackMaxVisible,o.stackGap).show({level:o.level,message:o.message,duration:o.duration,radius:o.radius,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap})}function M0(i){jl();for(let o of io.values())if(o.has(i))return o;return null}function Al(i,o,e){let t=typeof o=="string"?{message:o,duration:e}:o;return mu({...t,level:i,duration:t.duration??e})}function C0(i,o,e){return i==null?{message:o}:typeof i=="string"?{message:i}:typeof i=="function"?{message:i(e)}:i}var Ai={create:E0,show:mu,clearAll:J5,close(i){let o=M0(i);return o?o.close(i):!1},update(i,o){let e=M0(i);if(!e)return!1;let t=typeof o=="string"?{message:o}:o;return e.updateToast(i,t)},loading(i){let o=typeof i=="string"?{message:i}:i,e=mu({level:o.level??"info",message:o.message,duration:0,position:o.position,max:o.max,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress??!1,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap});return{id:e,close:()=>Ai.close(e),update:t=>{let r=typeof t=="string"?{message:t}:t;return Ai.update(e,r)},info:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"info",duration:2500,...r})},warning:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"warning",duration:3e3,...r})},success:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"success",duration:2500,...r})},error:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"error",duration:3500,...r})}}},async promise(i,o){let e=Ai.loading(o.loading);try{let t=await(typeof i=="function"?i():i),r=C0(o.success,"Completed successfully",t);return(o.successStrategy??(o.closeOnSuccess?"close":"update"))==="close"?e.close():e.update({level:"success",duration:o.successDuration??2500,...r}),t}catch(t){let r=C0(o.error,t instanceof Error?t.message:"Something went wrong",t);throw(o.errorStrategy??(o.closeOnError?"close":"update"))==="close"?e.close():e.update({level:"error",duration:o.errorDuration??3500,...r}),t}},closeAll(i){if(jl(),i){let o=io.get(i);if(!o?.isConnected){io.delete(i);return}o.clear();return}for(let[o,e]of io){if(!e?.isConnected){io.delete(o);continue}e.clear()}},info(i,o){return Al("info",i,o)},success(i,o){return Al("success",i,o)},warning(i,o){return Al("warning",i,o)},error(i,o){return Al("error",i,o)}};function gu(i,o){o.columns!=null&&(i.columns=o.columns),o.data!=null&&(i.data=o.data),o.dataSource!=null&&(i.dataSource=o.dataSource),o.source!=null&&(i.source=o.source),o.rowKey!=null&&(i.rowKey=o.rowKey),o.size!=null&&(i.size=o.size),o.selection!=null&&(i.selection=o.selection),o.selectedRowKeys!=null&&(i.selectedRowKeys=[...o.selectedRowKeys]),o.bordered!=null&&(i.bordered=o.bordered),o.border!=null&&(i.border=o.border),o.noBorder!=null&&(i.noBorder=o.noBorder),o.striped!=null&&(i.striped=o.striped),o.hoverable!=null&&(i.hoverable=o.hoverable),o.stickyHeader!=null&&(i.stickyHeader=o.stickyHeader),o.showHeader!=null&&(i.showHeader=o.showHeader),o.columnResizable!=null&&(i.columnResizable=o.columnResizable),o.columnReorderable!=null&&(i.columnReorderable=o.columnReorderable),o.loading!=null&&(i.loading=o.loading),o.virtual!=null&&(i.virtual=o.virtual),o.virtualHeight!=null&&(i.virtualHeight=o.virtualHeight),o.rowHeight!=null&&(i.rowHeight=o.rowHeight),o.overscan!=null&&(i.overscan=o.overscan),o.pagination!=null&&(i.pagination=o.pagination),o.current!=null&&(i.current=o.current),o.pageSize!=null&&(i.pageSize=o.pageSize),o.total!=null&&(i.total=o.total),o.showSizeChanger!=null&&(i.showSizeChanger=o.showSizeChanger),o.emptyText!=null&&(i.emptyText=o.emptyText),o.sortKey!=null&&(i.sortKey=o.sortKey),o.sortOrder!=null&&(i.sortOrder=o.sortOrder),o.rowClickable!=null&&(i.rowClickable=o.rowClickable),o.selectOnClick!=null&&(i.selectOnClick=o.selectOnClick),o.rowAnimation!=null&&(i.rowAnimation=o.rowAnimation),o.onRow!=null&&(i.onRow=o.onRow),o.onCell!=null&&(i.onCell=o.onCell),o.onHeaderRow!=null&&(i.onHeaderRow=o.onHeaderRow),o.onHeaderCell!=null&&(i.onHeaderCell=o.onHeaderCell)}function S0(i={}){let o=document.createElement("lui-table");re(o,ht("table")),gu(o,i);let e=!1;return{el:o,get mounted(){return e&&o.isConnected},get visible(){return!o.hidden},mount(r){return r&&!o.isConnected&&(r.appendChild(o),e=!0),this},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.hidden=!1,this},hide(){return o.hidden=!0,this},update(r){return gu(o,r),this},destroy(){this.unmount()},setData(r){return o.dataSource=r,this},setColumns(r){return o.columns=r,this},getData(){return o.dataSource??o.source??o.data??[]},getColumns(){return o.columns??[]},setLoading(r){return o.loading=r,this},getSelectedRowKeys(){return[...o.selectedRowKeys??[]]},setSelectedRowKeys(r){return o.selectedRowKeys=[...r],this},setSelection(r,n=o.selectedRowKeys??[]){return o.selection=r,o.selectedRowKeys=[...n],this},setPagination(r){return gu(o,r),this}}}var ex={create:S0};export{N1 as BP,cr as LuiAlert,Qe as LuiAutocomplete,dt as LuiAvatar,$t as LuiAvatarGroup,We as LuiBackground,St as LuiBadge,Mt as LuiBreadcrumb,Wt as LuiBreadcrumbItem,kt as LuiButton,He as LuiButtonGroup,mt as LuiButtonGroupItem,sr as LuiCalendar,wt as LuiCard,Xe as LuiCascader,xt as LuiCheckbox,Ut as LuiCheckboxGroup,Ir as LuiCol,Kr as LuiCollapse,br as LuiCollapseItem,Be as LuiColorPicker,jt as LuiCommandPalette,Dt as LuiConfigProvider,Pe as LuiContextMenu,Gr as LuiDateRangePicker,it as LuiDatepicker,xe as LuiDialog,or as LuiDivider,qe as LuiDrawer,fi as LuiDropdown,ze as LuiDropmenu,Qr as LuiEmptyState,Wr as LuiFileInput,yt as LuiForm,At as LuiFormItem,Ce as LuiIcon,Me as LuiIconPicker,Te as LuiImage,ot as LuiImageCropper,Se as LuiInput,bt as LuiInputNumber,nr as LuiInputOpt,go as LuiMenu,fn as LuiMenuDivider,Ot as LuiMenuItem,jo as LuiOption,Di as LuiOptionGroup,ka as LuiOverlayRoot,Re as LuiPagination,rt as LuiPopconfirm,Q as LuiPopover,Ct as LuiProgress,Nt as LuiQrcode,Gt as LuiRadio,ar as LuiRadioGroup,Mo as LuiRow,vt as LuiScrollArea,pe as LuiSelect,er as LuiSkeleton,Ye as LuiSlider,Lr as LuiSpinner,Sr as LuiSplitter,ct as LuiStatistic,Vr as LuiSwitch,ft as LuiTab,qr as LuiTabPanel,Z as LuiTable,Bt as LuiTableColumn,Aa as LuiTabs,Pr as LuiTag,Ie as LuiText,Ge as LuiTextarea,Pt as LuiToast,fr as LuiTooltip,ae as LuiTree,Ze as LuiTreeSelect,P as baseStyles,nt as bringOverlayStackToFront,mc as builtinIconCollection,Ms as builtinIconNames,dn as builtinIconPrefix,Ep as builtinTranslations,f5 as commandPalette,q5 as contextMenu,ou as createCommandPalette,Tl as createContextMenu,Ja as createDialog,k0 as createDialogForm,iu as createDrawer,D5 as createForm,hu as createPopover,S0 as createTable,E0 as createToastHost,I5 as dialog,E5 as drawer,eu as encodeQr,Zt as ensureOverlayExternalLayer,xc as ensureOverlayLayer,kc as ensureOverlayRoot,mn as eventPathContainsOwnedOverlay,N5 as form,Sx as formatDate,Ex as formatSize,N3 as getLocale,Hs as hasRecentOverlayInteraction,_0 as hideAllContextMenus,gc as isImageIconSource,Rs as isOverlayTopmost,Os as markOverlayInteraction,oe as mergeTranslations,Un as normalizeStatus,ye as onLocaleChange,Y5 as popover,Ek as registerFormField,zt as registerOverlayStack,$p as registerTranslations,va as resolveBuiltinIcon,Af as resolveBuiltinTranslations,gn as resolveOverlayLayerRegistration,Sp as setLocale,dp as setOverlayOwner,Cs as setupBuiltinIcons,w0 as showContextMenu,l4 as statusColorToken,lE as statusColorVar,ni as statusIcon,cE as statusOrder,L3 as t,ex as table,pt as toCssLength,Ai as toast,A as tokens,ie as translate,Sk as unregisterFormField,mo as unregisterOverlayStack};
|
|
14855
14855
|
/*! Bundled license information:
|
|
14856
14856
|
|
|
14857
14857
|
@lit-labs/virtualizer/layouts/shared/SizeCache.js:
|