ranui 0.4.1-alpha.2 → 0.4.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{arc-DOGcyb-0.js → arc-BTq35m9x.js} +2 -2
- package/dist/{arc-ByizYZ13.cjs → arc-BjIU7MOi.cjs} +1 -1
- package/dist/builder-2HD21I6K.cjs +1 -0
- package/dist/builder.js +2 -2
- package/dist/{button-DFBA474n.js → button-BgWXCj7-.js} +4 -4
- package/dist/button.js +1 -1
- package/dist/{card-Cfkb7dIm.js → card-DzVv3ADA.js} +3 -3
- package/dist/card.js +1 -1
- package/dist/{checkbox-CeVzf_ff.js → checkbox-KOXDiwRr.js} +4 -4
- package/dist/checkbox.js +1 -1
- package/dist/{circle-DgoPsPmL.cjs → circle-By7YwAJj.cjs} +1 -1
- package/dist/{circle-fold-DGHgTbNx.cjs → circle-fold-BJWGLDa6.cjs} +1 -1
- package/dist/{circle-fold-CZf63cE1.js → circle-fold-DrwUHB-m.js} +2 -2
- package/dist/{circle-line-DDD6hHbp.cjs → circle-line-BsXpw2HA.cjs} +1 -1
- package/dist/{circle-line-vsuTmqx8.js → circle-line-DCUX3o9u.js} +2 -2
- package/dist/{circle-rotate-B7JrnjYG.cjs → circle-rotate-BK1tW3Jv.cjs} +1 -1
- package/dist/{circle-rotate-DDC3CKzB.js → circle-rotate-DeBqoVVp.js} +2 -2
- package/dist/{circle-spin-Djuwx9eN.js → circle-spin-Crycoffl.js} +2 -2
- package/dist/{circle-spin-CIMhAYj5.cjs → circle-spin-Ctoq0Wil.cjs} +1 -1
- package/dist/{circle-turn-DtYjq4Ky.js → circle-turn-DytKZEgU.js} +2 -2
- package/dist/{circle-turn-D1Z-dXF8.cjs → circle-turn-J9aToB75.cjs} +1 -1
- package/dist/{colorpicker-C8vbgSta.js → colorpicker-7adjGSuz.js} +7 -7
- package/dist/colorpicker.js +1 -1
- package/dist/{content-WyCTQEb9.js → content-BmwgR8WP.js} +3 -3
- package/dist/content.js +1 -1
- package/dist/{cube-BHbuhZjD.cjs → cube-BB32JJuI.cjs} +1 -1
- package/dist/{cube-dim-JK8OwqXU.cjs → cube-dim-DTcZAlcE.cjs} +1 -1
- package/dist/{cube-dim-FDQVX9Sb.js → cube-dim-DgfzlG3p.js} +2 -2
- package/dist/{cube-fold-DMmWEicy.cjs → cube-fold-CKVQ1IDZ.cjs} +1 -1
- package/dist/{cube-fold-68Pk6igJ.js → cube-fold-Dp4-pf7P.js} +2 -2
- package/dist/{cube-grid-C5ONBtr1.cjs → cube-grid-BrxyqSNh.cjs} +1 -1
- package/dist/{cube-grid-DTgwN5o-.js → cube-grid-DprxkSoT.js} +2 -2
- package/dist/{cube-BJr0a40o.js → cube-iOzgFQbc.js} +2 -2
- package/dist/{dot-bar-Ddbyx-0a.cjs → dot-bar-C2PcL7wc.cjs} +1 -1
- package/dist/{dot-bar-CXBmT1RL.js → dot-bar-vHWpqnhw.js} +2 -2
- package/dist/{dot-circle-DksscvAR.js → dot-circle-DQqpkRr_.js} +2 -2
- package/dist/{dot-circle-DxoSLiz7.cjs → dot-circle-EInrpGOw.cjs} +1 -1
- package/dist/{dot-D8taMWFZ.cjs → dot-do6V9GYP.cjs} +1 -1
- package/dist/{dot-line-CKcmWaBb.cjs → dot-line-BEFriL91.cjs} +1 -1
- package/dist/{dot-line-8Z2hpBOL.js → dot-line-CorWP6p2.js} +2 -2
- package/dist/{dot-pulse-DVwedcib.cjs → dot-pulse-BGidqqxA.cjs} +1 -1
- package/dist/{dot-pulse-BC7xaifX.js → dot-pulse-OtjDlpwG.js} +2 -2
- package/dist/{double-bounce-BVGrEHLy.js → double-bounce-CWAE4F5S.js} +2 -2
- package/dist/{double-bounce-Cxp3i6ip.cjs → double-bounce-DOehLE4X.cjs} +1 -1
- package/dist/{drop-q8qufm5t.cjs → drop-BkBi0TEt.cjs} +1 -1
- package/dist/{drop-CTufsC6T.js → drop-CTSvqyOb.js} +2 -2
- package/dist/{dropdown-B2Sk5gQF.js → dropdown-DQy4YvVn.js} +4 -4
- package/dist/dropdown.js +1 -1
- package/dist/{factory-Ce9hR27Y.js → factory-Bbul5tOL.js} +1 -1
- package/dist/{form-C0-UiXLj.js → form-DwjKUNz4.js} +3 -3
- package/dist/form.js +1 -1
- package/dist/{glass-TzHfgesD.js → glass-DKQAEAmc.js} +3 -3
- package/dist/glass.js +1 -1
- package/dist/{icon-BoaQYEij.js → icon-DSIyi1nQ.js} +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +1 -1
- package/dist/iife/content.iife.js +1 -1
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/glass.iife.js +1 -1
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/link.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +1 -1
- package/dist/iife/mermaid.iife.js +1 -1
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +1 -1
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +1 -1
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/iife/theme-switch.iife.js +1 -1
- package/dist/{image-CNpdv9k_.js → image-Bn0VuwO0.js} +3 -3
- package/dist/image.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.iife.js +106 -106
- package/dist/index.js +30 -30
- package/dist/{input-_iNjylVC.js → input-2Zz1gLzy.js} +4 -4
- package/dist/input.js +1 -1
- package/dist/{line-qgqu6ngc.cjs → line-BFm46PmI.cjs} +1 -1
- package/dist/{line-Bhz15vpy.js → line-Dt7YMxyn.js} +2 -2
- package/dist/{line-scale-CtMO8YfX.js → line-scale-BNCCcLKl.js} +2 -2
- package/dist/{line-scale-Dr9ILV5d.cjs → line-scale-Mzdq1fTx.cjs} +1 -1
- package/dist/{link-CmMSKe18.js → link-DcRMinJ9.js} +2 -2
- package/dist/link.js +1 -1
- package/dist/{loading-DHQDAkef.js → loading-BXZBOAbH.js} +30 -30
- package/dist/loading.js +1 -1
- package/dist/{math-DobANAnr.js → math-C6oaCrk-.js} +4 -4
- package/dist/math.js +1 -1
- package/dist/{mermaid-CwMPhttK.js → mermaid-Cmxzclzv.js} +4 -4
- package/dist/mermaid.js +1 -1
- package/dist/{message-CT-at-dX.js → message-E92Vu7SO.js} +4 -4
- package/dist/message.js +1 -1
- package/dist/{modal-COzuPRoz.cjs → modal-BQUM-5G3.cjs} +1 -1
- package/dist/{modal-DkFW7_It.js → modal-TayIRDMV.js} +3 -3
- package/dist/modal.js +1 -1
- package/dist/{pacman-DSIM9KGC.js → pacman-DqDqKzL4.js} +2 -2
- package/dist/{pacman-C7_BcAl5.cjs → pacman-hB0Vx_ut.cjs} +1 -1
- package/dist/{player-Dhv_QP4a.js → player-BZVIOmdS.js} +5 -5
- package/dist/player.js +1 -1
- package/dist/{popover-DR5ua2_I.js → popover-Bimxdeql.js} +6 -6
- package/dist/popover.js +1 -1
- package/dist/{progress-BRIBVXqD.js → progress-CNUdc_VD.js} +4 -4
- package/dist/progress.js +1 -1
- package/dist/{pulse-QISsDmFE.cjs → pulse-CPV8p0Lr.cjs} +1 -1
- package/dist/{pulse-DNmbppj-.js → pulse-IOuRzRUm.js} +2 -2
- package/dist/{radar-B9eKnRw8.js → radar-Dse0Dgma.js} +4 -4
- package/dist/radar.js +1 -1
- package/dist/{rotate-VMR047YI.cjs → rotate-O1KJozW0.cjs} +1 -1
- package/dist/{rotate-BX5qIRKZ.js → rotate-uZhtaw8R.js} +2 -2
- package/dist/{route-C9sC9d8P.js → route-Dh5S2dSW.js} +3 -3
- package/dist/route.js +1 -1
- package/dist/{router-CID9Dasr.js → router-DUxBSvIi.js} +3 -3
- package/dist/router.js +1 -1
- package/dist/{scale-out-aZu3503p.cjs → scale-out-CEERARri.cjs} +1 -1
- package/dist/{scale-out-DqffQsuL.js → scale-out-mSsKNtie.js} +2 -2
- package/dist/{scratch-y8Op8fTo.js → scratch-4TCqNbat.js} +3 -3
- package/dist/scratch.js +1 -1
- package/dist/{section-cgPwzwLR.js → section-CMN7tQ-S.js} +3 -3
- package/dist/section.js +1 -1
- package/dist/{select-Bqo_7nRL.js → select-D48kcwEy.js} +9 -9
- package/dist/select.js +1 -1
- package/dist/{skeleton-wq2ybbYv.js → skeleton-DbgMcQQ0.js} +3 -3
- package/dist/skeleton.js +1 -1
- package/dist/{solar-DaoF834l.cjs → solar-CdvkRr5X.cjs} +1 -1
- package/dist/{solar-BPmDmWLU.js → solar-Ck7RIK09.js} +2 -2
- package/dist/{square-DiBkWYAH.cjs → square-exSvykCu.cjs} +1 -1
- package/dist/{square-DKQ0d_O6.js → square-xGODzCyr.js} +2 -2
- package/dist/ssg.js +1 -1
- package/dist/{ssr-vZNJHtYm.js → ssr-BzHZ2bCe.js} +1 -1
- package/dist/ssr-stream.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/{stretch-BXJ4labN.js → stretch-Bv60MZD_.js} +2 -2
- package/dist/{stretch-LP22YEA3.cjs → stretch-CTFwefaK.cjs} +1 -1
- package/dist/{tab-DMUILL_2.js → tab-ADuziXeq.js} +3 -3
- package/dist/tab.js +1 -1
- package/dist/{tabpane-R8Kyn9jv.js → tabpane-Bisq-qpc.js} +3 -3
- package/dist/tabpane.js +1 -1
- package/dist/{text-C_XRjuGr.cjs → text-BniFEEB5.cjs} +1 -1
- package/dist/{text-8gI5TFOa.js → text-CX8UkbzB.js} +2 -2
- package/dist/{theme-DAG2-N5e.js → theme-DL6q_FZu.js} +1 -1
- package/dist/{theme-switch-D3MpVw-R.js → theme-switch-GbuiPclm.js} +4 -4
- package/dist/theme-switch.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/{triple-bounce-CMwTsw-f.js → triple-bounce-BwxTDpKz.js} +2 -2
- package/dist/{triple-bounce-CNjk5imb.cjs → triple-bounce-BzAtF-TA.cjs} +1 -1
- package/dist/{utils-DqjNwwjC.js → utils-X5_TIQTQ.js} +3 -3
- package/dist/{utils-nntJky78.js → utils-xccQZnoa.js} +29 -25
- package/package.json +2 -2
- package/dist/builder-BjRti6oP.cjs +0 -1
package/dist/iife/icon.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ranui_icon=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=`.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-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,a=typeof document>`u`,o=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},s=0,c=1,l=2,u=null,d=null,f=0,p=new Set,m=!1;function h(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)y(e,l);f===0&&re()}}]}function g(e){let t=ee(e,!0);return te(t),x(t),()=>S(t)}function _(e){let t={owned:[],cleanups:[],owner:d},n=d,r=u;d=t,u=null;try{return e(()=>ae(t))}finally{d=n,u=r}}function v(e){d&&d.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:l,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:d}}function te(e){d&&d.owned.push(e)}function ne(e){u&&(u.sources.add(e),e.observers.add(u))}function y(e,t){if(e.disposed||e.state>=t)return;let n=e.state===s;if(e.state=t,e.isEffect)p.add(e);else if(n)for(let t of e.observers)y(t,c)}function re(){if(!(f>0||m)){m=!0;try{for(;p.size>0;){let e=[...p];p.clear();for(let t of e)t.disposed||b(t)}}finally{m=!1}}}function b(e){if(!(e.disposed||e.state===s)){if(e.state===c)for(let t of e.sources)`fn`in t&&b(t);e.state===l&&x(e),e.state=s}}function x(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);ie(e);let t=u,n=d;u=e,d=e,e.running=!0,e.state=s;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)y(t,l)}}finally{e.running=!1,u=t,d=n}}function ie(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,ie(e),e.observers.clear())}function ae(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var oe=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}};Math.PI/180,180/Math.PI,2*Math.PI;var C=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var se=e=>typeof e==`function`,ce=12e4,le=`__ranuts_bridge__`,ue=`default`,de=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=ue){this.targetOrigin=t,this.channel=n,this.senderId=C(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,de.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:le,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(se(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=C(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},ce),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=()=>{de.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||=C(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 oe;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],T=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new T(w[0],3609767458),new T(w[1],602891725),new T(w[2],3964484399),new T(w[3],2173295548),new T(w[4],4081628472),new T(w[5],3053834265),new T(w[6],2937671579),new T(w[7],3664609560),new T(w[8],2734883394),new T(w[9],1164996542),new T(w[10],1323610764),new T(w[11],3590304994),new T(w[12],4068182383),new T(w[13],991336113),new T(w[14],633803317),new T(w[15],3479774868),new T(w[16],2666613458),new T(w[17],944711139),new T(w[18],2341262773),new T(w[19],2007800933),new T(w[20],1495990901),new T(w[21],1856431235),new T(w[22],3175218132),new T(w[23],2198950837),new T(w[24],3999719339),new T(w[25],766784016),new T(w[26],2566594879),new T(w[27],3203337956),new T(w[28],1034457026),new T(w[29],2466948901),new T(w[30],3758326383),new T(w[31],168717936),new T(w[32],1188179964),new T(w[33],1546045734),new T(w[34],1522805485),new T(w[35],2643833823),new T(w[36],2343527390),new T(w[37],1014477480),new T(w[38],1206759142),new T(w[39],344077627),new T(w[40],1290863460),new T(w[41],3158454273),new T(w[42],3505952657),new T(w[43],106217008),new T(w[44],3606008344),new T(w[45],1432725776),new T(w[46],1467031594),new T(w[47],851169720),new T(w[48],3100823752),new T(w[49],1363258195),new T(w[50],3750685593),new T(w[51],3785050280),new T(w[52],3318307427),new T(w[53],3812723403),new T(w[54],2003034995),new T(w[55],3602036899),new T(w[56],1575990012),new T(w[57],1125592928),new T(w[58],2716904306),new T(w[59],442776044),new T(w[60],593698344),new T(w[61],3733110249),new T(w[62],2999351573),new T(w[63],3815920427),new T(3391569614,3928383900),new T(3515267271,566280711),new T(3940187606,3454069534),new T(4118630271,4000239992),new T(116418474,1914138554),new T(174292421,2731055270),new T(289380356,3203993006),new T(460393269,320620315),new T(685471733,587496836),new T(852142971,1086792851),new T(1017036298,365543100),new T(1126000580,2618297676),new T(1288033470,3409855158),new T(1501505948,4234509866),new T(1607167915,987167468),new T(1816402316,1246189591),new T(0,1),new T(0,32898),new T(2147483648,32906),new T(2147483648,2147516416),new T(0,32907),new T(0,2147483649),new T(2147483648,2147516545),new T(2147483648,32777),new T(0,138),new T(0,136),new T(0,2147516425),new T(0,2147483658),new T(0,2147516555),new T(2147483648,139),new T(2147483648,32905),new T(2147483648,32771),new T(2147483648,32770),new T(2147483648,128),new T(0,32778),new T(2147483648,2147483658),new T(2147483648,2147516545),new T(2147483648,32896),new T(0,2147483649),new T(2147483648,2147516424);var pe=/["'&<>]/;function E(e){let t=``+e,n=pe.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var me=new Map,he=new Map,ge=`data-adopted-style`,_e=`data-adopted-sheet`,ve=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ye=(e,t,n=ge)=>{if(typeof document<`u`&&t&&!ve(e,t,me)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},be=(e,t,n=_e)=>{if(typeof document<`u`&&t&&!ve(e,t,he)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},xe=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})(xe),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(xe);function D(e){return E(e)}var Se=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,Ce=(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()},O=(e,t,n)=>{for(let r of e)Se(r)&&(Ce(r,t)&&n.push(r),O(r.childrenList,t,n))},k=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?E(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}},A=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 k)}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 we(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(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}="${D(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${D(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`?E(e):(e instanceof k,e.serialize())).join(``):a+=E(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}>`}},we=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 O(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${E(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?E(e):(e instanceof k,e.serialize())).join(``)}</template>`}},j=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(j(t)):e.concat(t),[]),M=e=>e==null?null:e instanceof Fe?e.build():typeof e==`string`?a?e:document.createTextNode(e):e,Te=(e,t)=>{if(a){N(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,o=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};g(()=>{let e=t();o();let n=document.createDocumentFragment();i=_(t=>(N(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),v(()=>i?.())},Ee=`__ranFor`,De=e=>typeof e==`object`&&!!e&&e[Ee]===!0,Oe=(e,t,n)=>{let[r,i]=h(t),a=null,o=_(t=>{let i=M(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},ke=(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},Ae=(e,t)=>{if(a){(t.each()??[]).forEach((n,r)=>{let i=M(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;v(()=>{for(let e of r.values())e.dispose();r.clear()}),g(()=>{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=Oe(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();ke(n,a),r=i})},je=`__ranIndex`,Me=e=>typeof e==`object`&&!!e&&e[je]===!0,Ne=(e,t,n)=>{let[r,i]=h(e),a=null,o=_(e=>{let i=M(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Pe=(e,t)=>{if(a){(t.each()??[]).forEach((n,r)=>{let i=M(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];v(()=>{for(let e of r)e.dispose();r=[]}),g(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(Ne(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()}ke(n,r.map(e=>e.node).filter(e=>e!=null))})},N=(e,t)=>{j(t).forEach(t=>{if(De(t)){Ae(e,t);return}if(Me(t)){Pe(e,t);return}if(typeof t==`function`){Te(e,t);return}let n=M(t);n!=null&&e.appendChild(n)})},Fe=class{el;constructor(e){this.el=a?new A(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?g(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{a?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(a){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 Ie(this.el,t,e)}build(){return this.el}serialize(){if(a)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Ie=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(a)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 a?this.root.serialize():this.root.innerHTML}},Le=e=>new Fe(e),Re=()=>Le(`div`),ze=new Map;function Be(e,t){a?(ze.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ve=typeof document<`u`?HTMLElement:A,He=`data-ranui`,Ue=`data-ranui-sheet`,We=(e,t)=>ye(e,t,He),Ge=(e,t)=>be(e,t,Ue),P=new WeakMap,F=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Ke=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||P.get(e)||e.attachShadow(n);return P.set(e,r),We(r,t?`${t}\n${F}`:F),r},qe=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},I=(e,t,n=``)=>e.getAttribute(t)??n,L=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Je=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ge(t,a)},Ye=r({default:()=>R}),R,z=n((()=>{R={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`}})),Xe=r({default:()=>B}),B,V=n((()=>{B={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`}})),Ze=r({default:()=>H}),H,U=n((()=>{H={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`}})),Qe=r({default:()=>W}),W,G=n((()=>{W={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`}})),$e=r({default:()=>K}),K,q=n((()=>{K={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),et=r({default:()=>J}),J,tt=n((()=>{J={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),nt=r({default:()=>Y}),Y,rt=n((()=>{Y={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}}));z(),V(),U(),G(),q(),tt(),rt();var it={copy:R,check:B,download:H,fullscreen:W,"zoom-in":K,"zoom-out":J,refresh:Y},at=r({default:()=>ot}),ot,st=n((()=>{ot={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
1
|
+
var ranui_icon=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=`.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-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,a=typeof document>`u`,o=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},s=0,c=1,l=2,u=null,d=null,f=0,p=new Set,m=!1;function h(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)y(e,l);f===0&&re()}}]}function g(e){let t=ee(e,!0);return te(t),x(t),()=>S(t)}function _(e){let t={owned:[],cleanups:[],owner:d},n=d,r=u;d=t,u=null;try{return e(()=>ae(t))}finally{d=n,u=r}}function v(e){d&&d.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:l,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:d}}function te(e){d&&d.owned.push(e)}function ne(e){u&&(u.sources.add(e),e.observers.add(u))}function y(e,t){if(e.disposed||e.state>=t)return;let n=e.state===s;if(e.state=t,e.isEffect)p.add(e);else if(n)for(let t of e.observers)y(t,c)}function re(){if(!(f>0||m)){m=!0;try{for(;p.size>0;){let e=[...p];p.clear();for(let t of e)t.disposed||b(t)}}finally{m=!1}}}function b(e){if(!(e.disposed||e.state===s)){if(e.state===c)for(let t of e.sources)`fn`in t&&b(t);e.state===l&&x(e),e.state=s}}function x(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);ie(e);let t=u,n=d;u=e,d=e,e.running=!0,e.state=s;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)y(t,l)}}finally{e.running=!1,u=t,d=n}}function ie(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,ie(e),e.observers.clear())}function ae(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var oe=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}};Math.PI/180,180/Math.PI,2*Math.PI;var C=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var se=e=>typeof e==`function`,ce=12e4,le=`__ranuts_bridge__`,ue=`default`,de=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=ue){this.targetOrigin=t,this.channel=n,this.senderId=C(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,de.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:le,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(se(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=C(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},ce),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=()=>{de.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||=C(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 oe;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],T=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new T(w[0],3609767458),new T(w[1],602891725),new T(w[2],3964484399),new T(w[3],2173295548),new T(w[4],4081628472),new T(w[5],3053834265),new T(w[6],2937671579),new T(w[7],3664609560),new T(w[8],2734883394),new T(w[9],1164996542),new T(w[10],1323610764),new T(w[11],3590304994),new T(w[12],4068182383),new T(w[13],991336113),new T(w[14],633803317),new T(w[15],3479774868),new T(w[16],2666613458),new T(w[17],944711139),new T(w[18],2341262773),new T(w[19],2007800933),new T(w[20],1495990901),new T(w[21],1856431235),new T(w[22],3175218132),new T(w[23],2198950837),new T(w[24],3999719339),new T(w[25],766784016),new T(w[26],2566594879),new T(w[27],3203337956),new T(w[28],1034457026),new T(w[29],2466948901),new T(w[30],3758326383),new T(w[31],168717936),new T(w[32],1188179964),new T(w[33],1546045734),new T(w[34],1522805485),new T(w[35],2643833823),new T(w[36],2343527390),new T(w[37],1014477480),new T(w[38],1206759142),new T(w[39],344077627),new T(w[40],1290863460),new T(w[41],3158454273),new T(w[42],3505952657),new T(w[43],106217008),new T(w[44],3606008344),new T(w[45],1432725776),new T(w[46],1467031594),new T(w[47],851169720),new T(w[48],3100823752),new T(w[49],1363258195),new T(w[50],3750685593),new T(w[51],3785050280),new T(w[52],3318307427),new T(w[53],3812723403),new T(w[54],2003034995),new T(w[55],3602036899),new T(w[56],1575990012),new T(w[57],1125592928),new T(w[58],2716904306),new T(w[59],442776044),new T(w[60],593698344),new T(w[61],3733110249),new T(w[62],2999351573),new T(w[63],3815920427),new T(3391569614,3928383900),new T(3515267271,566280711),new T(3940187606,3454069534),new T(4118630271,4000239992),new T(116418474,1914138554),new T(174292421,2731055270),new T(289380356,3203993006),new T(460393269,320620315),new T(685471733,587496836),new T(852142971,1086792851),new T(1017036298,365543100),new T(1126000580,2618297676),new T(1288033470,3409855158),new T(1501505948,4234509866),new T(1607167915,987167468),new T(1816402316,1246189591),new T(0,1),new T(0,32898),new T(2147483648,32906),new T(2147483648,2147516416),new T(0,32907),new T(0,2147483649),new T(2147483648,2147516545),new T(2147483648,32777),new T(0,138),new T(0,136),new T(0,2147516425),new T(0,2147483658),new T(0,2147516555),new T(2147483648,139),new T(2147483648,32905),new T(2147483648,32771),new T(2147483648,32770),new T(2147483648,128),new T(0,32778),new T(2147483648,2147483658),new T(2147483648,2147516545),new T(2147483648,32896),new T(0,2147483649),new T(2147483648,2147516424);var pe=/["'&<>]/;function E(e){let t=``+e,n=pe.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var me=new Map,he=new Map,ge=`data-adopted-style`,_e=`data-adopted-sheet`,ve=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ye=(e,t,n=ge)=>{if(typeof document<`u`&&t&&!ve(e,t,me)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},be=(e,t,n=_e)=>{if(typeof document<`u`&&t&&!ve(e,t,he)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var xe=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})(xe),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(xe);function D(e){return E(e)}var Se=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,Ce=(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()},O=(e,t,n)=>{for(let r of e)Se(r)&&(Ce(r,t)&&n.push(r),O(r.childrenList,t,n))},k=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?E(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}},A=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 k)}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 we(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(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}="${D(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${D(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`?E(e):(e instanceof k,e.serialize())).join(``):a+=E(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}>`}},we=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 O(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${E(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?E(e):(e instanceof k,e.serialize())).join(``)}</template>`}},j=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(j(t)):e.concat(t),[]),M=e=>e==null?null:e instanceof Fe?e.build():typeof e==`string`?a?e:document.createTextNode(e):e,Te=(e,t)=>{if(a){N(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,o=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};g(()=>{let e=t();o();let n=document.createDocumentFragment();i=_(t=>(N(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),v(()=>i?.())},Ee=`__ranFor`,De=e=>typeof e==`object`&&!!e&&e[Ee]===!0,Oe=(e,t,n)=>{let[r,i]=h(t),a=null,o=_(t=>{let i=M(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},ke=(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},Ae=(e,t)=>{if(a){(t.each()??[]).forEach((n,r)=>{let i=M(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;v(()=>{for(let e of r.values())e.dispose();r.clear()}),g(()=>{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=Oe(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();ke(n,a),r=i})},je=`__ranIndex`,Me=e=>typeof e==`object`&&!!e&&e[je]===!0,Ne=(e,t,n)=>{let[r,i]=h(e),a=null,o=_(e=>{let i=M(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Pe=(e,t)=>{if(a){(t.each()??[]).forEach((n,r)=>{let i=M(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];v(()=>{for(let e of r)e.dispose();r=[]}),g(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(Ne(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()}ke(n,r.map(e=>e.node).filter(e=>e!=null))})},N=(e,t)=>{j(t).forEach(t=>{if(De(t)){Ae(e,t);return}if(Me(t)){Pe(e,t);return}if(typeof t==`function`){Te(e,t);return}let n=M(t);n!=null&&e.appendChild(n)})},Fe=class{el;constructor(e){this.el=a?new A(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?g(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{a?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(a){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 Ie(this.el,t,e)}build(){return this.el}serialize(){if(a)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Ie=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(a)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 a?this.root.serialize():this.root.innerHTML}},Le=e=>new Fe(e),Re=()=>Le(`div`),ze=new Map;function Be(e,t){a?(ze.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ve=typeof document<`u`?HTMLElement:A,He=`data-ranui`,Ue=`data-ranui-sheet`,We=(e,t)=>ye(e,t,He),Ge=(e,t)=>be(e,t,Ue),P=new WeakMap,F=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Ke=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||P.get(e)||e.attachShadow(n);return P.set(e,r),We(r,t?`${t}\n${F}`:F),r},qe=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},I=(e,t,n=``)=>e.getAttribute(t)??n,L=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Je=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ge(t,a)},Ye=r({default:()=>R}),R,z=n((()=>{R={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`}})),Xe=r({default:()=>B}),B,V=n((()=>{B={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`}})),Ze=r({default:()=>H}),H,U=n((()=>{H={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`}})),Qe=r({default:()=>W}),W,G=n((()=>{W={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`}})),$e=r({default:()=>K}),K,q=n((()=>{K={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),et=r({default:()=>J}),J,tt=n((()=>{J={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),nt=r({default:()=>Y}),Y,rt=n((()=>{Y={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}}));z(),V(),U(),G(),q(),tt(),rt();var it={copy:R,check:B,download:H,fullscreen:W,"zoom-in":K,"zoom-out":J,refresh:Y},at=r({default:()=>ot}),ot,st=n((()=>{ot={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200">
|
|
3
3
|
<path
|
|
4
4
|
d="M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h0.1c3 0 4.4-3.6 2.2-5.6-30.8-27.6-65.6-49.7-103.7-65.8-0.4-0.2-0.8-0.3-1.2-0.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.7 18.9-84.8 46-119.3 80.6-34.5 34.5-61.5 74.7-80.4 119.5C147.9 794.5 138 841 137 888.8c-0.1 4.5 3.5 8.2 8 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1 2.5 1.5 5.5 1.7 8.1 0.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4-32.4-32.5-50.3-75.7-50.3-121.6 0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4c32.4 32.5 50.3 75.7 50.3 121.6 0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"
|
package/dist/iife/image.iife.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
var ranui_image=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`
|
|
2
2
|
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==
|
|
3
|
-
`,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[()=>(g(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&&te()}}]}function f(e){let t=ee(e,!0);return h(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 h(e){s&&s.owned.push(e)}function g(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 te(){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)_(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}var re=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}};Math.PI/180,180/Math.PI,2*Math.PI;var S=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var C=e=>typeof e==`function`,w=12e4,T=`__ranuts_bridge__`,E=`default`,D=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)}},O=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=E){this.targetOrigin=t,this.channel=n,this.senderId=S(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,D.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:T,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(C(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=S(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},w),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=()=>{D.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 O(n,t,r);if(e||=S(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 re;var k=[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],A=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new A(k[0],3609767458),new A(k[1],602891725),new A(k[2],3964484399),new A(k[3],2173295548),new A(k[4],4081628472),new A(k[5],3053834265),new A(k[6],2937671579),new A(k[7],3664609560),new A(k[8],2734883394),new A(k[9],1164996542),new A(k[10],1323610764),new A(k[11],3590304994),new A(k[12],4068182383),new A(k[13],991336113),new A(k[14],633803317),new A(k[15],3479774868),new A(k[16],2666613458),new A(k[17],944711139),new A(k[18],2341262773),new A(k[19],2007800933),new A(k[20],1495990901),new A(k[21],1856431235),new A(k[22],3175218132),new A(k[23],2198950837),new A(k[24],3999719339),new A(k[25],766784016),new A(k[26],2566594879),new A(k[27],3203337956),new A(k[28],1034457026),new A(k[29],2466948901),new A(k[30],3758326383),new A(k[31],168717936),new A(k[32],1188179964),new A(k[33],1546045734),new A(k[34],1522805485),new A(k[35],2643833823),new A(k[36],2343527390),new A(k[37],1014477480),new A(k[38],1206759142),new A(k[39],344077627),new A(k[40],1290863460),new A(k[41],3158454273),new A(k[42],3505952657),new A(k[43],106217008),new A(k[44],3606008344),new A(k[45],1432725776),new A(k[46],1467031594),new A(k[47],851169720),new A(k[48],3100823752),new A(k[49],1363258195),new A(k[50],3750685593),new A(k[51],3785050280),new A(k[52],3318307427),new A(k[53],3812723403),new A(k[54],2003034995),new A(k[55],3602036899),new A(k[56],1575990012),new A(k[57],1125592928),new A(k[58],2716904306),new A(k[59],442776044),new A(k[60],593698344),new A(k[61],3733110249),new A(k[62],2999351573),new A(k[63],3815920427),new A(3391569614,3928383900),new A(3515267271,566280711),new A(3940187606,3454069534),new A(4118630271,4000239992),new A(116418474,1914138554),new A(174292421,2731055270),new A(289380356,3203993006),new A(460393269,320620315),new A(685471733,587496836),new A(852142971,1086792851),new A(1017036298,365543100),new A(1126000580,2618297676),new A(1288033470,3409855158),new A(1501505948,4234509866),new A(1607167915,987167468),new A(1816402316,1246189591),new A(0,1),new A(0,32898),new A(2147483648,32906),new A(2147483648,2147516416),new A(0,32907),new A(0,2147483649),new A(2147483648,2147516545),new A(2147483648,32777),new A(0,138),new A(0,136),new A(0,2147516425),new A(0,2147483658),new A(0,2147516555),new A(2147483648,139),new A(2147483648,32905),new A(2147483648,32771),new A(2147483648,32770),new A(2147483648,128),new A(0,32778),new A(2147483648,2147483658),new A(2147483648,2147516545),new A(2147483648,32896),new A(0,2147483649),new A(2147483648,2147516424);var ie=/["'&<>]/;function j(e){let t=``+e,n=ie.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ae=new Map,oe=new Map,se=`data-adopted-style`,ce=`data-adopted-sheet`,M=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},le=(e,t,n=se)=>{if(typeof document<`u`&&t&&!M(e,t,ae)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},N=(e,t,n=ce)=>{if(typeof document<`u`&&t&&!M(e,t,oe)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},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);function F(e){return j(e)}var I=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,L=(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()},R=(e,t,n)=>{for(let r of e)I(r)&&(L(r,t)&&n.push(r),R(r.childrenList,t,n))},z=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?j(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return R(this.childrenList,e,t),t}},B=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 z)}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 V(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return R(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`?j(e):(e instanceof z,e.serialize())).join(``):a+=j(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}>`}},V=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 R(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${j(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?j(e):(e instanceof z,e.serialize())).join(``)}</template>`}},H=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(H(t)):e.concat(t),[]),U=e=>e==null?null:e instanceof q?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,W=(e,t)=>{if(n){K(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=>(K(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ue=`__ranFor`,de=e=>typeof e==`object`&&!!e&&e[ue]===!0,fe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=U(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},G=(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},pe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=U(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=fe(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();G(r,a),i=n})},me=`__ranIndex`,he=e=>typeof e==`object`&&!!e&&e[me]===!0,ge=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=U(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},_e=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=U(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(ge(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()}G(r,i.map(e=>e.node).filter(e=>e!=null))})},K=(e,t)=>{H(t).forEach(t=>{if(de(t)){pe(e,t);return}if(he(t)){_e(e,t);return}if(typeof t==`function`){W(e,t);return}let n=U(t);n!=null&&e.appendChild(n)})},q=class{el;constructor(e){this.el=n?new B(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 K(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 ve(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}},ve=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return K(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}},ye=e=>new q(e),be=()=>ye(`div`),xe=new Map;function Se(e,t){n?(xe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ce=typeof document<`u`?HTMLElement:B,we=`data-ranui`,Te=`data-ranui-sheet`,J=(e,t)=>le(e,t,we),Ee=(e,t)=>N(e,t,Te),Y=new WeakMap,X=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,De=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),J(r,t?`${t}\n${X}`:X),r},Oe=(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??``)},ke=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ee(t,a)},Ae=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,$=class extends Ce{static get observedAttributes(){return[`src`,`fallback`,`sheet`,`alt`]}_image;_container;_shadowDom;constructor(){super(),this._shadowDom=De(this,Ae);let e=Oe(this._shadowDom,`.ran-image`,()=>be().class(`ran-image`).build());this._container=e}get fallback(){return Z(this,`fallback`,t)}set fallback(e){Q(this,`fallback`,e,{removeEmpty:!0})}get sheet(){return Z(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}get alt(){return Z(this,`alt`)}set alt(e){Q(this,`alt`,e)}handlerExternalCss=()=>{ke(this,this._shadowDom,`sheet`,null,this.sheet)};listenFallback(e,t){e===`fallback`&&this._image&&(t?this._image.setAttribute(`fallback`,t):this._image.removeAttribute(`fallback`))}updateSrc=()=>{this._image&&(this._image.src=this.getAttribute(`src`)||``)};connectedCallback(){this.handlerExternalCss(),this._image=new Image,this._image.alt=this.alt,this._image.addEventListener(`error`,()=>{this._image&&this.fallback&&(this._image.src=this.fallback)}),this._image.addEventListener(`load`,()=>{this._image&&this._container.appendChild(this._image)}),this.updateSrc()}attributeChangedCallback(e,t,n){t!==n&&(this.listenFallback(e,n),e===`src`&&this.updateSrc(),e===`alt`&&this._image&&(this._image.alt=n??``),e===`sheet`&&this.handlerExternalCss())}};return Se(`r-img`,$),e.ImageElement=$,e.default=$,e})({});
|
|
3
|
+
`,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[()=>(g(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&&te()}}]}function f(e){let t=ee(e,!0);return h(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 h(e){s&&s.owned.push(e)}function g(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 te(){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)_(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}var re=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}};Math.PI/180,180/Math.PI,2*Math.PI;var S=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var C=e=>typeof e==`function`,w=12e4,T=`__ranuts_bridge__`,E=`default`,D=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)}},O=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=E){this.targetOrigin=t,this.channel=n,this.senderId=S(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,D.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:T,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(C(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=S(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},w),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=()=>{D.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 O(n,t,r);if(e||=S(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 re;var k=[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],A=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new A(k[0],3609767458),new A(k[1],602891725),new A(k[2],3964484399),new A(k[3],2173295548),new A(k[4],4081628472),new A(k[5],3053834265),new A(k[6],2937671579),new A(k[7],3664609560),new A(k[8],2734883394),new A(k[9],1164996542),new A(k[10],1323610764),new A(k[11],3590304994),new A(k[12],4068182383),new A(k[13],991336113),new A(k[14],633803317),new A(k[15],3479774868),new A(k[16],2666613458),new A(k[17],944711139),new A(k[18],2341262773),new A(k[19],2007800933),new A(k[20],1495990901),new A(k[21],1856431235),new A(k[22],3175218132),new A(k[23],2198950837),new A(k[24],3999719339),new A(k[25],766784016),new A(k[26],2566594879),new A(k[27],3203337956),new A(k[28],1034457026),new A(k[29],2466948901),new A(k[30],3758326383),new A(k[31],168717936),new A(k[32],1188179964),new A(k[33],1546045734),new A(k[34],1522805485),new A(k[35],2643833823),new A(k[36],2343527390),new A(k[37],1014477480),new A(k[38],1206759142),new A(k[39],344077627),new A(k[40],1290863460),new A(k[41],3158454273),new A(k[42],3505952657),new A(k[43],106217008),new A(k[44],3606008344),new A(k[45],1432725776),new A(k[46],1467031594),new A(k[47],851169720),new A(k[48],3100823752),new A(k[49],1363258195),new A(k[50],3750685593),new A(k[51],3785050280),new A(k[52],3318307427),new A(k[53],3812723403),new A(k[54],2003034995),new A(k[55],3602036899),new A(k[56],1575990012),new A(k[57],1125592928),new A(k[58],2716904306),new A(k[59],442776044),new A(k[60],593698344),new A(k[61],3733110249),new A(k[62],2999351573),new A(k[63],3815920427),new A(3391569614,3928383900),new A(3515267271,566280711),new A(3940187606,3454069534),new A(4118630271,4000239992),new A(116418474,1914138554),new A(174292421,2731055270),new A(289380356,3203993006),new A(460393269,320620315),new A(685471733,587496836),new A(852142971,1086792851),new A(1017036298,365543100),new A(1126000580,2618297676),new A(1288033470,3409855158),new A(1501505948,4234509866),new A(1607167915,987167468),new A(1816402316,1246189591),new A(0,1),new A(0,32898),new A(2147483648,32906),new A(2147483648,2147516416),new A(0,32907),new A(0,2147483649),new A(2147483648,2147516545),new A(2147483648,32777),new A(0,138),new A(0,136),new A(0,2147516425),new A(0,2147483658),new A(0,2147516555),new A(2147483648,139),new A(2147483648,32905),new A(2147483648,32771),new A(2147483648,32770),new A(2147483648,128),new A(0,32778),new A(2147483648,2147483658),new A(2147483648,2147516545),new A(2147483648,32896),new A(0,2147483649),new A(2147483648,2147516424);var ie=/["'&<>]/;function j(e){let t=``+e,n=ie.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ae=new Map,oe=new Map,se=`data-adopted-style`,ce=`data-adopted-sheet`,M=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},le=(e,t,n=se)=>{if(typeof document<`u`&&t&&!M(e,t,ae)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},N=(e,t,n=ce)=>{if(typeof document<`u`&&t&&!M(e,t,oe)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var 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);function F(e){return j(e)}var I=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,L=(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()},R=(e,t,n)=>{for(let r of e)I(r)&&(L(r,t)&&n.push(r),R(r.childrenList,t,n))},z=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?j(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return R(this.childrenList,e,t),t}},B=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 z)}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 V(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return R(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`?j(e):(e instanceof z,e.serialize())).join(``):a+=j(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}>`}},V=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 R(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${j(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?j(e):(e instanceof z,e.serialize())).join(``)}</template>`}},H=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(H(t)):e.concat(t),[]),U=e=>e==null?null:e instanceof q?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,W=(e,t)=>{if(n){K(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=>(K(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},ue=`__ranFor`,de=e=>typeof e==`object`&&!!e&&e[ue]===!0,fe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=U(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},G=(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},pe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=U(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=fe(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();G(r,a),i=n})},me=`__ranIndex`,he=e=>typeof e==`object`&&!!e&&e[me]===!0,ge=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=U(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},_e=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=U(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(ge(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()}G(r,i.map(e=>e.node).filter(e=>e!=null))})},K=(e,t)=>{H(t).forEach(t=>{if(de(t)){pe(e,t);return}if(he(t)){_e(e,t);return}if(typeof t==`function`){W(e,t);return}let n=U(t);n!=null&&e.appendChild(n)})},q=class{el;constructor(e){this.el=n?new B(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 K(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 ve(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}},ve=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return K(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}},ye=e=>new q(e),be=()=>ye(`div`),xe=new Map;function Se(e,t){n?(xe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ce=typeof document<`u`?HTMLElement:B,we=`data-ranui`,Te=`data-ranui-sheet`,J=(e,t)=>le(e,t,we),Ee=(e,t)=>N(e,t,Te),Y=new WeakMap,X=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,De=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),J(r,t?`${t}\n${X}`:X),r},Oe=(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??``)},ke=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ee(t,a)},Ae=`.remove-wap-active-focus,.remove-wap-active-focus:active,.remove-wap-active-focus:focus{-webkit-tap-highlight-color:transparent;outline:0}`,$=class extends Ce{static get observedAttributes(){return[`src`,`fallback`,`sheet`,`alt`]}_image;_container;_shadowDom;constructor(){super(),this._shadowDom=De(this,Ae);let e=Oe(this._shadowDom,`.ran-image`,()=>be().class(`ran-image`).build());this._container=e}get fallback(){return Z(this,`fallback`,t)}set fallback(e){Q(this,`fallback`,e,{removeEmpty:!0})}get sheet(){return Z(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}get alt(){return Z(this,`alt`)}set alt(e){Q(this,`alt`,e)}handlerExternalCss=()=>{ke(this,this._shadowDom,`sheet`,null,this.sheet)};listenFallback(e,t){e===`fallback`&&this._image&&(t?this._image.setAttribute(`fallback`,t):this._image.removeAttribute(`fallback`))}updateSrc=()=>{this._image&&(this._image.src=this.getAttribute(`src`)||``)};connectedCallback(){this.handlerExternalCss(),this._image=new Image,this._image.alt=this.alt,this._image.addEventListener(`error`,()=>{this._image&&this.fallback&&(this._image.src=this.fallback)}),this._image.addEventListener(`load`,()=>{this._image&&this._container.appendChild(this._image)}),this.updateSrc()}attributeChangedCallback(e,t,n){t!==n&&(this.listenFallback(e,n),e===`src`&&this.updateSrc(),e===`alt`&&this._image&&(this._image.alt=n??``),e===`sheet`&&this.handlerExternalCss())}};return Se(`r-img`,$),e.ImageElement=$,e.default=$,e})({});
|
package/dist/iife/input.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ranui_input=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=typeof document>`u`,a=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},o=0,s=1,c=2,l=null,u=null,d=0,f=new Set,p=!1;function m(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)v(e,c);d===0&&re()}}]}function h(e){let t=ee(e,!0);return te(t),ae(t),()=>y(t)}function g(e){let t={owned:[],cleanups:[],owner:u},n=u,r=l;u=t,l=null;try{return e(()=>se(t))}finally{u=n,l=r}}function _(e){u&&u.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:c,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:u}}function te(e){u&&u.owned.push(e)}function ne(e){l&&(l.sources.add(e),e.observers.add(l))}function v(e,t){if(e.disposed||e.state>=t)return;let n=e.state===o;if(e.state=t,e.isEffect)f.add(e);else if(n)for(let t of e.observers)v(t,s)}function re(){if(!(d>0||p)){p=!0;try{for(;f.size>0;){let e=[...f];f.clear();for(let t of e)t.disposed||ie(t)}}finally{p=!1}}}function ie(e){if(!(e.disposed||e.state===o)){if(e.state===s)for(let t of e.sources)`fn`in t&&ie(t);e.state===c&&ae(e),e.state=o}}function ae(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);oe(e);let t=l,n=u;l=e,u=e,e.running=!0,e.state=o;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)v(t,c)}}finally{e.running=!1,l=t,u=n}}function oe(e){for(let t of e.owned)y(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 y(e){e.disposed||(e.disposed=!0,oe(e),e.observers.clear())}function se(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var ce=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}};Math.PI/180,180/Math.PI,2*Math.PI;var b=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var le=e=>typeof e==`function`,ue=12e4,de=`__ranuts_bridge__`,fe=`default`,pe=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=fe){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,pe.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:de,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(le(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`)))},ue),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=()=>{pe.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||=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 ce;var x=[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],S=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new S(x[0],3609767458),new S(x[1],602891725),new S(x[2],3964484399),new S(x[3],2173295548),new S(x[4],4081628472),new S(x[5],3053834265),new S(x[6],2937671579),new S(x[7],3664609560),new S(x[8],2734883394),new S(x[9],1164996542),new S(x[10],1323610764),new S(x[11],3590304994),new S(x[12],4068182383),new S(x[13],991336113),new S(x[14],633803317),new S(x[15],3479774868),new S(x[16],2666613458),new S(x[17],944711139),new S(x[18],2341262773),new S(x[19],2007800933),new S(x[20],1495990901),new S(x[21],1856431235),new S(x[22],3175218132),new S(x[23],2198950837),new S(x[24],3999719339),new S(x[25],766784016),new S(x[26],2566594879),new S(x[27],3203337956),new S(x[28],1034457026),new S(x[29],2466948901),new S(x[30],3758326383),new S(x[31],168717936),new S(x[32],1188179964),new S(x[33],1546045734),new S(x[34],1522805485),new S(x[35],2643833823),new S(x[36],2343527390),new S(x[37],1014477480),new S(x[38],1206759142),new S(x[39],344077627),new S(x[40],1290863460),new S(x[41],3158454273),new S(x[42],3505952657),new S(x[43],106217008),new S(x[44],3606008344),new S(x[45],1432725776),new S(x[46],1467031594),new S(x[47],851169720),new S(x[48],3100823752),new S(x[49],1363258195),new S(x[50],3750685593),new S(x[51],3785050280),new S(x[52],3318307427),new S(x[53],3812723403),new S(x[54],2003034995),new S(x[55],3602036899),new S(x[56],1575990012),new S(x[57],1125592928),new S(x[58],2716904306),new S(x[59],442776044),new S(x[60],593698344),new S(x[61],3733110249),new S(x[62],2999351573),new S(x[63],3815920427),new S(3391569614,3928383900),new S(3515267271,566280711),new S(3940187606,3454069534),new S(4118630271,4000239992),new S(116418474,1914138554),new S(174292421,2731055270),new S(289380356,3203993006),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,2618297676),new S(1288033470,3409855158),new S(1501505948,4234509866),new S(1607167915,987167468),new S(1816402316,1246189591),new S(0,1),new S(0,32898),new S(2147483648,32906),new S(2147483648,2147516416),new S(0,32907),new S(0,2147483649),new S(2147483648,2147516545),new S(2147483648,32777),new S(0,138),new S(0,136),new S(0,2147516425),new S(0,2147483658),new S(0,2147516555),new S(2147483648,139),new S(2147483648,32905),new S(2147483648,32771),new S(2147483648,32770),new S(2147483648,128),new S(0,32778),new S(2147483648,2147483658),new S(2147483648,2147516545),new S(2147483648,32896),new S(0,2147483649),new S(2147483648,2147516424);var he=/["'&<>]/;function C(e){let t=``+e,n=he.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ge=new Map,_e=new Map,ve=`data-adopted-style`,ye=`data-adopted-sheet`,be=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},xe=(e,t,n=ve)=>{if(typeof document<`u`&&t&&!be(e,t,ge)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},Se=(e,t,n=ye)=>{if(typeof document<`u`&&t&&!be(e,t,_e)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},Ce=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})(Ce),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(Ce);function w(e){return C(e)}var we=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,Te=(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)we(r)&&(Te(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`?C(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 Ee(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}="${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 E,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}>`}},Ee=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>${C(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof E,e.serialize())).join(``)}</template>`}},De=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(De(t)):e.concat(t),[]),O=e=>e==null?null:e instanceof Re?e.build():typeof e==`string`?i?e:document.createTextNode(e):e,Oe=(e,t)=>{if(i){k(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let a=null,o=()=>{a?.(),a=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};h(()=>{let e=t();o();let n=document.createDocumentFragment();a=g(t=>(k(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),_(()=>a?.())},ke=`__ranFor`,Ae=e=>typeof e==`object`&&!!e&&e[ke]===!0,je=(e,t,n)=>{let[r,i]=m(t),a=null,o=g(t=>{let i=O(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Me=(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},Ne=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;_(()=>{for(let e of r.values())e.dispose();r.clear()}),h(()=>{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=je(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();Me(n,a),r=i})},Pe=`__ranIndex`,Fe=e=>typeof e==`object`&&!!e&&e[Pe]===!0,Ie=(e,t,n)=>{let[r,i]=m(e),a=null,o=g(e=>{let i=O(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Le=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];_(()=>{for(let e of r)e.dispose();r=[]}),h(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(Ie(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()}Me(n,r.map(e=>e.node).filter(e=>e!=null))})},k=(e,t)=>{De(t).forEach(t=>{if(Ae(t)){Ne(e,t);return}if(Fe(t)){Le(e,t);return}if(typeof t==`function`){Oe(e,t);return}let n=O(t);n!=null&&e.appendChild(n)})},Re=class{el;constructor(e){this.el=i?new D(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?h(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{i?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 k(this.el,e),this}replaceChildren(...e){if(i){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 ze(this.el,t,e)}build(){return this.el}serialize(){if(i)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ze=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return k(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(i)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 i?this.root.serialize():this.root.innerHTML}},A=e=>new Re(e),j=()=>A(`div`),Be=()=>A(`input`),Ve=()=>A(`label`),M=[!1,`false`,null,void 0],N=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!M.includes(n))},He=new Map;function Ue(e,t){i?(He.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var We=typeof document<`u`?HTMLElement:D,Ge=`data-ranui`,Ke=`data-ranui-sheet`,qe=(e,t)=>xe(e,t,Ge),Je=(e,t)=>Se(e,t,Ke),P=new WeakMap,F=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,I=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||P.get(e)||e.attachShadow(n);return P.set(e,r),qe(r,t?`${t}\n${F}`:F),r},L=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},R=(e,t,n=``)=>e.getAttribute(t)??n,z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},B=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Je(t,a)},Ye=`.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-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,Xe=r({default:()=>V}),V,H=n((()=>{V={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`}})),Ze=r({default:()=>U}),U,W=n((()=>{U={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`}})),Qe=r({default:()=>G}),G,$e=n((()=>{G={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`}})),et=r({default:()=>K}),K,tt=n((()=>{K={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`}})),nt=r({default:()=>q}),q,rt=n((()=>{q={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),it=r({default:()=>J}),J,at=n((()=>{J={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),ot=r({default:()=>Y}),Y,st=n((()=>{Y={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}}));H(),W(),$e(),tt(),rt(),at(),st();var ct={copy:V,check:U,download:G,fullscreen:K,"zoom-in":q,"zoom-out":J,refresh:Y},lt=r({default:()=>ut}),ut,dt=n((()=>{ut={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
1
|
+
var ranui_input=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=typeof document>`u`,a=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},o=0,s=1,c=2,l=null,u=null,d=0,f=new Set,p=!1;function m(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)v(e,c);d===0&&re()}}]}function h(e){let t=ee(e,!0);return te(t),ae(t),()=>y(t)}function g(e){let t={owned:[],cleanups:[],owner:u},n=u,r=l;u=t,l=null;try{return e(()=>se(t))}finally{u=n,l=r}}function _(e){u&&u.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:c,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:u}}function te(e){u&&u.owned.push(e)}function ne(e){l&&(l.sources.add(e),e.observers.add(l))}function v(e,t){if(e.disposed||e.state>=t)return;let n=e.state===o;if(e.state=t,e.isEffect)f.add(e);else if(n)for(let t of e.observers)v(t,s)}function re(){if(!(d>0||p)){p=!0;try{for(;f.size>0;){let e=[...f];f.clear();for(let t of e)t.disposed||ie(t)}}finally{p=!1}}}function ie(e){if(!(e.disposed||e.state===o)){if(e.state===s)for(let t of e.sources)`fn`in t&&ie(t);e.state===c&&ae(e),e.state=o}}function ae(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);oe(e);let t=l,n=u;l=e,u=e,e.running=!0,e.state=o;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)v(t,c)}}finally{e.running=!1,l=t,u=n}}function oe(e){for(let t of e.owned)y(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 y(e){e.disposed||(e.disposed=!0,oe(e),e.observers.clear())}function se(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var ce=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}};Math.PI/180,180/Math.PI,2*Math.PI;var b=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var le=e=>typeof e==`function`,ue=12e4,de=`__ranuts_bridge__`,fe=`default`,pe=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=fe){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,pe.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:de,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(le(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`)))},ue),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=()=>{pe.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||=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 ce;var x=[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],S=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new S(x[0],3609767458),new S(x[1],602891725),new S(x[2],3964484399),new S(x[3],2173295548),new S(x[4],4081628472),new S(x[5],3053834265),new S(x[6],2937671579),new S(x[7],3664609560),new S(x[8],2734883394),new S(x[9],1164996542),new S(x[10],1323610764),new S(x[11],3590304994),new S(x[12],4068182383),new S(x[13],991336113),new S(x[14],633803317),new S(x[15],3479774868),new S(x[16],2666613458),new S(x[17],944711139),new S(x[18],2341262773),new S(x[19],2007800933),new S(x[20],1495990901),new S(x[21],1856431235),new S(x[22],3175218132),new S(x[23],2198950837),new S(x[24],3999719339),new S(x[25],766784016),new S(x[26],2566594879),new S(x[27],3203337956),new S(x[28],1034457026),new S(x[29],2466948901),new S(x[30],3758326383),new S(x[31],168717936),new S(x[32],1188179964),new S(x[33],1546045734),new S(x[34],1522805485),new S(x[35],2643833823),new S(x[36],2343527390),new S(x[37],1014477480),new S(x[38],1206759142),new S(x[39],344077627),new S(x[40],1290863460),new S(x[41],3158454273),new S(x[42],3505952657),new S(x[43],106217008),new S(x[44],3606008344),new S(x[45],1432725776),new S(x[46],1467031594),new S(x[47],851169720),new S(x[48],3100823752),new S(x[49],1363258195),new S(x[50],3750685593),new S(x[51],3785050280),new S(x[52],3318307427),new S(x[53],3812723403),new S(x[54],2003034995),new S(x[55],3602036899),new S(x[56],1575990012),new S(x[57],1125592928),new S(x[58],2716904306),new S(x[59],442776044),new S(x[60],593698344),new S(x[61],3733110249),new S(x[62],2999351573),new S(x[63],3815920427),new S(3391569614,3928383900),new S(3515267271,566280711),new S(3940187606,3454069534),new S(4118630271,4000239992),new S(116418474,1914138554),new S(174292421,2731055270),new S(289380356,3203993006),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,2618297676),new S(1288033470,3409855158),new S(1501505948,4234509866),new S(1607167915,987167468),new S(1816402316,1246189591),new S(0,1),new S(0,32898),new S(2147483648,32906),new S(2147483648,2147516416),new S(0,32907),new S(0,2147483649),new S(2147483648,2147516545),new S(2147483648,32777),new S(0,138),new S(0,136),new S(0,2147516425),new S(0,2147483658),new S(0,2147516555),new S(2147483648,139),new S(2147483648,32905),new S(2147483648,32771),new S(2147483648,32770),new S(2147483648,128),new S(0,32778),new S(2147483648,2147483658),new S(2147483648,2147516545),new S(2147483648,32896),new S(0,2147483649),new S(2147483648,2147516424);var he=/["'&<>]/;function C(e){let t=``+e,n=he.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var ge=new Map,_e=new Map,ve=`data-adopted-style`,ye=`data-adopted-sheet`,be=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},xe=(e,t,n=ve)=>{if(typeof document<`u`&&t&&!be(e,t,ge)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},Se=(e,t,n=ye)=>{if(typeof document<`u`&&t&&!be(e,t,_e)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var Ce=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})(Ce),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(Ce);function w(e){return C(e)}var we=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,Te=(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)we(r)&&(Te(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`?C(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 Ee(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}="${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 E,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}>`}},Ee=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>${C(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?C(e):(e instanceof E,e.serialize())).join(``)}</template>`}},De=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(De(t)):e.concat(t),[]),O=e=>e==null?null:e instanceof Re?e.build():typeof e==`string`?i?e:document.createTextNode(e):e,Oe=(e,t)=>{if(i){k(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let a=null,o=()=>{a?.(),a=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};h(()=>{let e=t();o();let n=document.createDocumentFragment();a=g(t=>(k(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),_(()=>a?.())},ke=`__ranFor`,Ae=e=>typeof e==`object`&&!!e&&e[ke]===!0,je=(e,t,n)=>{let[r,i]=m(t),a=null,o=g(t=>{let i=O(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Me=(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},Ne=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;_(()=>{for(let e of r.values())e.dispose();r.clear()}),h(()=>{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=je(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();Me(n,a),r=i})},Pe=`__ranIndex`,Fe=e=>typeof e==`object`&&!!e&&e[Pe]===!0,Ie=(e,t,n)=>{let[r,i]=m(e),a=null,o=g(e=>{let i=O(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Le=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];_(()=>{for(let e of r)e.dispose();r=[]}),h(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(Ie(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()}Me(n,r.map(e=>e.node).filter(e=>e!=null))})},k=(e,t)=>{De(t).forEach(t=>{if(Ae(t)){Ne(e,t);return}if(Fe(t)){Le(e,t);return}if(typeof t==`function`){Oe(e,t);return}let n=O(t);n!=null&&e.appendChild(n)})},Re=class{el;constructor(e){this.el=i?new D(e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?h(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{i?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 k(this.el,e),this}replaceChildren(...e){if(i){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 ze(this.el,t,e)}build(){return this.el}serialize(){if(i)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ze=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return k(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(i)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 i?this.root.serialize():this.root.innerHTML}},A=e=>new Re(e),j=()=>A(`div`),Be=()=>A(`input`),Ve=()=>A(`label`),M=[!1,`false`,null,void 0],N=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!M.includes(n))},He=new Map;function Ue(e,t){i?(He.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var We=typeof document<`u`?HTMLElement:D,Ge=`data-ranui`,Ke=`data-ranui-sheet`,qe=(e,t)=>xe(e,t,Ge),Je=(e,t)=>Se(e,t,Ke),P=new WeakMap,F=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,I=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||P.get(e)||e.attachShadow(n);return P.set(e,r),qe(r,t?`${t}\n${F}`:F),r},L=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},R=(e,t,n=``)=>e.getAttribute(t)??n,z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},B=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Je(t,a)},Ye=`.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-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation-name,rotate);animation-duration:var(--ran-icon-host-spin-animation-name,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation-name,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-keyframes-to-transform,rotate(360deg))}}`,Xe=r({default:()=>V}),V,H=n((()=>{V={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></g></svg>`}})),Ze=r({default:()=>U}),U,W=n((()=>{U={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></g></svg>`}})),Qe=r({default:()=>G}),G,$e=n((()=>{G={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></g></svg>`}})),et=r({default:()=>K}),K,tt=n((()=>{K={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M8 21H5a2 2 0 0 1-2-2v-3m18 0v3a2 2 0 0 1-2 2h-3"/></g></svg>`}})),nt=r({default:()=>q}),q,rt=n((()=>{q={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),it=r({default:()=>J}),J,at=n((()=>{J={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></g></svg>`}})),ot=r({default:()=>Y}),Y,st=n((()=>{Y={success:!0,_identification:!0,data:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></g></svg>`}}));H(),W(),$e(),tt(),rt(),at(),st();var ct={copy:V,check:U,download:G,fullscreen:K,"zoom-in":q,"zoom-out":J,refresh:Y},lt=r({default:()=>ut}),ut,dt=n((()=>{ut={success:!0,_identification:!0,data:`<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200">
|
|
3
3
|
<path
|
|
4
4
|
d="M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h0.1c3 0 4.4-3.6 2.2-5.6-30.8-27.6-65.6-49.7-103.7-65.8-0.4-0.2-0.8-0.3-1.2-0.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.7 18.9-84.8 46-119.3 80.6-34.5 34.5-61.5 74.7-80.4 119.5C147.9 794.5 138 841 137 888.8c-0.1 4.5 3.5 8.2 8 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1 2.5 1.5 5.5 1.7 8.1 0.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4-32.4-32.5-50.3-75.7-50.3-121.6 0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4c32.4 32.5 50.3 75.7 50.3 121.6 0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"
|
package/dist/iife/link.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var ranui_link=(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:inline}a{color:var(--ran-color-link,#006bff);cursor:pointer;font-family:inherit;font-size:inherit;border-radius:var(--ran-radius-sm,6px);text-decoration:none}a:hover{opacity:.85;text-decoration:underline}a:focus-visible{outline:2px solid var(--ran-color-primary,#006bff);outline-offset:2px}:host([active]) a{font-weight:600;text-decoration:underline}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},i=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}};Math.PI/180,180/Math.PI,2*Math.PI;var a=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var o=e=>typeof e==`function`,s=12e4,c=`__ranuts_bridge__`,l=`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)}},d=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=l){this.targetOrigin=t,this.channel=n,this.senderId=a(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:c,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:s,senderId:c}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(s?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(o(l)){let t=e.source??this.targetWindow;Promise.resolve(l(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=a(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},s),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 d(n,t,r);if(e||=a(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 i;var f=[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],p=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new p(f[0],3609767458),new p(f[1],602891725),new p(f[2],3964484399),new p(f[3],2173295548),new p(f[4],4081628472),new p(f[5],3053834265),new p(f[6],2937671579),new p(f[7],3664609560),new p(f[8],2734883394),new p(f[9],1164996542),new p(f[10],1323610764),new p(f[11],3590304994),new p(f[12],4068182383),new p(f[13],991336113),new p(f[14],633803317),new p(f[15],3479774868),new p(f[16],2666613458),new p(f[17],944711139),new p(f[18],2341262773),new p(f[19],2007800933),new p(f[20],1495990901),new p(f[21],1856431235),new p(f[22],3175218132),new p(f[23],2198950837),new p(f[24],3999719339),new p(f[25],766784016),new p(f[26],2566594879),new p(f[27],3203337956),new p(f[28],1034457026),new p(f[29],2466948901),new p(f[30],3758326383),new p(f[31],168717936),new p(f[32],1188179964),new p(f[33],1546045734),new p(f[34],1522805485),new p(f[35],2643833823),new p(f[36],2343527390),new p(f[37],1014477480),new p(f[38],1206759142),new p(f[39],344077627),new p(f[40],1290863460),new p(f[41],3158454273),new p(f[42],3505952657),new p(f[43],106217008),new p(f[44],3606008344),new p(f[45],1432725776),new p(f[46],1467031594),new p(f[47],851169720),new p(f[48],3100823752),new p(f[49],1363258195),new p(f[50],3750685593),new p(f[51],3785050280),new p(f[52],3318307427),new p(f[53],3812723403),new p(f[54],2003034995),new p(f[55],3602036899),new p(f[56],1575990012),new p(f[57],1125592928),new p(f[58],2716904306),new p(f[59],442776044),new p(f[60],593698344),new p(f[61],3733110249),new p(f[62],2999351573),new p(f[63],3815920427),new p(3391569614,3928383900),new p(3515267271,566280711),new p(3940187606,3454069534),new p(4118630271,4000239992),new p(116418474,1914138554),new p(174292421,2731055270),new p(289380356,3203993006),new p(460393269,320620315),new p(685471733,587496836),new p(852142971,1086792851),new p(1017036298,365543100),new p(1126000580,2618297676),new p(1288033470,3409855158),new p(1501505948,4234509866),new p(1607167915,987167468),new p(1816402316,1246189591),new p(0,1),new p(0,32898),new p(2147483648,32906),new p(2147483648,2147516416),new p(0,32907),new p(0,2147483649),new p(2147483648,2147516545),new p(2147483648,32777),new p(0,138),new p(0,136),new p(0,2147516425),new p(0,2147483658),new p(0,2147516555),new p(2147483648,139),new p(2147483648,32905),new p(2147483648,32771),new p(2147483648,32770),new p(2147483648,128),new p(0,32778),new p(2147483648,2147483658),new p(2147483648,2147516545),new p(2147483648,32896),new p(0,2147483649),new p(2147483648,2147516424);var m=/["'&<>]/;function h(e){let t=``+e,n=m.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var g=new Map,_=new Map,v=`data-adopted-style`,y=`data-adopted-sheet`,b=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},x=(e,t,n=v)=>{if(typeof document<`u`&&t&&!b(e,t,g)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},S=(e,t,n=y)=>{if(typeof document<`u`&&t&&!b(e,t,_)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},C=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})(C),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(C);function w(e){return h(e)}var T=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,E=(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()},D=(e,t,n)=>{for(let r of e)T(r)&&(E(r,t)&&n.push(r),D(r.childrenList,t,n))},O=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?h(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}},k=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 O)}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 A(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(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`?h(e):(e instanceof O,e.serialize())).join(``):a+=h(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}>`}},A=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 D(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${h(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?h(e):(e instanceof O,e.serialize())).join(``)}</template>`}},j=new Map;function M(e,t){n?(j.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var N=typeof document<`u`?HTMLElement:k,P=`data-ranui`,F=`data-ranui-sheet`,I=(e,t)=>x(e,t,P),L=(e,t)=>S(e,t,F),R=new WeakMap,z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,B=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||R.get(e)||e.attachShadow(n);return R.set(e,r),I(r,t?`${t}\n${z}`:z),r},V=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},H=(e,t,n=``)=>e.getAttribute(t)??n,U=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},W=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&L(t,a)},G=null;function K(){return G}var q=class extends N{static get observedAttributes(){return[`href`,`replace`,`sheet`]}_events=new r;_shadowDom;_anchor;constructor(){super(),this._shadowDom=B(this,t);let e=V(this._shadowDom,`a`,()=>{let e=document.createElement(`a`);return e.appendChild(document.createElement(`slot`)),e});this._anchor=e}get href(){return H(this,`href`)}set href(e){U(this,`href`,e)}get replace(){return this.hasAttribute(`replace`)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};_handleClick=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=this.href;if(!t||/^(https?:\/\/|\/\/|mailto:|tel:)/.test(t))return;e.preventDefault();let n=K();if(n){this.replace?n.replace(t):n.push(t);return}this.dispatchEvent(new CustomEvent(`ran-navigate`,{detail:{path:t,replace:this.replace},bubbles:!0,composed:!0}))};_syncHref(){this._anchor&&(this._anchor.href=this.href)}connectedCallback(){this.handlerExternalCss(),this._syncHref(),this._events.on(this._anchor,`click`,this._handleClick)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`href`&&this._syncHref(),e===`sheet`&&this.handlerExternalCss())}};return M(`r-link`,q),e.Link=q,e.default=q,e})({});
|
|
1
|
+
var ranui_link=(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:inline}a{color:var(--ran-color-link,#006bff);cursor:pointer;font-family:inherit;font-size:inherit;border-radius:var(--ran-radius-sm,6px);text-decoration:none}a:hover{opacity:.85;text-decoration:underline}a:focus-visible{outline:2px solid var(--ran-color-primary,#006bff);outline-offset:2px}:host([active]) a{font-weight:600;text-decoration:underline}`,n=typeof document>`u`,r=class{ac;constructor(){this.ac=new AbortController}get signal(){return this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.ac.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.ac.signal}),this}abort(){this.ac.abort(),this.ac=new AbortController}},i=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}};Math.PI/180,180/Math.PI,2*Math.PI;var a=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var o=e=>typeof e==`function`,s=12e4,c=`__ranuts_bridge__`,l=`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)}},d=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=l){this.targetOrigin=t,this.channel=n,this.senderId=a(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:c,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:s,senderId:c}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(s?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(o(l)){let t=e.source??this.targetWindow;Promise.resolve(l(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=a(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},s),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 d(n,t,r);if(e||=a(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 i;var f=[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],p=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new p(f[0],3609767458),new p(f[1],602891725),new p(f[2],3964484399),new p(f[3],2173295548),new p(f[4],4081628472),new p(f[5],3053834265),new p(f[6],2937671579),new p(f[7],3664609560),new p(f[8],2734883394),new p(f[9],1164996542),new p(f[10],1323610764),new p(f[11],3590304994),new p(f[12],4068182383),new p(f[13],991336113),new p(f[14],633803317),new p(f[15],3479774868),new p(f[16],2666613458),new p(f[17],944711139),new p(f[18],2341262773),new p(f[19],2007800933),new p(f[20],1495990901),new p(f[21],1856431235),new p(f[22],3175218132),new p(f[23],2198950837),new p(f[24],3999719339),new p(f[25],766784016),new p(f[26],2566594879),new p(f[27],3203337956),new p(f[28],1034457026),new p(f[29],2466948901),new p(f[30],3758326383),new p(f[31],168717936),new p(f[32],1188179964),new p(f[33],1546045734),new p(f[34],1522805485),new p(f[35],2643833823),new p(f[36],2343527390),new p(f[37],1014477480),new p(f[38],1206759142),new p(f[39],344077627),new p(f[40],1290863460),new p(f[41],3158454273),new p(f[42],3505952657),new p(f[43],106217008),new p(f[44],3606008344),new p(f[45],1432725776),new p(f[46],1467031594),new p(f[47],851169720),new p(f[48],3100823752),new p(f[49],1363258195),new p(f[50],3750685593),new p(f[51],3785050280),new p(f[52],3318307427),new p(f[53],3812723403),new p(f[54],2003034995),new p(f[55],3602036899),new p(f[56],1575990012),new p(f[57],1125592928),new p(f[58],2716904306),new p(f[59],442776044),new p(f[60],593698344),new p(f[61],3733110249),new p(f[62],2999351573),new p(f[63],3815920427),new p(3391569614,3928383900),new p(3515267271,566280711),new p(3940187606,3454069534),new p(4118630271,4000239992),new p(116418474,1914138554),new p(174292421,2731055270),new p(289380356,3203993006),new p(460393269,320620315),new p(685471733,587496836),new p(852142971,1086792851),new p(1017036298,365543100),new p(1126000580,2618297676),new p(1288033470,3409855158),new p(1501505948,4234509866),new p(1607167915,987167468),new p(1816402316,1246189591),new p(0,1),new p(0,32898),new p(2147483648,32906),new p(2147483648,2147516416),new p(0,32907),new p(0,2147483649),new p(2147483648,2147516545),new p(2147483648,32777),new p(0,138),new p(0,136),new p(0,2147516425),new p(0,2147483658),new p(0,2147516555),new p(2147483648,139),new p(2147483648,32905),new p(2147483648,32771),new p(2147483648,32770),new p(2147483648,128),new p(0,32778),new p(2147483648,2147483658),new p(2147483648,2147516545),new p(2147483648,32896),new p(0,2147483649),new p(2147483648,2147516424);var m=/["'&<>]/;function h(e){let t=``+e,n=m.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`"`;break;case 38:r=`&`;break;case 39:r=`'`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var g=new Map,_=new Map,v=`data-adopted-style`,y=`data-adopted-sheet`,b=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},x=(e,t,n=v)=>{if(typeof document<`u`&&t&&!b(e,t,g)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},S=(e,t,n=y)=>{if(typeof document<`u`&&t&&!b(e,t,_)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var C=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})(C),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(C);function w(e){return h(e)}var T=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,E=(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()},D=(e,t,n)=>{for(let r of e)T(r)&&(E(r,t)&&n.push(r),D(r.childrenList,t,n))},O=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?h(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}},k=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 O)}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 A(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(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`?h(e):(e instanceof O,e.serialize())).join(``):a+=h(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}>`}},A=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 D(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${h(e)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?h(e):(e instanceof O,e.serialize())).join(``)}</template>`}},j=new Map;function M(e,t){n?(j.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var N=typeof document<`u`?HTMLElement:k,P=`data-ranui`,F=`data-ranui-sheet`,I=(e,t)=>x(e,t,P),L=(e,t)=>S(e,t,F),R=new WeakMap,z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,B=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||R.get(e)||e.attachShadow(n);return R.set(e,r),I(r,t?`${t}\n${z}`:z),r},V=(e,t,n)=>{let r=e.querySelector(t);if(r)return r;let i=n();return e.appendChild(i),i},H=(e,t,n=``)=>e.getAttribute(t)??n,U=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},W=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&L(t,a)},G=null;function K(){return G}var q=class extends N{static get observedAttributes(){return[`href`,`replace`,`sheet`]}_events=new r;_shadowDom;_anchor;constructor(){super(),this._shadowDom=B(this,t);let e=V(this._shadowDom,`a`,()=>{let e=document.createElement(`a`);return e.appendChild(document.createElement(`slot`)),e});this._anchor=e}get href(){return H(this,`href`)}set href(e){U(this,`href`,e)}get replace(){return this.hasAttribute(`replace`)}get sheet(){return H(this,`sheet`)}set sheet(e){U(this,`sheet`,e)}handlerExternalCss=()=>{W(this,this._shadowDom,`sheet`,null,this.sheet)};_handleClick=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=this.href;if(!t||/^(https?:\/\/|\/\/|mailto:|tel:)/.test(t))return;e.preventDefault();let n=K();if(n){this.replace?n.replace(t):n.push(t);return}this.dispatchEvent(new CustomEvent(`ran-navigate`,{detail:{path:t,replace:this.replace},bubbles:!0,composed:!0}))};_syncHref(){this._anchor&&(this._anchor.href=this.href)}connectedCallback(){this.handlerExternalCss(),this._syncHref(),this._events.on(this._anchor,`click`,this._handleClick)}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`href`&&this._syncHref(),e===`sheet`&&this.handlerExternalCss())}};return M(`r-link`,q),e.Link=q,e.default=q,e})({});
|