UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

14 lines 78.3 kB
import{g as nn,F as Ge,G as Pe,H as Oe,J as Y,K as on,L as ir,M as rt,N as an,Q as ht,S as mt,T as un}from"../sdk.js";import{_ as cn}from"./typeof.b6c3327d.js";function _t(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(u){return void r(u)}l.done?t(c):Promise.resolve(c).then(n,o)}function Q(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(c){_t(a,n,o,i,l,"next",c)}function l(c){_t(a,n,o,i,l,"throw",c)}i(void 0)})}}var ur={exports:{}},cr={exports:{}};(function(e){function t(r,n){this.v=r,this.k=n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(cr);var lr=cr.exports,sr={exports:{}},dr={exports:{}};(function(e){function t(r,n,o,a){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}e.exports=t=function(c,u,s,h){function f(d,p){t(c,d,function(g){return this._invoke(d,p,g)})}u?i?i(c,u,{value:s,enumerable:!h,configurable:!h,writable:!h}):c[u]=s:(f("next",0),f("throw",1),f("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(dr);var fr=dr.exports;(function(e){var t=fr;function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,o,a=typeof Symbol=="function"?Symbol:{},i=a.iterator||"@@iterator",l=a.toStringTag||"@@toStringTag";function c(v,m,E,b){var y=m&&m.prototype instanceof s?m:s,_=Object.create(y.prototype);return t(_,"_invoke",function(x,P,T){var I,w,S,O=0,F=T||[],N=!1,W={p:0,n:0,v:n,a:C,f:C.bind(n,4),d:function(U,D){return I=U,w=0,S=n,W.n=D,u}};function C(j,U){for(w=j,S=U,o=0;!N&&O&&!D&&o<F.length;o++){var D,A=F[o],J=W.p,G=A[2];j>3?(D=G===U)&&(S=A[(w=A[4])?5:(w=3,3)],A[4]=A[5]=n):A[0]<=J&&((D=j<2&&J<A[1])?(w=0,W.v=U,W.n=A[1]):J<G&&(D=j<3||A[0]>U||U>G)&&(A[4]=j,A[5]=U,W.n=G,w=0))}if(D||j>1)return u;throw N=!0,U}return function(j,U,D){if(O>1)throw TypeError("Generator is already running");for(N&&U===1&&C(U,D),w=U,S=D;(o=w<2?n:S)||!N;){I||(w?w<3?(w>1&&(W.n=-1),C(w,S)):W.n=S:W.v=S);try{if(O=2,I){if(w||(j="next"),o=I[j]){if(!(o=o.call(I,S)))throw TypeError("iterator result is not an object");if(!o.done)return o;S=o.value,w<2&&(w=0)}else w===1&&(o=I.return)&&o.call(I),w<2&&(S=TypeError("The iterator does not provide a '"+j+"' method"),w=1);I=n}else if((o=(N=W.n<0)?S:x.call(P,W))!==u)break}catch(A){I=n,w=1,S=A}finally{O=1}}return{value:o,done:N}}}(v,E,b),!0),_}var u={};function s(){}function h(){}function f(){}o=Object.getPrototypeOf;var d=[][i]?o(o([][i]())):(t(o={},i,function(){return this}),o),p=f.prototype=s.prototype=Object.create(d);function g(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,f):(v.__proto__=f,t(v,l,"GeneratorFunction")),v.prototype=Object.create(p),v}return h.prototype=f,t(p,"constructor",f),t(f,"constructor",h),h.displayName="GeneratorFunction",t(f,l,"GeneratorFunction"),t(p),t(p,l,"Generator"),t(p,i,function(){return this}),t(p,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:c,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(sr);var vr=sr.exports,pr={exports:{}},hr={exports:{}},mr={exports:{}};(function(e){var t=lr,r=fr;function n(o,a){function i(c,u,s,h){try{var f=o[c](u),d=f.value;return d instanceof t?a.resolve(d.v).then(function(p){i("next",p,s,h)},function(p){i("throw",p,s,h)}):a.resolve(d).then(function(p){f.value=p,s(f)},function(p){return i("throw",p,s,h)})}catch(p){h(p)}}var l;this.next||(r(n.prototype),r(n.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(c,u,s){function h(){return new a(function(f,d){i(c,s,f,d)})}return l=l?l.then(h,h):h()},!0)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(mr);var gr=mr.exports;(function(e){var t=vr,r=gr;function n(o,a,i,l,c){return new r(t().w(o,a,i,l),c||Promise)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(hr);var Er=hr.exports;(function(e){var t=Er;function r(n,o,a,i,l){var c=t(n,o,a,i,l);return c.next().then(function(u){return u.done?u.value:c.next()})}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(pr);var ln=pr.exports,yr={exports:{}};(function(e){function t(r){var n=Object(r),o=[];for(var a in n)o.unshift(a);return function i(){for(;o.length;)if((a=o.pop())in n)return i.value=a,i.done=!1,i;return i.done=!0,i}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(yr);var sn=yr.exports,br={exports:{}};(function(e){var t=cn.default;function r(n){if(n!=null){var o=n[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],a=0;if(o)return o.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length))return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}}}throw new TypeError(t(n)+" is not iterable")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(br);var dn=br.exports;(function(e){var t=lr,r=vr,n=ln,o=Er,a=gr,i=sn,l=dn;function c(){var u=r(),s=u.m(c),h=(Object.getPrototypeOf?Object.getPrototypeOf(s):s.__proto__).constructor;function f(g){var v=typeof g=="function"&&g.constructor;return!!v&&(v===h||(v.displayName||v.name)==="GeneratorFunction")}var d={throw:1,return:2,break:3,continue:3};function p(g){var v,m;return function(E){v||(v={stop:function(){return m(E.a,2)},catch:function(){return E.v},abrupt:function(y,_){return m(E.a,d[y],_)},delegateYield:function(y,_,x){return v.resultName=_,m(E.d,l(y),x)},finish:function(y){return m(E.f,y)}},m=function(y,_,x){E.p=v.prev,E.n=v.next;try{return y(_,x)}finally{v.next=E.n}}),v.resultName&&(v[v.resultName]=E.v,v.resultName=void 0),v.sent=E.v,v.next=E.n;try{return g.call(this,v)}finally{E.p=v.prev,E.n=v.next}}}return(e.exports=c=function(){return{wrap:function(m,E,b,y){return u.w(p(m),E,b,y&&y.reverse())},isGeneratorFunction:f,mark:u.m,awrap:function(m,E){return new t(m,E)},AsyncIterator:a,async:function(m,E,b,y,_){return(f(E)?o:n)(p(m),E,b,y,_)},keys:i,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports})(ur);var fn=ur.exports,De=fn(),vn=De;try{regeneratorRuntime=De}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=De:Function("r","regeneratorRuntime = r")(De)}const R=nn(vn);var Ie="data-wujie-id",We="data-wujie-script-id",wr="data-wujie-Flag",nt="data-container-position-flag",Je="data-container-overflow-flag",gt="data-loading-flag",Pt="data-wujie-attach-css-flag",pn="wujie_iframe",je="_wujie_all_event",hn="position: fixed; z-index: 2147483647; visibility: hidden; inset: 0px; backface-visibility: hidden;",mn="position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index:1;",gn=`<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="30px" viewBox="0 0 24 30"> <rect x="0" y="13" width="4" height="5" fill="#909090"> <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s" repeatCount="indefinite"></animate> <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s" repeatCount="indefinite"></animate> </rect> <rect x="10" y="13" width="4" height="5" fill="#909090"> <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate> <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate> </rect> <rect x="20" y="13" width="4" height="5" fill="#909090"> <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate> <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate> </rect> </svg>`,En="url参数为空",_r="子应用调用reload无法生效",Pr="此报错可以忽略,iframe主动中断主应用代码在子应用运行",yn=Pr+",详见:https://github.com/Tencent/wujie/issues/54",St="事件订阅数量为空",bn="window上不存在fetch属性,需要自行polyfill",wn="当前浏览器不支持无界,子应用将采用iframe方式渲染",Se="脚本请求出现错误",ze="样式请求出现错误",It="html请求出现错误",Ot="无界组件短时间重复渲染了两次,可能存在性能问题请检查代码",_n="目标Script尚未准备好或已经被移除",Pn="不支持document.getElementById()传入特殊字符,请参考document.querySelector文档";function ne(e){return typeof e=="function"}function Sn(e){return(e==null?void 0:e.toUpperCase())==="LINK"||(e==null?void 0:e.toUpperCase())==="STYLE"||(e==null?void 0:e.toUpperCase())==="SCRIPT"||(e==null?void 0:e.toUpperCase())==="IFRAME"}var Sr=window.Proxy&&window.CustomElementRegistry,In=typeof document.all=="function"&&typeof document.all>"u",xt=new WeakMap,ke=function(t){if(xt.has(t))return!0;var r=In?typeof t=="function"&&typeof t<"u":typeof t=="function";return r&&xt.set(t,r),r},Ze=new WeakMap;function Ir(e){if(Ze.has(e))return Ze.get(e);var t=e.name.indexOf("bound ")===0&&!e.hasOwnProperty("prototype");return Ze.set(e,t),t}var Ke=new WeakMap;function Et(e){var t=e.prototype&&e.prototype.constructor===e&&Object.getOwnPropertyNames(e.prototype).length>1;if(t)return!0;if(Ke.has(e))return Ke.get(e);var r=t;if(!r){var n=e.toString(),o=/^function\b\s[A-Z].*/,a=/^class\b/;r=o.test(n)||a.test(n)}return Ke.set(e,r),r}var $=new WeakMap;function On(e,t){ke(t)&&!Ir(t)&&!Et(t)&&($.has(e)?$.get(e).has(t)||$.get(e).set(t,t):($.set(e,new WeakMap),$.get(e).set(t,t)))}function we(e,t){var r=e[t];if($.has(e)&&$.get(e).has(r))return $.get(e).get(r);if(ke(r)&&!Ir(r)&&!Et(r)){var n=Function.prototype.bind.call(r,e);$.has(e)||$.set(e,new WeakMap),$.get(e).set(r,n);for(var o in r)n[o]=r[o];return r.hasOwnProperty("prototype")&&!n.hasOwnProperty("prototype")&&Object.defineProperty(n,"prototype",{value:r.prototype,enumerable:!1,writable:!0}),n}return r}function Or(e){return window.document.querySelector("iframe[".concat(Ie,'="').concat(e,'"]'))}function qe(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function xr(e){if(!e)throw X(En),new Error;var t=V(e),r=t.protocol+"//"+t.host,n=t.pathname+t.search+t.hash;return n.startsWith("/")||(n="/"+n),{urlElement:t,appHostPath:r,appRoutePath:n}}function V(e){var t=window.document.createElement("a");return t.href=e,t.href=t.href,t}function ye(e){var t=e.search||"";return Ge(new URLSearchParams(t).entries()).reduce(function(r,n){return r[n[0]]=n[1],r},{})}function Lr(e){var t=ye(V(window.location.href));return Object.keys(t).includes(e)}function ve(e,t,r){var n=e.Element.prototype.setAttribute;t.prototype.setAttribute=function(u,s){var h=s;u===r&&(h=oe(s,this.baseURI||"",!0)),n.call(this,u,h)};var o=Object.getOwnPropertyDescriptor(t.prototype,r),a=o.enumerable,i=o.configurable,l=o.get,c=o.set;Object.defineProperty(t.prototype,r,{enumerable:a,configurable:i,get:function(){return l.call(this)},set:function(s){c.call(this,oe(s,this.baseURI,!0))}})}function Qe(e){var t=e;return t.protocol+"//"+t.host+t.pathname}function oe(e,t,r){try{return e&&(r&&e.startsWith("#")?e:new URL(e,t).href)}catch{return e}}function xn(e,t){var r,n=V(window.location.href),o=ye(n);n=null;var a=o[e]||"",i=(r=a.match(/^{([^}]*)}/))===null||r===void 0?void 0:r[1];return t&&i?a.replace("{".concat(i,"}"),t[i]):a}var yt=window.requestIdleCallback||function(e){return setTimeout(e,1)};function Tr(e){return typeof e=="string"?document.querySelector(e):e}function k(e,t){var r;(r=console)===null||r===void 0||r.warn("[wujie warn]: ".concat(e),t)}function X(e,t){var r;(r=console)===null||r===void 0||r.error("[wujie error]: ".concat(e),t)}function ot(e){var t=e.indexOf(">")+1,r=e.lastIndexOf("<");return e.substring(t,r)}function Ln(e){if(Pe(e)==="object")return"/";try{var t=new URL(e,location.href),r=t.origin,n=t.pathname,o=n.split("/");return o.pop(),"".concat(r).concat(o.join("/"),"/")}catch(a){return console.warn(a),""}}function Ye(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return e.reduce(function(a,i){return ne(i)?i.apply(void 0,[a].concat(n)):a},t||"")}}function _e(e){Promise.resolve().then(e)}function H(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];try{e&&e.length>0&&e.map(function(a){return a[t]}).filter(function(a){return ne(a)}).forEach(function(a){return a.apply(void 0,n)})}catch(a){X(a)}}function Xe(e){var t;return((t=e.tagName)===null||t===void 0?void 0:t.toUpperCase())==="SCRIPT"}var Tn=1;function Cr(e,t){if(Xe(e)){var r=t||String(Tn++);e.setAttribute(We,r)}}function jr(e){return Xe(e)?e.getAttribute(We):null}function Rr(e,t){return{name:e.name,el:e.el||(t==null?void 0:t.el),url:e.url||(t==null?void 0:t.url),html:e.html||(t==null?void 0:t.html),exec:e.exec!==void 0?e.exec:t==null?void 0:t.exec,replace:e.replace||(t==null?void 0:t.replace),fetch:e.fetch||(t==null?void 0:t.fetch),props:e.props||(t==null?void 0:t.props),sync:e.sync!==void 0?e.sync:t==null?void 0:t.sync,prefix:e.prefix||(t==null?void 0:t.prefix),loading:e.loading||(t==null?void 0:t.loading),attrs:e.attrs!==void 0?e.attrs:(t==null?void 0:t.attrs)||{},degradeAttrs:e.degradeAttrs!==void 0?e.degradeAttrs:(t==null?void 0:t.degradeAttrs)||{},fiber:e.fiber!==void 0?e.fiber:(t==null?void 0:t.fiber)!==void 0?t==null?void 0:t.fiber:!0,alive:e.alive!==void 0?e.alive:t==null?void 0:t.alive,degrade:e.degrade!==void 0?e.degrade:t==null?void 0:t.degrade,plugins:e.plugins||(t==null?void 0:t.plugins),iframeAddEventListeners:e.iframeAddEventListeners||(t==null?void 0:t.iframeAddEventListeners)||[],iframeOnEvents:e.iframeOnEvents||(t==null?void 0:t.iframeOnEvents)||[],lifecycles:{beforeLoad:e.beforeLoad||(t==null?void 0:t.beforeLoad),beforeMount:e.beforeMount||(t==null?void 0:t.beforeMount),afterMount:e.afterMount||(t==null?void 0:t.afterMount),beforeUnmount:e.beforeUnmount||(t==null?void 0:t.beforeUnmount),afterUnmount:e.afterUnmount||(t==null?void 0:t.afterUnmount),activated:e.activated||(t==null?void 0:t.activated),deactivated:e.deactivated||(t==null?void 0:t.deactivated),loadError:e.loadError||(t==null?void 0:t.loadError)}}}function Re(e,t,r){var n;typeof window.CustomEvent=="function"?n=new CustomEvent(t,{detail:r}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!1,r)),e.dispatchEvent(n)}function Ur(){throw k(yn),new Error(Pr)}var Cn=/(<script[\s\S]*?>)[\s\S]*?<\/script>/gi,jn=/<(script)\s+((?!type=('|")text\/ng-template\3)[^])*?>[^]*?<\/\1>/i,Lt=/.*\ssrc=('|")?([^>'"\s]+)/,Rn=/.*\stype=('|")?([^>'"\s]+)/,Un=/.*\sentry\s*.*/,An=/.*\sasync\s*.*/,Mn=/.*\sdefer\s*.*/,Dn=/.*\snomodule\s*.*/,Nn=/.*\stype=('|")?module('|")?\s*.*/,Wn=/<(link)\s+[^]*?>/gi,Jn=/\srel=('|")?(preload|prefetch|modulepreload)\1/,Tt=/.*\shref=('|")?([^>'"\s]+)/,kn=/.*\sas=('|")?font\1.*/,Fn=/<style[^>]*>[\s\S]*?<\/style>/gi,$n=/\s+rel=('|")?stylesheet\1.*/,Hn=/.*\shref=('|")?([^>'"\s]+)/,Bn=/<!--([\s\S]*?)-->/g,Gn=/<link(\s+|\s+[^]+\s+)ignore(\s*|\s+[^]*|=[^]*)>/i,qn=/<style(\s+|\s+[^]+\s+)ignore(\s*|\s+[^]*|=[^]*)>/i,Qn=/<script(\s+|\s+[^]+\s+)ignore(\s*|\s+[^]*|=[^]*)>/i,Yn=/.*\scrossorigin=?('|")?(use-credentials|anonymous)?('|")?/i;function Ct(e){return e.startsWith("//")||e.startsWith("http://")||e.startsWith("https://")}function jt(e,t){return new URL(e,t).toString()}function Xn(e){var t=["text/javascript","module","application/javascript","text/ecmascript","application/ecmascript","importmap"];return!e||t.indexOf(e)!==-1}function ce(e){var t=/<[-\w]+\s+([^>]*)>/i,r=t.exec(e);if(!r)return{};for(var n=r[1],o=/([^\s=]+)\s*=\s*(['"])(.*?)\2/g,a={},i;(i=o.exec(n))!==null;){var l=i[1],c=i[3];a[l]=c}return a}function Vn(){var e=window.document.createElement("script");return"noModule"in e}var at=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return"<!-- ".concat(r?"prefetch/preload/modulepreload":""," link ").concat(t," replaced by wujie -->")},Ar=function(t){return"<!-- inline-style-".concat(t," replaced by wujie -->")},zn=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"<!-- ".concat(r," script ").concat(t," replaced by wujie -->")},Zn="<!-- inline scripts replaced by wujie -->",Ue=function(t){return"<!-- ignore asset ".concat(t||"file"," replaced by wujie -->")},Rt=function(t,r){return"<!-- ".concat(r?"nomodule":"module"," script ").concat(t," ignored by wujie -->")};function Kn(e,t,r){var n=[],o=[],a=null,i=Vn(),l=e.replace(Bn,"").replace(Wn,function(u){var s=!!u.match($n);if(s){var h=u.match(Hn),f=u.match(Gn);if(h){var d=h&&h[2],p=d;return d&&!Ct(d)&&(p=jt(d,t)),f?Ue(p):(o.push({src:p}),at(p))}}var g=u.match(Jn)&&u.match(Tt)&&!u.match(kn);if(g){var v=u.match(Tt),m=Oe(v,3),E=m[2];return at(E,!0)}return u}).replace(Fn,function(u){if(qn.test(u))return Ue("style file");var s=ot(u);return o.push({src:"",content:s}),Ar(o.length-1)}).replace(Cn,function(u,s){var h=s.match(Qn),f=!!s.match(Nn),d=s.match(Yn),p=(d==null?void 0:d[2])||"",g=i&&!!s.match(Dn)||!i&&f,v=s.match(Rn),m=v&&v[2];if(!Xn(m))return u;if(jn.test(u)&&s.match(Lt)){var E=s.match(Un),b=s.match(Lt),y=b&&b[2];if(a&&E)throw new SyntaxError("You should not set multiply entry script!");if(y&&!Ct(y)&&(y=jt(y,t)),a=a||E&&y,h)return Ue(y||"js file");if(g)return Rt(y||"js file",i);if(y){var _=!!s.match(An),x=!!s.match(Mn);return n.push(_||x?{async:_,defer:x,src:y,module:f,crossorigin:!!d,crossoriginType:p,attrs:ce(u)}:{src:y,module:f,crossorigin:!!d,crossoriginType:p,attrs:ce(u)}),zn(y,_&&"async"||x&&"defer"||"")}return u}else{if(h)return Ue("js file");if(g)return Rt("js file",i);var P=ot(u),T=P.split(/[\r\n]+/).every(function(I){return!I.trim()||I.trim().startsWith("//")});return!T&&P&&n.push({src:"",content:P,module:f,crossorigin:!!d,crossoriginType:p,attrs:ce(u)}),Zn}}),c={template:l,scripts:n,styles:o,entry:a||n[n.length-1]};return typeof r=="function"&&(c=r(c)),c}function it(e){var t=e.plugins,r=e.replace;return function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;return Ye(t.map(function(i){return i.cssLoader}))(r?r(n):n,o,a)}}function eo(e){var t=e.plugins,r=e.replace;return function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;return Ye(t.map(function(i){return i.jsLoader}))(r?r(n):n,o,a)}}function Fe(e,t){var r=t.map(function(o){return o[e]}).filter(function(o){return o==null?void 0:o.length}),n=r.reduce(function(o,a){return o.concat(a)},[]);return e==="cssBeforeLoaders"?n.reverse():n}function te(e,t){return t.map(function(r){return r[e]}).filter(function(r){return r==null?void 0:r.length}).reduce(function(r,n){return r.concat(n)},[])}function re(e,t){return t.some(function(r){return typeof r=="string"?e===r:r.test(e)})}function to(e,t,r){var n=t?oe(t,r):r,o=/url\((['"]?)((?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*)(\1)\)/g;return e.replace(o,function(a,i,l,c){var u=/^data:/,s=u.test(l);return s?a:"url(".concat(i).concat(oe(l,n)).concat(c,")")})}var Ut={cssLoader:to,cssBeforeLoaders:[{content:"html {view-transition-name: none;}"}]};function Mr(e){return Array.isArray(e)?[Ut].concat(Ge(e)):[Ut]}function At(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?At(Object(r),!0).forEach(function(n){Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ro={},et={},tt={};if(!window.fetch)throw X(bn),new Error;var bt=window.fetch.bind(window);function no(e){return e}function Dr(e,t,r){return ut.apply(this,arguments)}function ut(){return ut=Q(R.mark(function e(t,r,n){var o,a,i,l;return R.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=Qe(t.proxyLocation),a=Ye(t.plugins.map(function(s){return s.cssLoader})),i=n().map(function(s){var h=s.src,f=s.ignore,d=s.contentPromise;return{src:h,ignore:f,contentPromise:d.then(function(p){return a(p,h,o)})}}),u.next=5,oo(r,i);case 5:return l=u.sent,u.abrupt("return",t.replace?t.replace(l):l);case 7:case"end":return u.stop()}},e)})),ut.apply(this,arguments)}function oo(e,t){return ct.apply(this,arguments)}function ct(){return ct=Q(R.mark(function e(t,r){var n;return R.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=t,a.abrupt("return",Promise.all(r.map(function(i,l){return i.contentPromise.then(function(c){i.src?n=n.replace(at(i.src),i.ignore?'<link href="'.concat(i.src,'" rel="stylesheet" type="text/css">'):"<style>/* ".concat(i.src," */").concat(c,"</style>")):c&&(n=n.replace(Ar(l),"<style>/* inline-style-".concat(l," */").concat(c,"</style>")))})})).then(function(){return n}));case 2:case"end":return a.stop()}},e)})),ct.apply(this,arguments)}var ao=function(t){return t.startsWith("<")},Ne=function(t,r,n,o,a){return r[t]||(r[t]=n(t).then(function(i){if(i.status>=400){if(r[t]=null,o)return X(ze,{src:t,response:i}),a==null||a(t,new Error(ze)),"";throw X(Se,{src:t,response:i}),a==null||a(t,new Error(Se)),new Error(Se)}return i.text()}).catch(function(i){return r[t]=null,o?(X(ze,t),a==null||a(t,i),""):(X(Se,t),a==null||a(t,i),"")}))};function $e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bt,r=arguments.length>2?arguments[2]:void 0;return e.map(function(n){var o=n.src,a=n.content,i=n.ignore;return a?{src:"",contentPromise:Promise.resolve(a)}:ao(o)?{src:"",contentPromise:Promise.resolve(ot(o))}:{src:o,ignore:i,contentPromise:i?Promise.resolve(""):Ne(o,ro,t,!0,r)}})}function Nr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bt,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return e.map(function(o){var a=o.src,i=o.async,l=o.defer,c=o.module,u=o.ignore,s=null;return(i||l)&&a&&!c?s=new Promise(function(h,f){return n?yt(function(){return Ne(a,et,t,!1,r).then(h,f)}):Ne(a,et,t,!1,r).then(h,f)}):c&&a||u?s=Promise.resolve(""):a?s=Ne(a,et,t,!1,r):s=Promise.resolve(o.content),c&&!i&&(o.defer=!0),me(me({},o),{},{contentPromise:s})})}function lt(e){var t,r,n=e.url,o=e.opts,a=e.html,i=(t=o.fetch)!==null&&t!==void 0?t:bt,l=(r=o.fiber)!==null&&r!==void 0?r:!0,c=o.plugins,u=o.loadError,s=c?Ye(c.map(function(m){return m.htmlLoader})):no,h=te("jsExcludes",c),f=te("cssExcludes",c),d=te("jsIgnores",c),p=te("cssIgnores",c),g=Ln,v=function(E,b,y){return(b?Promise.resolve(b):i(E).then(function(_){return _.status>=400?(X(It,{url:E,response:_}),u==null||u(E,new Error(It)),""):_.text()}).catch(function(_){return tt[E]=null,u==null||u(E,_),Promise.reject(_)})).then(function(_){var x=g(E),P=Kn(y(_),x),T=P.template,I=P.scripts,w=P.styles;return{template:T,assetPublicPath:x,getExternalScripts:function(){return Nr(I.filter(function(O){return!O.src||!re(O.src,h)}).map(function(O){return me(me({},O),{},{ignore:O.src&&re(O.src,d)})}),i,u,l)},getExternalStyleSheets:function(){return $e(w.filter(function(O){return!O.src||!re(O.src,f)}).map(function(O){return me(me({},O),{},{ignore:O.src&&re(O.src,p)})}),i,u)}}})};return o!=null&&o.plugins.some(function(m){return m.htmlLoader})?v(n,a,s):tt[n]||(tt[n]=v(n,a,s))}function io(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function uo(e,t,r){if(on())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&ir(o,r.prototype),o}function st(e){var t=typeof Map=="function"?new Map:void 0;return st=function(n){if(n===null||!io(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,o)}function o(){return uo(n,arguments,rt(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),ir(o,n)},st(e)}function Mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mt(Object(r),!0).forEach(function(n){Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var B=function(e){if((e=window.__WUJIE_INJECT)!==null&&e!==void 0&&e.idToSandboxMap)return window.__WUJIE_INJECT.idToSandboxMap;var t=window.__POWERED_BY_WUJIE__?window.__WUJIE.inject.idToSandboxMap:new Map;return window.__WUJIE_INJECT=ge(ge({},window.__WUJIE_INJECT),{},{idToSandboxMap:t}),t}();function K(e){var t;return((t=B.get(e))===null||t===void 0?void 0:t.wujie)||null}function Wr(e){var t;return((t=B.get(e))===null||t===void 0?void 0:t.options)||null}function co(e,t){var r=B.get(e);r?B.set(e,ge(ge({},r),{},{wujie:t})):B.set(e,{wujie:t})}function lo(e){var t=B.get(e);t!=null&&t.options&&B.set(e,{options:t.options}),B.delete(e)}function so(e,t){var r=B.get(e);r?B.set(e,ge(ge({},r),{},{options:t})):B.set(e,{options:t})}var M={modifyLocalProperties:["createElement","createTextNode","documentURI","URL","getElementsByTagName","getElementById"],modifyProperties:["createElement","createTextNode","documentURI","URL","getElementsByTagName","getElementsByClassName","getElementsByName","getElementById","querySelector","querySelectorAll","documentElement","scrollingElement","forms","images","links"],shadowProperties:["activeElement","childElementCount","children","firstElementChild","firstChild","fullscreenElement","lastElementChild","pictureInPictureElement","pointerLockElement","styleSheets"],shadowMethods:["append","contains","getSelection","elementFromPoint","elementsFromPoint","getAnimations","replaceChildren"],documentProperties:["characterSet","compatMode","contentType","designMode","dir","doctype","embeds","fullscreenEnabled","hidden","implementation","lastModified","pictureInPictureEnabled","plugins","readyState","referrer","visibilityState","fonts"],documentMethods:["execCommand","caretPositionFromPoint","createRange","exitFullscreen","exitPictureInPicture","getElementsByTagNameNS","hasFocus","prepend"],documentEvents:["onpointerlockchange","onpointerlockerror","onbeforecopy","onbeforecut","onbeforepaste","onfreeze","onresume","onsearch","onfullscreenchange","onfullscreenerror","onsecuritypolicyviolation","onvisibilitychange"],ownerProperties:["head","body"]},Dt=["DOMContentLoaded","readystatechange"],fo=["onreadystatechange"],Nt=["fullscreenchange","fullscreenerror","selectionchange","visibilitychange","wheel","keydown","keypress","keyup"],Wt=["gotpointercapture","lostpointercapture"],Jt=["hashchange","popstate","DOMContentLoaded","load","beforeunload","unload","message","error","unhandledrejection"],vo=["onload","onbeforeunload","onunload","onerror","onunhandledrejection"],po={IMG:"src",A:"href",SOURCE:"src"},ho=["getComputedStyle","visualViewport","matchMedia","DOMParser"],mo=[/animationFrame$/i,/resizeObserver$|mutationObserver$|intersectionObserver$/i,/height$|width$|left$/i,/^screen/i,/CSSStyleSheet$/i,/X$|Y$/],Jr=HTMLElement.prototype.appendChild,kr=HTMLElement.prototype.removeChild,kt=HTMLElement.prototype.contains,go=HTMLHeadElement.prototype.insertBefore,Eo=HTMLBodyElement.prototype.insertBefore,Ft=HTMLStyleElement.prototype.insertAdjacentElement,wt=Node.prototype.addEventListener,Ve=Node.prototype.removeEventListener,$t=window.addEventListener,Ht=window.removeEventListener,le=Node.prototype.appendChild,se=window.__POWERED_BY_WUJIE__?window.__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__:Document.prototype.querySelector;function Bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bt(Object(r),!0).forEach(function(n){Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yo(e,t){return Object.defineProperties(e,{srcElement:{get:t},target:{get:t}}),e}function Ae(e,t){var r=new CustomEvent(t),n=yo(r,function(){return e});ne(e["on".concat(t)])?e["on".concat(t)](n):e.dispatchEvent(n)}function ie(e,t){if(!(!e.innerHTML||t.degrade)){var r=function(){var o=Qr([e.sheet]),a=Oe(o,2),i=a[0],l=a[1];i&&t.shadowRoot.head.appendChild(i),l&&t.shadowRoot.host.appendChild(l),e._patcher=void 0};e._patcher&&clearTimeout(e._patcher),e._patcher=setTimeout(r,50)}}function bo(e,t,r,n){var o;if(e._hasPatchStyle)return;var a=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),i=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerText"),l=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),c=(o=e.sheet)===null||o===void 0?void 0:o.insertRule;function u(){c&&(e.sheet.insertRule=function(s,h){return a?e.innerHTML+=s:e.innerText+=s,c.call(e.sheet,s,h)})}u(),a&&Object.defineProperties(e,{innerHTML:{get:function(){return a.get.call(e)},set:function(h){var f=this;a.set.call(e,t(h,"",n)),_e(function(){return ie(f,r)})}}}),Object.defineProperties(e,{innerText:{get:function(){return i.get.call(e)},set:function(h){var f=this;i.set.call(e,t(h,"",n)),_e(function(){return ie(f,r)})}},textContent:{get:function(){return l.get.call(e)},set:function(h){var f=this;l.set.call(e,t(h,"",n)),_e(function(){return ie(f,r)})}},appendChild:{value:function(h){var f=this;if(_e(function(){return ie(f,r)}),h.nodeType===Node.TEXT_NODE){var d=le.call(e,e.ownerDocument.createTextNode(t(h.textContent,"",n)));return u(),d}else return le(h)}},insertAdjacentElement:{value:function(h,f){if(f.nodeName==="STYLE"){_e(function(){return ie(f,r)});var d=Ft.call(this,h,f);return r.styleSheetElements.push(f),d}else return Ft.call(this,h,f)}},_hasPatchStyle:{get:function(){return!0}}})}var Gt=Promise.resolve();function Me(e){return function(r,n){var o=this,a=r,i=e.rawDOMAppendOrInsertBefore,l=e.wujieId,c=K(l),u=c.styleSheetElements,s=c.replace,h=c.fetch,f=c.plugins,d=c.iframe,p=c.lifecycles,g=c.proxyLocation,v=c.fiber;if(!Sn(a.tagName)||!l){var m=i.call(this,a,n);return Z(a,d.contentWindow),H(f,"appendOrInsertElementHook",a,d.contentWindow),m}var E=d.contentDocument,b=Qe(g);if(a.tagName){var y;switch((y=a.tagName)===null||y===void 0?void 0:y.toUpperCase()){case"LINK":{var _=a,x=_.href,P=_.rel,T=_.type,I=P==="stylesheet"||T==="text/css"||x.endsWith(".css");if(!I){var w=i.call(this,a,n);return H(f,"appendOrInsertElementHook",a,d.contentWindow),w}x&&!re(x,te("cssExcludes",f))&&$e([{src:x,ignore:re(x,te("cssIgnores",f))}],h,p.loadError).forEach(function(z){var L=z.src,ae=z.ignore,Ce=z.contentPromise;return Ce.then(function(en){var tn=ce(a.outerHTML);if(ae&&L)i.call(o,a,n);else{var be=E.createElement("style"),rn=it({plugins:f,replace:s});be.innerHTML=rn(en,L,b),u.push(be),qe(be,tn),i.call(o,be,n),ie(be,c),Ae(a,"load")}a=null},function(){Ae(a,"error"),a=null})});var S=E.createComment("dynamic link ".concat(x," replaced by wujie"));return i.call(this,S,n)}case"STYLE":{var O=r;u.push(O);var F=O.innerHTML,N=it({plugins:f,replace:s});F&&(O.innerHTML=N(F,"",b));var W=i.call(this,a,n);return bo(O,N,c,b),ie(O,c),H(f,"appendOrInsertElementHook",a,d.contentWindow),W}case"SCRIPT":{Cr(a);var C=a,j=C.src,U=C.text,D=C.type,A=C.crossOrigin;if(j&&!re(j,te("jsExcludes",f))){var J=function(L){if(c.iframe===null)return k(Ot);var ae=function(){Ae(a,"load"),a=null};q(pe(pe({},L),{},{onload:ae}),c.iframe.contentWindow,a)},G={src:j,module:D==="module",crossorigin:A!==null,crossoriginType:A||"",ignore:re(j,te("jsIgnores",f)),attrs:ce(a.outerHTML)};Nr([G],h,p.loadError,v).forEach(function(z){Gt=Gt.then(function(){return z.contentPromise.then(function(L){var ae;if(c.execQueue===null)return k(Ot);var Ce=(ae=c.execQueue)===null||ae===void 0?void 0:ae.length;c.execQueue.push(function(){return v?c.requestIdleCallback(function(){J(pe(pe({},z),{},{content:L}))}):J(pe(pe({},z),{},{content:L}))}),Ce||c.execQueue.shift()()},function(){Ae(a,"error"),a=null})})})}else{var fe,xe=(fe=c.execQueue)===null||fe===void 0?void 0:fe.length;c.execQueue.push(function(){return v?c.requestIdleCallback(function(){q({src:null,content:U,attrs:ce(a.outerHTML)},c.iframe.contentWindow,a)}):q({src:null,content:U,attrs:ce(a.outerHTML)},c.iframe.contentWindow,a)}),xe||c.execQueue.shift()()}var Le=E.createComment("dynamic script ".concat(j," replaced by wujie"));return i.call(this,Le,n)}case"IFRAME":{if(a.getAttribute(wr)==="")return le.call(se.call(this.ownerDocument,"html"),a);var Te=i.call(this,a,n);return H(f,"appendOrInsertElementHook",a,d.contentWindow),Te}}}}}function Fr(e,t){var r=jr(e),n=K(t),o=n.iframe,a=o.contentWindow.__WUJIE_RAW_DOCUMENT_HEAD__.querySelector("script[".concat(We,"='").concat(r,"']"));return a===null&&k(_n,"<script ".concat(We,"='").concat(r,"'/>")),{targetScript:a,iframe:o}}function qt(e){return function(r){var n=r,o=e.rawElementContains,a=e.wujieId;if(n&&Xe(n)){var i=Fr(n,a),l=i.targetScript;return l!==null}return o(n)}}function wo(e){return function(r){var n=r,o=e.rawElementRemoveChild,a=e.wujieId;if(n&&Xe(n)){var i=Fr(n,a),l=i.targetScript,c=i.iframe;return l!==null?c.contentWindow.__WUJIE_RAW_DOCUMENT_HEAD__.removeChild(l):null}return o(n)}}function Qt(e){var t=new Map;e._cacheListeners=t,e.addEventListener=function(r,n,o){var a=t.get(r)||[];return t.set(r,[].concat(Ge(a),[n])),wt.call(e,r,n,o)},e.removeEventListener=function(r,n,o){var a=t.get(r),i=a==null?void 0:a.indexOf(n);return a!=null&&a.length&&i!==-1&&a.splice(i,1),Ve.call(e,r,n,o)}}function Yt(e){var t=e._cacheListeners;Ge(t.entries()).forEach(function(r){var n=Oe(r,2),o=n[0],a=n[1];a.forEach(function(i){return Ve.call(e,o,i)})})}function $r(e,t,r){r||(Qt(e.head),Qt(e.body)),e.head.appendChild=Me({rawDOMAppendOrInsertBefore:le,wujieId:t}),e.head.insertBefore=Me({rawDOMAppendOrInsertBefore:go,wujieId:t}),e.head.removeChild=wo({rawElementRemoveChild:kr.bind(e.head),wujieId:t}),e.head.contains=qt({rawElementContains:kt.bind(e.head),wujieId:t}),e.contains=qt({rawElementContains:kt.bind(e),wujieId:t}),e.body.appendChild=Me({rawDOMAppendOrInsertBefore:le,wujieId:t}),e.body.insertBefore=Me({rawDOMAppendOrInsertBefore:Eo,wujieId:t})}function Xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xt(Object(r),!0).forEach(function(n){Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _o(e,t,r){return t=rt(t),un(e,Hr()?Reflect.construct(t,r||[],rt(e).constructor):t.apply(e,r))}function Hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hr=function(){return!!e})()}var Po={":root":":host"};function So(){var e=window.customElements;if(e&&!(e!=null&&e.get("wujie-app"))){var t=function(r){function n(){return mt(this,n),_o(this,n,arguments)}return an(n,r),ht(n,[{key:"connectedCallback",value:function(){if(!this.shadowRoot){var a=this.attachShadow({mode:"open"}),i=K(this.getAttribute(Ie));Z(a,i.iframe.contentWindow),i.shadowRoot=a}}},{key:"disconnectedCallback",value:function(){var a=K(this.getAttribute(Ie));a==null||a.unmount()}}])}(st(HTMLElement));e==null||e.define("wujie-app",t)}}function Io(e){var t=window.document.createElement("wujie-app");return t.setAttribute(Ie,e),t.classList.add(pn),t}function de(e,t){var r=Tr(t);return r&&!r.contains(e)&&(r.querySelector("div[".concat(gt,"]"))||ue(r),e&&Jr.call(r,e)),r}function Br(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Lo(e,r),o=de(n,t),a=n.contentWindow.document;return a.open(),a.write("<!DOCTYPE html><html><head></head><body></body></html>"),a.close(),{iframe:n,container:o}}function Gr(e,t){return dt.apply(this,arguments)}function dt(){return dt=Q(R.mark(function e(t,r){var n,o,a,i,l,c,u,s;return R.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return n=t.iframe.contentDocument,o=t.plugins,a=t.replace,i=t.proxyLocation,l=it({plugins:o,replace:a}),c=Fe("cssBeforeLoaders",o),u=Fe("cssAfterLoaders",o),s=Qe(i),f.next=8,Promise.all([Promise.all($e(c,t.fetch,t.lifecycles.loadError).map(function(d){var p=d.src,g=d.contentPromise;return g.then(function(v){return{src:p,content:v}})})).then(function(d){d.forEach(function(p){var g=p.src,v=p.content;if(v){var m=n.createElement("style");m.setAttribute("type","text/css"),m.appendChild(n.createTextNode(v&&l(v,g,s)));var E=r.querySelector("head"),b=r.querySelector("body");r.insertBefore(m,E||b||r.firstChild)}})}),Promise.all($e(u,t.fetch,t.lifecycles.loadError).map(function(d){var p=d.src,g=d.contentPromise;return g.then(function(v){return{src:p,content:v}})})).then(function(d){d.forEach(function(p){var g=p.src,v=p.content;if(v){var m=n.createElement("style");m.setAttribute("type","text/css"),m.appendChild(n.createTextNode(v&&l(v,g,s))),r.appendChild(m)}})})]).then(function(){return r},function(){return r});case 8:return f.abrupt("return",f.sent);case 9:case"end":return f.stop()}},e)})),dt.apply(this,arguments)}function Oo(e,t,r){var n=e.querySelector("head"),o=e.querySelector("body");if(n){for(;n.firstChild;)le.call(t,n.firstChild.cloneNode(!0)),n.removeChild(n.firstChild);n.parentNode.replaceChild(t,n)}if(o){for(;o.firstChild;)le.call(r,o.firstChild.cloneNode(!0)),o.removeChild(o.firstChild);o.parentNode.replaceChild(r,o)}return e}function qr(e,t){var r=e.__WUJIE,n=r.head,o=r.body,a=r.alive,i=r.execFlag,l=e.document,c=new DOMParser,u=c.parseFromString(t,"text/html"),s=u.documentElement,h=s.attributes,f=l.createElement("html");f.innerHTML=t;for(var d=0;d<h.length;d++)f.setAttribute(h[d].name,h[d].value);!a&&i?f=Oo(f,n,o):(r.head=f.querySelector("head"),r.body=f.querySelector("body"));for(var p=l.createTreeWalker(f,NodeFilter.SHOW_ELEMENT,null,!1),g=p.currentNode;g;){Z(g,e);var v=po[g.tagName],m=g[v];v&&g.setAttribute(v,oe(m,g.baseURI||"")),g=p.nextNode()}if(!f.querySelector("head")){var E=l.createElement("head");f.appendChild(E)}if(!f.querySelector("body")){var b=l.createElement("body");f.appendChild(b)}return f}function xo(e,t,r){return ft.apply(this,arguments)}function ft(){return ft=Q(R.mark(function e(t,r,n){var o,a,i;return R.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=qr(r,n),c.next=3,Gr(r.__WUJIE,o);case 3:a=c.sent,t.appendChild(a),i=document.createElement("div"),i.setAttribute("style",hn),a.insertBefore(i,a.firstChild),t.head=t.querySelector("head"),t.body=t.querySelector("body"),Object.defineProperty(t.firstChild,"parentNode",{enumerable:!0,configurable:!0,get:function(){return r.document}}),$r(t,r.__WUJIE.id,!1);case 12:case"end":return c.stop()}},e)})),ft.apply(this,arguments)}function Lo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=document.createElement("iframe"),n="height:100%;width:100%";return qe(r,Vt(Vt({},t),{},Y({style:[n,t.style].join(";")},Ie,e))),r}function zt(e,t,r){return vt.apply(this,arguments)}function vt(){return vt=Q(R.mark(function e(t,r,n){var o,a;return R.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return o=qr(r,n),l.next=3,Gr(r.__WUJIE,o);case 3:a=l.sent,t.replaceChild(a,t.documentElement),Object.defineProperty(t.documentElement,"parentNode",{enumerable:!0,configurable:!0,get:function(){return r.document}}),$r(t,r.__WUJIE.id,!0);case 7:case"end":return l.stop()}},e)})),vt.apply(this,arguments)}function ue(e){for(;e!=null&&e.firstChild;)kr.call(e,e.firstChild)}function To(e,t){var r=Tr(e);ue(r);var n=null;try{n=window.getComputedStyle(r)}catch{return}n.position==="static"?(r.setAttribute(nt,n.position),r.setAttribute(Je,n.overflow==="visible"?"":n.overflow),r.style.setProperty("position","relative"),r.style.setProperty("overflow","hidden")):["relative","sticky"].includes(n.position)&&(r.setAttribute(Je,n.overflow==="visible"?"":n.overflow),r.style.setProperty("overflow","hidden"));var o=document.createElement("div");o.setAttribute(gt,""),o.setAttribute("style",mn),t?o.appendChild(t):o.innerHTML=gn,r.appendChild(o)}function Zt(e){var t=e.getAttribute(nt),r=e.getAttribute(Je);t&&e.style.removeProperty("position"),r!==null&&(r?e.style.setProperty("overflow",r):e.style.removeProperty("overflow")),e.removeAttribute(nt),e.removeAttribute(Je);var n=e.querySelector("div[".concat(gt,"]"));n&&e.removeChild(n)}function Qr(e){for(var t=[],r=[],n=/:root/g,o=0;o<e.length;o++)for(var a,i,l=(a=(i=e[o])===null||i===void 0?void 0:i.cssRules)!==null&&a!==void 0?a:[],c=0;c<l.length;c++){var u=l[c].cssText;n.test(u)&&t.push(u.replace(n,function(f){return Po[f]})),l[c].type===CSSRule.FONT_FACE_RULE&&r.push(u)}var s=null,h=null;return t.length&&(s=window.document.createElement("style"),s.innerHTML=t.join("")),r.length&&(h=window.document.createElement("style"),h.innerHTML=r.join("")),[s,h]}function Ee(e){var t=e.__WUJIE,r=t.sync,n=t.id,o=t.prefix,a=V(window.location.href),i=ye(a);if(!r&&!i[n])return a=null;var l=e.location.pathname+e.location.search+e.location.hash,c="";o&&Object.keys(o).forEach(function(s){var h=o[s];l.startsWith(h)&&(!c||h.length>o[c].length)&&(c=s)}),r?i[n]=window.encodeURIComponent(c?l.replace(o[c],"{".concat(c,"}")):l):delete i[n];var u="?"+Object.keys(i).map(function(s){return s+"="+i[s]}).join("&");a.search=u,a.href!==window.location.href&&window.history.replaceState(null,"",a.href),a=null}function Co(e){var t=e.location,r=t.pathname,n=t.search,o=t.hash,a=e.__WUJIE,i=a.id,l=a.url,c=a.sync,u=a.execFlag,s=a.prefix,h=a.inject,f=c&&!u?xn(i,s):l,d=(/^http/.test(f)?null:f)||l,p=xr(d),g=p.appRoutePath,v=r+n+o;v!==g&&e.history.replaceState(null,"",h.mainHostPath+g)}function jo(){var e=V(window.location.href),t=ye(e);Object.keys(t).forEach(function(n){var o=K(n);o&&o.execFlag&&o.sync&&!o.hrefFlag&&!o.activeFlag&&delete t[n]});var r="?"+Object.keys(t).map(function(n){return n+"="+window.decodeURIComponent(t[n])}).join("&");e.search=r,e.href!==window.location.href&&window.history.replaceState(null,"",e.href),e=null}function Ro(e,t){var r=V(window.location.href),n=ye(r);n[e]=window.encodeURIComponent(t);var o="?"+Object.keys(n).map(function(a){return a+"="+n[a]}).join("&");r.search=o,window.history.pushState(null,"",r.href),r=null}function Uo(){window.addEventListener("popstate",function(){var e=V(window.location.href),t=ye(e);e=null,Object.keys(t).map(function(r){return K(r)}).filter(function(r){return r}).forEach(function(r){var n=t[r.id],o=se.call(r.iframe.contentDocument,"body");if(/http/.test(n))r.degrade?(de(r.document.documentElement,o),Be(window.decodeURIComponent(n),Or(r.id).parentElement,r.degradeAttrs)):Be(window.decodeURIComponent(n),r.shadowRoot.host.parentElement,r.degradeAttrs),r.hrefFlag=!0;else if(r.hrefFlag){if(r.degrade){var a=Br(r.id,r.el,r.degradeAttrs),i=a.iframe;Yr(i.contentWindow,r.iframe.contentWindow),i.contentWindow.onunload=function(){r.unmount()},i.contentDocument.appendChild(o.firstElementChild),r.document=i.contentDocument}else de(r.shadowRoot.host,r.el);r.hrefFlag=!1}})})}function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kt(Object(r),!0).forEach(function(n){Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ao(e){e.__WUJIE_EVENTLISTENER__=e.__WUJIE_EVENTLISTENER__||new Set,e.addEventListener=function(r,n,o){if(H(e.__WUJIE.plugins,"windowAddEventListenerHook",e,r,n,o),e.__WUJIE_EVENTLISTENER__.add({type:r,listener:n,options:o}),Jt.concat(e.__WUJIE.iframeAddEventListeners).includes(r)||Pe(o)==="object"&&o.targetWindow){var a=Pe(o)==="object"&&o.targetWindow?o==null?void 0:o.targetWindow:e;return $t.call(a,r,n,o)}$t.call(window.__WUJIE_RAW_WINDOW__||window,r,n,o)},e.removeEventListener=function(r,n,o){if(H(e.__WUJIE.plugins,"windowRemoveEventListenerHook",e,r,n,o),e.__WUJIE_EVENTLISTENER__.forEach(function(i){i.listener===n&&i.type===r&&o==i.options&&e.__WUJIE_EVENTLISTENER__.delete(i)}),Jt.concat(e.__WUJIE.iframeAddEventListeners).includes(r)||Pe(o)==="object"&&o.targetWindow){var a=Pe(o)==="object"&&o.targetWindow?o==null?void 0:o.targetWindow:e;return Ht.call(a,r,n,o)}Ht.call(window.__WUJIE_RAW_WINDOW__||window,r,n,o)}}function er(e,t,r){e.__WUJIE=t,e.__WUJIE_PUBLIC_PATH__=r+"/",e.$wujie=t.provide,e.__WUJIE_RAW_WINDOW__=e}function Mo(e,t,r){var n=e.history,o=n.pushState,a=n.replaceState;n.pushState=function(i,l,c){var u=r+e.location.pathname+e.location.search+e.location.hash,s=oe(c==null?void 0:c.replace(t,""),u),h=c===void 0;o.call(n,i,l,h?void 0:s),!h&&(tr(e,t,r),Ee(e))},n.replaceState=function(i,l,c){var u=r+e.location.pathname+e.location.search+e.location.hash,s=oe(c==null?void 0:c.replace(t,""),u),h=c===void 0;a.call(n,i,l,h?void 0:s),!h&&(tr(e,t,r),Ee(e))}}function tr(e,t,r){var n,o=new URL((n=e.location.href)===null||n===void 0?void 0:n.replace(r,""),t),a=se.call(e.document,"base");a&&a.setAttribute("href",t+o.pathname)}function Do(e){function t(n){var o=e[n];try{return typeof o=="function"&&!Et(o)?e[n]=window[n].bind(window):e[n]=window[n],!0}catch(a){return k(a.message),!1}}Object.getOwnPropertyNames(e).forEach(function(n){if(n==="getSelection"){Object.defineProperty(e,n,{get:function(){return e.document[n]}});return}if(ho.includes(n)){t(n);return}mo.some(function(o){return o.test(n)&&n in e.parent?t(n):!1})});var r=Object.getOwnPropertyNames(window).filter(function(n){return/^on/.test(n)}).filter(function(n){return!vo.concat(e.__WUJIE.iframeOnEvents).includes(n)});r.forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n)||{enumerable:!0,writable:!0};try{Object.defineProperty(e,n,{enumerable:o.enumerable,configurable:!0,get:function(){return window[n]},set:o.writable||o.set?function(a){window[n]=typeof a=="function"?a.bind(e):a}:void 0})}catch(a){k(a.message)}}),H(e.__WUJIE.plugins,"windowPropertyOverride",e)}function No(e){var t=e.__WUJIE;e.Node.prototype.addEventListener=function(r,n,o){var a=t.elementEventCacheMap.get(this);return a?a.find(function(i){return i.type===r&&i.handler===n})||a.push({type:r,handler:n,options:o}):t.elementEventCacheMap.set(this,[{type:r,handler:n,options:o}]),wt.call(this,r,n,o)},e.Node.prototype.removeEventListener=function(r,n,o){var a=t.elementEventCacheMap.get(this);if(a){var i=a==null?void 0:a.findIndex(function(l){return l.type===r&&l.handler===n});a.splice(i,1)}return a!=null&&a.length||t.elementEventCacheMap.delete(this),Ve.call(this,r,n,o)}}function Wo(e,t){for(var r=t.__WUJIE,n=new WeakMap,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null,!1),a=o.currentNode;a;){var i=r.elementEventCacheMap.get(a);i!=null&&i.length&&(n.set(a,i),i.forEach(function(l){a.addEventListener(l.type,l.handler,l.options)})),a=o.nextNode()}r.elementEventCacheMap=n}function Jo(e,t,r){var n=r.__WUJIE,o=new WeakMap,a=n.elementEventCacheMap.get(e);a!=null&&a.length&&(o.set(t,a),a.forEach(function(i){t.addEventListener(i.type,i.handler,i.options)})),n.elementEventCacheMap=o}function Yr(e,t){Object.defineProperty(e.Event.prototype,"timeStamp",{get:function(){return t.document.createEvent("Event").timeStamp}})}function ko(e){var t=e.__WUJIE,r=new WeakMap,n=new WeakMap;e.Document.prototype.addEventListener=function(d,p,g){if(p){var v=r.get(p),m=n.get(p);if(v||(v=typeof p=="function"?p.bind(this):p,r.set(p,v)),m?m.includes(d)||m.push(d):n.set(p,[d]),H(e.__WUJIE.plugins,"documentAddEventListenerHook",e,d,v,g),Dt.includes(d))return wt.call(this,d,v,g);if(t.degrade)return t.document.addEventListener(d,v,g);if(Nt.includes(d))return window.document.addEventListener(d,v,g);if(Wt.includes(d)){window.document.addEventListener(d,v,g),t.shadowRoot.addEventListener(d,v,g);return}t.shadowRoot.addEventListener(d,v,g)}},e.Document.prototype.removeEventListener=function(d,p,g){var v=r.get(p),m=n.get(p);if(v){if(m!=null&&m.includes(d)&&(m.splice(m.indexOf(d),1),m.length||(r.delete(p),n.delete(p))),H(e.__WUJIE.plugins,"documentRemoveEventListenerHook",e,d,v,g),Dt.includes(d))return Ve.call(this,d,v,g);if(t.degrade)return t.document.removeEventListener(d,v,g);if(Nt.includes(d))return window.document.removeEventListener(d,v,g);if(Wt.includes(d)){window.document.removeEventListener(d,v,g),t.shadowRoot.removeEventListener(d,v,g);return}t.shadowRoot.removeEventListener(d,v,g)}};var o=Object.keys(e.HTMLElement.prototype).filter(function(d){return/^on/.test(d)}),a=Object.keys(e.Document.prototype).filter(function(d){return/^on/.test(d)}).filter(function(d){return!fo.includes(d)});o.filter(function(d){return a.includes(d)}).forEach(function(d){var p=Object.getOwnPropertyDescriptor(e.Document.prototype,d)||{enumerable:!0,writable:!0};try{Object.defineProperty(e.Document.prototype,d,{enumerable:p.enumerable,configurable:!0,get:function(){return t.degrade?t.document[d]:t.shadowRoot.firstElementChild[d]},set:p.writable||p.set?function(g){var v=typeof g=="function"?g.bind(e.document):g;t.degrade?t.document[d]=v:t.shadowRoot.firstElementChild[d]=v}:void 0})}catch(g){k(g.message)}});var i=M.ownerProperties,l=M.modifyProperties,c=M.shadowProperties,u=M.shadowMethods,s=M.documentProperties,h=M.documentMethods,f=M.documentEvents;l.concat(c,u,s,h).forEach(function(d){var p=Object.getOwnPropertyDescriptor(e.Document