const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BlackGold-CTblRGfI.js","assets/vendor-element-CbJWrKZ5.js","assets/vendor-core-DQkwEQyE.js","assets/vendor-core-BgDCIyLK.css","assets/vendor-element-Cbi4Z3M5.css","assets/SiteBrand.vue_vue_type_script_setup_true_lang-DNMU2Tgr.js","assets/index-DOwSoTEN.js","assets/index-DKspHpXp.css","assets/logo-5brww2_a.js","assets/knowledge-gi0FPtxW.js","assets/order-BwqJ7FLd.js","assets/complaint-Daprbxab.js","assets/common-ByLmgyGH.js","assets/format-BSrYeaol.js","assets/SpringFestival-CnCYBdGM.js","assets/SpringFestival-BcvZZrbM.css","assets/Enterprise-3KxrjrUC.js","assets/ReceiptConfirmDialog.vue_vue_type_script_setup_true_lang-BkeZQ0Ns.js","assets/index-CCeSfzFn.js","assets/index.vue_vue_type_script_setup_true_lang-DNI7ZnzO.js","assets/vendor-icons-UloWw-8i.js","assets/vendor-icons-CvN5L4W7.css","assets/index-D9n6ffNf.css","assets/Enterprise-_YJvZu_u.css","assets/Default-CQ10nkDd.js"])))=>i.map(i=>d[i]);
var t=(t,e,r)=>new Promise((n,o)=>{var s=t=>{try{a(r.next(t))}catch(e){o(e)}},i=t=>{try{a(r.throw(t))}catch(e){o(e)}},a=t=>t.done?n(t.value):Promise.resolve(t.value).then(s,i);a((r=r.apply(t,e)).next())});import{J as e,u as r,_ as n}from"./index-DOwSoTEN.js";import{bE as o,bX as s,bY as i,q as a,c as l,D as d,v as c,I as u}from"./vendor-core-DQkwEQyE.js";import{d as m}from"./logo-5brww2_a.js";import"./vendor-element-CbJWrKZ5.js";const p={},f=(t,e,r)=>{const n=t.trim();if(!n)return"";const o=n.includes("<template")?n:`<template>${n}</template>`,s=e.trim()?`\n<style>${e}</style>`:"";if(!r.trim())return`${o}${s}`;var i;return`${o}${`\n<script setup lang="ts">\nimport { onMounted } from 'vue'\n${`\nonMounted(() => {\n  try {\n    const root = document.querySelector('[data-ext-theme-root]') || document.body\n    const fn = new Function('root', 'window', 'document', \`${i=r,String(i||"").replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}\`)\n    fn(root, window, document)\n  } catch (e) {\n    console.error('External theme runtime script failed:', e)\n  }\n})`}\n<\/script>`}${s}`},g=t=>{if(!t)return"";if(/^https?:\/\//i.test(t)||t.startsWith("data:"))return t;const e="undefined"!=typeof window?window.location.origin:"";if(t.startsWith("/src/")||t.startsWith("/assets/"))return e?`${e}${t}`:t;const r=String("").trim(),n=(()=>{if(!r)return e;try{return new URL(r,e||void 0).href}catch(t){return e}})();if(!n)return t.startsWith("/")?t:`/${t}`;try{return new URL(t,n).href}catch(o){return t.startsWith("/")?t:`/${t}`}},v=(t,e,r)=>{var n;const o=window.__ADVANCED_THEME_CONTEXT__||{},s=g(m),i=g(e.siteLogo||(null==(n=e.siteConfig)?void 0:n.site_logo)||"")||s,a={"{{siteName}}":e.siteName||"","{{siteLogo}}":i,"{{siteLogoImg}}":i?`<img src="${i}" alt="logo" />`:"","{{siteDescription}}":e.siteDescription||"","{{siteKeywords}}":e.siteKeywords||"","{{siteCopyright}}":e.siteCopyright||"","{{siteIcp}}":e.siteIcp||"","{{siteDianzeng}}":e.siteDianzeng||""};{const t=o.order||{};a["{{orderTradeNo}}"]=t.trade_no||"",a["{{orderStatus}}"]=t.status||"",a["{{orderAmount}}"]=t.amount||"",a["{{orderProductName}}"]=t.product_name||"",a["{{orderSearchWidget}}"]='\n<div class="order-search-widget" data-ext-order-widget>\n  <div class="flex flex-col gap-3">\n    <div class="flex flex-col sm:flex-row gap-2">\n      <input data-field="keyword" type="text" placeholder="请输入订单号或联系方式" class="flex-1 px-3 py-2 border rounded text-sm" />\n      <button data-action="submit" class="px-4 py-2 text-sm rounded bg-blue-600 text-white disabled:opacity-60" type="button">查询订单</button>\n    </div>\n    <div data-field="error" class="text-sm text-red-500"></div>\n    <div data-field="result" class="mt-4 space-y-3"></div>\n  </div>\n</div>'}let l=t;return Object.keys(a).forEach(t=>{const e=a[t];l=l.split(t).join(e)}),l},_=(r,n)=>t(null,null,function*(){const t=`${r}:${n}`;if(p[t])return p[t];try{const i=yield(o=r,s=n,e.get({url:"/api/theme/payload",params:{module:o,id:s}}));return p[t]=i||null,p[t]}catch(i){return p[t]=null,null}var o,s}),h=a({__name:"search",setup(e){const a=r(),m=l(()=>{const e=a.siteConfig.theme_order_query;return String(e||"").startsWith("ext_")?(l="order",d=e,o(()=>t(null,null,function*(){const t=r();yield t.fetchSiteConfig();const e=yield _(l,d),n=v(String((null==e?void 0:e.html)||""),t),o=v(String((null==e?void 0:e.css)||""),t),a=v(String((null==e?void 0:e.js)||""),t),c=`<div data-ext-theme-root>${n}</div>`;if(!n.trim()&&!o.trim()&&!a.trim())return{template:'<div class="p-10 text-center">Template content is empty or failed to load.</div>'};const u=f(c,o,a||""),m={moduleCache:{vue:i},getFile:()=>u,addStyle(t){const e=document.createElement("style");e.textContent=t;const r=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(e,r)}};return yield s("custom.vue",m)}))):o("black_gold"===e?()=>n(()=>import("./BlackGold-CTblRGfI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])):"spring_festival"===e?()=>n(()=>import("./SpringFestival-CnCYBdGM.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,10,11,12,13,15])):"enterprise"===e?()=>n(()=>import("./Enterprise-3KxrjrUC.js"),__vite__mapDeps([16,1,2,3,4,5,6,7,8,17,12,10,18,19,20,21,22,9,11,13,23])):()=>n(()=>import("./Default-CQ10nkDd.js"),__vite__mapDeps([24,1,2,3,4,9,10,6,7,11,12,13,5,8,18,19,20,21,22])));var l,d});return(t,e)=>(c(),d(u(m.value)))}});export{h as default};
