import{G as e,H as n,J as o,K as t}from"./index.fe40b928.js";const s=(n,o=!1,t)=>new Promise(((s,c)=>{let r=e();t&&(r=e().in(t)),r[o?"selectAll":"select"](n).boundingClientRect((function(e){return o&&Array.isArray(e)&&e.length||!o&&e?s(e):void c("找不到元素")})).exec()}));function c(e,s="navigateTo"){const c=e.query?`${e.path}?${function(e){let n="";for(const o of Object.keys(e)){const s=e[o],c=encodeURIComponent(o)+"=";if(!r(s))if(console.log(encodeURIComponent(o),t(s)),t(s)){for(const e of Object.keys(s))if(!r(s[e])){n+=encodeURIComponent(o+"["+e+"]")+"="+encodeURIComponent(s[e])+"&"}}else n+=c+encodeURIComponent(s)+"&"}return n.slice(0,-1)}(e.query)}`:e.path;"navigateTo"==s&&n({url:c}),"reLaunch"==s&&o({url:c})}const r=e=>null==e&&void 0===e;function i(...e){return function(){return new Promise(((n,o)=>{const t=e.values(),s=e=>{const c=t.next();c.done?n(e):Promise.resolve(c.value(e)).then(s).catch(o)};s()}))}}const a=(e,n="rpx")=>Object.is(Number(e),NaN)?e:`${e}${n}`;export{a,s as g,c as n,i as s};