ranui 0.2.1-alpha.3 → 0.2.1-alpha.5

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.
Files changed (100) hide show
  1. package/dist/builder.js +1 -1
  2. package/dist/{builtin-BkM0LLof.js → builtin-1lUEp_ro.js} +1 -1
  3. package/dist/{button-D0zcnKnG.js → button-Cj-XSCsd.js} +1 -1
  4. package/dist/button.js +1 -1
  5. package/dist/{card-CygMndQS.js → card-BHN9Xp4S.js} +1 -1
  6. package/dist/card.js +1 -1
  7. package/dist/{checkbox-D5om9aJO.js → checkbox-O_J_n1_W.js} +1 -1
  8. package/dist/checkbox.js +1 -1
  9. package/dist/{colorpicker-qWnaTlYX.js → colorpicker-CKA4xN-g.js} +4 -4
  10. package/dist/colorpicker.js +1 -1
  11. package/dist/components/input/index.d.ts +15 -0
  12. package/dist/{content-Rry-U6ir.js → content-YOKzMoc7.js} +1 -1
  13. package/dist/content.js +1 -1
  14. package/dist/{dropdown-DzdAR1nI.js → dropdown-CzGAVWYC.js} +1 -1
  15. package/dist/dropdown.js +1 -1
  16. package/dist/{factory-BkvRcCOx.js → factory-ZNhcQ4tf.js} +127 -127
  17. package/dist/{form-CUJpeQ7Q.js → form-B8afuJlF.js} +1 -1
  18. package/dist/form.js +1 -1
  19. package/dist/{glass-Bj1Zf8Hy.js → glass-BniIptBE.js} +1 -1
  20. package/dist/glass.js +1 -1
  21. package/dist/{icon-CtlZJISZ.js → icon-GZrfSeon.js} +1 -1
  22. package/dist/icon.js +1 -1
  23. package/dist/icons.js +1 -1
  24. package/dist/iife/button.iife.js +1 -1
  25. package/dist/iife/card.iife.js +1 -1
  26. package/dist/iife/checkbox.iife.js +1 -1
  27. package/dist/iife/colorpicker.iife.js +2 -2
  28. package/dist/iife/content.iife.js +1 -1
  29. package/dist/iife/dropdown.iife.js +1 -1
  30. package/dist/iife/form.iife.js +1 -1
  31. package/dist/iife/glass.iife.js +1 -1
  32. package/dist/iife/icon.iife.js +1 -1
  33. package/dist/iife/image.iife.js +1 -1
  34. package/dist/iife/input.iife.js +1 -1
  35. package/dist/iife/loading.iife.js +1 -1
  36. package/dist/iife/math.iife.js +1 -1
  37. package/dist/iife/mermaid.iife.js +1 -1
  38. package/dist/iife/message.iife.js +1 -1
  39. package/dist/iife/modal.iife.js +1 -1
  40. package/dist/iife/player.iife.js +1 -1
  41. package/dist/iife/popover.iife.js +1 -1
  42. package/dist/iife/progress.iife.js +1 -1
  43. package/dist/iife/radar.iife.js +1 -1
  44. package/dist/iife/route.iife.js +1 -1
  45. package/dist/iife/router.iife.js +1 -1
  46. package/dist/iife/scratch.iife.js +1 -1
  47. package/dist/iife/section.iife.js +1 -1
  48. package/dist/iife/select.iife.js +2 -2
  49. package/dist/iife/skeleton.iife.js +1 -1
  50. package/dist/iife/tab.iife.js +1 -1
  51. package/dist/iife/tabpane.iife.js +1 -1
  52. package/dist/iife/theme-switch.iife.js +1 -1
  53. package/dist/{image-ILZNlaGc.js → image-CqoQfJoV.js} +1 -1
  54. package/dist/image.js +1 -1
  55. package/dist/index.cjs +17 -17
  56. package/dist/index.iife.js +204 -204
  57. package/dist/index.js +29 -29
  58. package/dist/{input-CDH6zY9I.js → input-ZY2Wumze.js} +11 -2
  59. package/dist/input.js +1 -1
  60. package/dist/{loading-DJWGih1g.js → loading-M6gWxLbm.js} +1 -1
  61. package/dist/loading.js +1 -1
  62. package/dist/{math-DRmkEDSQ.js → math-8E-45Y8e.js} +1 -1
  63. package/dist/math.js +1 -1
  64. package/dist/{mermaid-CMhm7npE.js → mermaid-C1oQyPE3.js} +2 -2
  65. package/dist/mermaid.js +1 -1
  66. package/dist/{message-BpYJBvYn.js → message-CNdmbeLf.js} +2 -2
  67. package/dist/message.js +1 -1
  68. package/dist/{modal-BeQlDYDP.js → modal-gRagDkTb.js} +1 -1
  69. package/dist/modal.js +1 -1
  70. package/dist/{player-CQ4e3Yeo.js → player-BkkmkqR4.js} +2 -2
  71. package/dist/player.js +1 -1
  72. package/dist/{popover-eZMnL1F3.js → popover-BZKSLe3D.js} +3 -3
  73. package/dist/popover.js +1 -1
  74. package/dist/{progress-DyHgW4Ep.js → progress-vk40tuhm.js} +1 -1
  75. package/dist/progress.js +1 -1
  76. package/dist/{radar-D21Rccap.js → radar-Bg0cexzU.js} +1 -1
  77. package/dist/radar.js +1 -1
  78. package/dist/{route-pR5P4ann.js → route-CGwS0cd_.js} +1 -1
  79. package/dist/route.js +1 -1
  80. package/dist/{router-CewzSH7O.js → router-BK6DEkcN.js} +1 -1
  81. package/dist/router.js +1 -1
  82. package/dist/{scratch-BFVsgl-7.js → scratch-ClF1awGi.js} +1 -1
  83. package/dist/scratch.js +1 -1
  84. package/dist/{section-DSPCsIxv.js → section-BL0V7Kjf.js} +1 -1
  85. package/dist/section.js +1 -1
  86. package/dist/{select-B58nMfB1.js → select-DRKYa3W2.js} +4 -4
  87. package/dist/select.js +1 -1
  88. package/dist/{skeleton-DoHYMsTn.js → skeleton-D7JIbROq.js} +1 -1
  89. package/dist/skeleton.js +1 -1
  90. package/dist/{tab-BRPdZ9Ws.js → tab-DFVtDJb2.js} +1 -1
  91. package/dist/tab.js +1 -1
  92. package/dist/{tabpane-Owf72hw_.js → tabpane-C3qZGN-D.js} +1 -1
  93. package/dist/tabpane.js +1 -1
  94. package/dist/test/ssr/stream.test.d.ts +1 -0
  95. package/dist/{theme-switch-CZDIIonc.js → theme-switch-BXNH5uPD.js} +44 -44
  96. package/dist/theme-switch.js +1 -1
  97. package/dist/utils/builder/core.d.ts +15 -13
  98. package/docs/BUILDER.md +15 -0
  99. package/docs/COMPONENTS.md +42 -6
  100. package/package.json +1 -1
@@ -1 +1 @@
1
- var ranui_content=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ee(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)_(e,a);c===0&&v()}}]}function f(e){let t=h(e,!0);return g(t),b(t),()=>S(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>te(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function g(e){s&&s.owned.push(e)}function ee(e){o&&(o.sources.add(e),e.observers.add(o))}function _(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)_(t,i)}function v(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||y(t)}}finally{u=!1}}}function y(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&y(t);e.state===a&&b(e),e.state=r}}function b(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);x(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)_(t,a)}}finally{e.running=!1,o=t,s=n}}function x(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function S(e){e.disposed||(e.disposed=!0,x(e),e.observers.clear())}function te(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function C(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function w(e){return C(e)}var T=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ne=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},E=(e,t,n)=>{for(let r of e)T(r)&&(ne(r,t)&&n.push(r),E(r.childrenList,t,n))},D=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?C(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}},O=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new D)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new re(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${w(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${w(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof D,e.serialize())).join(``):a+=C(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},re=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${C(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof D,e.serialize())).join(``)}</template>`}},k=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(k(t)):e.concat(t),[]),A=e=>e==null?null:e instanceof R?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ie=(e,t)=>{if(n){k([t()]).forEach(t=>{let n=A(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];f(()=>{let e=k([t()]);for(let e of i)e.parentNode?.removeChild(e);let n=[],a=r;for(let t of e){let e=A(t);e!=null&&(a.after(e),a=e,n.push(e))}i=n})},ae=`__ranFor`,oe=e=>typeof e==`object`&&!!e&&e[ae]===!0,se=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=A(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},j=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},M=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=se(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();j(r,a),i=n})},N=`__ranIndex`,P=e=>typeof e==`object`&&!!e&&e[N]===!0,F=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=A(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},I=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(F(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}j(r,i.map(e=>e.node).filter(e=>e!=null))})},L=(e,t)=>{k(t).forEach(t=>{if(oe(t)){M(e,t);return}if(P(t)){I(e,t);return}if(typeof t==`function`){ie(e,t);return}let n=A(t);n!=null&&e.appendChild(n)})},R=class{el;constructor(e){this.el=n?new O(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return L(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new z(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},z=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return L(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},B=e=>new R(e),V=()=>B(`slot`),H=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},U=(e=8)=>Math.random().toString(36).substring(2,e+2),W=e=>typeof e==`function`,G=12e4,ce=`__ranuts_bridge__`,le=`default`,K=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},ue=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=le){this.targetOrigin=t,this.channel=n,this.senderId=U(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,K.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ce,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(W(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=U(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},G),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{K.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new ue(n,t,r);if(e||=U(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new H;var q=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],J=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new J(q[0],3609767458),new J(q[1],602891725),new J(q[2],3964484399),new J(q[3],2173295548),new J(q[4],4081628472),new J(q[5],3053834265),new J(q[6],2937671579),new J(q[7],3664609560),new J(q[8],2734883394),new J(q[9],1164996542),new J(q[10],1323610764),new J(q[11],3590304994),new J(q[12],4068182383),new J(q[13],991336113),new J(q[14],633803317),new J(q[15],3479774868),new J(q[16],2666613458),new J(q[17],944711139),new J(q[18],2341262773),new J(q[19],2007800933),new J(q[20],1495990901),new J(q[21],1856431235),new J(q[22],3175218132),new J(q[23],2198950837),new J(q[24],3999719339),new J(q[25],766784016),new J(q[26],2566594879),new J(q[27],3203337956),new J(q[28],1034457026),new J(q[29],2466948901),new J(q[30],3758326383),new J(q[31],168717936),new J(q[32],1188179964),new J(q[33],1546045734),new J(q[34],1522805485),new J(q[35],2643833823),new J(q[36],2343527390),new J(q[37],1014477480),new J(q[38],1206759142),new J(q[39],344077627),new J(q[40],1290863460),new J(q[41],3158454273),new J(q[42],3505952657),new J(q[43],106217008),new J(q[44],3606008344),new J(q[45],1432725776),new J(q[46],1467031594),new J(q[47],851169720),new J(q[48],3100823752),new J(q[49],1363258195),new J(q[50],3750685593),new J(q[51],3785050280),new J(q[52],3318307427),new J(q[53],3812723403),new J(q[54],2003034995),new J(q[55],3602036899),new J(q[56],1575990012),new J(q[57],1125592928),new J(q[58],2716904306),new J(q[59],442776044),new J(q[60],593698344),new J(q[61],3733110249),new J(q[62],2999351573),new J(q[63],3815920427),new J(3391569614,3928383900),new J(3515267271,566280711),new J(3940187606,3454069534),new J(4118630271,4000239992),new J(116418474,1914138554),new J(174292421,2731055270),new J(289380356,3203993006),new J(460393269,320620315),new J(685471733,587496836),new J(852142971,1086792851),new J(1017036298,365543100),new J(1126000580,2618297676),new J(1288033470,3409855158),new J(1501505948,4234509866),new J(1607167915,987167468),new J(1816402316,1246189591),new J(0,1),new J(0,32898),new J(2147483648,32906),new J(2147483648,2147516416),new J(0,32907),new J(0,2147483649),new J(2147483648,2147516545),new J(2147483648,32777),new J(0,138),new J(0,136),new J(0,2147516425),new J(0,2147483658),new J(0,2147516555),new J(2147483648,139),new J(2147483648,32905),new J(2147483648,32771),new J(2147483648,32770),new J(2147483648,128),new J(0,32778),new J(2147483648,2147483658),new J(2147483648,2147516545),new J(2147483648,32896),new J(0,2147483649),new J(2147483648,2147516424);var Y=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(Y),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(Y);var de=new Map;function fe(e,t){n?(de.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var pe=typeof document<`u`?HTMLElement:O,X=new Map,me=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!X.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),X.set(t,e)}let n=X.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,he=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),me(r,t?`${t}\n${Q}`:Q),r},ge=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},$=class extends pe{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=he(this,t);let e=ge(this._shadowDom,`.slot`,()=>V().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}};return fe(`r-content`,$),e.Content=$,e.default=$,e})({});
1
+ var ranui_content=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{visibility:hidden;position:absolute}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(h(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=ee(e,!0);return te(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function te(e){s&&s.owned.push(e)}function h(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function S(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function C(e){return S(e)}var w=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,T=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},E=(e,t,n)=>{for(let r of e)w(r)&&(T(r,t)&&n.push(r),E(r.childrenList,t,n))},D=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}},O=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new D)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new re(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${C(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${C(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof D,e.serialize())).join(``):a+=S(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},re=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof D,e.serialize())).join(``)}</template>`}},k=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(k(t)):e.concat(t),[]),A=e=>e==null?null:e instanceof R?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,j=(e,t)=>{if(n){L(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(L(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ie=`__ranFor`,ae=e=>typeof e==`object`&&!!e&&e[ie]===!0,oe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=A(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},M=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=oe(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();M(r,a),i=n})},N=`__ranIndex`,P=e=>typeof e==`object`&&!!e&&e[N]===!0,F=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=A(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},I=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(F(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}M(r,i.map(e=>e.node).filter(e=>e!=null))})},L=(e,t)=>{k(t).forEach(t=>{if(ae(t)){se(e,t);return}if(P(t)){I(e,t);return}if(typeof t==`function`){j(e,t);return}let n=A(t);n!=null&&e.appendChild(n)})},R=class{el;constructor(e){this.el=n?new O(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return L(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new z(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},z=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return L(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},B=e=>new R(e),V=()=>B(`slot`),H=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},U=(e=8)=>Math.random().toString(36).substring(2,e+2),W=e=>typeof e==`function`,G=12e4,ce=`__ranuts_bridge__`,le=`default`,K=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},ue=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=le){this.targetOrigin=t,this.channel=n,this.senderId=U(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,K.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ce,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(W(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=U(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},G),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{K.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new ue(n,t,r);if(e||=U(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new H;var q=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],J=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new J(q[0],3609767458),new J(q[1],602891725),new J(q[2],3964484399),new J(q[3],2173295548),new J(q[4],4081628472),new J(q[5],3053834265),new J(q[6],2937671579),new J(q[7],3664609560),new J(q[8],2734883394),new J(q[9],1164996542),new J(q[10],1323610764),new J(q[11],3590304994),new J(q[12],4068182383),new J(q[13],991336113),new J(q[14],633803317),new J(q[15],3479774868),new J(q[16],2666613458),new J(q[17],944711139),new J(q[18],2341262773),new J(q[19],2007800933),new J(q[20],1495990901),new J(q[21],1856431235),new J(q[22],3175218132),new J(q[23],2198950837),new J(q[24],3999719339),new J(q[25],766784016),new J(q[26],2566594879),new J(q[27],3203337956),new J(q[28],1034457026),new J(q[29],2466948901),new J(q[30],3758326383),new J(q[31],168717936),new J(q[32],1188179964),new J(q[33],1546045734),new J(q[34],1522805485),new J(q[35],2643833823),new J(q[36],2343527390),new J(q[37],1014477480),new J(q[38],1206759142),new J(q[39],344077627),new J(q[40],1290863460),new J(q[41],3158454273),new J(q[42],3505952657),new J(q[43],106217008),new J(q[44],3606008344),new J(q[45],1432725776),new J(q[46],1467031594),new J(q[47],851169720),new J(q[48],3100823752),new J(q[49],1363258195),new J(q[50],3750685593),new J(q[51],3785050280),new J(q[52],3318307427),new J(q[53],3812723403),new J(q[54],2003034995),new J(q[55],3602036899),new J(q[56],1575990012),new J(q[57],1125592928),new J(q[58],2716904306),new J(q[59],442776044),new J(q[60],593698344),new J(q[61],3733110249),new J(q[62],2999351573),new J(q[63],3815920427),new J(3391569614,3928383900),new J(3515267271,566280711),new J(3940187606,3454069534),new J(4118630271,4000239992),new J(116418474,1914138554),new J(174292421,2731055270),new J(289380356,3203993006),new J(460393269,320620315),new J(685471733,587496836),new J(852142971,1086792851),new J(1017036298,365543100),new J(1126000580,2618297676),new J(1288033470,3409855158),new J(1501505948,4234509866),new J(1607167915,987167468),new J(1816402316,1246189591),new J(0,1),new J(0,32898),new J(2147483648,32906),new J(2147483648,2147516416),new J(0,32907),new J(0,2147483649),new J(2147483648,2147516545),new J(2147483648,32777),new J(0,138),new J(0,136),new J(0,2147516425),new J(0,2147483658),new J(0,2147516555),new J(2147483648,139),new J(2147483648,32905),new J(2147483648,32771),new J(2147483648,32770),new J(2147483648,128),new J(0,32778),new J(2147483648,2147483658),new J(2147483648,2147516545),new J(2147483648,32896),new J(0,2147483649),new J(2147483648,2147516424);var Y=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(Y),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(Y);var de=new Map;function fe(e,t){n?(de.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var pe=typeof document<`u`?HTMLElement:O,X=new Map,me=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!X.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),X.set(t,e)}let n=X.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,he=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),me(r,t?`${t}\n${Q}`:Q),r},ge=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},$=class extends pe{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=he(this,t);let e=ge(this._shadowDom,`.slot`,()=>V().class(`slot`).build());this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}};return fe(`r-content`,$),e.Content=$,e.default=$,e})({});
@@ -1 +1 @@
1
- var ranui_dropdown=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=e=>typeof e==`function`,i=12e4,a=`__ranuts_bridge__`,o=`default`,s=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},c=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=o){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,s.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:a,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,a)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),a(Error(`Request timeout`)))},i),s=e=>{clearTimeout(o),a(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{s.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new c(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},f=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},p=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(p),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(p);var m=typeof document>`u`,h=0,g=1,_=2,v=null,y=null,b=0,x=new Set,S=!1;function C(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)D(e,_);b===0&&re()}}]}function w(e){let t=ee(e,!0);return te(t),k(t),()=>j(t)}function T(e){let t={owned:[],cleanups:[],owner:y},n=y,r=v;y=t,v=null;try{return e(()=>ie(t))}finally{y=n,v=r}}function E(e){y&&y.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:_,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:y}}function te(e){y&&y.owned.push(e)}function ne(e){v&&(v.sources.add(e),e.observers.add(v))}function D(e,t){if(e.disposed||e.state>=t)return;let n=e.state===h;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)D(t,g)}function re(){if(!(b>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||O(t)}}finally{S=!1}}}function O(e){if(!(e.disposed||e.state===h)){if(e.state===g)for(let t of e.sources)`fn`in t&&O(t);e.state===_&&k(e),e.state=h}}function k(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);A(e);let t=v,n=y;v=e,y=e,e.running=!0,e.state=h;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)D(t,_)}}finally{e.running=!1,v=t,y=n}}function A(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function j(e){e.disposed||(e.disposed=!0,A(e),e.observers.clear())}function ie(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function M(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function N(e){return M(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},P=(e,t,n)=>{for(let r of e)ae(r)&&(oe(r,t)&&n.push(r),P(r.childrenList,t,n))},F=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?M(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}},I=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new F)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new se(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${N(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${N(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof F,e.serialize())).join(``):a+=M(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},se=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return P(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${M(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?M(e):(e instanceof F,e.serialize())).join(``)}</template>`}},L=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(L(t)):e.concat(t),[]),R=e=>e==null?null:e instanceof U?e.build():typeof e==`string`?m?e:document.createTextNode(e):e,ce=(e,t)=>{if(m){L([t()]).forEach(t=>{let n=R(t);n!=null&&e.appendChild(n)});return}let n=document.createComment(``);e.appendChild(n);let r=[];w(()=>{let e=L([t()]);for(let e of r)e.parentNode?.removeChild(e);let i=[],a=n;for(let t of e){let e=R(t);e!=null&&(a.after(e),a=e,i.push(e))}r=i})},le=`__ranFor`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,de=(e,t,n)=>{let[r,i]=C(t),a=null,o=T(t=>{let i=R(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},z=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},B=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;E(()=>{for(let e of r.values())e.dispose();r.clear()}),w(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=de(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();z(n,a),r=i})},V=`__ranIndex`,fe=e=>typeof e==`object`&&!!e&&e[V]===!0,pe=(e,t,n)=>{let[r,i]=C(e),a=null,o=T(e=>{let i=R(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},me=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];E(()=>{for(let e of r)e.dispose();r=[]}),w(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(pe(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}z(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{L(t).forEach(t=>{if(ue(t)){B(e,t);return}if(fe(t)){me(e,t);return}if(typeof t==`function`){ce(e,t);return}let n=R(t);n!=null&&e.appendChild(n)})},U=class{el;constructor(e){this.el=m?new I(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?w(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{m?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(m){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new he(this.el,t,e)}build(){return this.el}serialize(){if(m)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},he=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(m)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return m?this.root.serialize():this.root.innerHTML}},W=e=>new U(e),G=()=>W(`div`),ge=()=>W(`slot`),_e=new Map;function ve(e,t){m?(_e.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var ye=typeof document<`u`?HTMLElement:I,K=new Map,q=new Map,be=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!K.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),K.set(t,e)}let n=K.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},xe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!q.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),q.set(t,e)}let n=q.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Se=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),be(r,t?`${t}\n${Y}`:Y),r},Ce=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},X=(e,t,n=``)=>e.getAttribute(t)??n,Z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},we=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&xe(t,a)},Te=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,Q=300,Ee=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),$=class extends ye{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=Se(this,Te);let e=Ce(this._shadowDom,`.ranui-dropdown-container`,()=>G().class(`ranui-dropdown-container`).children(G().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(ge().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return X(this,`transit`)}set transit(e){Z(this,`transit`,e,{removeEmpty:!0})}get arrow(){return X(this,`arrow`)}set arrow(e){Z(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return X(this,`sheet`)}set sheet(e){Z(this,`sheet`,e)}handlerExternalCss=()=>{we(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(d(this.dropdown,this.transit),setTimeout(()=>{f(this.dropdown,this.transit)},Q))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=G().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(d(this.dropdown,this.transit),setTimeout(()=>{f(this.dropdown,this.transit)},Q)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}};return ve(`r-dropdown`,$),e.ARROW_TYPE=Ee,e.Dropdown=$,e.default=$,e})({});
1
+ var ranui_dropdown=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},n=(e=8)=>Math.random().toString(36).substring(2,e+2),r=e=>typeof e==`function`,i=12e4,a=`__ranuts_bridge__`,o=`default`,s=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},c=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=o){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,s.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:a,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,a)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),a(Error(`Request timeout`)))},i),s=e=>{clearTimeout(o),a(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{s.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new c(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},f=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},p=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(p),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(p);var m=typeof document>`u`,h=0,g=1,_=2,v=null,y=null,b=0,x=new Set,S=!1;function C(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)D(e,_);b===0&&O()}}]}function w(e){let t=ee(e,!0);return te(t),A(t),()=>M(t)}function T(e){let t={owned:[],cleanups:[],owner:y},n=y,r=v;y=t,v=null;try{return e(()=>N(t))}finally{y=n,v=r}}function E(e){y&&y.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:_,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:y}}function te(e){y&&y.owned.push(e)}function ne(e){v&&(v.sources.add(e),e.observers.add(v))}function D(e,t){if(e.disposed||e.state>=t)return;let n=e.state===h;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)D(t,g)}function O(){if(!(b>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||k(t)}}finally{S=!1}}}function k(e){if(!(e.disposed||e.state===h)){if(e.state===g)for(let t of e.sources)`fn`in t&&k(t);e.state===_&&A(e),e.state=h}}function A(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);j(e);let t=v,n=y;v=e,y=e,e.running=!0,e.state=h;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)D(t,_)}}finally{e.running=!1,v=t,y=n}}function j(e){for(let t of e.owned)M(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function M(e){e.disposed||(e.disposed=!0,j(e),e.observers.clear())}function N(e){for(let t of e.owned)M(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function P(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function F(e){return P(e)}var re=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ie=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},I=(e,t,n)=>{for(let r of e)re(r)&&(ie(r,t)&&n.push(r),I(r.childrenList,t,n))},L=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?P(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(this.childrenList,e,t),t}},R=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new L)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ae(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${F(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${F(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?P(e):(e instanceof L,e.serialize())).join(``):a+=P(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},ae=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return I(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${P(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?P(e):(e instanceof L,e.serialize())).join(``)}</template>`}},z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof U?e.build():typeof e==`string`?m?e:document.createTextNode(e):e,oe=(e,t)=>{if(m){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};w(()=>{let e=t();a();let n=document.createDocumentFragment();i=T(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),E(()=>i?.())},se=`__ranFor`,ce=e=>typeof e==`object`&&!!e&&e[se]===!0,le=(e,t,n)=>{let[r,i]=C(t),a=null,o=T(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},V=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},ue=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;E(()=>{for(let e of r.values())e.dispose();r.clear()}),w(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=le(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();V(n,a),r=i})},de=`__ranIndex`,fe=e=>typeof e==`object`&&!!e&&e[de]===!0,pe=(e,t,n)=>{let[r,i]=C(e),a=null,o=T(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},me=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];E(()=>{for(let e of r)e.dispose();r=[]}),w(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(pe(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}V(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{z(t).forEach(t=>{if(ce(t)){ue(e,t);return}if(fe(t)){me(e,t);return}if(typeof t==`function`){oe(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},U=class{el;constructor(e){this.el=m?new R(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?w(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{m?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(m){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new he(this.el,t,e)}build(){return this.el}serialize(){if(m)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},he=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(m)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return m?this.root.serialize():this.root.innerHTML}},W=e=>new U(e),G=()=>W(`div`),ge=()=>W(`slot`),_e=new Map;function ve(e,t){m?(_e.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var ye=typeof document<`u`?HTMLElement:R,K=new Map,q=new Map,be=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!K.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),K.set(t,e)}let n=K.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},xe=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!q.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),q.set(t,e)}let n=q.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Se=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),be(r,t?`${t}\n${Y}`:Y),r},Ce=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},X=(e,t,n=``)=>e.getAttribute(t)??n,Z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},we=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&xe(t,a)},Te=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:.1s forwards ranui-dropdown-down-in}.ran-dropdown-down-out{animation:.1s forwards ranui-dropdown-down-out}.ran-dropdown-up-in{animation:.1s forwards ranui-dropdown-up-in}.ran-dropdown-up-out{animation:.1s forwards ranui-dropdown-up-out}.ran-dropdown-left-in{animation:.1s forwards ranui-dropdown-left-in}.ran-dropdown-left-out{animation:.1s forwards ranui-dropdown-left-out}.ran-dropdown-right-in{animation:.1s forwards ranui-dropdown-right-in}.ran-dropdown-right-out{animation:.1s forwards ranui-dropdown-right-out}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,14px);list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0}.ranui-dropdown-container .bottom{transform:translateX(calc(var(--ran-dropdown-arrow-anchor-width,var(--ran-dropdown-min-width,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);top:max(0px, calc(var(--ran-dropdown-min-height,100%) - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-overlap,2px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(0) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-overlap,2px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow:before{background:var(--ran-dropdown-arrow-before-background,var(--ran-color-bg-elevated,#fff));position:var(--ran-dropdown-arrow-before-position,absolute);bottom:var(--ran-dropdown-arrow-before-bottom,0);width:var(--ran-dropdown-arrow-before-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-before-height,calc(var(--ran-dropdown-arrow-width,16px) / 2));clip-path:path("M 0 8 A 4 4 0 0 0 2.82842712474619 6.82842712474619 L 6.585786437626905 3.0710678118654755 A 2 2 0 0 1 9.414213562373096 3.0710678118654755 L 13.17157287525381 6.82842712474619 A 4 4 0 0 0 16 8 Z");content:var(--ran-dropdown-arrow-before-content,"");inset-inline-start:0}.ranui-dropdown-arrow:after{content:var(--ran-dropdown-arrow-after-content,"");position:var(--ran-dropdown-arrow-after-position,absolute);width:var(--ran-dropdown-arrow-after-width,9px);height:var(--ran-dropdown-arrow-after-height,9px);bottom:var(--ran-dropdown-arrow-after-bottom,0);margin:var(--ran-dropdown-arrow-after-margin,auto);border-radius:var(--ran-dropdown-arrow-after-border-radius,0 0 2px 0);transform:var(--ran-dropdown-arrow-after-transform,translateY(50%) rotate(-135deg));box-shadow:var(--ran-dropdown-arrow-after-box-shadow,2px 2px 5px #0000000d);z-index:var(--ran-dropdown-arrow-after-z-index,0);background:var(--ran-dropdown-arrow-after-background,var(--ran-color-bg-elevated,#fff));inset-inline:0}`,Q=300,Ee=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),$=class extends ye{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=Se(this,Te);let e=Ce(this._shadowDom,`.ranui-dropdown-container`,()=>G().class(`ranui-dropdown-container`).children(G().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).part(`dropdown`).children(ge().class(`slot`))).build());this.container=e,this.dropdown=e.querySelector(`.ranui-dropdown`),this._slot=e.querySelector(`.slot`)}get transit(){return X(this,`transit`)}set transit(e){Z(this,`transit`,e,{removeEmpty:!0})}get arrow(){return X(this,`arrow`)}set arrow(e){Z(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return X(this,`sheet`)}set sheet(e){Z(this,`sheet`,e)}handlerExternalCss=()=>{we(this,this._shadowDom,`sheet`,null,this.sheet)};handlerTransit=()=>{this.transit&&this.dropdown&&(d(this.dropdown,this.transit),setTimeout(()=>{f(this.dropdown,this.transit)},Q))};handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=G().class(`ranui-dropdown-arrow`).build(),this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&n&&(d(this.dropdown,this.transit),setTimeout(()=>{f(this.dropdown,this.transit)},Q)),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}};return ve(`r-dropdown`,$),e.ARROW_TYPE=Ee,e.Dropdown=$,e.default=$,e})({});
@@ -1 +1 @@
1
- var ranui_form=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=0,r=1,i=2,a=null,o=null,s=0,c=new Set,l=!1;function u(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)h(e,i);s===0&&g()}}]}function d(e){let t=m(e,!0);return ee(t),v(t),()=>b(t)}function f(e){let t={owned:[],cleanups:[],owner:o},n=o,r=a;o=t,a=null;try{return e(()=>x(t))}finally{o=n,a=r}}function p(e){o&&o.cleanups.push(e)}function m(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:i,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:o}}function ee(e){o&&o.owned.push(e)}function te(e){a&&(a.sources.add(e),e.observers.add(a))}function h(e,t){if(e.disposed||e.state>=t)return;let i=e.state===n;if(e.state=t,e.isEffect)c.add(e);else if(i)for(let t of e.observers)h(t,r)}function g(){if(!(s>0||l)){l=!0;try{for(;c.size>0;){let e=[...c];c.clear();for(let t of e)t.disposed||_(t)}}finally{l=!1}}}function _(e){if(!(e.disposed||e.state===n)){if(e.state===r)for(let t of e.sources)`fn`in t&&_(t);e.state===i&&v(e),e.state=n}}function v(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);y(e);let t=a,r=o;a=e,o=e,e.running=!0,e.state=n;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)h(t,i)}}finally{e.running=!1,a=t,o=r}}function y(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function b(e){e.disposed||(e.disposed=!0,y(e),e.observers.clear())}function x(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function S(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function C(e){return S(e)}var ne=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,w=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},T=(e,t,n)=>{for(let r of e)ne(r)&&(w(r,t)&&n.push(r),T(r.childrenList,t,n))},E=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}},D=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new E)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new re(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${C(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${C(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``):a+=S(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},re=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``)}</template>`}},O=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(O(t)):e.concat(t),[]),k=e=>e==null?null:e instanceof P?e.build():typeof e==`string`?t?e:document.createTextNode(e):e,ie=(e,n)=>{if(t){O([n()]).forEach(t=>{let n=k(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];d(()=>{let e=O([n()]);for(let e of i)e.parentNode?.removeChild(e);let t=[],a=r;for(let n of e){let e=k(n);e!=null&&(a.after(e),a=e,t.push(e))}i=t})},ae=`__ranFor`,oe=e=>typeof e==`object`&&!!e&&e[ae]===!0,se=(e,t,n)=>{let[r,i]=u(t),a=null,o=f(t=>{let i=k(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},A=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},ce=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=k(n.render(t,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;p(()=>{for(let e of i.values())e.dispose();i.clear()}),d(()=>{let e=n.each()??[],t=new Map,a=[];e.forEach((e,r)=>{let o=n.key(e,r);if(t.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=se(e,r,n.render),t.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();A(r,a),i=t})},le=`__ranIndex`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,j=(e,t,n)=>{let[r,i]=u(e),a=null,o=f(e=>{let i=k(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},M=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=k(n.render(()=>t,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];p(()=>{for(let e of i)e.dispose();i=[]}),d(()=>{let e=n.each()??[];for(let t=0;t<e.length;t++)t<i.length?i[t].setItem(e[t]):i.push(j(e[t],t,n.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}A(r,i.map(e=>e.node).filter(e=>e!=null))})},N=(e,t)=>{O(t).forEach(t=>{if(oe(t)){ce(e,t);return}if(ue(t)){M(e,t);return}if(typeof t==`function`){ie(e,t);return}let n=k(t);n!=null&&e.appendChild(n)})},P=class{el;constructor(e){this.el=t?new D(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?d(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{t?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return N(this.el,e),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new F(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},F=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return N(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},I=e=>new P(e),L=()=>I(`slot`),R=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,z=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},B=(e=8)=>Math.random().toString(36).substring(2,e+2),V=e=>typeof e==`function`,H=12e4,U=`__ranuts_bridge__`,de=`default`,W=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},fe=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=de){this.targetOrigin=t,this.channel=n,this.senderId=B(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,W.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:U,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(V(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=B(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},H),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{W.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new fe(n,t,r);if(e||=B(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new z;var G=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],K=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new K(G[0],3609767458),new K(G[1],602891725),new K(G[2],3964484399),new K(G[3],2173295548),new K(G[4],4081628472),new K(G[5],3053834265),new K(G[6],2937671579),new K(G[7],3664609560),new K(G[8],2734883394),new K(G[9],1164996542),new K(G[10],1323610764),new K(G[11],3590304994),new K(G[12],4068182383),new K(G[13],991336113),new K(G[14],633803317),new K(G[15],3479774868),new K(G[16],2666613458),new K(G[17],944711139),new K(G[18],2341262773),new K(G[19],2007800933),new K(G[20],1495990901),new K(G[21],1856431235),new K(G[22],3175218132),new K(G[23],2198950837),new K(G[24],3999719339),new K(G[25],766784016),new K(G[26],2566594879),new K(G[27],3203337956),new K(G[28],1034457026),new K(G[29],2466948901),new K(G[30],3758326383),new K(G[31],168717936),new K(G[32],1188179964),new K(G[33],1546045734),new K(G[34],1522805485),new K(G[35],2643833823),new K(G[36],2343527390),new K(G[37],1014477480),new K(G[38],1206759142),new K(G[39],344077627),new K(G[40],1290863460),new K(G[41],3158454273),new K(G[42],3505952657),new K(G[43],106217008),new K(G[44],3606008344),new K(G[45],1432725776),new K(G[46],1467031594),new K(G[47],851169720),new K(G[48],3100823752),new K(G[49],1363258195),new K(G[50],3750685593),new K(G[51],3785050280),new K(G[52],3318307427),new K(G[53],3812723403),new K(G[54],2003034995),new K(G[55],3602036899),new K(G[56],1575990012),new K(G[57],1125592928),new K(G[58],2716904306),new K(G[59],442776044),new K(G[60],593698344),new K(G[61],3733110249),new K(G[62],2999351573),new K(G[63],3815920427),new K(3391569614,3928383900),new K(3515267271,566280711),new K(3940187606,3454069534),new K(4118630271,4000239992),new K(116418474,1914138554),new K(174292421,2731055270),new K(289380356,3203993006),new K(460393269,320620315),new K(685471733,587496836),new K(852142971,1086792851),new K(1017036298,365543100),new K(1126000580,2618297676),new K(1288033470,3409855158),new K(1501505948,4234509866),new K(1607167915,987167468),new K(1816402316,1246189591),new K(0,1),new K(0,32898),new K(2147483648,32906),new K(2147483648,2147516416),new K(0,32907),new K(0,2147483649),new K(2147483648,2147516545),new K(2147483648,32777),new K(0,138),new K(0,136),new K(0,2147516425),new K(0,2147483658),new K(0,2147516555),new K(2147483648,139),new K(2147483648,32905),new K(2147483648,32771),new K(2147483648,32770),new K(2147483648,128),new K(0,32778),new K(2147483648,2147483658),new K(2147483648,2147516545),new K(2147483648,32896),new K(0,2147483649),new K(2147483648,2147516424);var q=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(q),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(q);var pe=new Map;function me(e,n){t?(pe.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var he=typeof document<`u`?HTMLElement:D,J=new Map,Y=new Map,ge=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!J.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),J.set(t,e)}let n=J.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},X=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!Y.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),Y.set(t,e)}let n=Y.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,_e=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),ge(r,t?`${t}\n${Q}`:Q),r},ve=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},ye=(e,t,n=``)=>e.getAttribute(t)??n,be=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},xe=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&X(t,a)},$=class extends he{_form;_shadowDom;static get observedAttributes(){return[`sheet`]}constructor(){super(),this._shadowDom=_e(this,R),this._form=ve(this._shadowDom,`.r-form`,()=>I(`form`).class(`r-form`).children(L().attr(`name`,`r-form_content`)).build())}get value(){return this.getAttribute(`value`)}set value(e){e!=null&&this.setAttribute(`value`,e)}get sheet(){return ye(this,`sheet`)}set sheet(e){be(this,`sheet`,e)}handlerExternalCss=()=>{xe(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss();let e={},t=new FormData(this._form);t.forEach((n,r)=>{e[r]||(e[r]=t.getAll(r).length>1?t.getAll(r):t.get(r))}),this._form.addEventListener(`submit`,()=>{this.value=JSON.stringify(e)})}attributeChangedCallback(e,t,n){t!==n&&e===`sheet`&&this.handlerExternalCss()}};return me(`r-form`,$),e.Form=$,e.default=$,e})({});
1
+ var ranui_form=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=typeof document>`u`,n=0,r=1,i=2,a=null,o=null,s=0,c=new Set,l=!1;function u(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)h(e,i);s===0&&g()}}]}function d(e){let t=m(e,!0);return ee(t),v(t),()=>b(t)}function f(e){let t={owned:[],cleanups:[],owner:o},n=o,r=a;o=t,a=null;try{return e(()=>x(t))}finally{o=n,a=r}}function p(e){o&&o.cleanups.push(e)}function m(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:i,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:o}}function ee(e){o&&o.owned.push(e)}function te(e){a&&(a.sources.add(e),e.observers.add(a))}function h(e,t){if(e.disposed||e.state>=t)return;let i=e.state===n;if(e.state=t,e.isEffect)c.add(e);else if(i)for(let t of e.observers)h(t,r)}function g(){if(!(s>0||l)){l=!0;try{for(;c.size>0;){let e=[...c];c.clear();for(let t of e)t.disposed||_(t)}}finally{l=!1}}}function _(e){if(!(e.disposed||e.state===n)){if(e.state===r)for(let t of e.sources)`fn`in t&&_(t);e.state===i&&v(e),e.state=n}}function v(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);y(e);let t=a,r=o;a=e,o=e,e.running=!0,e.state=n;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)h(t,i)}}finally{e.running=!1,a=t,o=r}}function y(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function b(e){e.disposed||(e.disposed=!0,y(e),e.observers.clear())}function x(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function S(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function C(e){return S(e)}var ne=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,w=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},T=(e,t,n)=>{for(let r of e)ne(r)&&(w(r,t)&&n.push(r),T(r.childrenList,t,n))},E=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?S(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}},D=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new E)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new re(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${C(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${C(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``):a+=S(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},re=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return T(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${S(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?S(e):(e instanceof E,e.serialize())).join(``)}</template>`}},O=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(O(t)):e.concat(t),[]),k=e=>e==null?null:e instanceof P?e.build():typeof e==`string`?t?e:document.createTextNode(e):e,ie=(e,n)=>{if(t){N(e,[n()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};d(()=>{let e=n();o();let t=document.createDocumentFragment();a=f(n=>(N(t,[e]),n)),i.parentNode?.insertBefore(t,i)}),p(()=>a?.())},ae=`__ranFor`,oe=e=>typeof e==`object`&&!!e&&e[ae]===!0,se=(e,t,n)=>{let[r,i]=u(t),a=null,o=f(t=>{let i=k(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},A=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},ce=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=k(n.render(t,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;p(()=>{for(let e of i.values())e.dispose();i.clear()}),d(()=>{let e=n.each()??[],t=new Map,a=[];e.forEach((e,r)=>{let o=n.key(e,r);if(t.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=se(e,r,n.render),t.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();A(r,a),i=t})},le=`__ranIndex`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,j=(e,t,n)=>{let[r,i]=u(e),a=null,o=f(e=>{let i=k(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},M=(e,n)=>{if(t){(n.each()??[]).forEach((t,r)=>{let i=k(n.render(()=>t,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];p(()=>{for(let e of i)e.dispose();i=[]}),d(()=>{let e=n.each()??[];for(let t=0;t<e.length;t++)t<i.length?i[t].setItem(e[t]):i.push(j(e[t],t,n.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}A(r,i.map(e=>e.node).filter(e=>e!=null))})},N=(e,t)=>{O(t).forEach(t=>{if(oe(t)){ce(e,t);return}if(ue(t)){M(e,t);return}if(typeof t==`function`){ie(e,t);return}let n=k(t);n!=null&&e.appendChild(n)})},P=class{el;constructor(e){this.el=t?new D(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?d(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{t?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return N(this.el,e),this}replaceChildren(...e){if(t){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new F(this.el,t,e)}build(){return this.el}serialize(){if(t)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},F=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return N(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(t)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let n=document.createElement(`style`);return n.textContent=e,this.root.appendChild(n),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return t?this.root.serialize():this.root.innerHTML}},I=e=>new P(e),L=()=>I(`slot`),R=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,z=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},B=(e=8)=>Math.random().toString(36).substring(2,e+2),V=e=>typeof e==`function`,H=12e4,U=`__ranuts_bridge__`,de=`default`,W=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},fe=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=de){this.targetOrigin=t,this.channel=n,this.senderId=B(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,W.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:U,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(V(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=B(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},H),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{W.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new fe(n,t,r);if(e||=B(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new z;var G=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],K=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new K(G[0],3609767458),new K(G[1],602891725),new K(G[2],3964484399),new K(G[3],2173295548),new K(G[4],4081628472),new K(G[5],3053834265),new K(G[6],2937671579),new K(G[7],3664609560),new K(G[8],2734883394),new K(G[9],1164996542),new K(G[10],1323610764),new K(G[11],3590304994),new K(G[12],4068182383),new K(G[13],991336113),new K(G[14],633803317),new K(G[15],3479774868),new K(G[16],2666613458),new K(G[17],944711139),new K(G[18],2341262773),new K(G[19],2007800933),new K(G[20],1495990901),new K(G[21],1856431235),new K(G[22],3175218132),new K(G[23],2198950837),new K(G[24],3999719339),new K(G[25],766784016),new K(G[26],2566594879),new K(G[27],3203337956),new K(G[28],1034457026),new K(G[29],2466948901),new K(G[30],3758326383),new K(G[31],168717936),new K(G[32],1188179964),new K(G[33],1546045734),new K(G[34],1522805485),new K(G[35],2643833823),new K(G[36],2343527390),new K(G[37],1014477480),new K(G[38],1206759142),new K(G[39],344077627),new K(G[40],1290863460),new K(G[41],3158454273),new K(G[42],3505952657),new K(G[43],106217008),new K(G[44],3606008344),new K(G[45],1432725776),new K(G[46],1467031594),new K(G[47],851169720),new K(G[48],3100823752),new K(G[49],1363258195),new K(G[50],3750685593),new K(G[51],3785050280),new K(G[52],3318307427),new K(G[53],3812723403),new K(G[54],2003034995),new K(G[55],3602036899),new K(G[56],1575990012),new K(G[57],1125592928),new K(G[58],2716904306),new K(G[59],442776044),new K(G[60],593698344),new K(G[61],3733110249),new K(G[62],2999351573),new K(G[63],3815920427),new K(3391569614,3928383900),new K(3515267271,566280711),new K(3940187606,3454069534),new K(4118630271,4000239992),new K(116418474,1914138554),new K(174292421,2731055270),new K(289380356,3203993006),new K(460393269,320620315),new K(685471733,587496836),new K(852142971,1086792851),new K(1017036298,365543100),new K(1126000580,2618297676),new K(1288033470,3409855158),new K(1501505948,4234509866),new K(1607167915,987167468),new K(1816402316,1246189591),new K(0,1),new K(0,32898),new K(2147483648,32906),new K(2147483648,2147516416),new K(0,32907),new K(0,2147483649),new K(2147483648,2147516545),new K(2147483648,32777),new K(0,138),new K(0,136),new K(0,2147516425),new K(0,2147483658),new K(0,2147516555),new K(2147483648,139),new K(2147483648,32905),new K(2147483648,32771),new K(2147483648,32770),new K(2147483648,128),new K(0,32778),new K(2147483648,2147483658),new K(2147483648,2147516545),new K(2147483648,32896),new K(0,2147483649),new K(2147483648,2147516424);var q=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(q),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(q);var pe=new Map;function me(e,n){t?(pe.set(e,n),n.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,n)}var he=typeof document<`u`?HTMLElement:D,J=new Map,Y=new Map,ge=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!J.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),J.set(t,e)}let n=J.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},X=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!Y.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),Y.set(t,e)}let n=Y.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!Array.from(e.querySelectorAll(`style[data-ranui-sheet]`)).some(e=>e.textContent===t)){let n=document.createElement(`style`);n.setAttribute(`data-ranui-sheet`,``),n.textContent=t,e.appendChild(n)}}},Z=new WeakMap,Q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,_e=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Z.get(e)||e.attachShadow(n);return Z.set(e,r),ge(r,t?`${t}\n${Q}`:Q),r},ve=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},ye=(e,t,n=``)=>e.getAttribute(t)??n,be=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},xe=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&X(t,a)},$=class extends he{_form;_shadowDom;static get observedAttributes(){return[`sheet`]}constructor(){super(),this._shadowDom=_e(this,R),this._form=ve(this._shadowDom,`.r-form`,()=>I(`form`).class(`r-form`).children(L().attr(`name`,`r-form_content`)).build())}get value(){return this.getAttribute(`value`)}set value(e){e!=null&&this.setAttribute(`value`,e)}get sheet(){return ye(this,`sheet`)}set sheet(e){be(this,`sheet`,e)}handlerExternalCss=()=>{xe(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss();let e={},t=new FormData(this._form);t.forEach((n,r)=>{e[r]||(e[r]=t.getAll(r).length>1?t.getAll(r):t.get(r))}),this._form.addEventListener(`submit`,()=>{this.value=JSON.stringify(e)})}attributeChangedCallback(e,t,n){t!==n&&e===`sheet`&&this.handlerExternalCss()}};return me(`r-form`,$),e.Form=$,e.default=$,e})({});
@@ -1 +1 @@
1
- var ranui_glass=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-glass-display,inline-block);position:var(--ran-glass-position,relative);border-radius:var(--ran-glass-radius,20px);isolation:isolate;-webkit-tap-highlight-color:transparent}.ran-glass-defs{pointer-events:none;width:0;height:0;position:absolute;overflow:hidden}.ran-glass{box-sizing:border-box;min-width:var(--ran-glass-min-width,0);min-height:var(--ran-glass-min-height,0);padding:var(--ran-glass-padding,0);border-radius:inherit;color:inherit;-webkit-backdrop-filter:blur(var(--ran-glass-blur,16px)) saturate(var(--ran-glass-saturate,180%)) brightness(var(--ran-glass-brightness,1.05)) var(--ran-glass-refraction,url(#ran-glass-filter));backdrop-filter:blur(var(--ran-glass-blur,16px)) saturate(var(--ran-glass-saturate,180%)) brightness(var(--ran-glass-brightness,1.05)) var(--ran-glass-refraction,url(#ran-glass-filter));background:var(--ran-glass-tint,#ffffff24);border:var(--ran-glass-border,1px solid #ffffff59);box-shadow:var(--ran-glass-shadow,inset 0 1px 1px #fff9, inset 0 0 0 1px #ffffff0f, inset 0 -20px 40px #ffffff0a, 0 24px 60px -18px #00000080);transition:var(--ran-glass-transition,transform var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-spring,cubic-bezier(.34, 1.26, .5, 1)));position:relative;overflow:hidden}.ran-glass-specular{border-radius:inherit;pointer-events:none;opacity:var(--ran-glass-specular-opacity,1);background:var(--ran-glass-specular,linear-gradient(180deg, #ffffff47, transparent 34%), radial-gradient(120% 80% at 50% 0%, #ffffff2e, transparent 60%));position:absolute;inset:0}.ran-glass-specular:after{content:"";border-radius:inherit;opacity:0;background:linear-gradient(105deg,#0000 42%,#fff6 50%,#0000 58%);position:absolute;inset:0;transform:translate(-130%)}:host([sheen]) .ran-glass-specular:after{opacity:.7;animation:ran-glass-sheen var(--ran-glass-sheen-duration,6s) ease-in-out infinite}@keyframes ran-glass-sheen{50%{transform:translate(130%)}}.ran-glass ::slotted(*){z-index:1;position:relative}:host([interactive]) .ran-glass{cursor:pointer}:host([interactive]:hover) .ran-glass{transform:translateY(-2px)}:host([interactive]:active) .ran-glass{transition-duration:var(--ran-motion-duration-fast,.15s);transform:translateY(0)scale(.98)}@media (prefers-reduced-motion:reduce){:host([sheen]) .ran-glass-specular:after{opacity:0;animation:none}.ran-glass{transition:none}}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=h(e,!0);return ee(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>S(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function ee(e){s&&s.owned.push(e)}function te(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function S(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function C(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function w(e){return C(e)}var ne=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,T=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},E=(e,t,n)=>{for(let r of e)ne(r)&&(T(r,t)&&n.push(r),E(r.childrenList,t,n))},D=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?C(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}},O=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new D)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new k(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${w(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${w(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof D,e.serialize())).join(``):a+=C(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},k=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${C(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof D,e.serialize())).join(``)}</template>`}},A=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(A(t)):e.concat(t),[]),j=e=>e==null?null:e instanceof F?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,re=(e,t)=>{if(n){A([t()]).forEach(t=>{let n=j(t);n!=null&&e.appendChild(n)});return}let r=document.createComment(``);e.appendChild(r);let i=[];f(()=>{let e=A([t()]);for(let e of i)e.parentNode?.removeChild(e);let n=[],a=r;for(let t of e){let e=j(t);e!=null&&(a.after(e),a=e,n.push(e))}i=n})},ie=`__ranFor`,ae=e=>typeof e==`object`&&!!e&&e[ie]===!0,oe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=j(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},M=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=j(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=oe(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();M(r,a),i=n})},ce=`__ranIndex`,le=e=>typeof e==`object`&&!!e&&e[ce]===!0,ue=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=j(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},N=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=j(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(ue(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}M(r,i.map(e=>e.node).filter(e=>e!=null))})},P=(e,t)=>{A(t).forEach(t=>{if(ae(t)){se(e,t);return}if(le(t)){N(e,t);return}if(typeof t==`function`){re(e,t);return}let n=j(t);n!=null&&e.appendChild(n)})},F=class{el;constructor(e){this.el=n?new O(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return P(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new I(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},I=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return P(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},L=e=>new F(e),R=()=>L(`div`),z=()=>L(`slot`),B=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},V=(e=8)=>Math.random().toString(36).substring(2,e+2),H=e=>typeof e==`function`,de=12e4,fe=`__ranuts_bridge__`,pe=`default`,U=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},me=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=pe){this.targetOrigin=t,this.channel=n,this.senderId=V(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,U.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:fe,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(H(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=V(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},de),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{U.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new me(n,t,r);if(e||=V(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new B;var W=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],G=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new G(W[0],3609767458),new G(W[1],602891725),new G(W[2],3964484399),new G(W[3],2173295548),new G(W[4],4081628472),new G(W[5],3053834265),new G(W[6],2937671579),new G(W[7],3664609560),new G(W[8],2734883394),new G(W[9],1164996542),new G(W[10],1323610764),new G(W[11],3590304994),new G(W[12],4068182383),new G(W[13],991336113),new G(W[14],633803317),new G(W[15],3479774868),new G(W[16],2666613458),new G(W[17],944711139),new G(W[18],2341262773),new G(W[19],2007800933),new G(W[20],1495990901),new G(W[21],1856431235),new G(W[22],3175218132),new G(W[23],2198950837),new G(W[24],3999719339),new G(W[25],766784016),new G(W[26],2566594879),new G(W[27],3203337956),new G(W[28],1034457026),new G(W[29],2466948901),new G(W[30],3758326383),new G(W[31],168717936),new G(W[32],1188179964),new G(W[33],1546045734),new G(W[34],1522805485),new G(W[35],2643833823),new G(W[36],2343527390),new G(W[37],1014477480),new G(W[38],1206759142),new G(W[39],344077627),new G(W[40],1290863460),new G(W[41],3158454273),new G(W[42],3505952657),new G(W[43],106217008),new G(W[44],3606008344),new G(W[45],1432725776),new G(W[46],1467031594),new G(W[47],851169720),new G(W[48],3100823752),new G(W[49],1363258195),new G(W[50],3750685593),new G(W[51],3785050280),new G(W[52],3318307427),new G(W[53],3812723403),new G(W[54],2003034995),new G(W[55],3602036899),new G(W[56],1575990012),new G(W[57],1125592928),new G(W[58],2716904306),new G(W[59],442776044),new G(W[60],593698344),new G(W[61],3733110249),new G(W[62],2999351573),new G(W[63],3815920427),new G(3391569614,3928383900),new G(3515267271,566280711),new G(3940187606,3454069534),new G(4118630271,4000239992),new G(116418474,1914138554),new G(174292421,2731055270),new G(289380356,3203993006),new G(460393269,320620315),new G(685471733,587496836),new G(852142971,1086792851),new G(1017036298,365543100),new G(1126000580,2618297676),new G(1288033470,3409855158),new G(1501505948,4234509866),new G(1607167915,987167468),new G(1816402316,1246189591),new G(0,1),new G(0,32898),new G(2147483648,32906),new G(2147483648,2147516416),new G(0,32907),new G(0,2147483649),new G(2147483648,2147516545),new G(2147483648,32777),new G(0,138),new G(0,136),new G(0,2147516425),new G(0,2147483658),new G(0,2147516555),new G(2147483648,139),new G(2147483648,32905),new G(2147483648,32771),new G(2147483648,32770),new G(2147483648,128),new G(0,32778),new G(2147483648,2147483658),new G(2147483648,2147516545),new G(2147483648,32896),new G(0,2147483649),new G(2147483648,2147516424);var K=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(K),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(K);var he=new Map;function ge(e,t){n?(he.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var _e=typeof document<`u`?HTMLElement:O,q=new Map,ve=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!q.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),q.set(t,e)}let n=q.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,ye=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),ve(r,t?`${t}\n${Y}`:Y),r},X=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Z=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},be=0,$=class e extends _e{_shadowDom;_glass;_turb=null;_disp=null;_uid=`ran-glass-${be+=1}`;static get observedAttributes(){return[`blur`,`saturate`,`displace`,`frequency`,`radius`,`tint`]}constructor(){super(),this._shadowDom=ye(this,t),this._glass=X(this._shadowDom,`.ran-glass`,()=>R().class(`ran-glass`).attr(`part`,`glass`).children(R().class(`ran-glass-specular`).attr(`part`,`specular`),z()).build())}get saturate(){return Z(this,`saturate`)}set saturate(e){Q(this,`saturate`,e)}get displace(){return Z(this,`displace`)}set displace(e){Q(this,`displace`,e)}get frequency(){return Z(this,`frequency`)}set frequency(e){Q(this,`frequency`,e)}get radius(){return Z(this,`radius`)}set radius(e){Q(this,`radius`,e)}get tint(){return Z(this,`tint`)}set tint(e){Q(this,`tint`,e)}get sheen(){return this.hasAttribute(`sheen`)}set sheen(e){this.toggleAttribute(`sheen`,e)}get interactive(){return this.hasAttribute(`interactive`)}set interactive(e){this.toggleAttribute(`interactive`,e)}_ensureFilter(){if(!(this._disp||typeof document>`u`)){if(!this._shadowDom.querySelector(`.ran-glass-defs`)){let e=document.createElement(`div`);e.className=`ran-glass-defs`,e.setAttribute(`aria-hidden`,`true`),e.innerHTML=`<svg><filter id="${this._uid}" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence type="fractalNoise" baseFrequency="0.004 0.006" numOctaves="2" seed="7" result="n"/><feGaussianBlur in="n" stdDeviation="2" result="sn"/><feDisplacementMap in="SourceGraphic" in2="sn" scale="8" xChannelSelector="R" yChannelSelector="G"/></filter></svg>`,this._shadowDom.insertBefore(e,this._shadowDom.firstChild),this.style.setProperty(`--ran-glass-refraction`,`url(#${this._uid})`)}this._turb=this._shadowDom.querySelector(`feTurbulence`),this._disp=this._shadowDom.querySelector(`feDisplacementMap`)}}_apply(e){let t=this.getAttribute(e);switch(e){case`blur`:this._setVar(`--ran-glass-blur`,t,`px`);break;case`saturate`:this._setVar(`--ran-glass-saturate`,t,`%`);break;case`radius`:this._setVar(`--ran-glass-radius`,t,`px`);break;case`tint`:this._setVar(`--ran-glass-tint`,t);break;case`displace`:this._ensureFilter(),this._disp&&t!=null&&this._disp.setAttribute(`scale`,t);break;case`frequency`:this._ensureFilter(),this._turb&&t!=null&&this._turb.setAttribute(`baseFrequency`,t);break}}_setVar(e,t,n=``){if(t==null||t===``){this.style.removeProperty(e);return}let r=n&&/^-?\d*\.?\d+$/.test(t.trim());this.style.setProperty(e,r?`${t.trim()}${n}`:t)}connectedCallback(){this._ensureFilter(),e.observedAttributes.forEach(e=>this._apply(e))}attributeChangedCallback(e,t,n){t!==n&&this._apply(e)}};return ge(`r-glass`,$),e.Glass=$,e.default=$,e})({});
1
+ var ranui_glass=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}:host{display:var(--ran-glass-display,inline-block);position:var(--ran-glass-position,relative);border-radius:var(--ran-glass-radius,20px);isolation:isolate;-webkit-tap-highlight-color:transparent}.ran-glass-defs{pointer-events:none;width:0;height:0;position:absolute;overflow:hidden}.ran-glass{box-sizing:border-box;min-width:var(--ran-glass-min-width,0);min-height:var(--ran-glass-min-height,0);padding:var(--ran-glass-padding,0);border-radius:inherit;color:inherit;-webkit-backdrop-filter:blur(var(--ran-glass-blur,16px)) saturate(var(--ran-glass-saturate,180%)) brightness(var(--ran-glass-brightness,1.05)) var(--ran-glass-refraction,url(#ran-glass-filter));backdrop-filter:blur(var(--ran-glass-blur,16px)) saturate(var(--ran-glass-saturate,180%)) brightness(var(--ran-glass-brightness,1.05)) var(--ran-glass-refraction,url(#ran-glass-filter));background:var(--ran-glass-tint,#ffffff24);border:var(--ran-glass-border,1px solid #ffffff59);box-shadow:var(--ran-glass-shadow,inset 0 1px 1px #fff9, inset 0 0 0 1px #ffffff0f, inset 0 -20px 40px #ffffff0a, 0 24px 60px -18px #00000080);transition:var(--ran-glass-transition,transform var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-spring,cubic-bezier(.34, 1.26, .5, 1)));position:relative;overflow:hidden}.ran-glass-specular{border-radius:inherit;pointer-events:none;opacity:var(--ran-glass-specular-opacity,1);background:var(--ran-glass-specular,linear-gradient(180deg, #ffffff47, transparent 34%), radial-gradient(120% 80% at 50% 0%, #ffffff2e, transparent 60%));position:absolute;inset:0}.ran-glass-specular:after{content:"";border-radius:inherit;opacity:0;background:linear-gradient(105deg,#0000 42%,#fff6 50%,#0000 58%);position:absolute;inset:0;transform:translate(-130%)}:host([sheen]) .ran-glass-specular:after{opacity:.7;animation:ran-glass-sheen var(--ran-glass-sheen-duration,6s) ease-in-out infinite}@keyframes ran-glass-sheen{50%{transform:translate(130%)}}.ran-glass ::slotted(*){z-index:1;position:relative}:host([interactive]) .ran-glass{cursor:pointer}:host([interactive]:hover) .ran-glass{transform:translateY(-2px)}:host([interactive]:active) .ran-glass{transition-duration:var(--ran-motion-duration-fast,.15s);transform:translateY(0)scale(.98)}@media (prefers-reduced-motion:reduce){:host([sheen]) .ran-glass-specular:after{opacity:0;animation:none}.ran-glass{transition:none}}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(te(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,a);c===0&&_()}}]}function f(e){let t=h(e,!0);return ee(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>S(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function h(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function ee(e){s&&s.owned.push(e)}function te(e){o&&(o.sources.add(e),e.observers.add(o))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)g(t,i)}function _(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function S(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function C(e){return typeof e==`string`?e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`):String(e)}function w(e){return C(e)}var ne=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,T=(e,t)=>{let n=t.trim();if(!n)return!1;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},E=(e,t,n)=>{for(let r of e)ne(r)&&(T(r,t)&&n.push(r),E(r.childrenList,t,n))},D=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?C(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}},O=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new D)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new k(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${w(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${w(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof D,e.serialize())).join(``):a+=C(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},k=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return E(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${C(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof D,e.serialize())).join(``)}</template>`}},A=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(A(t)):e.concat(t),[]),j=e=>e==null?null:e instanceof F?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,re=(e,t)=>{if(n){P(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(P(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ie=`__ranFor`,ae=e=>typeof e==`object`&&!!e&&e[ie]===!0,oe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=j(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},M=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=j(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=oe(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();M(r,a),i=n})},ce=`__ranIndex`,le=e=>typeof e==`object`&&!!e&&e[ce]===!0,ue=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=j(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},N=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=j(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(ue(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}M(r,i.map(e=>e.node).filter(e=>e!=null))})},P=(e,t)=>{A(t).forEach(t=>{if(ae(t)){se(e,t);return}if(le(t)){N(e,t);return}if(typeof t==`function`){re(e,t);return}let n=j(t);n!=null&&e.appendChild(n)})},F=class{el;constructor(e){this.el=n?new O(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return P(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new I(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},I=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return P(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},L=e=>new F(e),R=()=>L(`div`),z=()=>L(`slot`),B=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}},V=(e=8)=>Math.random().toString(36).substring(2,e+2),H=e=>typeof e==`function`,de=12e4,fe=`__ranuts_bridge__`,pe=`default`,U=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},me=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=pe){this.targetOrigin=t,this.channel=n,this.senderId=V(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,U.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:fe,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(H(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=V(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},de),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{U.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new me(n,t,r);if(e||=V(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new B;var W=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],G=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new G(W[0],3609767458),new G(W[1],602891725),new G(W[2],3964484399),new G(W[3],2173295548),new G(W[4],4081628472),new G(W[5],3053834265),new G(W[6],2937671579),new G(W[7],3664609560),new G(W[8],2734883394),new G(W[9],1164996542),new G(W[10],1323610764),new G(W[11],3590304994),new G(W[12],4068182383),new G(W[13],991336113),new G(W[14],633803317),new G(W[15],3479774868),new G(W[16],2666613458),new G(W[17],944711139),new G(W[18],2341262773),new G(W[19],2007800933),new G(W[20],1495990901),new G(W[21],1856431235),new G(W[22],3175218132),new G(W[23],2198950837),new G(W[24],3999719339),new G(W[25],766784016),new G(W[26],2566594879),new G(W[27],3203337956),new G(W[28],1034457026),new G(W[29],2466948901),new G(W[30],3758326383),new G(W[31],168717936),new G(W[32],1188179964),new G(W[33],1546045734),new G(W[34],1522805485),new G(W[35],2643833823),new G(W[36],2343527390),new G(W[37],1014477480),new G(W[38],1206759142),new G(W[39],344077627),new G(W[40],1290863460),new G(W[41],3158454273),new G(W[42],3505952657),new G(W[43],106217008),new G(W[44],3606008344),new G(W[45],1432725776),new G(W[46],1467031594),new G(W[47],851169720),new G(W[48],3100823752),new G(W[49],1363258195),new G(W[50],3750685593),new G(W[51],3785050280),new G(W[52],3318307427),new G(W[53],3812723403),new G(W[54],2003034995),new G(W[55],3602036899),new G(W[56],1575990012),new G(W[57],1125592928),new G(W[58],2716904306),new G(W[59],442776044),new G(W[60],593698344),new G(W[61],3733110249),new G(W[62],2999351573),new G(W[63],3815920427),new G(3391569614,3928383900),new G(3515267271,566280711),new G(3940187606,3454069534),new G(4118630271,4000239992),new G(116418474,1914138554),new G(174292421,2731055270),new G(289380356,3203993006),new G(460393269,320620315),new G(685471733,587496836),new G(852142971,1086792851),new G(1017036298,365543100),new G(1126000580,2618297676),new G(1288033470,3409855158),new G(1501505948,4234509866),new G(1607167915,987167468),new G(1816402316,1246189591),new G(0,1),new G(0,32898),new G(2147483648,32906),new G(2147483648,2147516416),new G(0,32907),new G(0,2147483649),new G(2147483648,2147516545),new G(2147483648,32777),new G(0,138),new G(0,136),new G(0,2147516425),new G(0,2147483658),new G(0,2147516555),new G(2147483648,139),new G(2147483648,32905),new G(2147483648,32771),new G(2147483648,32770),new G(2147483648,128),new G(0,32778),new G(2147483648,2147483658),new G(2147483648,2147516545),new G(2147483648,32896),new G(0,2147483649),new G(2147483648,2147516424);var K=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(K),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(K);var he=new Map;function ge(e,t){n?(he.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var _e=typeof document<`u`?HTMLElement:O,q=new Map,ve=(e,t)=>{if(!(typeof document>`u`)&&t){if(typeof CSSStyleSheet<`u`)try{if(!q.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),q.set(t,e)}let n=q.get(t);e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return}catch{}if(!e.querySelector(`style[data-ranui]`)){let n=document.createElement(`style`);n.setAttribute(`data-ranui`,``),n.textContent=t,e.appendChild(n)}}},J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,ye=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),ve(r,t?`${t}\n${Y}`:Y),r},X=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},Z=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},be=0,$=class e extends _e{_shadowDom;_glass;_turb=null;_disp=null;_uid=`ran-glass-${be+=1}`;static get observedAttributes(){return[`blur`,`saturate`,`displace`,`frequency`,`radius`,`tint`]}constructor(){super(),this._shadowDom=ye(this,t),this._glass=X(this._shadowDom,`.ran-glass`,()=>R().class(`ran-glass`).attr(`part`,`glass`).children(R().class(`ran-glass-specular`).attr(`part`,`specular`),z()).build())}get saturate(){return Z(this,`saturate`)}set saturate(e){Q(this,`saturate`,e)}get displace(){return Z(this,`displace`)}set displace(e){Q(this,`displace`,e)}get frequency(){return Z(this,`frequency`)}set frequency(e){Q(this,`frequency`,e)}get radius(){return Z(this,`radius`)}set radius(e){Q(this,`radius`,e)}get tint(){return Z(this,`tint`)}set tint(e){Q(this,`tint`,e)}get sheen(){return this.hasAttribute(`sheen`)}set sheen(e){this.toggleAttribute(`sheen`,e)}get interactive(){return this.hasAttribute(`interactive`)}set interactive(e){this.toggleAttribute(`interactive`,e)}_ensureFilter(){if(!(this._disp||typeof document>`u`)){if(!this._shadowDom.querySelector(`.ran-glass-defs`)){let e=document.createElement(`div`);e.className=`ran-glass-defs`,e.setAttribute(`aria-hidden`,`true`),e.innerHTML=`<svg><filter id="${this._uid}" x="-20%" y="-20%" width="140%" height="140%"><feTurbulence type="fractalNoise" baseFrequency="0.004 0.006" numOctaves="2" seed="7" result="n"/><feGaussianBlur in="n" stdDeviation="2" result="sn"/><feDisplacementMap in="SourceGraphic" in2="sn" scale="8" xChannelSelector="R" yChannelSelector="G"/></filter></svg>`,this._shadowDom.insertBefore(e,this._shadowDom.firstChild),this.style.setProperty(`--ran-glass-refraction`,`url(#${this._uid})`)}this._turb=this._shadowDom.querySelector(`feTurbulence`),this._disp=this._shadowDom.querySelector(`feDisplacementMap`)}}_apply(e){let t=this.getAttribute(e);switch(e){case`blur`:this._setVar(`--ran-glass-blur`,t,`px`);break;case`saturate`:this._setVar(`--ran-glass-saturate`,t,`%`);break;case`radius`:this._setVar(`--ran-glass-radius`,t,`px`);break;case`tint`:this._setVar(`--ran-glass-tint`,t);break;case`displace`:this._ensureFilter(),this._disp&&t!=null&&this._disp.setAttribute(`scale`,t);break;case`frequency`:this._ensureFilter(),this._turb&&t!=null&&this._turb.setAttribute(`baseFrequency`,t);break}}_setVar(e,t,n=``){if(t==null||t===``){this.style.removeProperty(e);return}let r=n&&/^-?\d*\.?\d+$/.test(t.trim());this.style.setProperty(e,r?`${t.trim()}${n}`:t)}connectedCallback(){this._ensureFilter(),e.observedAttributes.forEach(e=>this._apply(e))}attributeChangedCallback(e,t,n){t!==n&&this._apply(e)}};return ge(`r-glass`,$),e.Glass=$,e.default=$,e})({});