@melt-js/demo-vue3 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -3
- package/dist/assets/HostView-CI4NKKTv.js +2 -0
- package/dist/assets/HostView-CI4NKKTv.js.map +1 -0
- package/dist/assets/HostView-I-DgsKrJ.css +1 -0
- package/dist/assets/OverviewView-BzBqZXy_.js +2 -0
- package/dist/assets/OverviewView-BzBqZXy_.js.map +1 -0
- package/dist/assets/RemoteView-Bf-M2ckO.js +2 -0
- package/dist/assets/RemoteView-Bf-M2ckO.js.map +1 -0
- package/dist/assets/RemoteView-DagINN91.css +1 -0
- package/dist/assets/_plugin-vue_export-helper-BWAI2PXX.js +2 -0
- package/dist/assets/_plugin-vue_export-helper-BWAI2PXX.js.map +1 -0
- package/dist/assets/{index-CuPzn6_v.js → index-BWYTdPfJ.js} +3 -3
- package/dist/assets/{index-CuPzn6_v.js.map → index-BWYTdPfJ.js.map} +1 -1
- package/dist/assets/loadApp-VfkNA6r0.js +11 -0
- package/dist/assets/loadApp-VfkNA6r0.js.map +1 -0
- package/dist/assets/loadApp-t5jvd8FF.css +1 -0
- package/dist/index.html +1 -1
- package/package.json +2 -1
- package/dist/assets/HostView-CO-PQ4Eg.css +0 -1
- package/dist/assets/HostView-p_QlXO2b.js +0 -2
- package/dist/assets/HostView-p_QlXO2b.js.map +0 -1
- package/dist/assets/OverviewView-Y30WcRVR.js +0 -2
- package/dist/assets/OverviewView-Y30WcRVR.js.map +0 -1
- package/dist/assets/RemoteView-DMITrjYR.js +0 -2
- package/dist/assets/RemoteView-DMITrjYR.js.map +0 -1
- package/dist/assets/loadApp-B7EqU81T.js +0 -11
- package/dist/assets/loadApp-B7EqU81T.js.map +0 -1
- package/dist/assets/loadApp-CXgewGYF.css +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./OverviewView-BzBqZXy_.js","./index-BWYTdPfJ.js","./HostView-CI4NKKTv.js","./_plugin-vue_export-helper-BWAI2PXX.js","./HostView-I-DgsKrJ.css","./RemoteView-Bf-M2ckO.js","./RemoteView-DagINN91.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as G,s as kt,a as Tt,d as ue,n as Dt,r as Ft,i as $,h as ut,c as T,w as me,b as ge,p as he,_ as we,e as ft,o as q,f as J,g as B,t as H,F as Bt,j as Lt,k as Ie,l as ke,m as Te,q as dt,v as Vt,x as pt,y as Gt,z as ht,A as Ce,T as Mt,B as jt,C as Ut}from"./index-BWYTdPfJ.js";/*!
|
|
3
|
+
* vue-router v4.6.4
|
|
4
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/const te=typeof document<"u";function mt(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ht(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&mt(e.default)}const N=Object.assign;function Ne(e,t){const n={};for(const r in t){const o=t[r];n[r]=z(o)?o.map(e):e(o)}return n}const ie=()=>{},z=Array.isArray;function Ke(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const gt=/#/g,qt=/&/g,zt=/\//g,Kt=/=/g,Wt=/\?/g,vt=/\+/g,Qt=/%5B/g,Yt=/%5D/g,Et=/%5E/g,Jt=/%60/g,yt=/%7B/g,Xt=/%7C/g,_t=/%7D/g,Zt=/%20/g;function Ve(e){return e==null?"":encodeURI(""+e).replace(Xt,"|").replace(Qt,"[").replace(Yt,"]")}function $t(e){return Ve(e).replace(yt,"{").replace(_t,"}").replace(Et,"^")}function De(e){return Ve(e).replace(vt,"%2B").replace(Zt,"+").replace(gt,"%23").replace(qt,"%26").replace(Jt,"`").replace(yt,"{").replace(_t,"}").replace(Et,"^")}function en(e){return De(e).replace(Kt,"%3D")}function tn(e){return Ve(e).replace(gt,"%23").replace(Wt,"%3F")}function nn(e){return tn(e).replace(zt,"%2F")}function ce(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const rn=/\/$/,on=e=>e.replace(rn,"");function Oe(e,t,n="/"){let r,o={},c="",u="";const p=t.indexOf("#");let s=t.indexOf("?");return s=p>=0&&s>p?-1:s,s>=0&&(r=t.slice(0,s),c=t.slice(s,p>0?p:t.length),o=e(c.slice(1))),p>=0&&(r=r||t.slice(0,p),u=t.slice(p,t.length)),r=cn(r!=null?r:t,n),{fullPath:r+c+u,path:r,query:o,hash:ce(u)}}function sn(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function We(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ln(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&ne(t.matched[r],n.matched[o])&&Rt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ne(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Rt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!an(e[n],t[n]))return!1;return!0}function an(e,t){return z(e)?Qe(e,t):z(t)?Qe(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Qe(e,t){return z(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function cn(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let c=n.length-1,u,p;for(u=0;u<r.length;u++)if(p=r[u],p!==".")if(p==="..")c>1&&c--;else break;return n.slice(0,c).join("/")+"/"+r.slice(u).join("/")}const Q={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Fe=function(e){return e.pop="pop",e.push="push",e}({}),Pe=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function un(e){if(!e)if(te){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),on(e)}const fn=/^[^#]+#/;function dn(e,t){return e.replace(fn,"#")+t}function pn(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ve=()=>({left:window.scrollX,top:window.scrollY});function hn(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=pn(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ye(e,t){return(history.state?history.state.position-t:-1)+e}const Be=new Map;function mn(e,t){Be.set(e,t)}function gn(e){const t=Be.get(e);return Be.delete(e),t}function vn(e){return typeof e=="string"||e&&typeof e=="object"}function At(e){return typeof e=="string"||typeof e=="symbol"}let I=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const bt=Symbol("");I.MATCHER_NOT_FOUND+"",I.NAVIGATION_GUARD_REDIRECT+"",I.NAVIGATION_ABORTED+"",I.NAVIGATION_CANCELLED+"",I.NAVIGATION_DUPLICATED+"";function re(e,t){return N(new Error,{type:e,[bt]:!0},t)}function K(e,t){return e instanceof Error&&bt in e&&(t==null||!!(e.type&t))}const En=["params","query","hash"];function yn(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of En)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function _n(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const o=n[r].replace(vt," "),c=o.indexOf("="),u=ce(c<0?o:o.slice(0,c)),p=c<0?null:ce(o.slice(c+1));if(u in t){let s=t[u];z(s)||(s=t[u]=[s]),s.push(p)}else t[u]=p}return t}function Je(e){let t="";for(let n in e){const r=e[n];if(n=en(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(z(r)?r.map(o=>o&&De(o)):[r&&De(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Rn(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=z(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const An=Symbol(""),Xe=Symbol(""),Ge=Symbol(""),Me=Symbol(""),Le=Symbol("");function ae(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Y(e,t,n,r,o,c=u=>u()){const u=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((p,s)=>{const f=a=>{a===!1?s(re(I.NAVIGATION_ABORTED,{from:n,to:t})):a instanceof Error?s(a):vn(a)?s(re(I.NAVIGATION_GUARD_REDIRECT,{from:t,to:a})):(u&&r.enterCallbacks[o]===u&&typeof a=="function"&&u.push(a),p())},h=c(()=>e.call(r&&r.instances[o],t,n,f));let l=Promise.resolve(h);e.length<3&&(l=l.then(f)),l.catch(a=>s(a))})}function Se(e,t,n,r,o=c=>c()){const c=[];for(const u of e)for(const p in u.components){let s=u.components[p];if(!(t!=="beforeRouteEnter"&&!u.instances[p]))if(mt(s)){const f=(s.__vccOpts||s)[t];f&&c.push(Y(f,n,r,u,p,o))}else{let f=s();c.push(()=>f.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${p}" at "${u.path}"`);const l=Ht(h)?h.default:h;u.mods[p]=h,u.components[p]=l;const a=(l.__vccOpts||l)[t];return a&&Y(a,n,r,u,p,o)()}))}}return c}function bn(e,t){const n=[],r=[],o=[],c=Math.max(t.matched.length,e.matched.length);for(let u=0;u<c;u++){const p=t.matched[u];p&&(e.matched.find(f=>ne(f,p))?r.push(p):n.push(p));const s=e.matched[u];s&&(t.matched.find(f=>ne(f,s))||o.push(s))}return[n,r,o]}/*!
|
|
7
|
+
* vue-router v4.6.4
|
|
8
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/let wn=()=>location.protocol+"//"+location.host;function wt(e,t){const{pathname:n,search:r,hash:o}=t,c=e.indexOf("#");if(c>-1){let u=o.includes(e.slice(c))?e.slice(c).length:1,p=o.slice(u);return p[0]!=="/"&&(p="/"+p),We(p,"")}return We(n,e)+r+o}function Cn(e,t,n,r){let o=[],c=[],u=null;const p=({state:a})=>{const d=wt(e,location),_=n.value,y=t.value;let v=0;if(a){if(n.value=d,t.value=a,u&&u===_){u=null;return}v=y?a.position-y.position:0}else r(d);o.forEach(O=>{O(n.value,_,{delta:v,type:Fe.pop,direction:v?v>0?Pe.forward:Pe.back:Pe.unknown})})};function s(){u=n.value}function f(a){o.push(a);const d=()=>{const _=o.indexOf(a);_>-1&&o.splice(_,1)};return c.push(d),d}function h(){if(document.visibilityState==="hidden"){const{history:a}=window;if(!a.state)return;a.replaceState(N({},a.state,{scroll:ve()}),"")}}function l(){for(const a of c)a();c=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:s,listen:f,destroy:l}}function Ze(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?ve():null}}function Nn(e){const{history:t,location:n}=window,r={value:wt(e,n)},o={value:t.state};o.value||c(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function c(s,f,h){const l=e.indexOf("#"),a=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+s:wn()+e+s;try{t[h?"replaceState":"pushState"](f,"",a),o.value=f}catch(d){console.error(d),n[h?"replace":"assign"](a)}}function u(s,f){c(s,N({},t.state,Ze(o.value.back,s,o.value.forward,!0),f,{position:o.value.position}),!0),r.value=s}function p(s,f){const h=N({},o.value,t.state,{forward:s,scroll:ve()});c(h.current,h,!0),c(s,N({},Ze(r.value,s,null),{position:h.position+1},f),!1),r.value=s}return{location:r,state:o,push:p,replace:u}}function On(e){e=un(e);const t=Nn(e),n=Cn(e,t.state,t.location,t.replace);function r(c,u=!0){u||n.pauseListeners(),history.go(c)}const o=N({location:"",base:e,go:r,createHref:dn.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Pn(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),On(e)}let Z=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var F=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(F||{});const Sn={type:Z.Static,value:""},xn=/[a-zA-Z0-9_]/;function In(e){if(!e)return[[]];if(e==="/")return[[Sn]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(d){throw new Error(`ERR (${n})/"${f}": ${d}`)}let n=F.Static,r=n;const o=[];let c;function u(){c&&o.push(c),c=[]}let p=0,s,f="",h="";function l(){f&&(n===F.Static?c.push({type:Z.Static,value:f}):n===F.Param||n===F.ParamRegExp||n===F.ParamRegExpEnd?(c.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),c.push({type:Z.Param,value:f,regexp:h,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),f="")}function a(){f+=s}for(;p<e.length;){if(s=e[p++],s==="\\"&&n!==F.ParamRegExp){r=n,n=F.EscapeNext;continue}switch(n){case F.Static:s==="/"?(f&&l(),u()):s===":"?(l(),n=F.Param):a();break;case F.EscapeNext:a(),n=r;break;case F.Param:s==="("?n=F.ParamRegExp:xn.test(s)?a():(l(),n=F.Static,s!=="*"&&s!=="?"&&s!=="+"&&p--);break;case F.ParamRegExp:s===")"?h[h.length-1]=="\\"?h=h.slice(0,-1)+s:n=F.ParamRegExpEnd:h+=s;break;case F.ParamRegExpEnd:l(),n=F.Static,s!=="*"&&s!=="?"&&s!=="+"&&p--,h="";break;default:t("Unknown state");break}}return n===F.ParamRegExp&&t(`Unfinished custom RegExp for param "${f}"`),l(),u(),o}const $e="[^/]+?",kn={sensitive:!1,strict:!1,start:!0,end:!0};var V=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(V||{});const Tn=/[.+*?^${}()[\]/\\]/g;function Dn(e,t){const n=N({},kn,t),r=[];let o=n.start?"^":"";const c=[];for(const f of e){const h=f.length?[]:[V.Root];n.strict&&!f.length&&(o+="/");for(let l=0;l<f.length;l++){const a=f[l];let d=V.Segment+(n.sensitive?V.BonusCaseSensitive:0);if(a.type===Z.Static)l||(o+="/"),o+=a.value.replace(Tn,"\\$&"),d+=V.Static;else if(a.type===Z.Param){const{value:_,repeatable:y,optional:v,regexp:O}=a;c.push({name:_,repeatable:y,optional:v});const b=O||$e;if(b!==$e){d+=V.BonusCustomRegExp;try{`${b}`}catch(P){throw new Error(`Invalid custom RegExp for param "${_}" (${b}): `+P.message)}}let A=y?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;l||(A=v&&f.length<2?`(?:/${A})`:"/"+A),v&&(A+="?"),o+=A,d+=V.Dynamic,v&&(d+=V.BonusOptional),y&&(d+=V.BonusRepeatable),b===".*"&&(d+=V.BonusWildcard)}h.push(d)}r.push(h)}if(n.strict&&n.end){const f=r.length-1;r[f][r[f].length-1]+=V.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const u=new RegExp(o,n.sensitive?"":"i");function p(f){const h=f.match(u),l={};if(!h)return null;for(let a=1;a<h.length;a++){const d=h[a]||"",_=c[a-1];l[_.name]=d&&_.repeatable?d.split("/"):d}return l}function s(f){let h="",l=!1;for(const a of e){(!l||!h.endsWith("/"))&&(h+="/"),l=!1;for(const d of a)if(d.type===Z.Static)h+=d.value;else if(d.type===Z.Param){const{value:_,repeatable:y,optional:v}=d,O=_ in f?f[_]:"";if(z(O)&&!y)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const b=z(O)?O.join("/"):O;if(!b)if(v)a.length<2&&(h.endsWith("/")?h=h.slice(0,-1):l=!0);else throw new Error(`Missing required param "${_}"`);h+=b}}return h||"/"}return{re:u,score:r,keys:c,parse:p,stringify:s}}function Fn(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===V.Static+V.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===V.Static+V.Segment?1:-1:0}function Ct(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const c=Fn(r[n],o[n]);if(c)return c;n++}if(Math.abs(o.length-r.length)===1){if(et(r))return 1;if(et(o))return-1}return o.length-r.length}function et(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Bn={strict:!1,end:!0,sensitive:!1};function Ln(e,t,n){const r=Dn(In(e.path),n),o=N(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Vn(e,t){const n=[],r=new Map;t=Ke(Bn,t);function o(l){return r.get(l)}function c(l,a,d){const _=!d,y=nt(l);y.aliasOf=d&&d.record;const v=Ke(t,l),O=[y];if("alias"in l){const P=typeof l.alias=="string"?[l.alias]:l.alias;for(const S of P)O.push(nt(N({},y,{components:d?d.record.components:y.components,path:S,aliasOf:d?d.record:y})))}let b,A;for(const P of O){const{path:S}=P;if(a&&S[0]!=="/"){const L=a.record.path,x=L[L.length-1]==="/"?"":"/";P.path=a.record.path+(S&&x+S)}if(b=Ln(P,a,v),d?d.alias.push(b):(A=A||b,A!==b&&A.alias.push(b),_&&l.name&&!rt(b)&&u(l.name)),Nt(b)&&s(b),y.children){const L=y.children;for(let x=0;x<L.length;x++)c(L[x],b,d&&d.children[x])}d=d||b}return A?()=>{u(A)}:ie}function u(l){if(At(l)){const a=r.get(l);a&&(r.delete(l),n.splice(n.indexOf(a),1),a.children.forEach(u),a.alias.forEach(u))}else{const a=n.indexOf(l);a>-1&&(n.splice(a,1),l.record.name&&r.delete(l.record.name),l.children.forEach(u),l.alias.forEach(u))}}function p(){return n}function s(l){const a=jn(l,n);n.splice(a,0,l),l.record.name&&!rt(l)&&r.set(l.record.name,l)}function f(l,a){let d,_={},y,v;if("name"in l&&l.name){if(d=r.get(l.name),!d)throw re(I.MATCHER_NOT_FOUND,{location:l});v=d.record.name,_=N(tt(a.params,d.keys.filter(A=>!A.optional).concat(d.parent?d.parent.keys.filter(A=>A.optional):[]).map(A=>A.name)),l.params&&tt(l.params,d.keys.map(A=>A.name))),y=d.stringify(_)}else if(l.path!=null)y=l.path,d=n.find(A=>A.re.test(y)),d&&(_=d.parse(y),v=d.record.name);else{if(d=a.name?r.get(a.name):n.find(A=>A.re.test(a.path)),!d)throw re(I.MATCHER_NOT_FOUND,{location:l,currentLocation:a});v=d.record.name,_=N({},a.params,l.params),y=d.stringify(_)}const O=[];let b=d;for(;b;)O.unshift(b.record),b=b.parent;return{name:v,path:y,params:_,matched:O,meta:Mn(O)}}e.forEach(l=>c(l));function h(){n.length=0,r.clear()}return{addRoute:c,resolve:f,removeRoute:u,clearRoutes:h,getRoutes:p,getRecordMatcher:o}}function tt(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function nt(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Gn(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Gn(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function rt(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Mn(e){return e.reduce((t,n)=>N(t,n.meta),{})}function jn(e,t){let n=0,r=t.length;for(;n!==r;){const c=n+r>>1;Ct(e,t[c])<0?r=c:n=c+1}const o=Un(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function Un(e){let t=e;for(;t=t.parent;)if(Nt(t)&&Ct(e,t)===0)return t}function Nt({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ot(e){const t=$(Ge),n=$(Me),r=T(()=>{const s=G(e.to);return t.resolve(s)}),o=T(()=>{const{matched:s}=r.value,{length:f}=s,h=s[f-1],l=n.matched;if(!h||!l.length)return-1;const a=l.findIndex(ne.bind(null,h));if(a>-1)return a;const d=st(s[f-2]);return f>1&&st(h)===d&&l[l.length-1].path!==d?l.findIndex(ne.bind(null,s[f-2])):a}),c=T(()=>o.value>-1&&Wn(n.params,r.value.params)),u=T(()=>o.value>-1&&o.value===n.matched.length-1&&Rt(n.params,r.value.params));function p(s={}){if(Kn(s)){const f=t[G(e.replace)?"replace":"push"](G(e.to)).catch(ie);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:r,href:T(()=>r.value.href),isActive:c,isExactActive:u,navigate:p}}function Hn(e){return e.length===1?e[0]:e}const qn=ue({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ot,setup(e,{slots:t}){const n=Ft(ot(e)),{options:r}=$(Ge),o=T(()=>({[lt(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[lt(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const c=t.default&&Hn(t.default(n));return e.custom?c:ut("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},c)}}}),zn=qn;function Kn(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wn(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!z(o)||o.length!==r.length||r.some((c,u)=>c.valueOf()!==o[u].valueOf()))return!1}return!0}function st(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const lt=(e,t,n)=>e!=null?e:t!=null?t:n,Qn=ue({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=$(Le),o=T(()=>e.route||r.value),c=$(Xe,0),u=T(()=>{let f=G(c);const{matched:h}=o.value;let l;for(;(l=h[f])&&!l.components;)f++;return f}),p=T(()=>o.value.matched[u.value]);he(Xe,T(()=>u.value+1)),he(An,p),he(Le,o);const s=ge();return me(()=>[s.value,p.value,e.name],([f,h,l],[a,d,_])=>{h&&(h.instances[l]=f,d&&d!==h&&f&&f===a&&(h.leaveGuards.size||(h.leaveGuards=d.leaveGuards),h.updateGuards.size||(h.updateGuards=d.updateGuards))),f&&h&&(!d||!ne(h,d)||!a)&&(h.enterCallbacks[l]||[]).forEach(y=>y(f))},{flush:"post"}),()=>{const f=o.value,h=e.name,l=p.value,a=l&&l.components[h];if(!a)return at(n.default,{Component:a,route:f});const d=l.props[h],_=d?d===!0?f.params:typeof d=="function"?d(f):d:null,v=ut(a,N({},_,t,{onVnodeUnmounted:O=>{O.component.isUnmounted&&(l.instances[h]=null)},ref:s}));return at(n.default,{Component:v,route:f})||v}}});function at(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Yn=Qn;function Jn(e){const t=Vn(e.routes,e),n=e.parseQuery||_n,r=e.stringifyQuery||Je,o=e.history,c=ae(),u=ae(),p=ae(),s=Tt(Q);let f=Q;te&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Ne.bind(null,i=>""+i),l=Ne.bind(null,nn),a=Ne.bind(null,ce);function d(i,g){let m,E;return At(i)?(m=t.getRecordMatcher(i),E=g):E=i,t.addRoute(E,m)}function _(i){const g=t.getRecordMatcher(i);g&&t.removeRoute(g)}function y(){return t.getRoutes().map(i=>i.record)}function v(i){return!!t.getRecordMatcher(i)}function O(i,g){if(g=N({},g||s.value),typeof i=="string"){const R=Oe(n,i,g.path),D=t.resolve({path:R.path},g),le=o.createHref(R.fullPath);return N(R,D,{params:a(D.params),hash:ce(R.hash),redirectedFrom:void 0,href:le})}let m;if(i.path!=null)m=N({},i,{path:Oe(n,i.path,g.path).path});else{const R=N({},i.params);for(const D in R)R[D]==null&&delete R[D];m=N({},i,{params:l(R)}),g.params=l(g.params)}const E=t.resolve(m,g),C=i.hash||"";E.params=h(a(E.params));const k=sn(r,N({},i,{hash:$t(C),path:E.path})),w=o.createHref(k);return N({fullPath:k,hash:C,query:r===Je?Rn(i.query):i.query||{}},E,{redirectedFrom:void 0,href:w})}function b(i){return typeof i=="string"?Oe(n,i,s.value.path):N({},i)}function A(i,g){if(f!==i)return re(I.NAVIGATION_CANCELLED,{from:g,to:i})}function P(i){return x(i)}function S(i){return P(N(b(i),{replace:!0}))}function L(i,g){const m=i.matched[i.matched.length-1];if(m&&m.redirect){const{redirect:E}=m;let C=typeof E=="function"?E(i,g):E;return typeof C=="string"&&(C=C.includes("?")||C.includes("#")?C=b(C):{path:C},C.params={}),N({query:i.query,hash:i.hash,params:C.path!=null?{}:i.params},C)}}function x(i,g){const m=f=O(i),E=s.value,C=i.state,k=i.force,w=i.replace===!0,R=L(m,E);if(R)return x(N(b(R),{state:typeof R=="object"?N({},C,R.state):C,force:k,replace:w}),g||m);const D=m;D.redirectedFrom=g;let le;return!k&&ln(r,E,m)&&(le=re(I.NAVIGATION_DUPLICATED,{to:D,from:E}),ze(E,E,!0,!1)),(le?Promise.resolve(le):je(D,E)).catch(M=>K(M)?K(M,I.NAVIGATION_GUARD_REDIRECT)?M:Re(M):_e(M,D,E)).then(M=>{if(M){if(K(M,I.NAVIGATION_GUARD_REDIRECT))return x(N({replace:w},b(M.to),{state:typeof M.to=="object"?N({},C,M.to.state):C,force:k}),g||D)}else M=He(D,E,!0,w,C);return Ue(D,E,M),M})}function X(i,g){const m=A(i,g);return m?Promise.reject(m):Promise.resolve()}function Ee(i){const g=de.values().next().value;return g&&typeof g.runWithContext=="function"?g.runWithContext(i):i()}function je(i,g){let m;const[E,C,k]=bn(i,g);m=Se(E.reverse(),"beforeRouteLeave",i,g);for(const R of E)R.leaveGuards.forEach(D=>{m.push(Y(D,i,g))});const w=X.bind(null,i,g);return m.push(w),ee(m).then(()=>{m=[];for(const R of c.list())m.push(Y(R,i,g));return m.push(w),ee(m)}).then(()=>{m=Se(C,"beforeRouteUpdate",i,g);for(const R of C)R.updateGuards.forEach(D=>{m.push(Y(D,i,g))});return m.push(w),ee(m)}).then(()=>{m=[];for(const R of k)if(R.beforeEnter)if(z(R.beforeEnter))for(const D of R.beforeEnter)m.push(Y(D,i,g));else m.push(Y(R.beforeEnter,i,g));return m.push(w),ee(m)}).then(()=>(i.matched.forEach(R=>R.enterCallbacks={}),m=Se(k,"beforeRouteEnter",i,g,Ee),m.push(w),ee(m))).then(()=>{m=[];for(const R of u.list())m.push(Y(R,i,g));return m.push(w),ee(m)}).catch(R=>K(R,I.NAVIGATION_CANCELLED)?R:Promise.reject(R))}function Ue(i,g,m){p.list().forEach(E=>Ee(()=>E(i,g,m)))}function He(i,g,m,E,C){const k=A(i,g);if(k)return k;const w=g===Q,R=te?history.state:{};m&&(E||w?o.replace(i.fullPath,N({scroll:w&&R&&R.scroll},C)):o.push(i.fullPath,C)),s.value=i,ze(i,g,m,w),Re()}let oe;function xt(){oe||(oe=o.listen((i,g,m)=>{if(!se.listening)return;const E=O(i),C=L(E,se.currentRoute.value);if(C){x(N(C,{replace:!0,force:!0}),E).catch(ie);return}f=E;const k=s.value;te&&mn(Ye(k.fullPath,m.delta),ve()),je(E,k).catch(w=>K(w,I.NAVIGATION_ABORTED|I.NAVIGATION_CANCELLED)?w:K(w,I.NAVIGATION_GUARD_REDIRECT)?(x(N(b(w.to),{force:!0}),E).then(R=>{K(R,I.NAVIGATION_ABORTED|I.NAVIGATION_DUPLICATED)&&!m.delta&&m.type===Fe.pop&&o.go(-1,!1)}).catch(ie),Promise.reject()):(m.delta&&o.go(-m.delta,!1),_e(w,E,k))).then(w=>{w=w||He(E,k,!1),w&&(m.delta&&!K(w,I.NAVIGATION_CANCELLED)?o.go(-m.delta,!1):m.type===Fe.pop&&K(w,I.NAVIGATION_ABORTED|I.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Ue(E,k,w)}).catch(ie)}))}let ye=ae(),qe=ae(),fe;function _e(i,g,m){Re(i);const E=qe.list();return E.length?E.forEach(C=>C(i,g,m)):console.error(i),Promise.reject(i)}function It(){return fe&&s.value!==Q?Promise.resolve():new Promise((i,g)=>{ye.add([i,g])})}function Re(i){return fe||(fe=!i,xt(),ye.list().forEach(([g,m])=>i?m(i):g()),ye.reset()),i}function ze(i,g,m,E){const{scrollBehavior:C}=e;if(!te||!C)return Promise.resolve();const k=!m&&gn(Ye(i.fullPath,0))||(E||!m)&&history.state&&history.state.scroll||null;return Dt().then(()=>C(i,g,k)).then(w=>w&&hn(w)).catch(w=>_e(w,i,g))}const Ae=i=>o.go(i);let be;const de=new Set,se={currentRoute:s,listening:!0,addRoute:d,removeRoute:_,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:y,resolve:O,options:e,push:P,replace:S,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:c.add,beforeResolve:u.add,afterEach:p.add,onError:qe.add,isReady:It,install(i){i.component("RouterLink",zn),i.component("RouterView",Yn),i.config.globalProperties.$router=se,Object.defineProperty(i.config.globalProperties,"$route",{enumerable:!0,get:()=>G(s)}),te&&!be&&s.value===Q&&(be=!0,P(o.location).catch(E=>{}));const g={};for(const E in Q)Object.defineProperty(g,E,{get:()=>s.value[E],enumerable:!0});i.provide(Ge,se),i.provide(Me,kt(g)),i.provide(Le,s);const m=i.unmount;de.add(i),i.unmount=function(){de.delete(i),de.size<1&&(f=Q,oe&&oe(),oe=null,s.value=Q,be=!1,fe=!1),m()}}};function ee(i){return i.reduce((g,m)=>g.then(()=>Ee(m)),Promise.resolve())}return se}function Ot(e){return $(Me)}const Pt=[{path:"/",name:"overview",component:()=>we(()=>import("./OverviewView-BzBqZXy_.js"),__vite__mapDeps([0,1]),import.meta.url),meta:{title:"简介",description:"这个 demo 的依赖、端口与远端地址,以及各示例的入口。",fullscreen:!1}},{path:"/host",name:"host",component:()=>we(()=>import("./HostView-CI4NKKTv.js"),__vite__mapDeps([2,3,1,4]),import.meta.url),meta:{title:"主应用",description:"宿主自己的按钮与状态,用来对照远程组件的行为;它与远程组件共用同一份 Vue 运行时。"}},{path:"/remote",name:"remote",component:()=>we(()=>import("./RemoteView-Bf-M2ckO.js"),__vite__mapDeps([5,3,1,6]),import.meta.url),meta:{title:"远程组件",description:"preFetchLib 从远端加载的 comps-vue3 HelloWorld,点组件内的按钮可验证远程响应式。"}},{path:"/:pathMatch(.*)*",redirect:"/"}],Xn=Jn({history:Pn(),routes:Pt,scrollBehavior:()=>({top:0})}),Zn={class:"demo-navbar"},$n={class:"demo-navbar__inner"},er={class:"demo-navbar__brand"},tr={class:"demo-navbar__badge"},nr={class:"demo-navbar__title"},rr={class:"demo-navbar__sub"},or={class:"demo-navbar__nav","aria-label":"示例导航"},sr={class:"demo-navbar__intro"},lr={class:"demo-navbar__intro-tag"},ar={class:"demo-navbar__intro-text"},ir=ue({__name:"DemoNavbar",props:{title:{},subtitle:{},badge:{}},setup(e){const t=e,n=Ot(),r=T(()=>Pt.filter(s=>{var f;return!!((f=s.meta)!=null&&f.title)}).map(s=>{var f,h,l,a;return{path:s.path,title:String((h=(f=s.meta)==null?void 0:f.title)!=null?h:""),description:String((a=(l=s.meta)==null?void 0:l.description)!=null?a:"")}})),o=T(()=>{const s=r.value.findIndex(f=>f.path===n.path);return s===-1?0:s}),c=T(()=>{var s;return String((s=n.meta.title)!=null?s:t.title)}),u=T(()=>{var s;return String((s=n.meta.description)!=null?s:"")});function p(s){return n.path===s}return(s,f)=>{const h=ft("router-link");return q(),J("header",Zn,[B("div",$n,[B("div",er,[B("span",tr,H(e.badge),1),B("div",null,[B("p",nr,H(e.title),1),B("p",rr,H(e.subtitle),1)])]),B("nav",or,[(q(!0),J(Bt,null,Lt(r.value,l=>(q(),Ie(h,{key:l.path,to:l.path,class:dt(["demo-nav__link",{"is-active":p(l.path)}]),title:l.description},{default:ke(()=>[Te(H(l.title),1)]),_:2},1032,["to","class","title"]))),128))])]),B("div",sr,[B("span",lr,H(c.value)+" · "+H(o.value+1)+"/"+H(r.value.length),1),B("p",ar,H(u.value),1)])])}}});var it=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],W=(()=>{if(typeof document>"u")return!1;let e=it[0],t={};for(let n of it)if((n==null?void 0:n[1])in document){for(let[r,o]of n.entries())t[e[r]]=o;return t}return!1})(),ct={change:W.fullscreenchange,error:W.fullscreenerror},U={request(e=document.documentElement,t){return new Promise((n,r)=>{let o=()=>{U.off("change",o),n()};U.on("change",o);let c=e[W.requestFullscreen](t);c instanceof Promise&&c.then(o).catch(r)})},exit(){return new Promise((e,t)=>{if(!U.isFullscreen){e();return}let n=()=>{U.off("change",n),e()};U.on("change",n);let r=document[W.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},toggle(e,t){return U.isFullscreen?U.exit():U.request(e,t)},onchange(e){U.on("change",e)},onerror(e){U.on("error",e)},on(e,t){let n=ct[e];n&&document.addEventListener(n,t,!1)},off(e,t){let n=ct[e];n&&document.removeEventListener(n,t,!1)},raw:W};Object.defineProperties(U,{isFullscreen:{get:()=>!!document[W.fullscreenElement]},element:{enumerable:!0,get:()=>{var e;return(e=document[W.fullscreenElement])==null?void 0:e}},isEnabled:{enumerable:!0,get:()=>!!document[W.fullscreenEnabled]}}),W||(U={isEnabled:!1});var j=U;function cr(e){let t;if(t=e==null?document.body:typeof e=="function"?e():typeof e=="object"&&!(e instanceof Element)&&!("$el"in e)&&"value"in e?e.value:e,typeof t=="string"){let n=t.charAt(0)==="#"?t.slice(1):t,r=document.getElementById(n);if(!r)try{r=document.querySelector(t)}catch{}if(!r)throw Error(`Fullscreen target not found: ${t}`);t=r}if(t&&!(t instanceof Element)&&typeof t=="object"&&(t=t.$el),!(t instanceof HTMLElement))throw TypeError("Fullscreen target must resolve to an HTML element");return t}function ur(){let e=null,t=!1,n=null,r=!1,o,c={fullscreenClass:"fullscreen",teleport:!1,pageOnly:!1},u=null,p=a=>{var d;t!==a&&(t=a,(d=c.callback)==null||d.call(c,a))},s=(a=!1)=>{typeof document<"u"&&document.removeEventListener("keyup",h),j.isEnabled&&j.off("change",f),o==null||o(a),o=void 0,e=null,u=null},f=()=>{j.element===u&&j.isFullscreen?p(!0):(s(),p(!1))},h=a=>{(a.key==="Escape"||a.key==="Esc")&&l.exit().catch(()=>{})},l={get options(){return c},get element(){return e},get isFullscreen(){return t},get isSupported(){return j.isEnabled},get isEnabled(){return this.isSupported},toggle(a,d,_){return(_==null?!t:_)?this.enter(a,d):this.exit()},request(a,d={}){return l.enter(a,d)},enter(a,d={}){var _,y;if(r)return Promise.reject(Error("Fullscreen controller has been disposed"));if(n)return n;if(t)return Promise.resolve();if(typeof document>"u")return Promise.reject(Error("Fullscreen requires a browser"));let v;try{v=cr(a)}catch(S){return Promise.reject(S)}c={fullscreenClass:"fullscreen",teleport:!1,pageOnly:!1,...d},(_=c).pageOnly||(_.pageOnly=!j.isEnabled),(y=c).teleport&&(y.teleport=v!==document.body);let O=c.fullscreenClass.split(/\s+/).filter(Boolean).filter(S=>!v.classList.contains(S)),b=["position","left","top","width","height"].map(S=>[S,v.style.getPropertyValue(S),v.style.getPropertyPriority(S)]),A,P;if(o=S=>{if(O.forEach(L=>v.classList.remove(L)),c.pageOnly||c.teleport)for(let[L,x,X]of b)x?v.style.setProperty(L,x,X):v.style.removeProperty(L);if(A!=null&&A.parentNode){let L=A.parentNode;if(v.parentNode?A.parentNode.replaceChild(v,A):A.parentNode.removeChild(A),S&&P){let x=P;L.insertBefore(x,v.parentNode===L?v:null),Promise.resolve().then(()=>{let X=x.parentNode;if(X){for(;x.firstChild;)X.insertBefore(x.firstChild,x);X.removeChild(x)}});return}}P!=null&&P.parentNode&&P.parentNode.removeChild(P)},e=v,O.forEach(S=>v.classList.add(S)),(c.pageOnly||c.teleport)&&Object.assign(v.style,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),c.teleport&&v.parentNode&&(A=document.createComment("fullscreen"),v.parentNode.insertBefore(A,v),P=document.createElement("div"),P.setAttribute("data-fullscreen-teleport",""),P.style.display="contents",document.body.appendChild(P),P.appendChild(v)),c.pageOnly)return document.addEventListener("keyup",h),p(!0),Promise.resolve();u=c.teleport?document.body:v,j.on("change",f);try{return n=j.request(u).then(()=>{if(r)return j.element===u?j.exit():void 0;e&&f()}).catch(S=>{throw s(),p(!1),S}).finally(()=>{n=null}),n}catch(S){return s(),Promise.reject(S)}},async exit(){n&&await n,t&&(c.pageOnly?(s(),p(!1)):(await j.exit(),t&&(s(),p(!1))))},dispose(){r=!0;let a=u,d=n;s(!0);try{p(!1)}finally{if(j.isEnabled){let _=()=>{if(a&&j.element===a)return j.exit()};d?d.then(_,()=>{}).catch(()=>{}):Promise.resolve(_()).catch(()=>{})}}}};return l}var xe=e=>typeof e=="function"?e():G(e);function fr(e,t={}){let n=ur(),r=ge(!1),o=()=>{var c,u,p;return n.enter(e,{pageOnly:xe((c=t.pageOnly)!=null&&c),teleport:xe((u=t.teleport)!=null&&u),fullscreenClass:xe((p=t.fullscreenClass)==null?"fullscreen":p),callback:s=>{r.value=s}})};return Vt()&&pt(()=>{n.dispose(),r.value=!1}),{isFullscreen:Gt(r),isSupported:T(()=>n.isSupported),enter:o,exit:()=>n.exit(),toggle:()=>n.isFullscreen?n.exit():o()}}const St=Symbol("demo-fullscreen");function dr(e){const t=fr(e,{pageOnly:!0,teleport:!0,fullscreenClass:"is-demo-fullscreen"});let n="",r=!1;function o(){r||(n=document.body.style.overflow,document.body.style.overflow="hidden",r=!0)}function c(){r&&(document.body.style.overflow=n,r=!1)}me(t.isFullscreen,p=>{p?o():c()}),pt(c);const u={...t,isSupported:T(()=>!0),hasTarget:()=>!!e()};return he(St,u),u}function pr(){const e=$(St,null);if(!e)throw new Error("useDemoFullscreen() 必须在调用了 provideDemoFullscreen() 的组件内使用");return e}const hr=["title","aria-label","aria-pressed","aria-disabled"],mr={class:"screenfull-btn__icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"},gr={key:0,d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},vr={key:1,d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},Er={key:0,class:"screenfull-btn__text"},yr=ue({__name:"ScreenfullButton",props:{enterText:{default:"全屏"},exitText:{default:"退出全屏"},unsupportedText:{default:"当前浏览器不支持全屏"},showText:{type:Boolean,default:!0}},emits:["change","error"],setup(e,{emit:t}){const n=e,r=t,{isFullscreen:o,isSupported:c,enter:u,exit:p,hasTarget:s}=pr(),f=ge(null),h=T(()=>o.value?n.exitText:n.enterText),l=T(()=>c.value?h.value:n.unsupportedText);function a(y){console.warn(`[Fullscreen] ${y}`),r("error",y)}function d(){var O;const y=document.querySelector(".demo-preview"),v=document.activeElement;(v===document.body||y&&v&&y.contains(v))&&((O=f.value)==null||O.focus({preventScroll:!0}))}async function _(){if(o.value){try{await p()}catch(y){console.warn("[Fullscreen] Failed to exit fullscreen:",y),a("退出全屏失败,请稍后重试")}return}if(!s()){a("没有找到需要全屏的组件预览区");return}try{await u()}catch(y){console.warn("[Fullscreen] Failed to enter fullscreen:",y),a("全屏切换失败,请稍后重试")}}return me(o,y=>{r("change",y),y||d()}),(y,v)=>(q(),J("button",{ref_key:"buttonEl",ref:f,type:"button",class:dt(["screenfull-btn",{"is-fullscreen":G(o),"is-disabled":!G(c)}]),title:l.value,"aria-label":l.value,"aria-pressed":G(o)?"true":"false","aria-disabled":G(c)?"false":"true",onClick:_},[(q(),J("svg",mr,[G(o)?(q(),J("path",gr)):(q(),J("path",vr))])),e.showText?(q(),J("span",Er,H(h.value),1)):ht("",!0)],10,hr))}}),pe={name:"demo-vue3",badge:"Vue 3",subtitle:"Vue 3 + Vite 5 的 hel 宿主,preFetchLib 加载远程组件",port:30020,unpkgEntry:"https://unpkg.com/@melt-js/demo-vue3/dist/index.html"},_r={class:"demo-app"},Rr={class:"demo-stage__toolbar"},Ar={class:"demo-stage__hint"},br={class:"demo-stage__page"},wr={class:"demo-footer"},Cr=ue({__name:"App",setup(e){const t=Ot(),n=ge(null),r=T(()=>{var u;return String((u=t.meta.title)!=null?u:"")}),o=T(()=>t.meta.fullscreen!==!1),c=dr(()=>{var u,p;return(p=(u=n.value)==null?void 0:u.querySelector("[data-demo-preview]"))!=null?p:null});return me(()=>t.path,()=>{c.isFullscreen.value&&c.exit().catch(()=>{})}),(u,p)=>{const s=ft("router-view");return q(),J("div",_r,[Ce(ir,{title:G(pe).name,badge:G(pe).badge,subtitle:G(pe).subtitle},null,8,["title","badge","subtitle"]),B("main",{ref_key:"stageEl",ref:n,class:"demo-stage"},[B("div",Rr,[B("span",Ar,[p[0]||(p[0]=Te("示例预览 ",-1)),p[1]||(p[1]=B("em",null,"/",-1)),Te(" "+H(r.value),1)]),o.value?(q(),Ie(yr,{key:0})):ht("",!0)]),B("div",br,[Ce(s,null,{default:ke(({Component:f})=>[Ce(Mt,{name:"demo-fade",mode:"out-in"},{default:ke(()=>[(q(),Ie(jt(f),{key:u.$route.path}))]),_:2},1024)]),_:1})])],512),B("footer",wr,[B("span",null,H(G(pe).name)+" · hel-micro 消费方示例",1),p[2]||(p[2]=B("span",null,"hash 路由,可直接从 unpkg 的 dist/index.html 打开",-1))])])}}});Ut(Cr).use(Xn).mount("#app");const Or=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{pe as A,Pt as d,Or as l,pr as u};
|
|
11
|
+
//# sourceMappingURL=loadApp-VfkNA6r0.js.map
|