"use strict";(self.webpackChunkhunyuan_bot=self.webpackChunkhunyuan_bot||[]).push([[1489],{71489:(t,e,r)=>{var n=r(7378),o=r(22448),i=r(98175),a=r(872),c=r(27036),u=r(74494),l=r(35360),s=r(74496),f=r(97556),h=r(89690),p=r(71892),y=r(28619),v=r(37844),d=r(76911),m=r(18327),b=r(85428);function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=x(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==x(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x(t){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x(t)}function O(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||E(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||E(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){if(t){if("string"==typeof t)return L(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var P=s.l.FormItem;function k(t){var e=t.zIndex,r=t.onChange,o=t.type,i=S(s.l.useForm(),1)[0],a=S((0,n.useState)([]),2),u=a[0],g=a[1],E=(0,n.useMemo)((function(){return"header"===o?d.Sv.customizeHeaders:d.Sv.customizeCookie}),[o]),L=(0,p.g)((function(){g([].concat(O(u),[{id:(0,v.A)(),key:"",value:""}]))})),k=(0,p.g)((function(t){var e=O(u);e.splice(t,1),g(e)})),A=(0,y.$)((function(){var t=d.wc.get(E);"object"===x(t)?g(Object.keys(t).reduce((function(e,r){return r===d.Th||r===d.Yp?e:e.concat({id:(0,v.A)(),key:r,value:t[r]})}),[])):g([{id:(0,v.A)(),key:"",value:""}])})),_=(0,y.$)((function(){var t=d.wc.get(E);return"header"===o?j({},d.Th,(null==t?void 0:t[d.Th])||""):j({},d.Yp,(null==t?void 0:t[d.Yp])||"")})),T=(0,y.$)((function(t,e){t&&"object"===x(t)&&Object.keys(t).forEach((function(t){t!==d.Yp&&m.A.remove(t)})),e&&"object"===x(e)&&Object.keys(e).forEach((function(t){m.A.set(t,e[t],{secure:!0,expires:365})}))})),C=(0,p.g)((function(){var t=d.wc.get(E),e=_();d.wc.set(E,e)?("cookie"===o&&T(t,void 0),A(),r(),(0,d.hh)("success","清空成功")):(0,d.hh)("error","清空失败")}));return(0,n.useEffect)((function(){A()}),[A]),(0,b.jsxs)(s.l,{form:i,layout:"vertical",labelWidth:70,onSubmit:function(t){if(!0===t.validateResult){var e={};t.fields.key.forEach((function(r,n){e[r.trim()]=t.fields.value[n].trim()}));var n=d.wc.get(E),i=_();d.wc.set(E,w(w({},e),i))?("cookie"===o&&T(n,e),A(),r(),(0,d.hh)("success","保存成功")):(0,d.hh)("error","保存失败")}},onReset:A,scrollToFirstError:"smooth",children:[u.map((function(t,r){return(0,b.jsxs)("div",{className:"hyc-page-tools-customizeHeaders__item",children:[(0,b.jsx)(P,{label:"key",name:["key",r],initialData:t.key,rules:[{whitespace:!0,message:"key 不能为空"},{required:!0,message:"key 必填",type:"error"}],children:(0,b.jsx)(f.pd,{})}),(0,b.jsx)(P,{label:"value",name:["value",r],initialData:t.value,rules:[{whitespace:!0,message:"value 不能为空"},{required:!0,message:"value 必填",type:"error"}],children:(0,b.jsx)(f.pd,{})}),u.length>1&&(0,b.jsx)(h.i,{content:"确认删除此项吗?",destroyOnClose:!0,placement:"left",showArrow:!0,theme:"default",popupProps:{zIndex:e},onConfirm:function(){return k(r)},children:(0,b.jsx)(c.$,{className:"hyc-page-tools-customizeHeaders__item__close",theme:"default",variant:"text",shape:"square",children:(0,b.jsx)(l.Ay,{type:"close",size:16})})})]},"".concat(t.id))})),(0,b.jsx)(P,{children:(0,b.jsx)(c.$,{block:!0,theme:"primary",variant:"outline",onClick:L,children:(0,b.jsx)(l.Ay,{type:"add",size:18})})}),(0,b.jsxs)(P,{style:{display:"flex",justifyContent:"center"},children:[(0,b.jsx)(c.$,{theme:"primary",type:"submit",style:{marginRight:16},children:"保存"}),(0,b.jsx)(h.i,{content:"确认重置修改吗?",destroyOnClose:!0,placement:"top",showArrow:!0,theme:"warning",popupProps:{zIndex:e},onConfirm:function(){return i.reset()},children:(0,b.jsx)(c.$,{theme:"default",children:"重置"})}),(0,b.jsx)(h.i,{content:"确认清空吗?",destroyOnClose:!0,placement:"top",showArrow:!0,theme:"danger",popupProps:{zIndex:e},onConfirm:C,children:(0,b.jsx)(c.$,{theme:"default",style:{marginLeft:16},children:"清空"})})]})]})}var A=r(37984),_=r(60424),T="x-route-env-for-ssr-backend";function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function I(){I=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new _(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==C(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(C(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},S(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function z(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){D(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function D(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=C(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==C(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function G(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){F(i,n,o,a,c,"next",t)}function c(t){F(i,n,o,a,c,"throw",t)}a(void 0)}))}}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return M(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var R=s.l.FormItem,Y=["evt1","evt2","evt3"],H=[{label:"chat-bot-pre(当周迭代版本)",value:"chat-bot-pre"},{label:"chat-bot-pre-daily(日常版本)",value:"chat-bot-pre-daily"}];function U(t){var e=t.onChange,r=t.serverLanes,o=t.frontLanes,i=$(s.l.useForm(),1)[0],a=$((0,n.useState)({server:"",web:"",webPre:"",evt:""}),2),u=a[0],l=a[1],f=(0,y.$)(function(){var t=G(I().mark((function t(r){var n,o,i,a;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n={},Object.keys(r.fields).forEach((function(t){n[t]=r.fields[t]||""})),o=d.wc.get(d.Sv.customizeHeaders),d.wc.set(d.Sv.customizeHeaders,z(z({},o),{},D({},d.Th,n.server))),m.A.remove(T),m.A.set(T,n.server),i=d.wc.get(d.Sv.customizeCookie),d.wc.set(d.Sv.customizeCookie,z(z({},i),{},D({},d.Yp,n.web))),d.up.forEach((function(t){m.A.remove(t),m.A.set(t,n.web,{secure:!0,expires:365,sameSite:"None"})})),a=d.wc.get(d.Sv.customizeEvtCookie),d.wc.set(d.Sv.customizeEvtCookie,z(z({},a),{},D({},d.d2,n.evt))),m.A.remove(d.d2),m.A.set(d.d2,n.evt,{secure:!0,expires:365,sameSite:"None"}),m.A.remove(d.yz),m.A.set(d.yz,n.webPre,{secure:!0,expires:365,sameSite:"None"}),(0,A.Mo)()&&chrome.storage.local.set({routeEnv:n.server}),h(),e(),(0,d.hh)("success","保存成功");case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),h=(0,y.$)((function(){var t={server:"",web:"",webPre:"",evt:""};if((0,A.Mo)())G(I().mark((function e(){var r;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,chrome.storage.local.get("routeEnv");case 2:r=e.sent,t.server=r.routeEnv,l(t),i.setFieldsValue(t);case 6:case"end":return e.stop()}}),e)})))();else{var e=new URLSearchParams(window.location.search),r=e.get(d.Th)||e.get("x_route_env");if(r)t.server=r;else{var n=d.wc.get(d.Sv.customizeHeaders);"object"===C(n)&&(t.server=n[d.Th]||"")}t.web=m.A.get(d.Yp)||"",t.evt=m.A.get(d.d2)||"",t.webPre=m.A.get(d.yz)||"",l(t),i.setFieldsValue(t)}}));return(0,n.useEffect)((function(){h()}),[h]),(0,b.jsx)("div",{className:"lane-change",children:(0,b.jsxs)(s.l,{form:i,layout:"vertical",labelWidth:100,onSubmit:f,onReset:h,scrollToFirstError:"smooth",children:[(0,b.jsx)(R,{label:"后台",name:"server",initialData:u.server,children:(0,b.jsx)(_.l,{clearable:!0,filterable:!0,popupProps:{attach:".lane-change"},options:r.map((function(t){return{label:t,value:t}}))})}),!(0,A.Mo)()&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(R,{label:"前端(测试)",name:"web",initialData:u.web,children:(0,b.jsx)(_.l,{clearable:!0,filterable:!0,popupProps:{attach:".lane-change"},options:o.map((function(t){return{label:t,value:t}}))})}),(0,b.jsx)(R,{label:"前端(预发)",name:"webPre",children:(0,b.jsx)(_.l,{clearable:!0,filterable:!0,popupProps:{attach:".lane-change"},options:H.map((function(t){return{label:t.label,value:t.value}}))})}),(0,b.jsx)(R,{label:"前端活动页",name:"evt",initialData:u.evt,children:(0,b.jsx)(_.l,{clearable:!0,filterable:!0,popupProps:{attach:".lane-change"},options:Y.map((function(t){return{label:t,value:t}}))})})]}),(0,b.jsxs)(R,{style:{display:"flex",justifyContent:"center"},children:[(0,b.jsx)(c.$,{theme:"primary",type:"submit",style:{marginRight:16},children:"保存"}),(0,b.jsx)(c.$,{theme:"default",onClick:function(){i.reset()},children:"重置"})]})]})})}function W(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return q(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var V={off:"未开启",miss:"未匹配到manifest.json",hit:"已匹配minifest"},J=function(){!function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(window.location);var t=W((0,n.useState)([]),2),e=t[0],r=t[1];return(0,n.useEffect)((function(){window.performance.yb?r([{key:"状态",value:V[window.performance.yb.status]||"-"},{key:"离线包名称",value:window.performance.yb.offlineKey||"-"},{key:"进入页面时间",value:new Date(window.performance.yb.clickTime).toLocaleString()},{key:"资源版本号",value:String(window.performance.yb.offlineVer)||"-"}]):r([{key:"状态",value:"-"}])}),[]),(0,b.jsx)("div",{children:e.map((function(t){return(0,b.jsxs)("p",{children:[(0,b.jsxs)("strong",{children:[t.key,": "]}),t.value]},t.key)}))})},K=r(29354);function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function X(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function B(){B=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new _(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Q(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Q(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},S(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function tt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function et(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tt(i,n,o,a,c,"next",t)}function c(t){tt(i,n,o,a,c,"throw",t)}a(void 0)}))}}var rt=s.l.FormItem,nt=function(){var t=et(B().mark((function t(){var e,n;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.e(3936).then(r.bind(r,53936));case 2:return e=t.sent,n=e.scan,t.abrupt("return",n({enabled:!0}));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=X((0,n.useState)(!1),2),e=t[0],r=t[1],o=n.useRef();return(0,n.useEffect)((function(){var t;e&&(nt(),null===(t=o.current)||void 0===t||t.setFieldsValue({scan:!0}))}),[e]),(0,n.useEffect)((function(){var t=d.wc.get(d.Sv.customizeDebugTools)||{};r(t.reactScan)}),[]),(0,b.jsx)(s.l,{ref:o,children:(0,b.jsx)(rt,{name:"scan",label:"React Scan",initialData:e,children:(0,b.jsx)(K.d,{value:e,onChange:function(){var t=et(B().mark((function t(e){var n;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r(e),(n=d.wc.get(d.Sv.customizeDebugTools)||{}).reactScan=e,d.wc.set(d.Sv.customizeDebugTools,n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})})})};function it(t){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},it(t)}function at(){at=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new _(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==it(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(it(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},S(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ct(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ut(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return lt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function st(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ft(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=it(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=it(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==it(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ht=a.t.TabPanel,pt=[{name:"泳道切换",renderChildren:function(t,e,r){return(0,b.jsx)(U,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach((function(e){ft(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({zIndex:t,onChange:e},r))}},{name:"Debug Tools",renderChildren:function(){return(0,b.jsx)(ot,{})},hold:!0},{name:"自定义 header",renderChildren:function(t,e){return(0,b.jsx)(k,{zIndex:t,onChange:e,type:"header"})}},{name:"自定义 cookie",renderChildren:function(t,e){return(0,b.jsx)(k,{zIndex:t,onChange:e,type:"cookie"})}},{name:"离线包状态",renderChildren:function(){return(0,b.jsx)(J,{})}}],yt=(0,A.fx)();var vt=r(71713),dt=r.n(vt),mt=r(97741),bt=r(22359),gt=r(79124),wt=r(28496);function jt(t){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(t)}function xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(r),!0).forEach((function(e){St(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function St(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=jt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Lt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}if(!(0,o.XM)()){var Pt=function(t){return"number"==typeof t?t:parseInt(t,10)},kt=document.body,At={top:45,left:15},_t=(0,mt.tG)("debug_pos_of_render_tools",At,void 0,{getOnInit:!0}),Tt=document.createElement("div");Tt.style.position="absolute",Tt.style.top="0px",Tt.style.left="0px",Tt.dataset.toolContainer="1",document.body.appendChild(Tt),(0,gt.H)(Tt).render((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("style",{children:"\n .hyc-page-tools-pop {\n position: relative;\n bottom: auto;\n width: auto;\n line-height: 0;\n }\n "}),(0,b.jsx)((function(t){var e=t.children,r=Et((0,bt.fp)(_t),2),o=r[0],i=r[1],a=(0,n.useRef)(null);(0,n.useEffect)((function(){(Pt(o.left)>=kt.offsetWidth||Pt(o.top)>=kt.offsetHeight)&&i(At)}),[]);var c=(0,n.useRef)(!1);return(0,n.useEffect)((function(){dt()(a.current,{constrain:!0,relativeTo:kt,onMouseMove:function(){c.current=!0},onTouchMove:function(){c.current=!0},onMouseUp:function(t,e){c.current&&e.preventDefault(),i({top:t.style.top,left:t.style.left})},onTouchStop:function(t,e){c.current&&e.preventDefault(),i({top:t.style.top,left:t.style.left})}})}),[i]),(0,b.jsx)("div",{style:Ot({},o),ref:a,children:e})}),{children:(0,b.jsx)((function(t){var e=t.zIndex,r=void 0===e?999999999:e,o=t.placement,s=void 0===o?"right":o,f=ut((0,n.useState)(!1),2),h=f[0],p=f[1],v=ut((0,n.useState)(0),2),m=v[0],g=v[1],w=ut((0,n.useState)([]),2),j=w[0],x=w[1],O=(0,y.$)((function(){setTimeout((function(){window.location.reload()}),500)})),S=(0,n.useMemo)((function(){return(0,b.jsx)(a.t,{className:"hyc-page-tools-tabs",value:m,onChange:function(t){return g(t)},children:pt.map((function(t,e){return(0,b.jsx)(ht,{value:e,label:t.name,destroyOnHide:!t.hold,children:t.renderChildren(r+1,O,{serverLanes:j,frontLanes:j})},"tools-tab-".concat(e))}))})}),[m,r,O,j]);(0,n.useEffect)((function(){A.iW||E()}),[]);var E=function(){var t,e=(t=at().mark((function t(){var e,r;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("".concat((0,A.Ww)()?(0,A.jp)():"","/api/getZhiyanEnv"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:3,offset:0,limit:30})});case 3:if((e=t.sent).ok){t.next=6;break}throw new Error("后台泳道列表获取失败 ".concat(e.statusText));case 6:return t.next=8,e.json();case 8:r=t.sent,x(r.results.map((function(t){return t.varName}))),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),(0,d.hh)("error",t.t0.message);case 16:case"end":return t.stop()}}),t,null,[[0,12]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ct(i,n,o,a,c,"next",t)}function c(t){ct(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),L=(0,n.useRef)(Date.now());return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"hyc-page-tools-pop hyc-page-tools-pop--".concat(yt?"mobile":"pc"," hyc-page-tools-pop--").concat(s),style:{zIndex:r},children:(0,b.jsx)(c.$,{className:"hyc-page-tools-btn",variant:"outline",theme:"primary",icon:(0,b.jsx)(i.A,{size:16}),size:yt?"medium":"large",onClick:function(){Date.now()-L.current<=400&&p(!0)},onTouchStart:function(){return L.current=Date.now()},onMouseDown:function(){return L.current=Date.now()},children:"网页工具"})}),(0,b.jsx)(u._,{visible:h,className:"hyc-page-tools-drawer",onClose:function(){return p(!1)},size:yt?"100%":"480px",placement:s,destroyOnClose:!0,zIndex:r,header:(0,b.jsxs)("div",{className:"hyc-page-tools-drawer__header",children:[(0,b.jsx)("span",{children:"网页工具"}),(0,b.jsx)(c.$,{shape:"square",theme:"default",variant:"text",onClick:function(){return p(!1)},children:(0,b.jsx)(l.Ay,{type:"close",size:18})})]}),footer:null,children:S})]})}),{})})]})),(0,wt.lQ)()===wt.bM.PRE_RELEASE&&document.body.setAttribute("data-web-pre-env",m.A.get(d.yz)||"")}}}]);
|