@lark-apaas/miaoda-coding-sdk 0.0.15 → 0.0.16-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-runtime.dev.js +1 -1
- package/dist/design-runtime.js +1 -1
- package/dist/design-runtime.min.js +1 -1
- package/dist/doubao-runtime.dev.js +71 -31
- package/dist/doubao-runtime.js +71 -31
- package/dist/doubao-runtime.min.js +3 -3
- package/dist/runtime.dev.js +71 -31
- package/dist/runtime.js +71 -31
- package/dist/runtime.min.js +3 -3
- package/package.json +1 -1
|
@@ -761,7 +761,7 @@ var MiaodaRuntime = (() => {
|
|
|
761
761
|
__name(initCreativePvTracking, "initCreativePvTracking");
|
|
762
762
|
|
|
763
763
|
// src/design-runtime.ts
|
|
764
|
-
var version = "0.0.
|
|
764
|
+
var version = "0.0.16-beta.0";
|
|
765
765
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
766
766
|
if (!window.__CREATIVITY_RUNTIME__) {
|
|
767
767
|
window.__CREATIVITY_RUNTIME__ = true;
|
package/dist/design-runtime.js
CHANGED
|
@@ -761,7 +761,7 @@ var MiaodaRuntime = (() => {
|
|
|
761
761
|
__name(initCreativePvTracking, "initCreativePvTracking");
|
|
762
762
|
|
|
763
763
|
// src/design-runtime.ts
|
|
764
|
-
var version = "0.0.
|
|
764
|
+
var version = "0.0.16-beta.0";
|
|
765
765
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
766
766
|
if (!window.__CREATIVITY_RUNTIME__) {
|
|
767
767
|
window.__CREATIVITY_RUNTIME__ = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var MiaodaRuntime=(()=>{var y=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});var H=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},K=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!==r&&y(t,o,{get:()=>e[o],enumerable:!(n=U(e,o))||n.enumerable});return t};var X=t=>K(y({},"__esModule",{value:!0}),t);var _e={};H(_e,{name:()=>me,version:()=>he});var J=new Set(["text/babel","text/jsx"]),z=3e3,Y=15e3,q=1e3,G=20,P=!1;function A(){P||(P=!0,document.addEventListener("DOMContentLoaded",Q,{once:!0}))}i(A,"initCreativeBabelStages");function Q(){let t=W();if(!t.length)return;let e={fetchDur:0,transformDur:0,evalDur:0,externalCount:t.filter(o=>o.src).length},r={sent:!1,scriptsDone:!1,scriptsDoneAt:null,totalStart:null,renderStart:null,renderDur:null,takeover:!1,retries:0,hardTimer:null},n=window.Babel;if(!n||typeof n.transform!="function"||typeof n.disableScriptTags!="function"||e.externalCount>0&&typeof fetch!="function"){r.scriptsDone=!0,m(e,r);return}try{n.disableScriptTags()}catch{r.scriptsDone=!0,m(e,r);return}r.takeover=!0,r.totalStart=performance.now(),r.hardTimer=setTimeout(()=>m(e,r),Y),te(e,r),ee(n,t,e,r)}i(Q,"onDomContentLoaded");function W(){let t=document.getElementsByTagName("script"),e=[];for(let r=0;r<t.length;r++){let n=t[r];J.has((n.type||"").split(";")[0])&&e.push(n)}return e}i(W,"collectBabelScripts");function E(t,e){let r=t.getAttribute(e);return r===""?[]:r?r.split(",").map(n=>n.trim()):null}i(E,"attrList");function Z(t,e){var o,a,c;let r=t.getAttribute("data-type"),n={browsers:(o=E(t,"data-targets"))!=null?o:void 0};return r==="module"&&(n.esmodules="intersect"),{filename:e,presets:(a=E(t,"data-presets"))!=null?a:r==="module"?["react",["env",{modules:!1}]]:["react","env"],plugins:(c=E(t,"data-plugins"))!=null?c:["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline",sourceFileName:e,targets:n}}i(Z,"buildOptions");function ee(t,e,r,n){let o=0,a=i((l,d)=>{var h;let p;if(l.src)p=l.src;else{let f=l.getAttribute("data-module");f?p=f:(o++,p=o===1?"Inline Babel script":`Inline Babel script (${o})`)}try{let f=performance.now(),v=t.transform(d,Z(l,p)),b=performance.now(),g=document.createElement("script"),w=l.getAttribute("data-type");w&&g.setAttribute("type",w),l.nonce&&(g.nonce=l.nonce),g.text=(h=v==null?void 0:v.code)!=null?h:"",document.head.appendChild(g),r.transformDur+=b-f,r.evalDur+=performance.now()-b}catch(f){console.error("[creative-babel-stages] script failed:",p,f)}},"runOne"),c=0;for(;c<e.length&&!e[c].src;)a(e[c],e[c].innerHTML),c++;if(c>=e.length){D(r,n);return}let u=e.slice(c),s=u.map(l=>{if(!l.src)return Promise.resolve(l.innerHTML);let d=performance.now();return fetch(l.src).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(p=>(r.fetchDur+=performance.now()-d,p))});(async()=>{for(let l=0;l<u.length;l++){let d=null;try{d=await s[l]}catch(p){console.error("[creative-babel-stages] load failed:",u[l].src,p);continue}a(u[l],d)}D(r,n)})()}i(ee,"runScripts");function te(t,e){let r=window.ReactDOM;if(!r)return;let n=i(c=>{if(e.renderStart===null){e.renderStart=performance.now();try{let u=new MutationObserver(()=>{u.disconnect(),e.renderDur=performance.now()-e.renderStart,e.scriptsDone&&m(t,e)});u.observe(c,{childList:!0,subtree:!0})}catch{}}},"observeCommit"),o=r.createRoot;typeof o=="function"&&(r.createRoot=(c,u)=>{let s=o.call(r,c,u),l=s.render.bind(s);return s.render=d=>(n(c),l(d)),s});let a=r.render;typeof a=="function"&&(r.render=(c,u,s)=>(n(u),a.call(r,c,u,s)))}i(te,"instrumentRender");function D(t,e){e.scriptsDone=!0,e.scriptsDoneAt=performance.now(),e.renderStart===null||e.renderDur!==null?m(t,e):setTimeout(()=>m(t,e),z)}i(D,"onScriptsDone");function m(t,e){var a;if(e.sent)return;let r=window.Slardar;if(!r){e.retries++<G&&setTimeout(()=>m(t,e),q);return}e.sent=!0,e.hardTimer!==null&&clearTimeout(e.hardTimer);let n=e.renderDur!==null&&e.renderStart!==null?e.renderStart+e.renderDur:(a=e.scriptsDoneAt)!=null?a:performance.now(),o=e.totalStart===null?0:Math.max(0,n-e.totalStart);r("sendEvent",{name:"creative_babel_stages",metrics:{babel_total_dur:Math.round(o),babel_fetch_dur:Math.round(t.fetchDur),babel_transform_dur:Math.round(t.transformDur),babel_eval_dur:Math.round(t.evalDur)},categories:{takeover:String(e.takeover),external:String(t.externalCount>0),render_observed:String(e.renderDur!==null)}})}i(m,"trySend");var re="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js",R=!1;function M(){if(R)return;if(R=!0,window.Slardar){x();return}let t=document.createElement("script");t.src=re,t.onload=()=>{window.Slardar&&x()},t.onerror=()=>{},document.head.appendChild(t)}i(M,"initCreativePerf");function x(){var o,a,c;let t=window.Slardar;if(!t)return;let e=null;t("context.merge",{app_id:(o=window.__appId__)!=null?o:"",creative_type:(a=window.__creativeType__)!=null?a:"unknown",is_public:String((c=window.__isExternallyVisible__)!=null?c:!1)}),t("init",{bid:"apaas_miaoda",env:window.ENVIRONMENT||"online"}),t("start");try{new PerformanceObserver(u=>{for(let s of u.getEntries())if(s.name==="first-contentful-paint"){e=s.startTime,t("context.merge",{has_painted:"true"});break}}).observe({type:"paint",buffered:!0})}catch{}let r=!1,n=i(()=>{if(r||!window.Slardar)return;r=!0;let u=performance.getEntriesByType("resource"),s=performance.getEntriesByType("navigation")[0],l=e!=null?e:ne(),d={transfer_size:u.reduce((p,h)=>{var f;return p+((f=h.transferSize)!=null?f:0)},0)};s&&s.domContentLoadedEventEnd>=s.responseStart&&(d.ttfb_to_dom_ready_dur=Math.round(s.domContentLoadedEventEnd-s.responseStart)),s&&l!==null&&l>=s.domContentLoadedEventEnd&&(d.render_to_fcp_dur=Math.round(l-s.domContentLoadedEventEnd)),window.Slardar("sendEvent",{name:"creative_perf",metrics:d})},"send");window.addEventListener("load",()=>setTimeout(n,500)),setTimeout(n,15e3)}i(x,"bootstrap");function ne(){var r;let e=performance.getEntriesByType("paint").find(n=>n.name==="first-contentful-paint");return(r=e==null?void 0:e.startTime)!=null?r:null}i(ne,"getBufferedFcpStartTime");function k(){let t="inspector-id";document.addEventListener("DOMContentLoaded",()=>{let e=window.Babel;if(!e||!e.registerPlugin)return;let r=null,n=i(()=>{let a={},c=0;return document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach(u=>{let s=u.getAttribute("src");if(s){let l=s.split("?")[0],d=l.split("/").pop()||l;a[d]=d in a?"":l}else{c++;let l=c===1?"Inline Babel script":`Inline Babel script (${c})`;a[l]=u.getAttribute("data-filename")||`inline-${c-1}`}}),a},"buildFileMap");e.availablePlugins&&delete e.availablePlugins[t],e.registerPlugin(t,({types:a})=>({visitor:{JSXOpeningElement(c,u){let s=c.node;if(s.name&&s.name.type==="JSXMemberExpression")return;for(let S=0;S<s.attributes.length;S++){let T=s.attributes[S];if(T.type==="JSXAttribute"&&T.name&&T.name.name==="data-inspector-id")return}let l=u.file&&u.file.opts&&u.file.opts.filename||"?";r===null&&(r=n());let d=l.split("?")[0],p=d.split("/").pop()||d,h=r[l]||r[p]||d.replace(/^\/?[a-z][a-z0-9+.-]*:\/{1,2}[^/]+/i,"").replace(/^\/+/,"")||l,f=s.loc&&s.loc.start,v=f?f.line:0,b=f?f.column+1:0,g=s.name&&s.name.type==="JSXIdentifier"?s.name.name:h,w=`jsx:${h}:${g}:${v}:${b}`;s.attributes.push(a.jsxAttribute(a.jsxIdentifier("data-inspector-id"),a.stringLiteral(w)))}}}));let o="";try{let a=document.getElementById("__srcmap");if(a&&a.textContent){let c=JSON.parse(a.textContent),u=c==null?void 0:c.file;typeof u=="string"&&(o=u)}}catch{}document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach((a,c)=>{let u=a.getAttribute("data-plugins")||"";if(u.indexOf(t)<0&&a.setAttribute("data-plugins",u?`${u},${t}`:t),!a.hasAttribute("data-filename")){let s=o?`${o}#inline-${c}`:`inline-${c}`;a.setAttribute("data-filename",a.getAttribute("src")||s)}})})}i(k,"registerInspectorIdPlugin");function C(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(C,"generateUUID");var L="x_sdk_device_id";function ie(){try{let t=localStorage.getItem(L);return t||(t=C(),localStorage.setItem(L,t)),t}catch{return C()}}i(ie,"getDeviceId");function oe(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(oe,"getDeviceType");var se="pageSessionID";function ae(){try{return new URLSearchParams(window.location.search).get(se)||""}catch{return""}}i(ae,"getPvId");function ce(t={}){let e=t.pvId||ae();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:ie(),module:"app_web",app_env:"runtime",source_type:"user",device_type:oe(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(ce,"getDefaultAttributes");function N(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(N,"toNanoString");var le="1.0.2";function ue(t,e){let r=ce(e),n=N(Date.now());return{metricsData:{resource:{attributes:{sdk_version:le,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(o=>({attributes:{...r,url:o.url,path:o.path,referrer:o.referrer},startTimeUnixNano:N(o.timestampMs),timeUnixNano:n,asDouble:1}))}}]}}}i(ue,"buildPayload");function de(t,e,r={},n){if(e.length===0)return;let o;try{o=JSON.stringify(ue(e,n))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...r},body:o,keepalive:!0}).catch(()=>{})}catch{}}i(de,"sendPvData");var I="__APAAS_PV_TRACKER_STARTED__";function pe(){try{let t=window;return t[I]?!1:(t[I]=!0,!0)}catch{return!0}}i(pe,"claimPvReporting");function B(){try{window[I]=!1}catch{}}i(B,"releasePvReporting");var _,fe=(_=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new _),this._instance}start(e){var r;if(!this.started&&pe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let n=(r=e.flushIntervalMs)!=null?r:1e4;this.flushTimer=setInterval(()=>this.flush(),n)}catch(n){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,B(),n}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,B())}pageKey(){let{origin:e,pathname:r,search:n}=window.location;return`${e}${r}${n}`}scheduleFirstFlush(){var e;let r=(e=this.config)==null?void 0:e.firstFlushDelayMs;r==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),r))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);de(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let r=history[e],n=i(()=>this.recordPv(),"recordPv");history[e]=function(...o){let a=r.apply(this,o);return n(),a},this.disposers.push(()=>{history[e]=r})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let r=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",r),this.disposers.push(()=>window.removeEventListener("pagehide",r))}},i(_,"_PvTracker"),_),O=fe.instance;function $(){return window.appId||null}i($,"getAppId");function F(){var e;let t=(e=$())!=null?e:"";O.start({collectorUrl:`/app/${t}/__runtime__/api/v1/observability/metrics/collect`,firstFlushDelayMs:1e3})}i(F,"initCreativePvTracking");var he="0.0.15",me="@lark-apaas/miaoda-coding-sdk";window.__CREATIVITY_RUNTIME__||(window.__CREATIVITY_RUNTIME__=!0,k(),M(),F(),A());return X(_e);})();
|
|
1
|
+
"use strict";var MiaodaRuntime=(()=>{var y=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});var H=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},K=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!==r&&y(t,o,{get:()=>e[o],enumerable:!(n=U(e,o))||n.enumerable});return t};var X=t=>K(y({},"__esModule",{value:!0}),t);var _e={};H(_e,{name:()=>me,version:()=>he});var J=new Set(["text/babel","text/jsx"]),z=3e3,Y=15e3,q=1e3,G=20,P=!1;function A(){P||(P=!0,document.addEventListener("DOMContentLoaded",Q,{once:!0}))}i(A,"initCreativeBabelStages");function Q(){let t=W();if(!t.length)return;let e={fetchDur:0,transformDur:0,evalDur:0,externalCount:t.filter(o=>o.src).length},r={sent:!1,scriptsDone:!1,scriptsDoneAt:null,totalStart:null,renderStart:null,renderDur:null,takeover:!1,retries:0,hardTimer:null},n=window.Babel;if(!n||typeof n.transform!="function"||typeof n.disableScriptTags!="function"||e.externalCount>0&&typeof fetch!="function"){r.scriptsDone=!0,m(e,r);return}try{n.disableScriptTags()}catch{r.scriptsDone=!0,m(e,r);return}r.takeover=!0,r.totalStart=performance.now(),r.hardTimer=setTimeout(()=>m(e,r),Y),te(e,r),ee(n,t,e,r)}i(Q,"onDomContentLoaded");function W(){let t=document.getElementsByTagName("script"),e=[];for(let r=0;r<t.length;r++){let n=t[r];J.has((n.type||"").split(";")[0])&&e.push(n)}return e}i(W,"collectBabelScripts");function E(t,e){let r=t.getAttribute(e);return r===""?[]:r?r.split(",").map(n=>n.trim()):null}i(E,"attrList");function Z(t,e){var o,a,c;let r=t.getAttribute("data-type"),n={browsers:(o=E(t,"data-targets"))!=null?o:void 0};return r==="module"&&(n.esmodules="intersect"),{filename:e,presets:(a=E(t,"data-presets"))!=null?a:r==="module"?["react",["env",{modules:!1}]]:["react","env"],plugins:(c=E(t,"data-plugins"))!=null?c:["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline",sourceFileName:e,targets:n}}i(Z,"buildOptions");function ee(t,e,r,n){let o=0,a=i((l,d)=>{var h;let p;if(l.src)p=l.src;else{let f=l.getAttribute("data-module");f?p=f:(o++,p=o===1?"Inline Babel script":`Inline Babel script (${o})`)}try{let f=performance.now(),v=t.transform(d,Z(l,p)),b=performance.now(),g=document.createElement("script"),w=l.getAttribute("data-type");w&&g.setAttribute("type",w),l.nonce&&(g.nonce=l.nonce),g.text=(h=v==null?void 0:v.code)!=null?h:"",document.head.appendChild(g),r.transformDur+=b-f,r.evalDur+=performance.now()-b}catch(f){console.error("[creative-babel-stages] script failed:",p,f)}},"runOne"),c=0;for(;c<e.length&&!e[c].src;)a(e[c],e[c].innerHTML),c++;if(c>=e.length){D(r,n);return}let u=e.slice(c),s=u.map(l=>{if(!l.src)return Promise.resolve(l.innerHTML);let d=performance.now();return fetch(l.src).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(p=>(r.fetchDur+=performance.now()-d,p))});(async()=>{for(let l=0;l<u.length;l++){let d=null;try{d=await s[l]}catch(p){console.error("[creative-babel-stages] load failed:",u[l].src,p);continue}a(u[l],d)}D(r,n)})()}i(ee,"runScripts");function te(t,e){let r=window.ReactDOM;if(!r)return;let n=i(c=>{if(e.renderStart===null){e.renderStart=performance.now();try{let u=new MutationObserver(()=>{u.disconnect(),e.renderDur=performance.now()-e.renderStart,e.scriptsDone&&m(t,e)});u.observe(c,{childList:!0,subtree:!0})}catch{}}},"observeCommit"),o=r.createRoot;typeof o=="function"&&(r.createRoot=(c,u)=>{let s=o.call(r,c,u),l=s.render.bind(s);return s.render=d=>(n(c),l(d)),s});let a=r.render;typeof a=="function"&&(r.render=(c,u,s)=>(n(u),a.call(r,c,u,s)))}i(te,"instrumentRender");function D(t,e){e.scriptsDone=!0,e.scriptsDoneAt=performance.now(),e.renderStart===null||e.renderDur!==null?m(t,e):setTimeout(()=>m(t,e),z)}i(D,"onScriptsDone");function m(t,e){var a;if(e.sent)return;let r=window.Slardar;if(!r){e.retries++<G&&setTimeout(()=>m(t,e),q);return}e.sent=!0,e.hardTimer!==null&&clearTimeout(e.hardTimer);let n=e.renderDur!==null&&e.renderStart!==null?e.renderStart+e.renderDur:(a=e.scriptsDoneAt)!=null?a:performance.now(),o=e.totalStart===null?0:Math.max(0,n-e.totalStart);r("sendEvent",{name:"creative_babel_stages",metrics:{babel_total_dur:Math.round(o),babel_fetch_dur:Math.round(t.fetchDur),babel_transform_dur:Math.round(t.transformDur),babel_eval_dur:Math.round(t.evalDur)},categories:{takeover:String(e.takeover),external:String(t.externalCount>0),render_observed:String(e.renderDur!==null)}})}i(m,"trySend");var re="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js",R=!1;function M(){if(R)return;if(R=!0,window.Slardar){x();return}let t=document.createElement("script");t.src=re,t.onload=()=>{window.Slardar&&x()},t.onerror=()=>{},document.head.appendChild(t)}i(M,"initCreativePerf");function x(){var o,a,c;let t=window.Slardar;if(!t)return;let e=null;t("context.merge",{app_id:(o=window.__appId__)!=null?o:"",creative_type:(a=window.__creativeType__)!=null?a:"unknown",is_public:String((c=window.__isExternallyVisible__)!=null?c:!1)}),t("init",{bid:"apaas_miaoda",env:window.ENVIRONMENT||"online"}),t("start");try{new PerformanceObserver(u=>{for(let s of u.getEntries())if(s.name==="first-contentful-paint"){e=s.startTime,t("context.merge",{has_painted:"true"});break}}).observe({type:"paint",buffered:!0})}catch{}let r=!1,n=i(()=>{if(r||!window.Slardar)return;r=!0;let u=performance.getEntriesByType("resource"),s=performance.getEntriesByType("navigation")[0],l=e!=null?e:ne(),d={transfer_size:u.reduce((p,h)=>{var f;return p+((f=h.transferSize)!=null?f:0)},0)};s&&s.domContentLoadedEventEnd>=s.responseStart&&(d.ttfb_to_dom_ready_dur=Math.round(s.domContentLoadedEventEnd-s.responseStart)),s&&l!==null&&l>=s.domContentLoadedEventEnd&&(d.render_to_fcp_dur=Math.round(l-s.domContentLoadedEventEnd)),window.Slardar("sendEvent",{name:"creative_perf",metrics:d})},"send");window.addEventListener("load",()=>setTimeout(n,500)),setTimeout(n,15e3)}i(x,"bootstrap");function ne(){var r;let e=performance.getEntriesByType("paint").find(n=>n.name==="first-contentful-paint");return(r=e==null?void 0:e.startTime)!=null?r:null}i(ne,"getBufferedFcpStartTime");function k(){let t="inspector-id";document.addEventListener("DOMContentLoaded",()=>{let e=window.Babel;if(!e||!e.registerPlugin)return;let r=null,n=i(()=>{let a={},c=0;return document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach(u=>{let s=u.getAttribute("src");if(s){let l=s.split("?")[0],d=l.split("/").pop()||l;a[d]=d in a?"":l}else{c++;let l=c===1?"Inline Babel script":`Inline Babel script (${c})`;a[l]=u.getAttribute("data-filename")||`inline-${c-1}`}}),a},"buildFileMap");e.availablePlugins&&delete e.availablePlugins[t],e.registerPlugin(t,({types:a})=>({visitor:{JSXOpeningElement(c,u){let s=c.node;if(s.name&&s.name.type==="JSXMemberExpression")return;for(let S=0;S<s.attributes.length;S++){let T=s.attributes[S];if(T.type==="JSXAttribute"&&T.name&&T.name.name==="data-inspector-id")return}let l=u.file&&u.file.opts&&u.file.opts.filename||"?";r===null&&(r=n());let d=l.split("?")[0],p=d.split("/").pop()||d,h=r[l]||r[p]||d.replace(/^\/?[a-z][a-z0-9+.-]*:\/{1,2}[^/]+/i,"").replace(/^\/+/,"")||l,f=s.loc&&s.loc.start,v=f?f.line:0,b=f?f.column+1:0,g=s.name&&s.name.type==="JSXIdentifier"?s.name.name:h,w=`jsx:${h}:${g}:${v}:${b}`;s.attributes.push(a.jsxAttribute(a.jsxIdentifier("data-inspector-id"),a.stringLiteral(w)))}}}));let o="";try{let a=document.getElementById("__srcmap");if(a&&a.textContent){let c=JSON.parse(a.textContent),u=c==null?void 0:c.file;typeof u=="string"&&(o=u)}}catch{}document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach((a,c)=>{let u=a.getAttribute("data-plugins")||"";if(u.indexOf(t)<0&&a.setAttribute("data-plugins",u?`${u},${t}`:t),!a.hasAttribute("data-filename")){let s=o?`${o}#inline-${c}`:`inline-${c}`;a.setAttribute("data-filename",a.getAttribute("src")||s)}})})}i(k,"registerInspectorIdPlugin");function C(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(C,"generateUUID");var L="x_sdk_device_id";function ie(){try{let t=localStorage.getItem(L);return t||(t=C(),localStorage.setItem(L,t)),t}catch{return C()}}i(ie,"getDeviceId");function oe(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(oe,"getDeviceType");var se="pageSessionID";function ae(){try{return new URLSearchParams(window.location.search).get(se)||""}catch{return""}}i(ae,"getPvId");function ce(t={}){let e=t.pvId||ae();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:ie(),module:"app_web",app_env:"runtime",source_type:"user",device_type:oe(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(ce,"getDefaultAttributes");function N(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(N,"toNanoString");var le="1.0.2";function ue(t,e){let r=ce(e),n=N(Date.now());return{metricsData:{resource:{attributes:{sdk_version:le,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(o=>({attributes:{...r,url:o.url,path:o.path,referrer:o.referrer},startTimeUnixNano:N(o.timestampMs),timeUnixNano:n,asDouble:1}))}}]}}}i(ue,"buildPayload");function de(t,e,r={},n){if(e.length===0)return;let o;try{o=JSON.stringify(ue(e,n))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...r},body:o,keepalive:!0}).catch(()=>{})}catch{}}i(de,"sendPvData");var I="__APAAS_PV_TRACKER_STARTED__";function pe(){try{let t=window;return t[I]?!1:(t[I]=!0,!0)}catch{return!0}}i(pe,"claimPvReporting");function B(){try{window[I]=!1}catch{}}i(B,"releasePvReporting");var _,fe=(_=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new _),this._instance}start(e){var r;if(!this.started&&pe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let n=(r=e.flushIntervalMs)!=null?r:1e4;this.flushTimer=setInterval(()=>this.flush(),n)}catch(n){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,B(),n}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,B())}pageKey(){let{origin:e,pathname:r,search:n}=window.location;return`${e}${r}${n}`}scheduleFirstFlush(){var e;let r=(e=this.config)==null?void 0:e.firstFlushDelayMs;r==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),r))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);de(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let r=history[e],n=i(()=>this.recordPv(),"recordPv");history[e]=function(...o){let a=r.apply(this,o);return n(),a},this.disposers.push(()=>{history[e]=r})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let r=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",r),this.disposers.push(()=>window.removeEventListener("pagehide",r))}},i(_,"_PvTracker"),_),O=fe.instance;function $(){return window.appId||null}i($,"getAppId");function F(){var e;let t=(e=$())!=null?e:"";O.start({collectorUrl:`/app/${t}/__runtime__/api/v1/observability/metrics/collect`,firstFlushDelayMs:1e3})}i(F,"initCreativePvTracking");var he="0.0.16-beta.0",me="@lark-apaas/miaoda-coding-sdk";window.__CREATIVITY_RUNTIME__||(window.__CREATIVITY_RUNTIME__=!0,k(),M(),F(),A());return X(_e);})();
|
|
@@ -1510,18 +1510,22 @@ var MiaodaRuntime = (() => {
|
|
|
1510
1510
|
// src/runtime/watermark.ts
|
|
1511
1511
|
var CDN = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp";
|
|
1512
1512
|
var DOUBAO_LOGO_SRC = `${CDN}/miaoda-ui/doubao.svg`;
|
|
1513
|
+
var DOUBAO_BRAND_TEXT_SRC = `${CDN}/miaoda-ui/Union.png`;
|
|
1513
1514
|
var MIAODA_LOGO_SRC = `${CDN}/logo/miaodalogo.svg`;
|
|
1514
1515
|
var CLOSE_ICON_SVG = '<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>';
|
|
1515
1516
|
var FEEDBACK_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>';
|
|
1517
|
+
var REPORT_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.13397 2.5C7.51887 1.83333 8.48113 1.83333 8.86603 2.5L14.0622 11.5C14.4471 12.1667 13.966 13 13.1962 13H2.80385C2.03405 13 1.55292 12.1667 1.93782 11.5L7.13397 2.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/><path d="M8 6.16667V8.83333" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><circle cx="8" cy="10.6667" r="0.6667" fill="currentColor"/></svg>';
|
|
1518
|
+
var DOUBAO_CLOSE_ICON_SVG = '<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.91685 2.08234C10.2097 2.37519 10.2096 2.8501 9.91685 3.143L7.06253 5.99732L9.91858 8.85337C10.2114 9.14627 10.2115 9.62115 9.91858 9.91403C9.62568 10.2068 9.15076 10.2068 8.85792 9.91403L6.00187 7.05798L3.14444 9.91541C2.85155 10.2083 2.37667 10.2083 2.08378 9.91541C1.791 9.62251 1.79093 9.14761 2.08378 8.85475L4.94121 5.99732L2.08551 3.14162C1.79267 2.84878 1.79278 2.37387 2.08551 2.08096C2.3784 1.78807 2.85327 1.78807 3.14617 2.08096L6.00187 4.93666L8.85619 2.08234C9.14906 1.78961 9.62399 1.7896 9.91685 2.08234Z" fill="white" fill-opacity="0.3"/></svg>';
|
|
1516
1519
|
var DOWNLOAD_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>';
|
|
1517
1520
|
var EFFICIENCY_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>';
|
|
1518
1521
|
var REPORT_ENABLED = true;
|
|
1519
1522
|
var PILL_SHADOW = "0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1520
1523
|
var CARD_SHADOW = "0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1521
1524
|
var FONT_FAMILY = "'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1525
|
+
var DOUBAO_FONT_FAMILY = "'Doubao Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1522
1526
|
var VARIANT_CONFIG = {
|
|
1523
1527
|
doubao: {
|
|
1524
|
-
brandText: "\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",
|
|
1528
|
+
brandText: "\u8C46\u5305\u5DE5\u4F5C AI \u751F\u6210",
|
|
1525
1529
|
logoSrc: DOUBAO_LOGO_SRC,
|
|
1526
1530
|
downloadUrl: "https://ugapk.com/FCtLH"
|
|
1527
1531
|
},
|
|
@@ -1550,6 +1554,7 @@ var MiaodaRuntime = (() => {
|
|
|
1550
1554
|
__name(openReport, "openReport");
|
|
1551
1555
|
var ICON_SVG_MAP = {
|
|
1552
1556
|
feedback: FEEDBACK_ICON_SVG,
|
|
1557
|
+
report: REPORT_ICON_SVG,
|
|
1553
1558
|
close: CLOSE_ICON_SVG,
|
|
1554
1559
|
download: DOWNLOAD_ICON_SVG,
|
|
1555
1560
|
efficiency: EFFICIENCY_ICON_SVG
|
|
@@ -1607,31 +1612,61 @@ var MiaodaRuntime = (() => {
|
|
|
1607
1612
|
__name(makeLogo, "makeLogo");
|
|
1608
1613
|
function buildPill(variant, platform, onClose) {
|
|
1609
1614
|
const isDesktop = platform === "desktop";
|
|
1615
|
+
const isDoubao = variant === "doubao";
|
|
1610
1616
|
const config = VARIANT_CONFIG[variant];
|
|
1611
1617
|
const pill = document.createElement("div");
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1618
|
+
if (isDoubao) {
|
|
1619
|
+
Object.assign(pill.style, {
|
|
1620
|
+
boxSizing: "border-box",
|
|
1621
|
+
display: "inline-flex",
|
|
1622
|
+
alignItems: "center",
|
|
1623
|
+
gap: "3.4px",
|
|
1624
|
+
padding: isDesktop ? "5px 10px 5px 7px" : "6px 12px 6px 8px",
|
|
1625
|
+
background: "rgba(77,77,77,0.7)",
|
|
1626
|
+
borderRadius: "8.5px",
|
|
1627
|
+
cursor: "pointer"
|
|
1628
|
+
});
|
|
1629
|
+
} else {
|
|
1630
|
+
Object.assign(pill.style, {
|
|
1631
|
+
boxSizing: "border-box",
|
|
1632
|
+
display: "inline-flex",
|
|
1633
|
+
alignItems: "center",
|
|
1634
|
+
gap: "4px",
|
|
1635
|
+
padding: isDesktop ? "6px 12px 6px 8px" : "5px 12px 5px 8px",
|
|
1636
|
+
background: "#363636",
|
|
1637
|
+
border: "0.5px solid rgba(255,255,255,0.1)",
|
|
1638
|
+
borderRadius: "100px",
|
|
1639
|
+
boxShadow: PILL_SHADOW,
|
|
1640
|
+
cursor: "pointer"
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
const logo = makeLogo(config.logoSrc, isDoubao ? 17 : 16);
|
|
1644
|
+
let brandEl;
|
|
1645
|
+
if (isDoubao) {
|
|
1646
|
+
const img = document.createElement("img");
|
|
1647
|
+
img.src = DOUBAO_BRAND_TEXT_SRC;
|
|
1648
|
+
img.alt = config.brandText;
|
|
1649
|
+
img.draggable = false;
|
|
1650
|
+
Object.assign(img.style, {
|
|
1651
|
+
height: isDesktop ? "12px" : "14px",
|
|
1652
|
+
width: "auto",
|
|
1653
|
+
display: "block",
|
|
1654
|
+
flexShrink: "0"
|
|
1655
|
+
});
|
|
1656
|
+
brandEl = img;
|
|
1657
|
+
} else {
|
|
1658
|
+
const span = document.createElement("span");
|
|
1659
|
+
span.textContent = config.brandText;
|
|
1660
|
+
Object.assign(span.style, {
|
|
1661
|
+
fontFamily: FONT_FAMILY,
|
|
1662
|
+
fontSize: isDesktop ? "12px" : "14px",
|
|
1663
|
+
lineHeight: isDesktop ? "18px" : "22px",
|
|
1664
|
+
color: "rgba(255,255,255,0.85)",
|
|
1665
|
+
whiteSpace: "nowrap"
|
|
1666
|
+
});
|
|
1667
|
+
brandEl = span;
|
|
1668
|
+
}
|
|
1669
|
+
pill.append(logo, brandEl);
|
|
1635
1670
|
if (isDesktop && onClose) {
|
|
1636
1671
|
const close = document.createElement("span");
|
|
1637
1672
|
close.setAttribute("role", "button");
|
|
@@ -1641,10 +1676,14 @@ var MiaodaRuntime = (() => {
|
|
|
1641
1676
|
display: "none",
|
|
1642
1677
|
alignItems: "center",
|
|
1643
1678
|
cursor: "pointer",
|
|
1644
|
-
flexShrink: "0"
|
|
1645
|
-
color: "rgba(255,255,255,0.5)"
|
|
1679
|
+
flexShrink: "0"
|
|
1646
1680
|
});
|
|
1647
|
-
|
|
1681
|
+
if (isDoubao) {
|
|
1682
|
+
close.innerHTML = DOUBAO_CLOSE_ICON_SVG;
|
|
1683
|
+
} else {
|
|
1684
|
+
close.style.color = "rgba(255,255,255,0.5)";
|
|
1685
|
+
close.appendChild(makeCloseIcon(10));
|
|
1686
|
+
}
|
|
1648
1687
|
close.addEventListener("click", (e) => {
|
|
1649
1688
|
e.stopPropagation();
|
|
1650
1689
|
onClose();
|
|
@@ -1754,6 +1793,7 @@ var MiaodaRuntime = (() => {
|
|
|
1754
1793
|
const shadow = host.attachShadow({
|
|
1755
1794
|
mode: "open"
|
|
1756
1795
|
});
|
|
1796
|
+
const fontFamily = variant === "doubao" ? DOUBAO_FONT_FAMILY : FONT_FAMILY;
|
|
1757
1797
|
const style = document.createElement("style");
|
|
1758
1798
|
style.textContent = `
|
|
1759
1799
|
:host {
|
|
@@ -1771,7 +1811,7 @@ var MiaodaRuntime = (() => {
|
|
|
1771
1811
|
all: initial;
|
|
1772
1812
|
direction: ltr;
|
|
1773
1813
|
unicode-bidi: isolate;
|
|
1774
|
-
font-family: ${
|
|
1814
|
+
font-family: ${fontFamily};
|
|
1775
1815
|
display: flex;
|
|
1776
1816
|
flex-direction: column;
|
|
1777
1817
|
align-items: flex-end;
|
|
@@ -1807,7 +1847,7 @@ var MiaodaRuntime = (() => {
|
|
|
1807
1847
|
}
|
|
1808
1848
|
if (REPORT_ENABLED) {
|
|
1809
1849
|
items.push(buildMenuRow({
|
|
1810
|
-
icon: "feedback",
|
|
1850
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1811
1851
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1812
1852
|
fontSize: 14,
|
|
1813
1853
|
onClick: openReport
|
|
@@ -1851,7 +1891,7 @@ var MiaodaRuntime = (() => {
|
|
|
1851
1891
|
}
|
|
1852
1892
|
if (REPORT_ENABLED) {
|
|
1853
1893
|
items.push(buildMenuRow({
|
|
1854
|
-
icon: "feedback",
|
|
1894
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1855
1895
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1856
1896
|
fontSize: 16,
|
|
1857
1897
|
onClick: openReport
|
|
@@ -1913,7 +1953,7 @@ var MiaodaRuntime = (() => {
|
|
|
1913
1953
|
__name(mountDoubaoWatermark, "mountDoubaoWatermark");
|
|
1914
1954
|
|
|
1915
1955
|
// src/doubao-runtime.ts
|
|
1916
|
-
var version = "0.0.
|
|
1956
|
+
var version = "0.0.16-beta.0";
|
|
1917
1957
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1918
1958
|
if (isOnlineEnv()) {
|
|
1919
1959
|
reportPageView();
|
package/dist/doubao-runtime.js
CHANGED
|
@@ -1510,18 +1510,22 @@ var MiaodaRuntime = (() => {
|
|
|
1510
1510
|
// src/runtime/watermark.ts
|
|
1511
1511
|
var CDN = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp";
|
|
1512
1512
|
var DOUBAO_LOGO_SRC = `${CDN}/miaoda-ui/doubao.svg`;
|
|
1513
|
+
var DOUBAO_BRAND_TEXT_SRC = `${CDN}/miaoda-ui/Union.png`;
|
|
1513
1514
|
var MIAODA_LOGO_SRC = `${CDN}/logo/miaodalogo.svg`;
|
|
1514
1515
|
var CLOSE_ICON_SVG = '<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>';
|
|
1515
1516
|
var FEEDBACK_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>';
|
|
1517
|
+
var REPORT_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.13397 2.5C7.51887 1.83333 8.48113 1.83333 8.86603 2.5L14.0622 11.5C14.4471 12.1667 13.966 13 13.1962 13H2.80385C2.03405 13 1.55292 12.1667 1.93782 11.5L7.13397 2.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/><path d="M8 6.16667V8.83333" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><circle cx="8" cy="10.6667" r="0.6667" fill="currentColor"/></svg>';
|
|
1518
|
+
var DOUBAO_CLOSE_ICON_SVG = '<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.91685 2.08234C10.2097 2.37519 10.2096 2.8501 9.91685 3.143L7.06253 5.99732L9.91858 8.85337C10.2114 9.14627 10.2115 9.62115 9.91858 9.91403C9.62568 10.2068 9.15076 10.2068 8.85792 9.91403L6.00187 7.05798L3.14444 9.91541C2.85155 10.2083 2.37667 10.2083 2.08378 9.91541C1.791 9.62251 1.79093 9.14761 2.08378 8.85475L4.94121 5.99732L2.08551 3.14162C1.79267 2.84878 1.79278 2.37387 2.08551 2.08096C2.3784 1.78807 2.85327 1.78807 3.14617 2.08096L6.00187 4.93666L8.85619 2.08234C9.14906 1.78961 9.62399 1.7896 9.91685 2.08234Z" fill="white" fill-opacity="0.3"/></svg>';
|
|
1516
1519
|
var DOWNLOAD_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>';
|
|
1517
1520
|
var EFFICIENCY_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>';
|
|
1518
1521
|
var REPORT_ENABLED = true;
|
|
1519
1522
|
var PILL_SHADOW = "0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1520
1523
|
var CARD_SHADOW = "0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1521
1524
|
var FONT_FAMILY = "'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1525
|
+
var DOUBAO_FONT_FAMILY = "'Doubao Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1522
1526
|
var VARIANT_CONFIG = {
|
|
1523
1527
|
doubao: {
|
|
1524
|
-
brandText: "\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",
|
|
1528
|
+
brandText: "\u8C46\u5305\u5DE5\u4F5C AI \u751F\u6210",
|
|
1525
1529
|
logoSrc: DOUBAO_LOGO_SRC,
|
|
1526
1530
|
downloadUrl: "https://ugapk.com/FCtLH"
|
|
1527
1531
|
},
|
|
@@ -1550,6 +1554,7 @@ var MiaodaRuntime = (() => {
|
|
|
1550
1554
|
__name(openReport, "openReport");
|
|
1551
1555
|
var ICON_SVG_MAP = {
|
|
1552
1556
|
feedback: FEEDBACK_ICON_SVG,
|
|
1557
|
+
report: REPORT_ICON_SVG,
|
|
1553
1558
|
close: CLOSE_ICON_SVG,
|
|
1554
1559
|
download: DOWNLOAD_ICON_SVG,
|
|
1555
1560
|
efficiency: EFFICIENCY_ICON_SVG
|
|
@@ -1607,31 +1612,61 @@ var MiaodaRuntime = (() => {
|
|
|
1607
1612
|
__name(makeLogo, "makeLogo");
|
|
1608
1613
|
function buildPill(variant, platform, onClose) {
|
|
1609
1614
|
const isDesktop = platform === "desktop";
|
|
1615
|
+
const isDoubao = variant === "doubao";
|
|
1610
1616
|
const config = VARIANT_CONFIG[variant];
|
|
1611
1617
|
const pill = document.createElement("div");
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1618
|
+
if (isDoubao) {
|
|
1619
|
+
Object.assign(pill.style, {
|
|
1620
|
+
boxSizing: "border-box",
|
|
1621
|
+
display: "inline-flex",
|
|
1622
|
+
alignItems: "center",
|
|
1623
|
+
gap: "3.4px",
|
|
1624
|
+
padding: isDesktop ? "5px 10px 5px 7px" : "6px 12px 6px 8px",
|
|
1625
|
+
background: "rgba(77,77,77,0.7)",
|
|
1626
|
+
borderRadius: "8.5px",
|
|
1627
|
+
cursor: "pointer"
|
|
1628
|
+
});
|
|
1629
|
+
} else {
|
|
1630
|
+
Object.assign(pill.style, {
|
|
1631
|
+
boxSizing: "border-box",
|
|
1632
|
+
display: "inline-flex",
|
|
1633
|
+
alignItems: "center",
|
|
1634
|
+
gap: "4px",
|
|
1635
|
+
padding: isDesktop ? "6px 12px 6px 8px" : "5px 12px 5px 8px",
|
|
1636
|
+
background: "#363636",
|
|
1637
|
+
border: "0.5px solid rgba(255,255,255,0.1)",
|
|
1638
|
+
borderRadius: "100px",
|
|
1639
|
+
boxShadow: PILL_SHADOW,
|
|
1640
|
+
cursor: "pointer"
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
const logo = makeLogo(config.logoSrc, isDoubao ? 17 : 16);
|
|
1644
|
+
let brandEl;
|
|
1645
|
+
if (isDoubao) {
|
|
1646
|
+
const img = document.createElement("img");
|
|
1647
|
+
img.src = DOUBAO_BRAND_TEXT_SRC;
|
|
1648
|
+
img.alt = config.brandText;
|
|
1649
|
+
img.draggable = false;
|
|
1650
|
+
Object.assign(img.style, {
|
|
1651
|
+
height: isDesktop ? "12px" : "14px",
|
|
1652
|
+
width: "auto",
|
|
1653
|
+
display: "block",
|
|
1654
|
+
flexShrink: "0"
|
|
1655
|
+
});
|
|
1656
|
+
brandEl = img;
|
|
1657
|
+
} else {
|
|
1658
|
+
const span = document.createElement("span");
|
|
1659
|
+
span.textContent = config.brandText;
|
|
1660
|
+
Object.assign(span.style, {
|
|
1661
|
+
fontFamily: FONT_FAMILY,
|
|
1662
|
+
fontSize: isDesktop ? "12px" : "14px",
|
|
1663
|
+
lineHeight: isDesktop ? "18px" : "22px",
|
|
1664
|
+
color: "rgba(255,255,255,0.85)",
|
|
1665
|
+
whiteSpace: "nowrap"
|
|
1666
|
+
});
|
|
1667
|
+
brandEl = span;
|
|
1668
|
+
}
|
|
1669
|
+
pill.append(logo, brandEl);
|
|
1635
1670
|
if (isDesktop && onClose) {
|
|
1636
1671
|
const close = document.createElement("span");
|
|
1637
1672
|
close.setAttribute("role", "button");
|
|
@@ -1641,10 +1676,14 @@ var MiaodaRuntime = (() => {
|
|
|
1641
1676
|
display: "none",
|
|
1642
1677
|
alignItems: "center",
|
|
1643
1678
|
cursor: "pointer",
|
|
1644
|
-
flexShrink: "0"
|
|
1645
|
-
color: "rgba(255,255,255,0.5)"
|
|
1679
|
+
flexShrink: "0"
|
|
1646
1680
|
});
|
|
1647
|
-
|
|
1681
|
+
if (isDoubao) {
|
|
1682
|
+
close.innerHTML = DOUBAO_CLOSE_ICON_SVG;
|
|
1683
|
+
} else {
|
|
1684
|
+
close.style.color = "rgba(255,255,255,0.5)";
|
|
1685
|
+
close.appendChild(makeCloseIcon(10));
|
|
1686
|
+
}
|
|
1648
1687
|
close.addEventListener("click", (e) => {
|
|
1649
1688
|
e.stopPropagation();
|
|
1650
1689
|
onClose();
|
|
@@ -1754,6 +1793,7 @@ var MiaodaRuntime = (() => {
|
|
|
1754
1793
|
const shadow = host.attachShadow({
|
|
1755
1794
|
mode: "open"
|
|
1756
1795
|
});
|
|
1796
|
+
const fontFamily = variant === "doubao" ? DOUBAO_FONT_FAMILY : FONT_FAMILY;
|
|
1757
1797
|
const style = document.createElement("style");
|
|
1758
1798
|
style.textContent = `
|
|
1759
1799
|
:host {
|
|
@@ -1771,7 +1811,7 @@ var MiaodaRuntime = (() => {
|
|
|
1771
1811
|
all: initial;
|
|
1772
1812
|
direction: ltr;
|
|
1773
1813
|
unicode-bidi: isolate;
|
|
1774
|
-
font-family: ${
|
|
1814
|
+
font-family: ${fontFamily};
|
|
1775
1815
|
display: flex;
|
|
1776
1816
|
flex-direction: column;
|
|
1777
1817
|
align-items: flex-end;
|
|
@@ -1807,7 +1847,7 @@ var MiaodaRuntime = (() => {
|
|
|
1807
1847
|
}
|
|
1808
1848
|
if (REPORT_ENABLED) {
|
|
1809
1849
|
items.push(buildMenuRow({
|
|
1810
|
-
icon: "feedback",
|
|
1850
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1811
1851
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1812
1852
|
fontSize: 14,
|
|
1813
1853
|
onClick: openReport
|
|
@@ -1851,7 +1891,7 @@ var MiaodaRuntime = (() => {
|
|
|
1851
1891
|
}
|
|
1852
1892
|
if (REPORT_ENABLED) {
|
|
1853
1893
|
items.push(buildMenuRow({
|
|
1854
|
-
icon: "feedback",
|
|
1894
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1855
1895
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1856
1896
|
fontSize: 16,
|
|
1857
1897
|
onClick: openReport
|
|
@@ -1913,7 +1953,7 @@ var MiaodaRuntime = (() => {
|
|
|
1913
1953
|
__name(mountDoubaoWatermark, "mountDoubaoWatermark");
|
|
1914
1954
|
|
|
1915
1955
|
// src/doubao-runtime.ts
|
|
1916
|
-
var version = "0.0.
|
|
1956
|
+
var version = "0.0.16-beta.0";
|
|
1917
1957
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1918
1958
|
if (isOnlineEnv()) {
|
|
1919
1959
|
reportPageView();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var MiaodaRuntime=(()=>{var Oe=Object.create;var B=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty;var i=(t,e)=>B(t,"name",{value:e,configurable:!0});var V=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),De=(t,e)=>{for(var o in e)B(t,o,{get:e[o],enumerable:!0})},q=(t,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Be(e))!Fe.call(t,f)&&f!==o&&B(t,f,{get:()=>e[f],enumerable:!(u=Re(e,f))||u.enumerable});return t};var Y=(t,e,o)=>(o=t!=null?Oe(He(t)):{},q(e||!t||!t.__esModule?B(o,"default",{value:t,enumerable:!0}):o,t)),Ne=t=>q(B({},"__esModule",{value:!0}),t);var ee=V((Q,H)=>{"use strict";(function(t){"use strict";function e(n,h){var r=(n&65535)+(h&65535),b=(n>>16)+(h>>16)+(r>>16);return b<<16|r&65535}i(e,"safeAdd");function o(n,h){return n<<h|n>>>32-h}i(o,"bitRotateLeft");function u(n,h,r,b,C,S){return e(o(e(e(h,n),e(b,S)),C),r)}i(u,"md5cmn");function f(n,h,r,b,C,S,A){return u(h&r|~h&b,n,h,C,S,A)}i(f,"md5ff");function m(n,h,r,b,C,S,A){return u(h&b|r&~b,n,h,C,S,A)}i(m,"md5gg");function g(n,h,r,b,C,S,A){return u(h^r^b,n,h,C,S,A)}i(g,"md5hh");function v(n,h,r,b,C,S,A){return u(r^(h|~b),n,h,C,S,A)}i(v,"md5ii");function y(n,h){n[h>>5]|=128<<h%32,n[(h+64>>>9<<4)+14]=h;var r,b,C,S,A,a=1732584193,s=-271733879,c=-1732584194,l=271733878;for(r=0;r<n.length;r+=16)b=a,C=s,S=c,A=l,a=f(a,s,c,l,n[r],7,-680876936),l=f(l,a,s,c,n[r+1],12,-389564586),c=f(c,l,a,s,n[r+2],17,606105819),s=f(s,c,l,a,n[r+3],22,-1044525330),a=f(a,s,c,l,n[r+4],7,-176418897),l=f(l,a,s,c,n[r+5],12,1200080426),c=f(c,l,a,s,n[r+6],17,-1473231341),s=f(s,c,l,a,n[r+7],22,-45705983),a=f(a,s,c,l,n[r+8],7,1770035416),l=f(l,a,s,c,n[r+9],12,-1958414417),c=f(c,l,a,s,n[r+10],17,-42063),s=f(s,c,l,a,n[r+11],22,-1990404162),a=f(a,s,c,l,n[r+12],7,1804603682),l=f(l,a,s,c,n[r+13],12,-40341101),c=f(c,l,a,s,n[r+14],17,-1502002290),s=f(s,c,l,a,n[r+15],22,1236535329),a=m(a,s,c,l,n[r+1],5,-165796510),l=m(l,a,s,c,n[r+6],9,-1069501632),c=m(c,l,a,s,n[r+11],14,643717713),s=m(s,c,l,a,n[r],20,-373897302),a=m(a,s,c,l,n[r+5],5,-701558691),l=m(l,a,s,c,n[r+10],9,38016083),c=m(c,l,a,s,n[r+15],14,-660478335),s=m(s,c,l,a,n[r+4],20,-405537848),a=m(a,s,c,l,n[r+9],5,568446438),l=m(l,a,s,c,n[r+14],9,-1019803690),c=m(c,l,a,s,n[r+3],14,-187363961),s=m(s,c,l,a,n[r+8],20,1163531501),a=m(a,s,c,l,n[r+13],5,-1444681467),l=m(l,a,s,c,n[r+2],9,-51403784),c=m(c,l,a,s,n[r+7],14,1735328473),s=m(s,c,l,a,n[r+12],20,-1926607734),a=g(a,s,c,l,n[r+5],4,-378558),l=g(l,a,s,c,n[r+8],11,-2022574463),c=g(c,l,a,s,n[r+11],16,1839030562),s=g(s,c,l,a,n[r+14],23,-35309556),a=g(a,s,c,l,n[r+1],4,-1530992060),l=g(l,a,s,c,n[r+4],11,1272893353),c=g(c,l,a,s,n[r+7],16,-155497632),s=g(s,c,l,a,n[r+10],23,-1094730640),a=g(a,s,c,l,n[r+13],4,681279174),l=g(l,a,s,c,n[r],11,-358537222),c=g(c,l,a,s,n[r+3],16,-722521979),s=g(s,c,l,a,n[r+6],23,76029189),a=g(a,s,c,l,n[r+9],4,-640364487),l=g(l,a,s,c,n[r+12],11,-421815835),c=g(c,l,a,s,n[r+15],16,530742520),s=g(s,c,l,a,n[r+2],23,-995338651),a=v(a,s,c,l,n[r],6,-198630844),l=v(l,a,s,c,n[r+7],10,1126891415),c=v(c,l,a,s,n[r+14],15,-1416354905),s=v(s,c,l,a,n[r+5],21,-57434055),a=v(a,s,c,l,n[r+12],6,1700485571),l=v(l,a,s,c,n[r+3],10,-1894986606),c=v(c,l,a,s,n[r+10],15,-1051523),s=v(s,c,l,a,n[r+1],21,-2054922799),a=v(a,s,c,l,n[r+8],6,1873313359),l=v(l,a,s,c,n[r+15],10,-30611744),c=v(c,l,a,s,n[r+6],15,-1560198380),s=v(s,c,l,a,n[r+13],21,1309151649),a=v(a,s,c,l,n[r+4],6,-145523070),l=v(l,a,s,c,n[r+11],10,-1120210379),c=v(c,l,a,s,n[r+2],15,718787259),s=v(s,c,l,a,n[r+9],21,-343485551),a=e(a,b),s=e(s,C),c=e(c,S),l=e(l,A);return[a,s,c,l]}i(y,"binlMD5");function T(n){var h,r="",b=n.length*32;for(h=0;h<b;h+=8)r+=String.fromCharCode(n[h>>5]>>>h%32&255);return r}i(T,"binl2rstr");function x(n){var h,r=[];for(r[(n.length>>2)-1]=void 0,h=0;h<r.length;h+=1)r[h]=0;var b=n.length*8;for(h=0;h<b;h+=8)r[h>>5]|=(n.charCodeAt(h/8)&255)<<h%32;return r}i(x,"rstr2binl");function I(n){return T(y(x(n),n.length*8))}i(I,"rstrMD5");function E(n,h){var r,b=x(n),C=[],S=[],A;for(C[15]=S[15]=void 0,b.length>16&&(b=y(b,n.length*8)),r=0;r<16;r+=1)C[r]=b[r]^909522486,S[r]=b[r]^1549556828;return A=y(C.concat(x(h)),512+h.length*8),T(y(S.concat(A),640))}i(E,"rstrHMACMD5");function P(n){var h="0123456789abcdef",r="",b,C;for(C=0;C<n.length;C+=1)b=n.charCodeAt(C),r+=h.charAt(b>>>4&15)+h.charAt(b&15);return r}i(P,"rstr2hex");function L(n){return unescape(encodeURIComponent(n))}i(L,"str2rstrUTF8");function d(n){return I(L(n))}i(d,"rawMD5");function p(n){return P(d(n))}i(p,"hexMD5");function w(n,h){return E(L(n),L(h))}i(w,"rawHMACMD5");function _(n,h){return P(w(n,h))}i(_,"hexHMACMD5");function k(n,h,r){return h?r?w(h,n):_(h,n):r?d(n):p(n)}i(k,"md5"),typeof define=="function"&&define.amd?define(function(){return k}):typeof H=="object"&&H.exports?H.exports=k:t.md5=k})(Q)});var ne=V((F,te)=>{"use strict";(function(t,e){typeof F=="object"?te.exports=F=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(F,function(){var t=t||(function(e,o){var u=Object.create||(function(){function d(){}return i(d,"F"),function(p){var w;return d.prototype=p,w=new d,d.prototype=null,w}})(),f={},m=f.lib={},g=m.Base=(function(){return{extend:i(function(d){var p=u(this);return d&&p.mixIn(d),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},"extend"),create:i(function(){var d=this.extend();return d.init.apply(d,arguments),d},"create"),init:i(function(){},"init"),mixIn:i(function(d){for(var p in d)d.hasOwnProperty(p)&&(this[p]=d[p]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),v=m.WordArray=g.extend({init:i(function(d,p){d=this.words=d||[],p!=o?this.sigBytes=p:this.sigBytes=d.length*4},"init"),toString:i(function(d){return(d||T).stringify(this)},"toString"),concat:i(function(d){var p=this.words,w=d.words,_=this.sigBytes,k=d.sigBytes;if(this.clamp(),_%4)for(var n=0;n<k;n++){var h=w[n>>>2]>>>24-n%4*8&255;p[_+n>>>2]|=h<<24-(_+n)%4*8}else for(var n=0;n<k;n+=4)p[_+n>>>2]=w[n>>>2];return this.sigBytes+=k,this},"concat"),clamp:i(function(){var d=this.words,p=this.sigBytes;d[p>>>2]&=4294967295<<32-p%4*8,d.length=e.ceil(p/4)},"clamp"),clone:i(function(){var d=g.clone.call(this);return d.words=this.words.slice(0),d},"clone"),random:i(function(d){for(var p=[],w=i(function(r){var r=r,b=987654321,C=4294967295;return function(){b=36969*(b&65535)+(b>>16)&C,r=18e3*(r&65535)+(r>>16)&C;var S=(b<<16)+r&C;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),_=0,k;_<d;_+=4){var n=w((k||e.random())*4294967296);k=n()*987654071,p.push(n()*4294967296|0)}return new v.init(p,d)},"random")}),y=f.enc={},T=y.Hex={stringify:i(function(d){for(var p=d.words,w=d.sigBytes,_=[],k=0;k<w;k++){var n=p[k>>>2]>>>24-k%4*8&255;_.push((n>>>4).toString(16)),_.push((n&15).toString(16))}return _.join("")},"stringify"),parse:i(function(d){for(var p=d.length,w=[],_=0;_<p;_+=2)w[_>>>3]|=parseInt(d.substr(_,2),16)<<24-_%8*4;return new v.init(w,p/2)},"parse")},x=y.Latin1={stringify:i(function(d){for(var p=d.words,w=d.sigBytes,_=[],k=0;k<w;k++){var n=p[k>>>2]>>>24-k%4*8&255;_.push(String.fromCharCode(n))}return _.join("")},"stringify"),parse:i(function(d){for(var p=d.length,w=[],_=0;_<p;_++)w[_>>>2]|=(d.charCodeAt(_)&255)<<24-_%4*8;return new v.init(w,p)},"parse")},I=y.Utf8={stringify:i(function(d){try{return decodeURIComponent(escape(x.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(d){return x.parse(unescape(encodeURIComponent(d)))},"parse")},E=m.BufferedBlockAlgorithm=g.extend({reset:i(function(){this._data=new v.init,this._nDataBytes=0},"reset"),_append:i(function(d){typeof d=="string"&&(d=I.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},"_append"),_process:i(function(d){var p=this._data,w=p.words,_=p.sigBytes,k=this.blockSize,n=k*4,h=_/n;d?h=e.ceil(h):h=e.max((h|0)-this._minBufferSize,0);var r=h*k,b=e.min(r*4,_);if(r){for(var C=0;C<r;C+=k)this._doProcessBlock(w,C);var S=w.splice(0,r);p.sigBytes-=b}return new v.init(S,b)},"_process"),clone:i(function(){var d=g.clone.call(this);return d._data=this._data.clone(),d},"clone"),_minBufferSize:0}),P=m.Hasher=E.extend({cfg:g.extend(),init:i(function(d){this.cfg=this.cfg.extend(d),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(d){return this._append(d),this._process(),this},"update"),finalize:i(function(d){d&&this._append(d);var p=this._doFinalize();return p},"finalize"),blockSize:512/32,_createHelper:i(function(d){return function(p,w){return new d.init(w).finalize(p)}},"_createHelper"),_createHmacHelper:i(function(d){return function(p,w){return new L.HMAC.init(d,w).finalize(p)}},"_createHmacHelper")}),L=f.algo={};return f})(Math);return t})});var ie=V((D,re)=>{"use strict";(function(t,e){typeof D=="object"?re.exports=D=e(ne()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(D,function(t){return(function(){var e=t,o=e.lib,u=o.WordArray,f=o.Hasher,m=e.algo,g=[],v=m.SHA1=f.extend({_doReset:i(function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(y,T){for(var x=this._hash.words,I=x[0],E=x[1],P=x[2],L=x[3],d=x[4],p=0;p<80;p++){if(p<16)g[p]=y[T+p]|0;else{var w=g[p-3]^g[p-8]^g[p-14]^g[p-16];g[p]=w<<1|w>>>31}var _=(I<<5|I>>>27)+d+g[p];p<20?_+=(E&P|~E&L)+1518500249:p<40?_+=(E^P^L)+1859775393:p<60?_+=(E&P|E&L|P&L)-1894007588:_+=(E^P^L)-899497514,d=L,L=P,P=E<<30|E>>>2,E=I,I=_}x[0]=x[0]+I|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+L|0,x[4]=x[4]+d|0},"_doProcessBlock"),_doFinalize:i(function(){var y=this._data,T=y.words,x=this._nDataBytes*8,I=y.sigBytes*8;return T[I>>>5]|=128<<24-I%32,T[(I+64>>>9<<4)+14]=Math.floor(x/4294967296),T[(I+64>>>9<<4)+15]=x,y.sigBytes=T.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var y=f.clone.call(this);return y._hash=this._hash.clone(),y},"clone")});e.SHA1=f._createHelper(v),e.HmacSHA1=f._createHmacHelper(v)})(),t.SHA1})});var wt={};De(wt,{TrackKey:()=>G,name:()=>yt,reportTeaEvent:()=>K,version:()=>bt});var le=Y(ee(),1),de=Y(ie(),1);function M(){return window.appId||null}i(M,"getAppId");function N(){var o;let t="suda-csrf-token",e=document.cookie.split("; ");for(let u of e){let[f,m]=u.split("=");if(f===t)return decodeURIComponent(m)}return(o=window.csrfToken)!=null?o:null}i(N,"getCsrfToken");function $(){let t=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(t)}i($,"isNewPathEnabled");function j(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(j,"getEnv");function oe(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(oe,"isOnlineEnv");function W(){let t=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(t),o=/iPad|Tab|Tablet/i.test(t)&&navigator.maxTouchPoints>1;return e||o}i(W,"isMobile");async function ae(){var t,e,o;try{let u=M();if(!u)return!0;let f=$()?`/app/${u}/__runtime__/api/v1/studio/get_published`:`/spark/b/${u}/get_published`,g=await(await fetch(f,{headers:{"X-Suda-Csrf-Token":(t=N())!=null?t:""}})).json();if(g.code===0||g.status_code==="0")return((o=(e=g.data)==null?void 0:e.app_info)==null?void 0:o.show_badge)!==!1}catch{}return!0}i(ae,"fetchShowBadge");async function se(){var u;let t=M();if(!t)return{code:1,msg:"appId is required",data:{}};let e=$()?`/app/${t}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${t}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(u=N())!=null?u:""}})).json()}i(se,"getLarkUserInfo");var G={VIEW:"aily_agent_artifact_page_view"},$e="08a441",je="42b91e";function ce(t){let e=String(t);return(0,de.default)($e+(0,le.default)(e+je)).toString()}i(ce,"encryptTea");var z=!1;async function We(){var m,g,v,y;let{data:t}=await se(),{tenantID:e,userID:o}=t||{},u=o&&o!=="0"?ce(o):void 0,f=e&&e!=="0"?ce(e):void 0;(m=window.collectEvent)==null||m.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(v=window.collectEvent)==null||v.call(window,"config",{user_unique_id:u,device_type:W()?"mobile":"pc",evtParams:{open_from:(g=new URLSearchParams(window.location.search).get("open-from"))!=null?g:void 0,env:j(),user_id:u,tenant_id:f}}),z=!0,(y=window.collectEvent)==null||y.call(window,"start")}i(We,"createTracker");async function K({trackKey:t,trackParams:e={}}){var o;try{z||(z=!0,await We()),(o=window.collectEvent)==null||o.call(window,t,e)}catch(u){console.error(u)}}i(K,"reportTeaEvent");function ue(){return K({trackKey:G.VIEW,trackParams:{artifact_uid:M(),agent_id:"agent_miaoda",url:window.location.href}})}i(ue,"reportPageView");function fe(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(fe,"generateUUID");var pe="x_sdk_device_id";function Ue(){try{let t=localStorage.getItem(pe);return t||(t=fe(),localStorage.setItem(pe,t)),t}catch{return fe()}}i(Ue,"getDeviceId");function Ve(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(Ve,"getDeviceType");var ze="pageSessionID";function Ge(){try{return new URLSearchParams(window.location.search).get(ze)||""}catch{return""}}i(Ge,"getPvId");function Ke(t={}){let e=t.pvId||Ge();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Ue(),module:"app_web",app_env:"runtime",source_type:"user",device_type:Ve(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Ke,"getDefaultAttributes");function he(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(he,"toNanoString");var Ze="1.0.2";function Je(t,e){let o=Ke(e),u=he(Date.now());return{metricsData:{resource:{attributes:{sdk_version:Ze,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(f=>({attributes:{...o,url:f.url,path:f.path,referrer:f.referrer},startTimeUnixNano:he(f.timestampMs),timeUnixNano:u,asDouble:1}))}}]}}}i(Je,"buildPayload");function Xe(t,e,o={},u){if(e.length===0)return;let f;try{f=JSON.stringify(Je(e,u))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:f,keepalive:!0}).catch(()=>{})}catch{}}i(Xe,"sendPvData");var Z="__APAAS_PV_TRACKER_STARTED__";function qe(){try{let t=window;return t[Z]?!1:(t[Z]=!0,!0)}catch{return!0}}i(qe,"claimPvReporting");function me(){try{window[Z]=!1}catch{}}i(me,"releasePvReporting");var O,Ye=(O=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new O),this._instance}start(e){var o;if(!this.started&&qe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let u=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),u)}catch(u){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,me(),u}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,me())}pageKey(){let{origin:e,pathname:o,search:u}=window.location;return`${e}${o}${u}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Xe(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],u=i(()=>this.recordPv(),"recordPv");history[e]=function(...f){let m=o.apply(this,f);return u(),m},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(O,"_PvTracker"),O),ge=Ye.instance;function ve(){var o;let t=(o=M())!=null?o:"",e=$()?`/app/${t}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${t}/runtime/api/v1/observability/metrics/collect`;ge.start({collectorUrl:e})}i(ve,"initPvTracking");var Qe=/\bLark\//i;function _e(){var e,o,u,f;let t=window;return typeof((u=(o=(e=t.webkit)==null?void 0:e.messageHandlers)==null?void 0:o.invokeNative)==null?void 0:u.postMessage)=="function"||typeof((f=t.Lark_Bridge)==null?void 0:f.invokeNative)=="function"?!0:Qe.test(navigator.userAgent)}i(_e,"isFeishuClient");function be({messageIds:t,token:e,docType:o=113}){var v,y;if(t.length===0||!e)return!1;let u={apiName:"markMiaodaFeedMessagesRead",data:{__v2__:!0,messageIds:t.map(String),token:e,docType:o}},f=window,m=(y=(v=f.webkit)==null?void 0:v.messageHandlers)==null?void 0:y.invokeNative;if(m!=null&&m.postMessage)return m.postMessage(u),!0;let g=f.Lark_Bridge;return g!=null&&g.invokeNative?(g.invokeNative(JSON.stringify(u)),!0):!1}i(be,"markMiaodaFeedMessagesRead");var et=113,tt="/app/",nt="/__runtime__/api/v1/devops/read_lark_messages";function rt(t){if(!t||typeof t!="object")return[];let{data:e}=t;return Array.isArray(e)?e.map(String):e&&Array.isArray(e.message_ids)?e.message_ids.map(String):[]}i(rt,"extractMessageIds");var ye=!1;async function it(t){var u;let e=await fetch(`${tt}${t}${nt}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":(u=N())!=null?u:""}});if(!e.ok)return[];let o=await e.json();return rt(o)}i(it,"fetchFeedMessageIds");async function we(){if(ye||!_e())return;ye=!0;let t=M();if(t)try{let e=await it(t);if(!e.length)return;be({messageIds:e,token:t,docType:et})}catch{}}i(we,"markFeedReadOnce");var xe="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp",ot=`${xe}/miaoda-ui/doubao.svg`,at=`${xe}/logo/miaodalogo.svg`,ke='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',st='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',ct='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>',lt='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>',Se=!0,dt="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",ut="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",X="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",U={doubao:{brandText:"\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",logoSrc:ot,downloadUrl:"https://ugapk.com/FCtLH"},miaoda:{brandText:"\u5999\u642D\u751F\u6210",logoSrc:at,landingUrl:"https://miaoda.feishu.cn/landing"}},ft={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function Ee(){var o;let t=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=M())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${ft[j()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(t)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(Ee,"openReport");var pt={feedback:st,close:ke,download:ct,efficiency:lt};function Ie(t){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${t}px`,height:`${t}px`,flexShrink:"0"}),e.innerHTML=ke;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(t)),o.setAttribute("height",String(t)),o.style.display="block"),e}i(Ie,"makeCloseIcon");function ht(t,e=16){if(t==="close")return Ie(e);let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:`${e}px`,height:`${e}px`,flexShrink:"0"}),o.innerHTML=pt[t];let u=o.firstElementChild;return u&&(u.style.display="block"),o}i(ht,"makeIcon");function mt(t,e){let o=document.createElement("img");return o.src=t,o.width=e,o.height=e,o.alt="",Object.assign(o.style,{width:`${e}px`,height:`${e}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),o}i(mt,"makeLogo");function Le(t,e,o){let u=e==="desktop",f=U[t],m=document.createElement("div");Object.assign(m.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"4px",padding:u?"6px 12px 6px 8px":"5px 12px 5px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:dt,cursor:"pointer"});let g=mt(f.logoSrc,16),v=document.createElement("span");if(v.textContent=f.brandText,Object.assign(v.style,{fontFamily:X,fontSize:u?"12px":"14px",lineHeight:u?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),m.append(g,v),u&&o){let y=document.createElement("span");y.setAttribute("role","button"),y.setAttribute("aria-label","\u5173\u95ED"),y.setAttribute("data-watermark-close",""),Object.assign(y.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),y.appendChild(Ie(10)),y.addEventListener("click",T=>{T.stopPropagation(),o()}),m.appendChild(y)}return m}i(Le,"buildPill");function R(t){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",t.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",minHeight:"38px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),o.appendChild(ht(t.icon));let u=document.createElement("span");return u.textContent=t.label,Object.assign(u.style,{fontFamily:X,fontSize:`${t.fontSize}px`,lineHeight:`${t.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,u),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",t.onClick),e}i(R,"buildMenuRow");function gt(){let t=document.createElement("div");return Object.assign(t.style,{height:"1px",background:"rgba(0,0,0,0.08)",margin:"0 10px"}),t}i(gt,"buildDivider");function Te(t){var o;let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${t.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:ut,overflow:"hidden",outline:"none"}),t.items.length){let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px",display:"flex",flexDirection:"column",gap:`${(o=t.itemGap)!=null?o:0}px`}),t.items.forEach(f=>u.appendChild(f)),e.appendChild(u)}if(t.extraItems&&t.extraItems.length){e.appendChild(gt());let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px"}),t.extraItems.forEach(f=>u.appendChild(f)),e.appendChild(u)}return e}i(Te,"buildMenuCard");function Ae(t,e=!1){let o=document.createElement("div");o.setAttribute("data-custom-element",`${t}-watermark${e?"-mobile":""}`);let u=o.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=`
|
|
1
|
+
"use strict";var MiaodaRuntime=(()=>{var Pe=Object.create;var R=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty;var i=(t,e)=>R(t,"name",{value:e,configurable:!0});var V=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),He=(t,e)=>{for(var o in e)R(t,o,{get:e[o],enumerable:!0})},q=(t,e,o,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Re(e))!Fe.call(t,f)&&f!==o&&R(t,f,{get:()=>e[f],enumerable:!(d=Be(e,f))||d.enumerable});return t};var Q=(t,e,o)=>(o=t!=null?Pe(De(t)):{},q(e||!t||!t.__esModule?R(o,"default",{value:t,enumerable:!0}):o,t)),Ne=t=>q(R({},"__esModule",{value:!0}),t);var te=V((ee,D)=>{"use strict";(function(t){"use strict";function e(n,h){var r=(n&65535)+(h&65535),_=(n>>16)+(h>>16)+(r>>16);return _<<16|r&65535}i(e,"safeAdd");function o(n,h){return n<<h|n>>>32-h}i(o,"bitRotateLeft");function d(n,h,r,_,x,L){return e(o(e(e(h,n),e(_,L)),x),r)}i(d,"md5cmn");function f(n,h,r,_,x,L,A){return d(h&r|~h&_,n,h,x,L,A)}i(f,"md5ff");function m(n,h,r,_,x,L,A){return d(h&_|r&~_,n,h,x,L,A)}i(m,"md5gg");function g(n,h,r,_,x,L,A){return d(h^r^_,n,h,x,L,A)}i(g,"md5hh");function v(n,h,r,_,x,L,A){return d(r^(h|~_),n,h,x,L,A)}i(v,"md5ii");function y(n,h){n[h>>5]|=128<<h%32,n[(h+64>>>9<<4)+14]=h;var r,_,x,L,A,s=1732584193,a=-271733879,c=-1732584194,l=271733878;for(r=0;r<n.length;r+=16)_=s,x=a,L=c,A=l,s=f(s,a,c,l,n[r],7,-680876936),l=f(l,s,a,c,n[r+1],12,-389564586),c=f(c,l,s,a,n[r+2],17,606105819),a=f(a,c,l,s,n[r+3],22,-1044525330),s=f(s,a,c,l,n[r+4],7,-176418897),l=f(l,s,a,c,n[r+5],12,1200080426),c=f(c,l,s,a,n[r+6],17,-1473231341),a=f(a,c,l,s,n[r+7],22,-45705983),s=f(s,a,c,l,n[r+8],7,1770035416),l=f(l,s,a,c,n[r+9],12,-1958414417),c=f(c,l,s,a,n[r+10],17,-42063),a=f(a,c,l,s,n[r+11],22,-1990404162),s=f(s,a,c,l,n[r+12],7,1804603682),l=f(l,s,a,c,n[r+13],12,-40341101),c=f(c,l,s,a,n[r+14],17,-1502002290),a=f(a,c,l,s,n[r+15],22,1236535329),s=m(s,a,c,l,n[r+1],5,-165796510),l=m(l,s,a,c,n[r+6],9,-1069501632),c=m(c,l,s,a,n[r+11],14,643717713),a=m(a,c,l,s,n[r],20,-373897302),s=m(s,a,c,l,n[r+5],5,-701558691),l=m(l,s,a,c,n[r+10],9,38016083),c=m(c,l,s,a,n[r+15],14,-660478335),a=m(a,c,l,s,n[r+4],20,-405537848),s=m(s,a,c,l,n[r+9],5,568446438),l=m(l,s,a,c,n[r+14],9,-1019803690),c=m(c,l,s,a,n[r+3],14,-187363961),a=m(a,c,l,s,n[r+8],20,1163531501),s=m(s,a,c,l,n[r+13],5,-1444681467),l=m(l,s,a,c,n[r+2],9,-51403784),c=m(c,l,s,a,n[r+7],14,1735328473),a=m(a,c,l,s,n[r+12],20,-1926607734),s=g(s,a,c,l,n[r+5],4,-378558),l=g(l,s,a,c,n[r+8],11,-2022574463),c=g(c,l,s,a,n[r+11],16,1839030562),a=g(a,c,l,s,n[r+14],23,-35309556),s=g(s,a,c,l,n[r+1],4,-1530992060),l=g(l,s,a,c,n[r+4],11,1272893353),c=g(c,l,s,a,n[r+7],16,-155497632),a=g(a,c,l,s,n[r+10],23,-1094730640),s=g(s,a,c,l,n[r+13],4,681279174),l=g(l,s,a,c,n[r],11,-358537222),c=g(c,l,s,a,n[r+3],16,-722521979),a=g(a,c,l,s,n[r+6],23,76029189),s=g(s,a,c,l,n[r+9],4,-640364487),l=g(l,s,a,c,n[r+12],11,-421815835),c=g(c,l,s,a,n[r+15],16,530742520),a=g(a,c,l,s,n[r+2],23,-995338651),s=v(s,a,c,l,n[r],6,-198630844),l=v(l,s,a,c,n[r+7],10,1126891415),c=v(c,l,s,a,n[r+14],15,-1416354905),a=v(a,c,l,s,n[r+5],21,-57434055),s=v(s,a,c,l,n[r+12],6,1700485571),l=v(l,s,a,c,n[r+3],10,-1894986606),c=v(c,l,s,a,n[r+10],15,-1051523),a=v(a,c,l,s,n[r+1],21,-2054922799),s=v(s,a,c,l,n[r+8],6,1873313359),l=v(l,s,a,c,n[r+15],10,-30611744),c=v(c,l,s,a,n[r+6],15,-1560198380),a=v(a,c,l,s,n[r+13],21,1309151649),s=v(s,a,c,l,n[r+4],6,-145523070),l=v(l,s,a,c,n[r+11],10,-1120210379),c=v(c,l,s,a,n[r+2],15,718787259),a=v(a,c,l,s,n[r+9],21,-343485551),s=e(s,_),a=e(a,x),c=e(c,L),l=e(l,A);return[s,a,c,l]}i(y,"binlMD5");function w(n){var h,r="",_=n.length*32;for(h=0;h<_;h+=8)r+=String.fromCharCode(n[h>>5]>>>h%32&255);return r}i(w,"binl2rstr");function k(n){var h,r=[];for(r[(n.length>>2)-1]=void 0,h=0;h<r.length;h+=1)r[h]=0;var _=n.length*8;for(h=0;h<_;h+=8)r[h>>5]|=(n.charCodeAt(h/8)&255)<<h%32;return r}i(k,"rstr2binl");function I(n){return w(y(k(n),n.length*8))}i(I,"rstrMD5");function E(n,h){var r,_=k(n),x=[],L=[],A;for(x[15]=L[15]=void 0,_.length>16&&(_=y(_,n.length*8)),r=0;r<16;r+=1)x[r]=_[r]^909522486,L[r]=_[r]^1549556828;return A=y(x.concat(k(h)),512+h.length*8),w(y(L.concat(A),640))}i(E,"rstrHMACMD5");function O(n){var h="0123456789abcdef",r="",_,x;for(x=0;x<n.length;x+=1)_=n.charCodeAt(x),r+=h.charAt(_>>>4&15)+h.charAt(_&15);return r}i(O,"rstr2hex");function T(n){return unescape(encodeURIComponent(n))}i(T,"str2rstrUTF8");function u(n){return I(T(n))}i(u,"rawMD5");function p(n){return O(u(n))}i(p,"hexMD5");function C(n,h){return E(T(n),T(h))}i(C,"rawHMACMD5");function b(n,h){return O(C(n,h))}i(b,"hexHMACMD5");function S(n,h,r){return h?r?C(h,n):b(h,n):r?u(n):p(n)}i(S,"md5"),typeof define=="function"&&define.amd?define(function(){return S}):typeof D=="object"&&D.exports?D.exports=S:t.md5=S})(ee)});var re=V((F,ne)=>{"use strict";(function(t,e){typeof F=="object"?ne.exports=F=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(F,function(){var t=t||(function(e,o){var d=Object.create||(function(){function u(){}return i(u,"F"),function(p){var C;return u.prototype=p,C=new u,u.prototype=null,C}})(),f={},m=f.lib={},g=m.Base=(function(){return{extend:i(function(u){var p=d(this);return u&&p.mixIn(u),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},"extend"),create:i(function(){var u=this.extend();return u.init.apply(u,arguments),u},"create"),init:i(function(){},"init"),mixIn:i(function(u){for(var p in u)u.hasOwnProperty(p)&&(this[p]=u[p]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),v=m.WordArray=g.extend({init:i(function(u,p){u=this.words=u||[],p!=o?this.sigBytes=p:this.sigBytes=u.length*4},"init"),toString:i(function(u){return(u||w).stringify(this)},"toString"),concat:i(function(u){var p=this.words,C=u.words,b=this.sigBytes,S=u.sigBytes;if(this.clamp(),b%4)for(var n=0;n<S;n++){var h=C[n>>>2]>>>24-n%4*8&255;p[b+n>>>2]|=h<<24-(b+n)%4*8}else for(var n=0;n<S;n+=4)p[b+n>>>2]=C[n>>>2];return this.sigBytes+=S,this},"concat"),clamp:i(function(){var u=this.words,p=this.sigBytes;u[p>>>2]&=4294967295<<32-p%4*8,u.length=e.ceil(p/4)},"clamp"),clone:i(function(){var u=g.clone.call(this);return u.words=this.words.slice(0),u},"clone"),random:i(function(u){for(var p=[],C=i(function(r){var r=r,_=987654321,x=4294967295;return function(){_=36969*(_&65535)+(_>>16)&x,r=18e3*(r&65535)+(r>>16)&x;var L=(_<<16)+r&x;return L/=4294967296,L+=.5,L*(e.random()>.5?1:-1)}},"r"),b=0,S;b<u;b+=4){var n=C((S||e.random())*4294967296);S=n()*987654071,p.push(n()*4294967296|0)}return new v.init(p,u)},"random")}),y=f.enc={},w=y.Hex={stringify:i(function(u){for(var p=u.words,C=u.sigBytes,b=[],S=0;S<C;S++){var n=p[S>>>2]>>>24-S%4*8&255;b.push((n>>>4).toString(16)),b.push((n&15).toString(16))}return b.join("")},"stringify"),parse:i(function(u){for(var p=u.length,C=[],b=0;b<p;b+=2)C[b>>>3]|=parseInt(u.substr(b,2),16)<<24-b%8*4;return new v.init(C,p/2)},"parse")},k=y.Latin1={stringify:i(function(u){for(var p=u.words,C=u.sigBytes,b=[],S=0;S<C;S++){var n=p[S>>>2]>>>24-S%4*8&255;b.push(String.fromCharCode(n))}return b.join("")},"stringify"),parse:i(function(u){for(var p=u.length,C=[],b=0;b<p;b++)C[b>>>2]|=(u.charCodeAt(b)&255)<<24-b%4*8;return new v.init(C,p)},"parse")},I=y.Utf8={stringify:i(function(u){try{return decodeURIComponent(escape(k.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(u){return k.parse(unescape(encodeURIComponent(u)))},"parse")},E=m.BufferedBlockAlgorithm=g.extend({reset:i(function(){this._data=new v.init,this._nDataBytes=0},"reset"),_append:i(function(u){typeof u=="string"&&(u=I.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},"_append"),_process:i(function(u){var p=this._data,C=p.words,b=p.sigBytes,S=this.blockSize,n=S*4,h=b/n;u?h=e.ceil(h):h=e.max((h|0)-this._minBufferSize,0);var r=h*S,_=e.min(r*4,b);if(r){for(var x=0;x<r;x+=S)this._doProcessBlock(C,x);var L=C.splice(0,r);p.sigBytes-=_}return new v.init(L,_)},"_process"),clone:i(function(){var u=g.clone.call(this);return u._data=this._data.clone(),u},"clone"),_minBufferSize:0}),O=m.Hasher=E.extend({cfg:g.extend(),init:i(function(u){this.cfg=this.cfg.extend(u),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(u){return this._append(u),this._process(),this},"update"),finalize:i(function(u){u&&this._append(u);var p=this._doFinalize();return p},"finalize"),blockSize:512/32,_createHelper:i(function(u){return function(p,C){return new u.init(C).finalize(p)}},"_createHelper"),_createHmacHelper:i(function(u){return function(p,C){return new T.HMAC.init(u,C).finalize(p)}},"_createHmacHelper")}),T=f.algo={};return f})(Math);return t})});var oe=V((H,ie)=>{"use strict";(function(t,e){typeof H=="object"?ie.exports=H=e(re()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(H,function(t){return(function(){var e=t,o=e.lib,d=o.WordArray,f=o.Hasher,m=e.algo,g=[],v=m.SHA1=f.extend({_doReset:i(function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(y,w){for(var k=this._hash.words,I=k[0],E=k[1],O=k[2],T=k[3],u=k[4],p=0;p<80;p++){if(p<16)g[p]=y[w+p]|0;else{var C=g[p-3]^g[p-8]^g[p-14]^g[p-16];g[p]=C<<1|C>>>31}var b=(I<<5|I>>>27)+u+g[p];p<20?b+=(E&O|~E&T)+1518500249:p<40?b+=(E^O^T)+1859775393:p<60?b+=(E&O|E&T|O&T)-1894007588:b+=(E^O^T)-899497514,u=T,T=O,O=E<<30|E>>>2,E=I,I=b}k[0]=k[0]+I|0,k[1]=k[1]+E|0,k[2]=k[2]+O|0,k[3]=k[3]+T|0,k[4]=k[4]+u|0},"_doProcessBlock"),_doFinalize:i(function(){var y=this._data,w=y.words,k=this._nDataBytes*8,I=y.sigBytes*8;return w[I>>>5]|=128<<24-I%32,w[(I+64>>>9<<4)+14]=Math.floor(k/4294967296),w[(I+64>>>9<<4)+15]=k,y.sigBytes=w.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var y=f.clone.call(this);return y._hash=this._hash.clone(),y},"clone")});e.SHA1=f._createHelper(v),e.HmacSHA1=f._createHmacHelper(v)})(),t.SHA1})});var St={};He(St,{TrackKey:()=>G,name:()=>kt,reportTeaEvent:()=>Z,version:()=>xt});var de=Q(te(),1),ue=Q(oe(),1);function M(){return window.appId||null}i(M,"getAppId");function N(){var o;let t="suda-csrf-token",e=document.cookie.split("; ");for(let d of e){let[f,m]=d.split("=");if(f===t)return decodeURIComponent(m)}return(o=window.csrfToken)!=null?o:null}i(N,"getCsrfToken");function $(){let t=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(t)}i($,"isNewPathEnabled");function j(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(j,"getEnv");function se(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(se,"isOnlineEnv");function U(){let t=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(t),o=/iPad|Tab|Tablet/i.test(t)&&navigator.maxTouchPoints>1;return e||o}i(U,"isMobile");async function ae(){var t,e,o;try{let d=M();if(!d)return!0;let f=$()?`/app/${d}/__runtime__/api/v1/studio/get_published`:`/spark/b/${d}/get_published`,g=await(await fetch(f,{headers:{"X-Suda-Csrf-Token":(t=N())!=null?t:""}})).json();if(g.code===0||g.status_code==="0")return((o=(e=g.data)==null?void 0:e.app_info)==null?void 0:o.show_badge)!==!1}catch{}return!0}i(ae,"fetchShowBadge");async function ce(){var d;let t=M();if(!t)return{code:1,msg:"appId is required",data:{}};let e=$()?`/app/${t}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${t}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(d=N())!=null?d:""}})).json()}i(ce,"getLarkUserInfo");var G={VIEW:"aily_agent_artifact_page_view"},$e="08a441",je="42b91e";function le(t){let e=String(t);return(0,ue.default)($e+(0,de.default)(e+je)).toString()}i(le,"encryptTea");var z=!1;async function Ue(){var m,g,v,y;let{data:t}=await ce(),{tenantID:e,userID:o}=t||{},d=o&&o!=="0"?le(o):void 0,f=e&&e!=="0"?le(e):void 0;(m=window.collectEvent)==null||m.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(v=window.collectEvent)==null||v.call(window,"config",{user_unique_id:d,device_type:U()?"mobile":"pc",evtParams:{open_from:(g=new URLSearchParams(window.location.search).get("open-from"))!=null?g:void 0,env:j(),user_id:d,tenant_id:f}}),z=!0,(y=window.collectEvent)==null||y.call(window,"start")}i(Ue,"createTracker");async function Z({trackKey:t,trackParams:e={}}){var o;try{z||(z=!0,await Ue()),(o=window.collectEvent)==null||o.call(window,t,e)}catch(d){console.error(d)}}i(Z,"reportTeaEvent");function fe(){return Z({trackKey:G.VIEW,trackParams:{artifact_uid:M(),agent_id:"agent_miaoda",url:window.location.href}})}i(fe,"reportPageView");function pe(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(pe,"generateUUID");var he="x_sdk_device_id";function We(){try{let t=localStorage.getItem(he);return t||(t=pe(),localStorage.setItem(he,t)),t}catch{return pe()}}i(We,"getDeviceId");function Ve(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(Ve,"getDeviceType");var ze="pageSessionID";function Ge(){try{return new URLSearchParams(window.location.search).get(ze)||""}catch{return""}}i(Ge,"getPvId");function Ze(t={}){let e=t.pvId||Ge();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:We(),module:"app_web",app_env:"runtime",source_type:"user",device_type:Ve(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Ze,"getDefaultAttributes");function ge(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(ge,"toNanoString");var Ke="1.0.2";function Xe(t,e){let o=Ze(e),d=ge(Date.now());return{metricsData:{resource:{attributes:{sdk_version:Ke,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(f=>({attributes:{...o,url:f.url,path:f.path,referrer:f.referrer},startTimeUnixNano:ge(f.timestampMs),timeUnixNano:d,asDouble:1}))}}]}}}i(Xe,"buildPayload");function Je(t,e,o={},d){if(e.length===0)return;let f;try{f=JSON.stringify(Xe(e,d))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:f,keepalive:!0}).catch(()=>{})}catch{}}i(Je,"sendPvData");var K="__APAAS_PV_TRACKER_STARTED__";function Ye(){try{let t=window;return t[K]?!1:(t[K]=!0,!0)}catch{return!0}}i(Ye,"claimPvReporting");function me(){try{window[K]=!1}catch{}}i(me,"releasePvReporting");var P,qe=(P=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new P),this._instance}start(e){var o;if(!this.started&&Ye()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let d=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),d)}catch(d){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,me(),d}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,me())}pageKey(){let{origin:e,pathname:o,search:d}=window.location;return`${e}${o}${d}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Je(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],d=i(()=>this.recordPv(),"recordPv");history[e]=function(...f){let m=o.apply(this,f);return d(),m},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(P,"_PvTracker"),P),ve=qe.instance;function be(){var o;let t=(o=M())!=null?o:"",e=$()?`/app/${t}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${t}/runtime/api/v1/observability/metrics/collect`;ve.start({collectorUrl:e})}i(be,"initPvTracking");var Qe=/\bLark\//i;function _e(){var e,o,d,f;let t=window;return typeof((d=(o=(e=t.webkit)==null?void 0:e.messageHandlers)==null?void 0:o.invokeNative)==null?void 0:d.postMessage)=="function"||typeof((f=t.Lark_Bridge)==null?void 0:f.invokeNative)=="function"?!0:Qe.test(navigator.userAgent)}i(_e,"isFeishuClient");function ye({messageIds:t,token:e,docType:o=113}){var v,y;if(t.length===0||!e)return!1;let d={apiName:"markMiaodaFeedMessagesRead",data:{__v2__:!0,messageIds:t.map(String),token:e,docType:o}},f=window,m=(y=(v=f.webkit)==null?void 0:v.messageHandlers)==null?void 0:y.invokeNative;if(m!=null&&m.postMessage)return m.postMessage(d),!0;let g=f.Lark_Bridge;return g!=null&&g.invokeNative?(g.invokeNative(JSON.stringify(d)),!0):!1}i(ye,"markMiaodaFeedMessagesRead");var et=113,tt="/app/",nt="/__runtime__/api/v1/devops/read_lark_messages";function rt(t){if(!t||typeof t!="object")return[];let{data:e}=t;return Array.isArray(e)?e.map(String):e&&Array.isArray(e.message_ids)?e.message_ids.map(String):[]}i(rt,"extractMessageIds");var we=!1;async function it(t){var d;let e=await fetch(`${tt}${t}${nt}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":(d=N())!=null?d:""}});if(!e.ok)return[];let o=await e.json();return rt(o)}i(it,"fetchFeedMessageIds");async function Ce(){if(we||!_e())return;we=!0;let t=M();if(t)try{let e=await it(t);if(!e.length)return;ye({messageIds:e,token:t,docType:et})}catch{}}i(Ce,"markFeedReadOnce");var J="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp",ot=`${J}/miaoda-ui/doubao.svg`,st=`${J}/miaoda-ui/Union.png`,at=`${J}/logo/miaodalogo.svg`,ke='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',ct='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',lt='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.13397 2.5C7.51887 1.83333 8.48113 1.83333 8.86603 2.5L14.0622 11.5C14.4471 12.1667 13.966 13 13.1962 13H2.80385C2.03405 13 1.55292 12.1667 1.93782 11.5L7.13397 2.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/><path d="M8 6.16667V8.83333" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><circle cx="8" cy="10.6667" r="0.6667" fill="currentColor"/></svg>',dt='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.91685 2.08234C10.2097 2.37519 10.2096 2.8501 9.91685 3.143L7.06253 5.99732L9.91858 8.85337C10.2114 9.14627 10.2115 9.62115 9.91858 9.91403C9.62568 10.2068 9.15076 10.2068 8.85792 9.91403L6.00187 7.05798L3.14444 9.91541C2.85155 10.2083 2.37667 10.2083 2.08378 9.91541C1.791 9.62251 1.79093 9.14761 2.08378 8.85475L4.94121 5.99732L2.08551 3.14162C1.79267 2.84878 1.79278 2.37387 2.08551 2.08096C2.3784 1.78807 2.85327 1.78807 3.14617 2.08096L6.00187 4.93666L8.85619 2.08234C9.14906 1.78961 9.62399 1.7896 9.91685 2.08234Z" fill="white" fill-opacity="0.3"/></svg>',ut='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>',ft='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>',Se=!0,pt="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",ht="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",Y="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",gt="'Doubao Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",W={doubao:{brandText:"\u8C46\u5305\u5DE5\u4F5C AI \u751F\u6210",logoSrc:ot,downloadUrl:"https://ugapk.com/FCtLH"},miaoda:{brandText:"\u5999\u642D\u751F\u6210",logoSrc:at,landingUrl:"https://miaoda.feishu.cn/landing"}},mt={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function Le(){var o;let t=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=M())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${mt[j()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(t)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(Le,"openReport");var vt={feedback:ct,report:lt,close:ke,download:ut,efficiency:ft};function Ee(t){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${t}px`,height:`${t}px`,flexShrink:"0"}),e.innerHTML=ke;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(t)),o.setAttribute("height",String(t)),o.style.display="block"),e}i(Ee,"makeCloseIcon");function bt(t,e=16){if(t==="close")return Ee(e);let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:`${e}px`,height:`${e}px`,flexShrink:"0"}),o.innerHTML=vt[t];let d=o.firstElementChild;return d&&(d.style.display="block"),o}i(bt,"makeIcon");function _t(t,e){let o=document.createElement("img");return o.src=t,o.width=e,o.height=e,o.alt="",Object.assign(o.style,{width:`${e}px`,height:`${e}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),o}i(_t,"makeLogo");function Ie(t,e,o){let d=e==="desktop",f=t==="doubao",m=W[t],g=document.createElement("div");f?Object.assign(g.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"3.4px",padding:d?"5px 10px 5px 7px":"6px 12px 6px 8px",background:"rgba(77,77,77,0.7)",borderRadius:"8.5px",cursor:"pointer"}):Object.assign(g.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"4px",padding:d?"6px 12px 6px 8px":"5px 12px 5px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:pt,cursor:"pointer"});let v=_t(m.logoSrc,f?17:16),y;if(f){let w=document.createElement("img");w.src=st,w.alt=m.brandText,w.draggable=!1,Object.assign(w.style,{height:d?"12px":"14px",width:"auto",display:"block",flexShrink:"0"}),y=w}else{let w=document.createElement("span");w.textContent=m.brandText,Object.assign(w.style,{fontFamily:Y,fontSize:d?"12px":"14px",lineHeight:d?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),y=w}if(g.append(v,y),d&&o){let w=document.createElement("span");w.setAttribute("role","button"),w.setAttribute("aria-label","\u5173\u95ED"),w.setAttribute("data-watermark-close",""),Object.assign(w.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0"}),f?w.innerHTML=dt:(w.style.color="rgba(255,255,255,0.5)",w.appendChild(Ee(10))),w.addEventListener("click",k=>{k.stopPropagation(),o()}),g.appendChild(w)}return g}i(Ie,"buildPill");function B(t){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",t.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",minHeight:"38px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),o.appendChild(bt(t.icon));let d=document.createElement("span");return d.textContent=t.label,Object.assign(d.style,{fontFamily:Y,fontSize:`${t.fontSize}px`,lineHeight:`${t.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,d),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",t.onClick),e}i(B,"buildMenuRow");function yt(){let t=document.createElement("div");return Object.assign(t.style,{height:"1px",background:"rgba(0,0,0,0.08)",margin:"0 10px"}),t}i(yt,"buildDivider");function Te(t){var o;let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${t.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:ht,overflow:"hidden",outline:"none"}),t.items.length){let d=document.createElement("div");Object.assign(d.style,{boxSizing:"border-box",padding:"4px",display:"flex",flexDirection:"column",gap:`${(o=t.itemGap)!=null?o:0}px`}),t.items.forEach(f=>d.appendChild(f)),e.appendChild(d)}if(t.extraItems&&t.extraItems.length){e.appendChild(yt());let d=document.createElement("div");Object.assign(d.style,{boxSizing:"border-box",padding:"4px"}),t.extraItems.forEach(f=>d.appendChild(f)),e.appendChild(d)}return e}i(Te,"buildMenuCard");function Ae(t,e=!1){let o=document.createElement("div");o.setAttribute("data-custom-element",`${t}-watermark${e?"-mobile":""}`);let d=o.attachShadow({mode:"open"}),f=t==="doubao"?gt:Y,m=document.createElement("style");m.textContent=`
|
|
2
2
|
:host {
|
|
3
3
|
all: initial !important;
|
|
4
4
|
display: block !important;
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
all: initial;
|
|
15
15
|
direction: ltr;
|
|
16
16
|
unicode-bidi: isolate;
|
|
17
|
-
font-family: ${
|
|
17
|
+
font-family: ${f};
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
align-items: flex-end;
|
|
21
21
|
gap: 8px;
|
|
22
22
|
}
|
|
23
|
-
`;let
|
|
23
|
+
`;let g=document.createElement("div");return g.className="watermark-root",d.append(m,g),{host:o,container:g}}i(Ae,"createWatermarkRoot");function wt(t){let{host:e,container:o}=Ae(t),d=[];t==="doubao"?d.push(B({icon:"download",label:"\u4E0B\u8F7D\u8C46\u5305\u5DE5\u4F5C",fontSize:14,onClick:i(()=>window.open(W.doubao.downloadUrl,"_blank","noopener,noreferrer"),"onClick")})):d.push(B({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:14,onClick:i(()=>window.open(W.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),Se&&d.push(B({icon:t==="doubao"?"report":"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:Le}));let f=Te({items:d,minWidth:160,itemGap:8});f.style.display="none";let m=Ie(t,"desktop",()=>e.remove()),g=m.querySelector("[data-watermark-close]");o.append(f,m);let v=null;return o.addEventListener("mouseenter",()=>{v&&clearTimeout(v),f.style.display="flex",g&&(g.style.display="inline-flex")}),o.addEventListener("mouseleave",()=>{v=setTimeout(()=>{f.style.display="none",g&&(g.style.display="none")},100)}),e}i(wt,"buildDesktopWatermark");function Ct(t){let{host:e,container:o}=Ae(t,!0);o.style.cursor="pointer";let d=[];t==="miaoda"&&d.push(B({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:16,onClick:i(()=>window.open(W.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),Se&&d.push(B({icon:t==="doubao"?"report":"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:Le}));let f=[B({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(y=>{y.stopPropagation(),document.removeEventListener("click",v),e.remove()},"onClick")})],m=Te({items:d,extraItems:f,minWidth:160});m.style.display="none";let g=Ie(t,"mobile");o.append(m,g),o.addEventListener("click",y=>{y.stopPropagation(),m.style.display=m.style.display==="none"?"flex":"none"});let v=i(()=>{m.style.display="none"},"onOutsideClick");return document.addEventListener("click",v),e}i(Ct,"buildMobileWatermark");var xe=!1,X=!1;async function Oe(t){if(xe||X||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>Oe(t),{once:!0});return}X=!0;let e=await ae();if(xe=!0,X=!1,!e)return;let o=U()?Ct(t):wt(t);document.body.appendChild(o)}i(Oe,"mountWatermark");function Me(){return Oe("doubao")}i(Me,"mountDoubaoWatermark");var xt="0.0.16-beta.0",kt="@lark-apaas/miaoda-coding-sdk";se()&&(fe(),be());Me();Ce();return Ne(St);})();
|
package/dist/runtime.dev.js
CHANGED
|
@@ -1424,18 +1424,22 @@ var MiaodaRuntime = (() => {
|
|
|
1424
1424
|
// src/runtime/watermark.ts
|
|
1425
1425
|
var CDN = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp";
|
|
1426
1426
|
var DOUBAO_LOGO_SRC = `${CDN}/miaoda-ui/doubao.svg`;
|
|
1427
|
+
var DOUBAO_BRAND_TEXT_SRC = `${CDN}/miaoda-ui/Union.png`;
|
|
1427
1428
|
var MIAODA_LOGO_SRC = `${CDN}/logo/miaodalogo.svg`;
|
|
1428
1429
|
var CLOSE_ICON_SVG = '<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>';
|
|
1429
1430
|
var FEEDBACK_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>';
|
|
1431
|
+
var REPORT_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.13397 2.5C7.51887 1.83333 8.48113 1.83333 8.86603 2.5L14.0622 11.5C14.4471 12.1667 13.966 13 13.1962 13H2.80385C2.03405 13 1.55292 12.1667 1.93782 11.5L7.13397 2.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/><path d="M8 6.16667V8.83333" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><circle cx="8" cy="10.6667" r="0.6667" fill="currentColor"/></svg>';
|
|
1432
|
+
var DOUBAO_CLOSE_ICON_SVG = '<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.91685 2.08234C10.2097 2.37519 10.2096 2.8501 9.91685 3.143L7.06253 5.99732L9.91858 8.85337C10.2114 9.14627 10.2115 9.62115 9.91858 9.91403C9.62568 10.2068 9.15076 10.2068 8.85792 9.91403L6.00187 7.05798L3.14444 9.91541C2.85155 10.2083 2.37667 10.2083 2.08378 9.91541C1.791 9.62251 1.79093 9.14761 2.08378 8.85475L4.94121 5.99732L2.08551 3.14162C1.79267 2.84878 1.79278 2.37387 2.08551 2.08096C2.3784 1.78807 2.85327 1.78807 3.14617 2.08096L6.00187 4.93666L8.85619 2.08234C9.14906 1.78961 9.62399 1.7896 9.91685 2.08234Z" fill="white" fill-opacity="0.3"/></svg>';
|
|
1430
1433
|
var DOWNLOAD_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>';
|
|
1431
1434
|
var EFFICIENCY_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>';
|
|
1432
1435
|
var REPORT_ENABLED = true;
|
|
1433
1436
|
var PILL_SHADOW = "0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1434
1437
|
var CARD_SHADOW = "0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1435
1438
|
var FONT_FAMILY = "'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1439
|
+
var DOUBAO_FONT_FAMILY = "'Doubao Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1436
1440
|
var VARIANT_CONFIG = {
|
|
1437
1441
|
doubao: {
|
|
1438
|
-
brandText: "\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",
|
|
1442
|
+
brandText: "\u8C46\u5305\u5DE5\u4F5C AI \u751F\u6210",
|
|
1439
1443
|
logoSrc: DOUBAO_LOGO_SRC,
|
|
1440
1444
|
downloadUrl: "https://ugapk.com/FCtLH"
|
|
1441
1445
|
},
|
|
@@ -1464,6 +1468,7 @@ var MiaodaRuntime = (() => {
|
|
|
1464
1468
|
__name(openReport, "openReport");
|
|
1465
1469
|
var ICON_SVG_MAP = {
|
|
1466
1470
|
feedback: FEEDBACK_ICON_SVG,
|
|
1471
|
+
report: REPORT_ICON_SVG,
|
|
1467
1472
|
close: CLOSE_ICON_SVG,
|
|
1468
1473
|
download: DOWNLOAD_ICON_SVG,
|
|
1469
1474
|
efficiency: EFFICIENCY_ICON_SVG
|
|
@@ -1521,31 +1526,61 @@ var MiaodaRuntime = (() => {
|
|
|
1521
1526
|
__name(makeLogo, "makeLogo");
|
|
1522
1527
|
function buildPill(variant, platform, onClose) {
|
|
1523
1528
|
const isDesktop = platform === "desktop";
|
|
1529
|
+
const isDoubao = variant === "doubao";
|
|
1524
1530
|
const config = VARIANT_CONFIG[variant];
|
|
1525
1531
|
const pill = document.createElement("div");
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1532
|
+
if (isDoubao) {
|
|
1533
|
+
Object.assign(pill.style, {
|
|
1534
|
+
boxSizing: "border-box",
|
|
1535
|
+
display: "inline-flex",
|
|
1536
|
+
alignItems: "center",
|
|
1537
|
+
gap: "3.4px",
|
|
1538
|
+
padding: isDesktop ? "5px 10px 5px 7px" : "6px 12px 6px 8px",
|
|
1539
|
+
background: "rgba(77,77,77,0.7)",
|
|
1540
|
+
borderRadius: "8.5px",
|
|
1541
|
+
cursor: "pointer"
|
|
1542
|
+
});
|
|
1543
|
+
} else {
|
|
1544
|
+
Object.assign(pill.style, {
|
|
1545
|
+
boxSizing: "border-box",
|
|
1546
|
+
display: "inline-flex",
|
|
1547
|
+
alignItems: "center",
|
|
1548
|
+
gap: "4px",
|
|
1549
|
+
padding: isDesktop ? "6px 12px 6px 8px" : "5px 12px 5px 8px",
|
|
1550
|
+
background: "#363636",
|
|
1551
|
+
border: "0.5px solid rgba(255,255,255,0.1)",
|
|
1552
|
+
borderRadius: "100px",
|
|
1553
|
+
boxShadow: PILL_SHADOW,
|
|
1554
|
+
cursor: "pointer"
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
const logo = makeLogo(config.logoSrc, isDoubao ? 17 : 16);
|
|
1558
|
+
let brandEl;
|
|
1559
|
+
if (isDoubao) {
|
|
1560
|
+
const img = document.createElement("img");
|
|
1561
|
+
img.src = DOUBAO_BRAND_TEXT_SRC;
|
|
1562
|
+
img.alt = config.brandText;
|
|
1563
|
+
img.draggable = false;
|
|
1564
|
+
Object.assign(img.style, {
|
|
1565
|
+
height: isDesktop ? "12px" : "14px",
|
|
1566
|
+
width: "auto",
|
|
1567
|
+
display: "block",
|
|
1568
|
+
flexShrink: "0"
|
|
1569
|
+
});
|
|
1570
|
+
brandEl = img;
|
|
1571
|
+
} else {
|
|
1572
|
+
const span = document.createElement("span");
|
|
1573
|
+
span.textContent = config.brandText;
|
|
1574
|
+
Object.assign(span.style, {
|
|
1575
|
+
fontFamily: FONT_FAMILY,
|
|
1576
|
+
fontSize: isDesktop ? "12px" : "14px",
|
|
1577
|
+
lineHeight: isDesktop ? "18px" : "22px",
|
|
1578
|
+
color: "rgba(255,255,255,0.85)",
|
|
1579
|
+
whiteSpace: "nowrap"
|
|
1580
|
+
});
|
|
1581
|
+
brandEl = span;
|
|
1582
|
+
}
|
|
1583
|
+
pill.append(logo, brandEl);
|
|
1549
1584
|
if (isDesktop && onClose) {
|
|
1550
1585
|
const close = document.createElement("span");
|
|
1551
1586
|
close.setAttribute("role", "button");
|
|
@@ -1555,10 +1590,14 @@ var MiaodaRuntime = (() => {
|
|
|
1555
1590
|
display: "none",
|
|
1556
1591
|
alignItems: "center",
|
|
1557
1592
|
cursor: "pointer",
|
|
1558
|
-
flexShrink: "0"
|
|
1559
|
-
color: "rgba(255,255,255,0.5)"
|
|
1593
|
+
flexShrink: "0"
|
|
1560
1594
|
});
|
|
1561
|
-
|
|
1595
|
+
if (isDoubao) {
|
|
1596
|
+
close.innerHTML = DOUBAO_CLOSE_ICON_SVG;
|
|
1597
|
+
} else {
|
|
1598
|
+
close.style.color = "rgba(255,255,255,0.5)";
|
|
1599
|
+
close.appendChild(makeCloseIcon(10));
|
|
1600
|
+
}
|
|
1562
1601
|
close.addEventListener("click", (e) => {
|
|
1563
1602
|
e.stopPropagation();
|
|
1564
1603
|
onClose();
|
|
@@ -1668,6 +1707,7 @@ var MiaodaRuntime = (() => {
|
|
|
1668
1707
|
const shadow = host.attachShadow({
|
|
1669
1708
|
mode: "open"
|
|
1670
1709
|
});
|
|
1710
|
+
const fontFamily = variant === "doubao" ? DOUBAO_FONT_FAMILY : FONT_FAMILY;
|
|
1671
1711
|
const style = document.createElement("style");
|
|
1672
1712
|
style.textContent = `
|
|
1673
1713
|
:host {
|
|
@@ -1685,7 +1725,7 @@ var MiaodaRuntime = (() => {
|
|
|
1685
1725
|
all: initial;
|
|
1686
1726
|
direction: ltr;
|
|
1687
1727
|
unicode-bidi: isolate;
|
|
1688
|
-
font-family: ${
|
|
1728
|
+
font-family: ${fontFamily};
|
|
1689
1729
|
display: flex;
|
|
1690
1730
|
flex-direction: column;
|
|
1691
1731
|
align-items: flex-end;
|
|
@@ -1721,7 +1761,7 @@ var MiaodaRuntime = (() => {
|
|
|
1721
1761
|
}
|
|
1722
1762
|
if (REPORT_ENABLED) {
|
|
1723
1763
|
items.push(buildMenuRow({
|
|
1724
|
-
icon: "feedback",
|
|
1764
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1725
1765
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1726
1766
|
fontSize: 14,
|
|
1727
1767
|
onClick: openReport
|
|
@@ -1765,7 +1805,7 @@ var MiaodaRuntime = (() => {
|
|
|
1765
1805
|
}
|
|
1766
1806
|
if (REPORT_ENABLED) {
|
|
1767
1807
|
items.push(buildMenuRow({
|
|
1768
|
-
icon: "feedback",
|
|
1808
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1769
1809
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1770
1810
|
fontSize: 16,
|
|
1771
1811
|
onClick: openReport
|
|
@@ -1827,7 +1867,7 @@ var MiaodaRuntime = (() => {
|
|
|
1827
1867
|
__name(mountMiaodaWatermark, "mountMiaodaWatermark");
|
|
1828
1868
|
|
|
1829
1869
|
// src/runtime.ts
|
|
1830
|
-
var version = "0.0.
|
|
1870
|
+
var version = "0.0.16-beta.0";
|
|
1831
1871
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1832
1872
|
if (isOnlineEnv()) {
|
|
1833
1873
|
reportPageView();
|
package/dist/runtime.js
CHANGED
|
@@ -1424,18 +1424,22 @@ var MiaodaRuntime = (() => {
|
|
|
1424
1424
|
// src/runtime/watermark.ts
|
|
1425
1425
|
var CDN = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp";
|
|
1426
1426
|
var DOUBAO_LOGO_SRC = `${CDN}/miaoda-ui/doubao.svg`;
|
|
1427
|
+
var DOUBAO_BRAND_TEXT_SRC = `${CDN}/miaoda-ui/Union.png`;
|
|
1427
1428
|
var MIAODA_LOGO_SRC = `${CDN}/logo/miaodalogo.svg`;
|
|
1428
1429
|
var CLOSE_ICON_SVG = '<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>';
|
|
1429
1430
|
var FEEDBACK_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>';
|
|
1431
|
+
var REPORT_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.13397 2.5C7.51887 1.83333 8.48113 1.83333 8.86603 2.5L14.0622 11.5C14.4471 12.1667 13.966 13 13.1962 13H2.80385C2.03405 13 1.55292 12.1667 1.93782 11.5L7.13397 2.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/><path d="M8 6.16667V8.83333" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><circle cx="8" cy="10.6667" r="0.6667" fill="currentColor"/></svg>';
|
|
1432
|
+
var DOUBAO_CLOSE_ICON_SVG = '<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.91685 2.08234C10.2097 2.37519 10.2096 2.8501 9.91685 3.143L7.06253 5.99732L9.91858 8.85337C10.2114 9.14627 10.2115 9.62115 9.91858 9.91403C9.62568 10.2068 9.15076 10.2068 8.85792 9.91403L6.00187 7.05798L3.14444 9.91541C2.85155 10.2083 2.37667 10.2083 2.08378 9.91541C1.791 9.62251 1.79093 9.14761 2.08378 8.85475L4.94121 5.99732L2.08551 3.14162C1.79267 2.84878 1.79278 2.37387 2.08551 2.08096C2.3784 1.78807 2.85327 1.78807 3.14617 2.08096L6.00187 4.93666L8.85619 2.08234C9.14906 1.78961 9.62399 1.7896 9.91685 2.08234Z" fill="white" fill-opacity="0.3"/></svg>';
|
|
1430
1433
|
var DOWNLOAD_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>';
|
|
1431
1434
|
var EFFICIENCY_ICON_SVG = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>';
|
|
1432
1435
|
var REPORT_ENABLED = true;
|
|
1433
1436
|
var PILL_SHADOW = "0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1434
1437
|
var CARD_SHADOW = "0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
1435
1438
|
var FONT_FAMILY = "'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1439
|
+
var DOUBAO_FONT_FAMILY = "'Doubao Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
1436
1440
|
var VARIANT_CONFIG = {
|
|
1437
1441
|
doubao: {
|
|
1438
|
-
brandText: "\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",
|
|
1442
|
+
brandText: "\u8C46\u5305\u5DE5\u4F5C AI \u751F\u6210",
|
|
1439
1443
|
logoSrc: DOUBAO_LOGO_SRC,
|
|
1440
1444
|
downloadUrl: "https://ugapk.com/FCtLH"
|
|
1441
1445
|
},
|
|
@@ -1464,6 +1468,7 @@ var MiaodaRuntime = (() => {
|
|
|
1464
1468
|
__name(openReport, "openReport");
|
|
1465
1469
|
var ICON_SVG_MAP = {
|
|
1466
1470
|
feedback: FEEDBACK_ICON_SVG,
|
|
1471
|
+
report: REPORT_ICON_SVG,
|
|
1467
1472
|
close: CLOSE_ICON_SVG,
|
|
1468
1473
|
download: DOWNLOAD_ICON_SVG,
|
|
1469
1474
|
efficiency: EFFICIENCY_ICON_SVG
|
|
@@ -1521,31 +1526,61 @@ var MiaodaRuntime = (() => {
|
|
|
1521
1526
|
__name(makeLogo, "makeLogo");
|
|
1522
1527
|
function buildPill(variant, platform, onClose) {
|
|
1523
1528
|
const isDesktop = platform === "desktop";
|
|
1529
|
+
const isDoubao = variant === "doubao";
|
|
1524
1530
|
const config = VARIANT_CONFIG[variant];
|
|
1525
1531
|
const pill = document.createElement("div");
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1532
|
+
if (isDoubao) {
|
|
1533
|
+
Object.assign(pill.style, {
|
|
1534
|
+
boxSizing: "border-box",
|
|
1535
|
+
display: "inline-flex",
|
|
1536
|
+
alignItems: "center",
|
|
1537
|
+
gap: "3.4px",
|
|
1538
|
+
padding: isDesktop ? "5px 10px 5px 7px" : "6px 12px 6px 8px",
|
|
1539
|
+
background: "rgba(77,77,77,0.7)",
|
|
1540
|
+
borderRadius: "8.5px",
|
|
1541
|
+
cursor: "pointer"
|
|
1542
|
+
});
|
|
1543
|
+
} else {
|
|
1544
|
+
Object.assign(pill.style, {
|
|
1545
|
+
boxSizing: "border-box",
|
|
1546
|
+
display: "inline-flex",
|
|
1547
|
+
alignItems: "center",
|
|
1548
|
+
gap: "4px",
|
|
1549
|
+
padding: isDesktop ? "6px 12px 6px 8px" : "5px 12px 5px 8px",
|
|
1550
|
+
background: "#363636",
|
|
1551
|
+
border: "0.5px solid rgba(255,255,255,0.1)",
|
|
1552
|
+
borderRadius: "100px",
|
|
1553
|
+
boxShadow: PILL_SHADOW,
|
|
1554
|
+
cursor: "pointer"
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
const logo = makeLogo(config.logoSrc, isDoubao ? 17 : 16);
|
|
1558
|
+
let brandEl;
|
|
1559
|
+
if (isDoubao) {
|
|
1560
|
+
const img = document.createElement("img");
|
|
1561
|
+
img.src = DOUBAO_BRAND_TEXT_SRC;
|
|
1562
|
+
img.alt = config.brandText;
|
|
1563
|
+
img.draggable = false;
|
|
1564
|
+
Object.assign(img.style, {
|
|
1565
|
+
height: isDesktop ? "12px" : "14px",
|
|
1566
|
+
width: "auto",
|
|
1567
|
+
display: "block",
|
|
1568
|
+
flexShrink: "0"
|
|
1569
|
+
});
|
|
1570
|
+
brandEl = img;
|
|
1571
|
+
} else {
|
|
1572
|
+
const span = document.createElement("span");
|
|
1573
|
+
span.textContent = config.brandText;
|
|
1574
|
+
Object.assign(span.style, {
|
|
1575
|
+
fontFamily: FONT_FAMILY,
|
|
1576
|
+
fontSize: isDesktop ? "12px" : "14px",
|
|
1577
|
+
lineHeight: isDesktop ? "18px" : "22px",
|
|
1578
|
+
color: "rgba(255,255,255,0.85)",
|
|
1579
|
+
whiteSpace: "nowrap"
|
|
1580
|
+
});
|
|
1581
|
+
brandEl = span;
|
|
1582
|
+
}
|
|
1583
|
+
pill.append(logo, brandEl);
|
|
1549
1584
|
if (isDesktop && onClose) {
|
|
1550
1585
|
const close = document.createElement("span");
|
|
1551
1586
|
close.setAttribute("role", "button");
|
|
@@ -1555,10 +1590,14 @@ var MiaodaRuntime = (() => {
|
|
|
1555
1590
|
display: "none",
|
|
1556
1591
|
alignItems: "center",
|
|
1557
1592
|
cursor: "pointer",
|
|
1558
|
-
flexShrink: "0"
|
|
1559
|
-
color: "rgba(255,255,255,0.5)"
|
|
1593
|
+
flexShrink: "0"
|
|
1560
1594
|
});
|
|
1561
|
-
|
|
1595
|
+
if (isDoubao) {
|
|
1596
|
+
close.innerHTML = DOUBAO_CLOSE_ICON_SVG;
|
|
1597
|
+
} else {
|
|
1598
|
+
close.style.color = "rgba(255,255,255,0.5)";
|
|
1599
|
+
close.appendChild(makeCloseIcon(10));
|
|
1600
|
+
}
|
|
1562
1601
|
close.addEventListener("click", (e) => {
|
|
1563
1602
|
e.stopPropagation();
|
|
1564
1603
|
onClose();
|
|
@@ -1668,6 +1707,7 @@ var MiaodaRuntime = (() => {
|
|
|
1668
1707
|
const shadow = host.attachShadow({
|
|
1669
1708
|
mode: "open"
|
|
1670
1709
|
});
|
|
1710
|
+
const fontFamily = variant === "doubao" ? DOUBAO_FONT_FAMILY : FONT_FAMILY;
|
|
1671
1711
|
const style = document.createElement("style");
|
|
1672
1712
|
style.textContent = `
|
|
1673
1713
|
:host {
|
|
@@ -1685,7 +1725,7 @@ var MiaodaRuntime = (() => {
|
|
|
1685
1725
|
all: initial;
|
|
1686
1726
|
direction: ltr;
|
|
1687
1727
|
unicode-bidi: isolate;
|
|
1688
|
-
font-family: ${
|
|
1728
|
+
font-family: ${fontFamily};
|
|
1689
1729
|
display: flex;
|
|
1690
1730
|
flex-direction: column;
|
|
1691
1731
|
align-items: flex-end;
|
|
@@ -1721,7 +1761,7 @@ var MiaodaRuntime = (() => {
|
|
|
1721
1761
|
}
|
|
1722
1762
|
if (REPORT_ENABLED) {
|
|
1723
1763
|
items.push(buildMenuRow({
|
|
1724
|
-
icon: "feedback",
|
|
1764
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1725
1765
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1726
1766
|
fontSize: 14,
|
|
1727
1767
|
onClick: openReport
|
|
@@ -1765,7 +1805,7 @@ var MiaodaRuntime = (() => {
|
|
|
1765
1805
|
}
|
|
1766
1806
|
if (REPORT_ENABLED) {
|
|
1767
1807
|
items.push(buildMenuRow({
|
|
1768
|
-
icon: "feedback",
|
|
1808
|
+
icon: variant === "doubao" ? "report" : "feedback",
|
|
1769
1809
|
label: "\u6295\u8BC9\u4E0E\u4E3E\u62A5",
|
|
1770
1810
|
fontSize: 16,
|
|
1771
1811
|
onClick: openReport
|
|
@@ -1827,7 +1867,7 @@ var MiaodaRuntime = (() => {
|
|
|
1827
1867
|
__name(mountMiaodaWatermark, "mountMiaodaWatermark");
|
|
1828
1868
|
|
|
1829
1869
|
// src/runtime.ts
|
|
1830
|
-
var version = "0.0.
|
|
1870
|
+
var version = "0.0.16-beta.0";
|
|
1831
1871
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1832
1872
|
if (isOnlineEnv()) {
|
|
1833
1873
|
reportPageView();
|
package/dist/runtime.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var MiaodaRuntime=(()=>{var Te=Object.create;var H=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var i=(n,e)=>H(n,"name",{value:e,configurable:!0});var U=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Me=(n,e)=>{for(var o in e)H(n,o,{get:e[o],enumerable:!0})},q=(n,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of Pe(e))!Oe.call(n,p)&&p!==o&&H(n,p,{get:()=>e[p],enumerable:!(u=Ae(e,p))||u.enumerable});return n};var X=(n,e,o)=>(o=n!=null?Te(Be(n)):{},q(e||!n||!n.__esModule?H(o,"default",{value:n,enumerable:!0}):o,n)),He=n=>q(H({},"__esModule",{value:!0}),n);var Q=U((Y,D)=>{"use strict";(function(n){"use strict";function e(t,h){var r=(t&65535)+(h&65535),y=(t>>16)+(h>>16)+(r>>16);return y<<16|r&65535}i(e,"safeAdd");function o(t,h){return t<<h|t>>>32-h}i(o,"bitRotateLeft");function u(t,h,r,y,C,S){return e(o(e(e(h,t),e(y,S)),C),r)}i(u,"md5cmn");function p(t,h,r,y,C,S,A){return u(h&r|~h&y,t,h,C,S,A)}i(p,"md5ff");function m(t,h,r,y,C,S,A){return u(h&y|r&~y,t,h,C,S,A)}i(m,"md5gg");function g(t,h,r,y,C,S,A){return u(h^r^y,t,h,C,S,A)}i(g,"md5hh");function v(t,h,r,y,C,S,A){return u(r^(h|~y),t,h,C,S,A)}i(v,"md5ii");function w(t,h){t[h>>5]|=128<<h%32,t[(h+64>>>9<<4)+14]=h;var r,y,C,S,A,a=1732584193,s=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)y=a,C=s,S=c,A=l,a=p(a,s,c,l,t[r],7,-680876936),l=p(l,a,s,c,t[r+1],12,-389564586),c=p(c,l,a,s,t[r+2],17,606105819),s=p(s,c,l,a,t[r+3],22,-1044525330),a=p(a,s,c,l,t[r+4],7,-176418897),l=p(l,a,s,c,t[r+5],12,1200080426),c=p(c,l,a,s,t[r+6],17,-1473231341),s=p(s,c,l,a,t[r+7],22,-45705983),a=p(a,s,c,l,t[r+8],7,1770035416),l=p(l,a,s,c,t[r+9],12,-1958414417),c=p(c,l,a,s,t[r+10],17,-42063),s=p(s,c,l,a,t[r+11],22,-1990404162),a=p(a,s,c,l,t[r+12],7,1804603682),l=p(l,a,s,c,t[r+13],12,-40341101),c=p(c,l,a,s,t[r+14],17,-1502002290),s=p(s,c,l,a,t[r+15],22,1236535329),a=m(a,s,c,l,t[r+1],5,-165796510),l=m(l,a,s,c,t[r+6],9,-1069501632),c=m(c,l,a,s,t[r+11],14,643717713),s=m(s,c,l,a,t[r],20,-373897302),a=m(a,s,c,l,t[r+5],5,-701558691),l=m(l,a,s,c,t[r+10],9,38016083),c=m(c,l,a,s,t[r+15],14,-660478335),s=m(s,c,l,a,t[r+4],20,-405537848),a=m(a,s,c,l,t[r+9],5,568446438),l=m(l,a,s,c,t[r+14],9,-1019803690),c=m(c,l,a,s,t[r+3],14,-187363961),s=m(s,c,l,a,t[r+8],20,1163531501),a=m(a,s,c,l,t[r+13],5,-1444681467),l=m(l,a,s,c,t[r+2],9,-51403784),c=m(c,l,a,s,t[r+7],14,1735328473),s=m(s,c,l,a,t[r+12],20,-1926607734),a=g(a,s,c,l,t[r+5],4,-378558),l=g(l,a,s,c,t[r+8],11,-2022574463),c=g(c,l,a,s,t[r+11],16,1839030562),s=g(s,c,l,a,t[r+14],23,-35309556),a=g(a,s,c,l,t[r+1],4,-1530992060),l=g(l,a,s,c,t[r+4],11,1272893353),c=g(c,l,a,s,t[r+7],16,-155497632),s=g(s,c,l,a,t[r+10],23,-1094730640),a=g(a,s,c,l,t[r+13],4,681279174),l=g(l,a,s,c,t[r],11,-358537222),c=g(c,l,a,s,t[r+3],16,-722521979),s=g(s,c,l,a,t[r+6],23,76029189),a=g(a,s,c,l,t[r+9],4,-640364487),l=g(l,a,s,c,t[r+12],11,-421815835),c=g(c,l,a,s,t[r+15],16,530742520),s=g(s,c,l,a,t[r+2],23,-995338651),a=v(a,s,c,l,t[r],6,-198630844),l=v(l,a,s,c,t[r+7],10,1126891415),c=v(c,l,a,s,t[r+14],15,-1416354905),s=v(s,c,l,a,t[r+5],21,-57434055),a=v(a,s,c,l,t[r+12],6,1700485571),l=v(l,a,s,c,t[r+3],10,-1894986606),c=v(c,l,a,s,t[r+10],15,-1051523),s=v(s,c,l,a,t[r+1],21,-2054922799),a=v(a,s,c,l,t[r+8],6,1873313359),l=v(l,a,s,c,t[r+15],10,-30611744),c=v(c,l,a,s,t[r+6],15,-1560198380),s=v(s,c,l,a,t[r+13],21,1309151649),a=v(a,s,c,l,t[r+4],6,-145523070),l=v(l,a,s,c,t[r+11],10,-1120210379),c=v(c,l,a,s,t[r+2],15,718787259),s=v(s,c,l,a,t[r+9],21,-343485551),a=e(a,y),s=e(s,C),c=e(c,S),l=e(l,A);return[a,s,c,l]}i(w,"binlMD5");function T(t){var h,r="",y=t.length*32;for(h=0;h<y;h+=8)r+=String.fromCharCode(t[h>>5]>>>h%32&255);return r}i(T,"binl2rstr");function x(t){var h,r=[];for(r[(t.length>>2)-1]=void 0,h=0;h<r.length;h+=1)r[h]=0;var y=t.length*8;for(h=0;h<y;h+=8)r[h>>5]|=(t.charCodeAt(h/8)&255)<<h%32;return r}i(x,"rstr2binl");function L(t){return T(w(x(t),t.length*8))}i(L,"rstrMD5");function E(t,h){var r,y=x(t),C=[],S=[],A;for(C[15]=S[15]=void 0,y.length>16&&(y=w(y,t.length*8)),r=0;r<16;r+=1)C[r]=y[r]^909522486,S[r]=y[r]^1549556828;return A=w(C.concat(x(h)),512+h.length*8),T(w(S.concat(A),640))}i(E,"rstrHMACMD5");function P(t){var h="0123456789abcdef",r="",y,C;for(C=0;C<t.length;C+=1)y=t.charCodeAt(C),r+=h.charAt(y>>>4&15)+h.charAt(y&15);return r}i(P,"rstr2hex");function I(t){return unescape(encodeURIComponent(t))}i(I,"str2rstrUTF8");function d(t){return L(I(t))}i(d,"rawMD5");function f(t){return P(d(t))}i(f,"hexMD5");function _(t,h){return E(I(t),I(h))}i(_,"rawHMACMD5");function b(t,h){return P(_(t,h))}i(b,"hexHMACMD5");function k(t,h,r){return h?r?_(h,t):b(h,t):r?d(t):f(t)}i(k,"md5"),typeof define=="function"&&define.amd?define(function(){return k}):typeof D=="object"&&D.exports?D.exports=k:n.md5=k})(Y)});var te=U((R,ee)=>{"use strict";(function(n,e){typeof R=="object"?ee.exports=R=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(R,function(){var n=n||(function(e,o){var u=Object.create||(function(){function d(){}return i(d,"F"),function(f){var _;return d.prototype=f,_=new d,d.prototype=null,_}})(),p={},m=p.lib={},g=m.Base=(function(){return{extend:i(function(d){var f=u(this);return d&&f.mixIn(d),(!f.hasOwnProperty("init")||this.init===f.init)&&(f.init=function(){f.$super.init.apply(this,arguments)}),f.init.prototype=f,f.$super=this,f},"extend"),create:i(function(){var d=this.extend();return d.init.apply(d,arguments),d},"create"),init:i(function(){},"init"),mixIn:i(function(d){for(var f in d)d.hasOwnProperty(f)&&(this[f]=d[f]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),v=m.WordArray=g.extend({init:i(function(d,f){d=this.words=d||[],f!=o?this.sigBytes=f:this.sigBytes=d.length*4},"init"),toString:i(function(d){return(d||T).stringify(this)},"toString"),concat:i(function(d){var f=this.words,_=d.words,b=this.sigBytes,k=d.sigBytes;if(this.clamp(),b%4)for(var t=0;t<k;t++){var h=_[t>>>2]>>>24-t%4*8&255;f[b+t>>>2]|=h<<24-(b+t)%4*8}else for(var t=0;t<k;t+=4)f[b+t>>>2]=_[t>>>2];return this.sigBytes+=k,this},"concat"),clamp:i(function(){var d=this.words,f=this.sigBytes;d[f>>>2]&=4294967295<<32-f%4*8,d.length=e.ceil(f/4)},"clamp"),clone:i(function(){var d=g.clone.call(this);return d.words=this.words.slice(0),d},"clone"),random:i(function(d){for(var f=[],_=i(function(r){var r=r,y=987654321,C=4294967295;return function(){y=36969*(y&65535)+(y>>16)&C,r=18e3*(r&65535)+(r>>16)&C;var S=(y<<16)+r&C;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),b=0,k;b<d;b+=4){var t=_((k||e.random())*4294967296);k=t()*987654071,f.push(t()*4294967296|0)}return new v.init(f,d)},"random")}),w=p.enc={},T=w.Hex={stringify:i(function(d){for(var f=d.words,_=d.sigBytes,b=[],k=0;k<_;k++){var t=f[k>>>2]>>>24-k%4*8&255;b.push((t>>>4).toString(16)),b.push((t&15).toString(16))}return b.join("")},"stringify"),parse:i(function(d){for(var f=d.length,_=[],b=0;b<f;b+=2)_[b>>>3]|=parseInt(d.substr(b,2),16)<<24-b%8*4;return new v.init(_,f/2)},"parse")},x=w.Latin1={stringify:i(function(d){for(var f=d.words,_=d.sigBytes,b=[],k=0;k<_;k++){var t=f[k>>>2]>>>24-k%4*8&255;b.push(String.fromCharCode(t))}return b.join("")},"stringify"),parse:i(function(d){for(var f=d.length,_=[],b=0;b<f;b++)_[b>>>2]|=(d.charCodeAt(b)&255)<<24-b%4*8;return new v.init(_,f)},"parse")},L=w.Utf8={stringify:i(function(d){try{return decodeURIComponent(escape(x.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(d){return x.parse(unescape(encodeURIComponent(d)))},"parse")},E=m.BufferedBlockAlgorithm=g.extend({reset:i(function(){this._data=new v.init,this._nDataBytes=0},"reset"),_append:i(function(d){typeof d=="string"&&(d=L.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},"_append"),_process:i(function(d){var f=this._data,_=f.words,b=f.sigBytes,k=this.blockSize,t=k*4,h=b/t;d?h=e.ceil(h):h=e.max((h|0)-this._minBufferSize,0);var r=h*k,y=e.min(r*4,b);if(r){for(var C=0;C<r;C+=k)this._doProcessBlock(_,C);var S=_.splice(0,r);f.sigBytes-=y}return new v.init(S,y)},"_process"),clone:i(function(){var d=g.clone.call(this);return d._data=this._data.clone(),d},"clone"),_minBufferSize:0}),P=m.Hasher=E.extend({cfg:g.extend(),init:i(function(d){this.cfg=this.cfg.extend(d),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(d){return this._append(d),this._process(),this},"update"),finalize:i(function(d){d&&this._append(d);var f=this._doFinalize();return f},"finalize"),blockSize:512/32,_createHelper:i(function(d){return function(f,_){return new d.init(_).finalize(f)}},"_createHelper"),_createHmacHelper:i(function(d){return function(f,_){return new I.HMAC.init(d,_).finalize(f)}},"_createHmacHelper")}),I=p.algo={};return p})(Math);return n})});var re=U((F,ne)=>{"use strict";(function(n,e){typeof F=="object"?ne.exports=F=e(te()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(F,function(n){return(function(){var e=n,o=e.lib,u=o.WordArray,p=o.Hasher,m=e.algo,g=[],v=m.SHA1=p.extend({_doReset:i(function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(w,T){for(var x=this._hash.words,L=x[0],E=x[1],P=x[2],I=x[3],d=x[4],f=0;f<80;f++){if(f<16)g[f]=w[T+f]|0;else{var _=g[f-3]^g[f-8]^g[f-14]^g[f-16];g[f]=_<<1|_>>>31}var b=(L<<5|L>>>27)+d+g[f];f<20?b+=(E&P|~E&I)+1518500249:f<40?b+=(E^P^I)+1859775393:f<60?b+=(E&P|E&I|P&I)-1894007588:b+=(E^P^I)-899497514,d=I,I=P,P=E<<30|E>>>2,E=L,L=b}x[0]=x[0]+L|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+I|0,x[4]=x[4]+d|0},"_doProcessBlock"),_doFinalize:i(function(){var w=this._data,T=w.words,x=this._nDataBytes*8,L=w.sigBytes*8;return T[L>>>5]|=128<<24-L%32,T[(L+64>>>9<<4)+14]=Math.floor(x/4294967296),T[(L+64>>>9<<4)+15]=x,w.sigBytes=T.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var w=p.clone.call(this);return w._hash=this._hash.clone(),w},"clone")});e.SHA1=p._createHelper(v),e.HmacSHA1=p._createHmacHelper(v)})(),n.SHA1})});var ut={};Me(ut,{TrackKey:()=>z,name:()=>dt,reportTeaEvent:()=>G,version:()=>lt});var le=X(Q(),1),de=X(re(),1);function B(){return window.appId||null}i(B,"getAppId");function ie(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let u of e){let[p,m]=u.split("=");if(p===n)return decodeURIComponent(m)}return(o=window.csrfToken)!=null?o:null}i(ie,"getCsrfToken");function N(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(N,"isNewPathEnabled");function $(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i($,"getEnv");function oe(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(oe,"isOnlineEnv");function W(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(W,"isMobile");async function ae(){var n,e,o;try{let u=B();if(!u)return!0;let p=N()?`/app/${u}/__runtime__/api/v1/studio/get_published`:`/spark/b/${u}/get_published`,g=await(await fetch(p,{headers:{"X-Suda-Csrf-Token":(n=ie())!=null?n:""}})).json();if(g.code===0||g.status_code==="0")return((o=(e=g.data)==null?void 0:e.app_info)==null?void 0:o.show_badge)!==!1}catch{}return!0}i(ae,"fetchShowBadge");async function se(){var u;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=N()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(u=ie())!=null?u:""}})).json()}i(se,"getLarkUserInfo");var z={VIEW:"aily_agent_artifact_page_view"},De="08a441",Re="42b91e";function ce(n){let e=String(n);return(0,de.default)(De+(0,le.default)(e+Re)).toString()}i(ce,"encryptTea");var V=!1;async function Fe(){var m,g,v,w;let{data:n}=await se(),{tenantID:e,userID:o}=n||{},u=o&&o!=="0"?ce(o):void 0,p=e&&e!=="0"?ce(e):void 0;(m=window.collectEvent)==null||m.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(v=window.collectEvent)==null||v.call(window,"config",{user_unique_id:u,device_type:W()?"mobile":"pc",evtParams:{open_from:(g=new URLSearchParams(window.location.search).get("open-from"))!=null?g:void 0,env:$(),user_id:u,tenant_id:p}}),V=!0,(w=window.collectEvent)==null||w.call(window,"start")}i(Fe,"createTracker");async function G({trackKey:n,trackParams:e={}}){var o;try{V||(V=!0,await Fe()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(u){console.error(u)}}i(G,"reportTeaEvent");function ue(){return G({trackKey:z.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(ue,"reportPageView");function fe(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(fe,"generateUUID");var pe="x_sdk_device_id";function Ne(){try{let n=localStorage.getItem(pe);return n||(n=fe(),localStorage.setItem(pe,n)),n}catch{return fe()}}i(Ne,"getDeviceId");function $e(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i($e,"getDeviceType");var We="pageSessionID";function je(){try{return new URLSearchParams(window.location.search).get(We)||""}catch{return""}}i(je,"getPvId");function Ue(n={}){let e=n.pvId||je();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Ne(),module:"app_web",app_env:"runtime",source_type:"user",device_type:$e(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Ue,"getDefaultAttributes");function he(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(he,"toNanoString");var Ve="1.0.2";function ze(n,e){let o=Ue(e),u=he(Date.now());return{metricsData:{resource:{attributes:{sdk_version:Ve,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(p=>({attributes:{...o,url:p.url,path:p.path,referrer:p.referrer},startTimeUnixNano:he(p.timestampMs),timeUnixNano:u,asDouble:1}))}}]}}}i(ze,"buildPayload");function Ge(n,e,o={},u){if(e.length===0)return;let p;try{p=JSON.stringify(ze(e,u))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:p,keepalive:!0}).catch(()=>{})}catch{}}i(Ge,"sendPvData");var K="__APAAS_PV_TRACKER_STARTED__";function Ke(){try{let n=window;return n[K]?!1:(n[K]=!0,!0)}catch{return!0}}i(Ke,"claimPvReporting");function me(){try{window[K]=!1}catch{}}i(me,"releasePvReporting");var O,Ze=(O=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new O),this._instance}start(e){var o;if(!this.started&&Ke()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let u=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),u)}catch(u){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,me(),u}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,me())}pageKey(){let{origin:e,pathname:o,search:u}=window.location;return`${e}${o}${u}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ge(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],u=i(()=>this.recordPv(),"recordPv");history[e]=function(...p){let m=o.apply(this,p);return u(),m},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(O,"_PvTracker"),O),ge=Ze.instance;function ve(){var o;let n=(o=B())!=null?o:"",e=N()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;ge.start({collectorUrl:e})}i(ve,"initPvTracking");var ye="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp",Je=`${ye}/miaoda-ui/doubao.svg`,qe=`${ye}/logo/miaodalogo.svg`,we='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Xe='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',Ye='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>',Qe='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>',_e=!0,et="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",tt="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",J="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",j={doubao:{brandText:"\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",logoSrc:Je,downloadUrl:"https://ugapk.com/FCtLH"},miaoda:{brandText:"\u5999\u642D\u751F\u6210",logoSrc:qe,landingUrl:"https://miaoda.feishu.cn/landing"}},nt={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function Ce(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${nt[$()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(Ce,"openReport");var rt={feedback:Xe,close:we,download:Ye,efficiency:Qe};function xe(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=we;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(xe,"makeCloseIcon");function it(n,e=16){if(n==="close")return xe(e);let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:`${e}px`,height:`${e}px`,flexShrink:"0"}),o.innerHTML=rt[n];let u=o.firstElementChild;return u&&(u.style.display="block"),o}i(it,"makeIcon");function ot(n,e){let o=document.createElement("img");return o.src=n,o.width=e,o.height=e,o.alt="",Object.assign(o.style,{width:`${e}px`,height:`${e}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),o}i(ot,"makeLogo");function ke(n,e,o){let u=e==="desktop",p=j[n],m=document.createElement("div");Object.assign(m.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"4px",padding:u?"6px 12px 6px 8px":"5px 12px 5px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:et,cursor:"pointer"});let g=ot(p.logoSrc,16),v=document.createElement("span");if(v.textContent=p.brandText,Object.assign(v.style,{fontFamily:J,fontSize:u?"12px":"14px",lineHeight:u?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),m.append(g,v),u&&o){let w=document.createElement("span");w.setAttribute("role","button"),w.setAttribute("aria-label","\u5173\u95ED"),w.setAttribute("data-watermark-close",""),Object.assign(w.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),w.appendChild(xe(10)),w.addEventListener("click",T=>{T.stopPropagation(),o()}),m.appendChild(w)}return m}i(ke,"buildPill");function M(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",minHeight:"38px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),o.appendChild(it(n.icon));let u=document.createElement("span");return u.textContent=n.label,Object.assign(u.style,{fontFamily:J,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,u),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(M,"buildMenuRow");function at(){let n=document.createElement("div");return Object.assign(n.style,{height:"1px",background:"rgba(0,0,0,0.08)",margin:"0 10px"}),n}i(at,"buildDivider");function Se(n){var o;let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:tt,overflow:"hidden",outline:"none"}),n.items.length){let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px",display:"flex",flexDirection:"column",gap:`${(o=n.itemGap)!=null?o:0}px`}),n.items.forEach(p=>u.appendChild(p)),e.appendChild(u)}if(n.extraItems&&n.extraItems.length){e.appendChild(at());let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px"}),n.extraItems.forEach(p=>u.appendChild(p)),e.appendChild(u)}return e}i(Se,"buildMenuCard");function Ee(n,e=!1){let o=document.createElement("div");o.setAttribute("data-custom-element",`${n}-watermark${e?"-mobile":""}`);let u=o.attachShadow({mode:"open"}),p=document.createElement("style");p.textContent=`
|
|
1
|
+
"use strict";var MiaodaRuntime=(()=>{var Te=Object.create;var D=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var i=(n,e)=>D(n,"name",{value:e,configurable:!0});var j=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Me=(n,e)=>{for(var o in e)D(n,o,{get:e[o],enumerable:!0})},X=(n,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Oe(e))!Pe.call(n,f)&&f!==o&&D(n,f,{get:()=>e[f],enumerable:!(u=Ae(e,f))||u.enumerable});return n};var Y=(n,e,o)=>(o=n!=null?Te(Be(n)):{},X(e||!n||!n.__esModule?D(o,"default",{value:n,enumerable:!0}):o,n)),De=n=>X(D({},"__esModule",{value:!0}),n);var ee=j((Q,R)=>{"use strict";(function(n){"use strict";function e(t,h){var r=(t&65535)+(h&65535),w=(t>>16)+(h>>16)+(r>>16);return w<<16|r&65535}i(e,"safeAdd");function o(t,h){return t<<h|t>>>32-h}i(o,"bitRotateLeft");function u(t,h,r,w,C,L){return e(o(e(e(h,t),e(w,L)),C),r)}i(u,"md5cmn");function f(t,h,r,w,C,L,A){return u(h&r|~h&w,t,h,C,L,A)}i(f,"md5ff");function m(t,h,r,w,C,L,A){return u(h&w|r&~w,t,h,C,L,A)}i(m,"md5gg");function g(t,h,r,w,C,L,A){return u(h^r^w,t,h,C,L,A)}i(g,"md5hh");function v(t,h,r,w,C,L,A){return u(r^(h|~w),t,h,C,L,A)}i(v,"md5ii");function x(t,h){t[h>>5]|=128<<h%32,t[(h+64>>>9<<4)+14]=h;var r,w,C,L,A,a=1732584193,s=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)w=a,C=s,L=c,A=l,a=f(a,s,c,l,t[r],7,-680876936),l=f(l,a,s,c,t[r+1],12,-389564586),c=f(c,l,a,s,t[r+2],17,606105819),s=f(s,c,l,a,t[r+3],22,-1044525330),a=f(a,s,c,l,t[r+4],7,-176418897),l=f(l,a,s,c,t[r+5],12,1200080426),c=f(c,l,a,s,t[r+6],17,-1473231341),s=f(s,c,l,a,t[r+7],22,-45705983),a=f(a,s,c,l,t[r+8],7,1770035416),l=f(l,a,s,c,t[r+9],12,-1958414417),c=f(c,l,a,s,t[r+10],17,-42063),s=f(s,c,l,a,t[r+11],22,-1990404162),a=f(a,s,c,l,t[r+12],7,1804603682),l=f(l,a,s,c,t[r+13],12,-40341101),c=f(c,l,a,s,t[r+14],17,-1502002290),s=f(s,c,l,a,t[r+15],22,1236535329),a=m(a,s,c,l,t[r+1],5,-165796510),l=m(l,a,s,c,t[r+6],9,-1069501632),c=m(c,l,a,s,t[r+11],14,643717713),s=m(s,c,l,a,t[r],20,-373897302),a=m(a,s,c,l,t[r+5],5,-701558691),l=m(l,a,s,c,t[r+10],9,38016083),c=m(c,l,a,s,t[r+15],14,-660478335),s=m(s,c,l,a,t[r+4],20,-405537848),a=m(a,s,c,l,t[r+9],5,568446438),l=m(l,a,s,c,t[r+14],9,-1019803690),c=m(c,l,a,s,t[r+3],14,-187363961),s=m(s,c,l,a,t[r+8],20,1163531501),a=m(a,s,c,l,t[r+13],5,-1444681467),l=m(l,a,s,c,t[r+2],9,-51403784),c=m(c,l,a,s,t[r+7],14,1735328473),s=m(s,c,l,a,t[r+12],20,-1926607734),a=g(a,s,c,l,t[r+5],4,-378558),l=g(l,a,s,c,t[r+8],11,-2022574463),c=g(c,l,a,s,t[r+11],16,1839030562),s=g(s,c,l,a,t[r+14],23,-35309556),a=g(a,s,c,l,t[r+1],4,-1530992060),l=g(l,a,s,c,t[r+4],11,1272893353),c=g(c,l,a,s,t[r+7],16,-155497632),s=g(s,c,l,a,t[r+10],23,-1094730640),a=g(a,s,c,l,t[r+13],4,681279174),l=g(l,a,s,c,t[r],11,-358537222),c=g(c,l,a,s,t[r+3],16,-722521979),s=g(s,c,l,a,t[r+6],23,76029189),a=g(a,s,c,l,t[r+9],4,-640364487),l=g(l,a,s,c,t[r+12],11,-421815835),c=g(c,l,a,s,t[r+15],16,530742520),s=g(s,c,l,a,t[r+2],23,-995338651),a=v(a,s,c,l,t[r],6,-198630844),l=v(l,a,s,c,t[r+7],10,1126891415),c=v(c,l,a,s,t[r+14],15,-1416354905),s=v(s,c,l,a,t[r+5],21,-57434055),a=v(a,s,c,l,t[r+12],6,1700485571),l=v(l,a,s,c,t[r+3],10,-1894986606),c=v(c,l,a,s,t[r+10],15,-1051523),s=v(s,c,l,a,t[r+1],21,-2054922799),a=v(a,s,c,l,t[r+8],6,1873313359),l=v(l,a,s,c,t[r+15],10,-30611744),c=v(c,l,a,s,t[r+6],15,-1560198380),s=v(s,c,l,a,t[r+13],21,1309151649),a=v(a,s,c,l,t[r+4],6,-145523070),l=v(l,a,s,c,t[r+11],10,-1120210379),c=v(c,l,a,s,t[r+2],15,718787259),s=v(s,c,l,a,t[r+9],21,-343485551),a=e(a,w),s=e(s,C),c=e(c,L),l=e(l,A);return[a,s,c,l]}i(x,"binlMD5");function y(t){var h,r="",w=t.length*32;for(h=0;h<w;h+=8)r+=String.fromCharCode(t[h>>5]>>>h%32&255);return r}i(y,"binl2rstr");function k(t){var h,r=[];for(r[(t.length>>2)-1]=void 0,h=0;h<r.length;h+=1)r[h]=0;var w=t.length*8;for(h=0;h<w;h+=8)r[h>>5]|=(t.charCodeAt(h/8)&255)<<h%32;return r}i(k,"rstr2binl");function I(t){return y(x(k(t),t.length*8))}i(I,"rstrMD5");function E(t,h){var r,w=k(t),C=[],L=[],A;for(C[15]=L[15]=void 0,w.length>16&&(w=x(w,t.length*8)),r=0;r<16;r+=1)C[r]=w[r]^909522486,L[r]=w[r]^1549556828;return A=x(C.concat(k(h)),512+h.length*8),y(x(L.concat(A),640))}i(E,"rstrHMACMD5");function O(t){var h="0123456789abcdef",r="",w,C;for(C=0;C<t.length;C+=1)w=t.charCodeAt(C),r+=h.charAt(w>>>4&15)+h.charAt(w&15);return r}i(O,"rstr2hex");function T(t){return unescape(encodeURIComponent(t))}i(T,"str2rstrUTF8");function d(t){return I(T(t))}i(d,"rawMD5");function p(t){return O(d(t))}i(p,"hexMD5");function _(t,h){return E(T(t),T(h))}i(_,"rawHMACMD5");function b(t,h){return O(_(t,h))}i(b,"hexHMACMD5");function S(t,h,r){return h?r?_(h,t):b(h,t):r?d(t):p(t)}i(S,"md5"),typeof define=="function"&&define.amd?define(function(){return S}):typeof R=="object"&&R.exports?R.exports=S:n.md5=S})(Q)});var ne=j((H,te)=>{"use strict";(function(n,e){typeof H=="object"?te.exports=H=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(H,function(){var n=n||(function(e,o){var u=Object.create||(function(){function d(){}return i(d,"F"),function(p){var _;return d.prototype=p,_=new d,d.prototype=null,_}})(),f={},m=f.lib={},g=m.Base=(function(){return{extend:i(function(d){var p=u(this);return d&&p.mixIn(d),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},"extend"),create:i(function(){var d=this.extend();return d.init.apply(d,arguments),d},"create"),init:i(function(){},"init"),mixIn:i(function(d){for(var p in d)d.hasOwnProperty(p)&&(this[p]=d[p]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),v=m.WordArray=g.extend({init:i(function(d,p){d=this.words=d||[],p!=o?this.sigBytes=p:this.sigBytes=d.length*4},"init"),toString:i(function(d){return(d||y).stringify(this)},"toString"),concat:i(function(d){var p=this.words,_=d.words,b=this.sigBytes,S=d.sigBytes;if(this.clamp(),b%4)for(var t=0;t<S;t++){var h=_[t>>>2]>>>24-t%4*8&255;p[b+t>>>2]|=h<<24-(b+t)%4*8}else for(var t=0;t<S;t+=4)p[b+t>>>2]=_[t>>>2];return this.sigBytes+=S,this},"concat"),clamp:i(function(){var d=this.words,p=this.sigBytes;d[p>>>2]&=4294967295<<32-p%4*8,d.length=e.ceil(p/4)},"clamp"),clone:i(function(){var d=g.clone.call(this);return d.words=this.words.slice(0),d},"clone"),random:i(function(d){for(var p=[],_=i(function(r){var r=r,w=987654321,C=4294967295;return function(){w=36969*(w&65535)+(w>>16)&C,r=18e3*(r&65535)+(r>>16)&C;var L=(w<<16)+r&C;return L/=4294967296,L+=.5,L*(e.random()>.5?1:-1)}},"r"),b=0,S;b<d;b+=4){var t=_((S||e.random())*4294967296);S=t()*987654071,p.push(t()*4294967296|0)}return new v.init(p,d)},"random")}),x=f.enc={},y=x.Hex={stringify:i(function(d){for(var p=d.words,_=d.sigBytes,b=[],S=0;S<_;S++){var t=p[S>>>2]>>>24-S%4*8&255;b.push((t>>>4).toString(16)),b.push((t&15).toString(16))}return b.join("")},"stringify"),parse:i(function(d){for(var p=d.length,_=[],b=0;b<p;b+=2)_[b>>>3]|=parseInt(d.substr(b,2),16)<<24-b%8*4;return new v.init(_,p/2)},"parse")},k=x.Latin1={stringify:i(function(d){for(var p=d.words,_=d.sigBytes,b=[],S=0;S<_;S++){var t=p[S>>>2]>>>24-S%4*8&255;b.push(String.fromCharCode(t))}return b.join("")},"stringify"),parse:i(function(d){for(var p=d.length,_=[],b=0;b<p;b++)_[b>>>2]|=(d.charCodeAt(b)&255)<<24-b%4*8;return new v.init(_,p)},"parse")},I=x.Utf8={stringify:i(function(d){try{return decodeURIComponent(escape(k.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(d){return k.parse(unescape(encodeURIComponent(d)))},"parse")},E=m.BufferedBlockAlgorithm=g.extend({reset:i(function(){this._data=new v.init,this._nDataBytes=0},"reset"),_append:i(function(d){typeof d=="string"&&(d=I.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},"_append"),_process:i(function(d){var p=this._data,_=p.words,b=p.sigBytes,S=this.blockSize,t=S*4,h=b/t;d?h=e.ceil(h):h=e.max((h|0)-this._minBufferSize,0);var r=h*S,w=e.min(r*4,b);if(r){for(var C=0;C<r;C+=S)this._doProcessBlock(_,C);var L=_.splice(0,r);p.sigBytes-=w}return new v.init(L,w)},"_process"),clone:i(function(){var d=g.clone.call(this);return d._data=this._data.clone(),d},"clone"),_minBufferSize:0}),O=m.Hasher=E.extend({cfg:g.extend(),init:i(function(d){this.cfg=this.cfg.extend(d),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(d){return this._append(d),this._process(),this},"update"),finalize:i(function(d){d&&this._append(d);var p=this._doFinalize();return p},"finalize"),blockSize:512/32,_createHelper:i(function(d){return function(p,_){return new d.init(_).finalize(p)}},"_createHelper"),_createHmacHelper:i(function(d){return function(p,_){return new T.HMAC.init(d,_).finalize(p)}},"_createHmacHelper")}),T=f.algo={};return f})(Math);return n})});var ie=j((F,re)=>{"use strict";(function(n,e){typeof F=="object"?re.exports=F=e(ne()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(F,function(n){return(function(){var e=n,o=e.lib,u=o.WordArray,f=o.Hasher,m=e.algo,g=[],v=m.SHA1=f.extend({_doReset:i(function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(x,y){for(var k=this._hash.words,I=k[0],E=k[1],O=k[2],T=k[3],d=k[4],p=0;p<80;p++){if(p<16)g[p]=x[y+p]|0;else{var _=g[p-3]^g[p-8]^g[p-14]^g[p-16];g[p]=_<<1|_>>>31}var b=(I<<5|I>>>27)+d+g[p];p<20?b+=(E&O|~E&T)+1518500249:p<40?b+=(E^O^T)+1859775393:p<60?b+=(E&O|E&T|O&T)-1894007588:b+=(E^O^T)-899497514,d=T,T=O,O=E<<30|E>>>2,E=I,I=b}k[0]=k[0]+I|0,k[1]=k[1]+E|0,k[2]=k[2]+O|0,k[3]=k[3]+T|0,k[4]=k[4]+d|0},"_doProcessBlock"),_doFinalize:i(function(){var x=this._data,y=x.words,k=this._nDataBytes*8,I=x.sigBytes*8;return y[I>>>5]|=128<<24-I%32,y[(I+64>>>9<<4)+14]=Math.floor(k/4294967296),y[(I+64>>>9<<4)+15]=k,x.sigBytes=y.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var x=f.clone.call(this);return x._hash=this._hash.clone(),x},"clone")});e.SHA1=f._createHelper(v),e.HmacSHA1=f._createHmacHelper(v)})(),n.SHA1})});var gt={};Me(gt,{TrackKey:()=>z,name:()=>ht,reportTeaEvent:()=>G,version:()=>pt});var de=Y(ee(),1),ue=Y(ie(),1);function B(){return window.appId||null}i(B,"getAppId");function oe(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let u of e){let[f,m]=u.split("=");if(f===n)return decodeURIComponent(m)}return(o=window.csrfToken)!=null?o:null}i(oe,"getCsrfToken");function N(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(N,"isNewPathEnabled");function $(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i($,"getEnv");function ae(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(ae,"isOnlineEnv");function U(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(U,"isMobile");async function se(){var n,e,o;try{let u=B();if(!u)return!0;let f=N()?`/app/${u}/__runtime__/api/v1/studio/get_published`:`/spark/b/${u}/get_published`,g=await(await fetch(f,{headers:{"X-Suda-Csrf-Token":(n=oe())!=null?n:""}})).json();if(g.code===0||g.status_code==="0")return((o=(e=g.data)==null?void 0:e.app_info)==null?void 0:o.show_badge)!==!1}catch{}return!0}i(se,"fetchShowBadge");async function ce(){var u;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=N()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(u=oe())!=null?u:""}})).json()}i(ce,"getLarkUserInfo");var z={VIEW:"aily_agent_artifact_page_view"},Re="08a441",He="42b91e";function le(n){let e=String(n);return(0,ue.default)(Re+(0,de.default)(e+He)).toString()}i(le,"encryptTea");var V=!1;async function Fe(){var m,g,v,x;let{data:n}=await ce(),{tenantID:e,userID:o}=n||{},u=o&&o!=="0"?le(o):void 0,f=e&&e!=="0"?le(e):void 0;(m=window.collectEvent)==null||m.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(v=window.collectEvent)==null||v.call(window,"config",{user_unique_id:u,device_type:U()?"mobile":"pc",evtParams:{open_from:(g=new URLSearchParams(window.location.search).get("open-from"))!=null?g:void 0,env:$(),user_id:u,tenant_id:f}}),V=!0,(x=window.collectEvent)==null||x.call(window,"start")}i(Fe,"createTracker");async function G({trackKey:n,trackParams:e={}}){var o;try{V||(V=!0,await Fe()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(u){console.error(u)}}i(G,"reportTeaEvent");function fe(){return G({trackKey:z.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(fe,"reportPageView");function pe(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(pe,"generateUUID");var he="x_sdk_device_id";function Ne(){try{let n=localStorage.getItem(he);return n||(n=pe(),localStorage.setItem(he,n)),n}catch{return pe()}}i(Ne,"getDeviceId");function $e(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i($e,"getDeviceType");var Ue="pageSessionID";function We(){try{return new URLSearchParams(window.location.search).get(Ue)||""}catch{return""}}i(We,"getPvId");function je(n={}){let e=n.pvId||We();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Ne(),module:"app_web",app_env:"runtime",source_type:"user",device_type:$e(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(je,"getDefaultAttributes");function ge(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(ge,"toNanoString");var Ve="1.0.2";function ze(n,e){let o=je(e),u=ge(Date.now());return{metricsData:{resource:{attributes:{sdk_version:Ve,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(f=>({attributes:{...o,url:f.url,path:f.path,referrer:f.referrer},startTimeUnixNano:ge(f.timestampMs),timeUnixNano:u,asDouble:1}))}}]}}}i(ze,"buildPayload");function Ge(n,e,o={},u){if(e.length===0)return;let f;try{f=JSON.stringify(ze(e,u))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:f,keepalive:!0}).catch(()=>{})}catch{}}i(Ge,"sendPvData");var Z="__APAAS_PV_TRACKER_STARTED__";function Ze(){try{let n=window;return n[Z]?!1:(n[Z]=!0,!0)}catch{return!0}}i(Ze,"claimPvReporting");function me(){try{window[Z]=!1}catch{}}i(me,"releasePvReporting");var P,Ke=(P=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new P),this._instance}start(e){var o;if(!this.started&&Ze()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let u=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),u)}catch(u){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,me(),u}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,me())}pageKey(){let{origin:e,pathname:o,search:u}=window.location;return`${e}${o}${u}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ge(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],u=i(()=>this.recordPv(),"recordPv");history[e]=function(...f){let m=o.apply(this,f);return u(),m},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(P,"_PvTracker"),P),ve=Ke.instance;function be(){var o;let n=(o=B())!=null?o:"",e=N()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;ve.start({collectorUrl:e})}i(be,"initPvTracking");var J="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp",Je=`${J}/miaoda-ui/doubao.svg`,qe=`${J}/miaoda-ui/Union.png`,Xe=`${J}/logo/miaodalogo.svg`,ye='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Ye='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',Qe='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.13397 2.5C7.51887 1.83333 8.48113 1.83333 8.86603 2.5L14.0622 11.5C14.4471 12.1667 13.966 13 13.1962 13H2.80385C2.03405 13 1.55292 12.1667 1.93782 11.5L7.13397 2.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/><path d="M8 6.16667V8.83333" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><circle cx="8" cy="10.6667" r="0.6667" fill="currentColor"/></svg>',et='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.91685 2.08234C10.2097 2.37519 10.2096 2.8501 9.91685 3.143L7.06253 5.99732L9.91858 8.85337C10.2114 9.14627 10.2115 9.62115 9.91858 9.91403C9.62568 10.2068 9.15076 10.2068 8.85792 9.91403L6.00187 7.05798L3.14444 9.91541C2.85155 10.2083 2.37667 10.2083 2.08378 9.91541C1.791 9.62251 1.79093 9.14761 2.08378 8.85475L4.94121 5.99732L2.08551 3.14162C1.79267 2.84878 1.79278 2.37387 2.08551 2.08096C2.3784 1.78807 2.85327 1.78807 3.14617 2.08096L6.00187 4.93666L8.85619 2.08234C9.14906 1.78961 9.62399 1.7896 9.91685 2.08234Z" fill="white" fill-opacity="0.3"/></svg>',tt='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>',nt='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>',_e=!0,rt="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",it="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",q="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",ot="'Doubao Sans', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",W={doubao:{brandText:"\u8C46\u5305\u5DE5\u4F5C AI \u751F\u6210",logoSrc:Je,downloadUrl:"https://ugapk.com/FCtLH"},miaoda:{brandText:"\u5999\u642D\u751F\u6210",logoSrc:Xe,landingUrl:"https://miaoda.feishu.cn/landing"}},at={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function Ce(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${at[$()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(Ce,"openReport");var st={feedback:Ye,report:Qe,close:ye,download:tt,efficiency:nt};function xe(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=ye;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(xe,"makeCloseIcon");function ct(n,e=16){if(n==="close")return xe(e);let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:`${e}px`,height:`${e}px`,flexShrink:"0"}),o.innerHTML=st[n];let u=o.firstElementChild;return u&&(u.style.display="block"),o}i(ct,"makeIcon");function lt(n,e){let o=document.createElement("img");return o.src=n,o.width=e,o.height=e,o.alt="",Object.assign(o.style,{width:`${e}px`,height:`${e}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),o}i(lt,"makeLogo");function ke(n,e,o){let u=e==="desktop",f=n==="doubao",m=W[n],g=document.createElement("div");f?Object.assign(g.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"3.4px",padding:u?"5px 10px 5px 7px":"6px 12px 6px 8px",background:"rgba(77,77,77,0.7)",borderRadius:"8.5px",cursor:"pointer"}):Object.assign(g.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"4px",padding:u?"6px 12px 6px 8px":"5px 12px 5px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:rt,cursor:"pointer"});let v=lt(m.logoSrc,f?17:16),x;if(f){let y=document.createElement("img");y.src=qe,y.alt=m.brandText,y.draggable=!1,Object.assign(y.style,{height:u?"12px":"14px",width:"auto",display:"block",flexShrink:"0"}),x=y}else{let y=document.createElement("span");y.textContent=m.brandText,Object.assign(y.style,{fontFamily:q,fontSize:u?"12px":"14px",lineHeight:u?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),x=y}if(g.append(v,x),u&&o){let y=document.createElement("span");y.setAttribute("role","button"),y.setAttribute("aria-label","\u5173\u95ED"),y.setAttribute("data-watermark-close",""),Object.assign(y.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0"}),f?y.innerHTML=et:(y.style.color="rgba(255,255,255,0.5)",y.appendChild(xe(10))),y.addEventListener("click",k=>{k.stopPropagation(),o()}),g.appendChild(y)}return g}i(ke,"buildPill");function M(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",minHeight:"38px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),o.appendChild(ct(n.icon));let u=document.createElement("span");return u.textContent=n.label,Object.assign(u.style,{fontFamily:q,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,u),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(M,"buildMenuRow");function dt(){let n=document.createElement("div");return Object.assign(n.style,{height:"1px",background:"rgba(0,0,0,0.08)",margin:"0 10px"}),n}i(dt,"buildDivider");function Se(n){var o;let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:it,overflow:"hidden",outline:"none"}),n.items.length){let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px",display:"flex",flexDirection:"column",gap:`${(o=n.itemGap)!=null?o:0}px`}),n.items.forEach(f=>u.appendChild(f)),e.appendChild(u)}if(n.extraItems&&n.extraItems.length){e.appendChild(dt());let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px"}),n.extraItems.forEach(f=>u.appendChild(f)),e.appendChild(u)}return e}i(Se,"buildMenuCard");function Le(n,e=!1){let o=document.createElement("div");o.setAttribute("data-custom-element",`${n}-watermark${e?"-mobile":""}`);let u=o.attachShadow({mode:"open"}),f=n==="doubao"?ot:q,m=document.createElement("style");m.textContent=`
|
|
2
2
|
:host {
|
|
3
3
|
all: initial !important;
|
|
4
4
|
display: block !important;
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
all: initial;
|
|
15
15
|
direction: ltr;
|
|
16
16
|
unicode-bidi: isolate;
|
|
17
|
-
font-family: ${
|
|
17
|
+
font-family: ${f};
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
align-items: flex-end;
|
|
21
21
|
gap: 8px;
|
|
22
22
|
}
|
|
23
|
-
`;let
|
|
23
|
+
`;let g=document.createElement("div");return g.className="watermark-root",u.append(m,g),{host:o,container:g}}i(Le,"createWatermarkRoot");function ut(n){let{host:e,container:o}=Le(n),u=[];n==="doubao"?u.push(M({icon:"download",label:"\u4E0B\u8F7D\u8C46\u5305\u5DE5\u4F5C",fontSize:14,onClick:i(()=>window.open(W.doubao.downloadUrl,"_blank","noopener,noreferrer"),"onClick")})):u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:14,onClick:i(()=>window.open(W.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:n==="doubao"?"report":"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:Ce}));let f=Se({items:u,minWidth:160,itemGap:8});f.style.display="none";let m=ke(n,"desktop",()=>e.remove()),g=m.querySelector("[data-watermark-close]");o.append(f,m);let v=null;return o.addEventListener("mouseenter",()=>{v&&clearTimeout(v),f.style.display="flex",g&&(g.style.display="inline-flex")}),o.addEventListener("mouseleave",()=>{v=setTimeout(()=>{f.style.display="none",g&&(g.style.display="none")},100)}),e}i(ut,"buildDesktopWatermark");function ft(n){let{host:e,container:o}=Le(n,!0);o.style.cursor="pointer";let u=[];n==="miaoda"&&u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:16,onClick:i(()=>window.open(W.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:n==="doubao"?"report":"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:Ce}));let f=[M({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(x=>{x.stopPropagation(),document.removeEventListener("click",v),e.remove()},"onClick")})],m=Se({items:u,extraItems:f,minWidth:160});m.style.display="none";let g=ke(n,"mobile");o.append(m,g),o.addEventListener("click",x=>{x.stopPropagation(),m.style.display=m.style.display==="none"?"flex":"none"});let v=i(()=>{m.style.display="none"},"onOutsideClick");return document.addEventListener("click",v),e}i(ft,"buildMobileWatermark");var we=!1,K=!1;async function Ee(n){if(we||K||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>Ee(n),{once:!0});return}K=!0;let e=await se();if(we=!0,K=!1,!e)return;let o=U()?ft(n):ut(n);document.body.appendChild(o)}i(Ee,"mountWatermark");function Ie(){return Ee("miaoda")}i(Ie,"mountMiaodaWatermark");var pt="0.0.16-beta.0",ht="@lark-apaas/miaoda-coding-sdk";ae()&&(fe(),be());Ie();return De(gt);})();
|
package/package.json
CHANGED