diff --git a/web/assets/index-f973085b.js b/web/assets/index-43b76bd9.js similarity index 99% rename from web/assets/index-f973085b.js rename to web/assets/index-43b76bd9.js index e7c8d9664b..cee1ec1ca0 100644 --- a/web/assets/index-f973085b.js +++ b/web/assets/index-43b76bd9.js @@ -1,4 +1,4 @@ -import{v as vShow,i as inject,g as getCurrentInstance,w as watch,o as onBeforeUnmount,r as ref,a as onMounted,b as isBrowser,c as computed,d as reactive,h as hasInstance,e as onBeforeMount,f as off,j as readonly,k as on,l as createInjectionKey,m as modalBodyInjectionKey,n as drawerBodyInjectionKey,p as popoverBodyInjectionKey,u as useMemo,q as defineComponent,s as provide,t as getSlot$1,x as withDirectives,y as getFirstVNode,C as CssRender,z as useSsrAdapter,A as toRef,B as isMounted,D as h,L as LazyTeleport,E as zindexable,F as nextTick,G as onActivated,H as onDeactivated,I as depx,V as VResizeObserver,J as mergeProps,K as pxfy,M as renderSlot,N as resizeObserverManager,O as getNative,P as root,Q as overArg,R as isPrototype,S as isArrayLike,T as arrayLikeKeys,U as isArray,W as isSymbol,X as MapCache,Y as toString,Z as toSource,_ as baseGetTag,$ as Map$1,a0 as Symbol$1,a1 as eq,a2 as Uint8Array,a3 as isBuffer,a4 as Stack,a5 as isTypedArray,a6 as isObjectLike,a7 as isObject,a8 as isLength,a9 as isIndex,aa as isArguments,ab as identity,ac as baseFor,ad as arrayMap,ae as configProviderInjectionKey,af as replaceable,ag as cB,ah as cE,ai as c$1,aj as useConfig,ak as useTheme,al as useThemeClass,am as NBaseIcon,an as emptyLight,ao as createKey,ap as render,aq as Transition,ar as cM,as as cNotM,at as fadeInScaleUpTransition,au as useRtl,av as internalSelectMenuLight,aw as resolveWrappedSlot,ax as NBaseLoading,ay as NScrollbar,az as resolveSlot,aA as getMargin,aB as cCB,aC as watchEffect,aD as popoverLight,aE as clickoutside,aF as getPreciseEventTarget,aG as isSlotEmpty,aH as FocusTrap,aI as Fragment,aJ as XScrollbar,aK as getFirstSlotVNode,aL as cloneVNode,aM as Text,aN as keep,aO as call,aP as NBaseClose,aQ as tagLight,aR as color2Class,aS as iconSwitchTransition,aT as useStyle,aU as NIconSwitchTransition,aV as internalSelectionLight,aW as Wrapper,aX as fadeInHeightExpandTransition,aY as NFadeInExpandTransition,aZ as ErrorIcon,a_ as WarningIcon,a$ as InfoIcon,b0 as SuccessIcon,b1 as alertLight,b2 as resolveSlotWithProps,b3 as isSafari,b4 as useFormItem,b5 as inputLight,b6 as isBrowser$1,b7 as markEventEffectPerformed,b8 as selectLight,b9 as tooltipLight,ba as useMergedClsPrefix,bb as ellipsisLight,bc as radioLight,bd as flatten$1,be as warn,bf as iconLight,bg as dropdownLight,bh as dialogApiInjectionKey,bi as throwError,bj as Comment,bk as spaceLight,bl as getGap,bm as formLight,bn as keysOf,bo as commonVariables,bp as createId,bq as formItemInjectionKey,br as fadeInTransition,bs as imageLight,bt as normalizeStyle,bu as XButton,bv as inputNumberLight,bw as rgba,bx as insideModal,by as insidePopover,bz as listLight,bA as messageApiInjectionKey,bB as progressLight,bC as resultLight,bD as spinLight,bE as switchLight,bF as tableLight,bG as thingLight,bH as typographyLight,bI as NButton,bJ as Teleport,bK as uploadLight,bL as defineStore,bM as openBlock,bN as createElementBlock,bO as toDisplayString,bP as createBlock,bQ as withCtx,bR as createBaseVNode,bS as createVNode,bT as withKeys,bU as unref,bV as createTextVNode,bW as NModal,bX as storeToRefs,bY as useUserStore,bZ as useOsTheme,b_ as isMobile,b$ as renderList,c0 as isRef,c1 as render$1,c2 as NConfigProvider,c3 as lightTheme,c4 as darkTheme,c5 as createCommentVNode,c6 as normalizeClass,c7 as pushScopeId,c8 as popScopeId,c9 as ApiResultCode,ca as cookies}from"./index-936a7da4.js";let onceCbs=[];const paramsMap=new WeakMap;function flushOnceCallbacks(){onceCbs.forEach(e=>e(...paramsMap.get(e))),onceCbs=[]}function beforeNextFrameOnce(e,...t){paramsMap.set(e,t),!onceCbs.includes(e)&&onceCbs.push(e)===1&&requestAnimationFrame(flushOnceCallbacks)}function happensIn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function parseResponsiveProp(e){if(typeof e=="number")return{"":e.toString()};const t={};return e.split(/ +/).forEach(n=>{if(n==="")return;const[o,r]=n.split(":");r===void 0?t[""]=o:t[o]=r}),t}function parseResponsivePropValue(e,t){var n;if(e==null)return;const o=parseResponsiveProp(e);if(t===void 0)return o[""];if(typeof t=="string")return(n=o[t])!==null&&n!==void 0?n:o[""];if(Array.isArray(t)){for(let r=t.length-1;r>=0;--r){const i=t[r];if(i in o)return o[i]}return o[""]}else{let r,i=-1;return Object.keys(o).forEach(a=>{const l=Number(a);!Number.isNaN(l)&&t>=l&&l>=i&&(i=l,r=o[a])}),r}}function getSlot(e,t="default",n=[]){const r=e.$slots[t];return r===void 0?n:r()}function getTitleAttribute(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function createRefSetter(e){return t=>{t?e.value=t.$el:e.value=null}}function mergeEventHandlers(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(o=>{o&&o(n)})}}function isNodeVShowFalse(e){var t;const n=(t=e.dirs)===null||t===void 0?void 0:t.find(({dir:o})=>o===vShow);return!!(n&&n.value===!1)}const pureNumberRegex=/^(\d|\.)+$/,numberRegex=/(\d|\.)+/;function formatLength(e,{c:t=1,offset:n=0,attachPx:o=!0}={}){if(typeof e=="number"){const r=(e+n)*t;return r===0?"0":`${r}px`}else if(typeof e=="string")if(pureNumberRegex.test(e)){const r=(Number(e)+n)*t;return o?r===0?"0":`${r}px`:`${r}`}else{const r=numberRegex.exec(e);return r?e.replace(numberRegex,String((Number(r[0])+n)*t)):e}return e}let _isJsdom;function isJsdom(){return _isJsdom===void 0&&(_isJsdom=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),_isJsdom}function useInjectionInstanceCollection(e,t,n){var o;const r=inject(e,null);if(r===null)return;const i=(o=getCurrentInstance())===null||o===void 0?void 0:o.proxy;watch(n,a),a(n.value),onBeforeUnmount(()=>{a(void 0,n.value)});function a(u,d){if(!r)return;const f=r[t];d!==void 0&&l(f,d),u!==void 0&&s(f,u)}function l(u,d){u[d]||(u[d]=[]),u[d].splice(u[d].findIndex(f=>f===i),1)}function s(u,d){u[d]||(u[d]=[]),~u[d].findIndex(f=>f===i)||u[d].push(i)}}function useDeferredTrue(e,t,n){if(!t)return e;const o=ref(e.value);let r=null;return watch(e,i=>{r!==null&&window.clearTimeout(r),i===!0?n&&!n.value?o.value=!0:r=window.setTimeout(()=>{o.value=!0},t):o.value=!1}),o}let fontsReady,isFontReady;const init=()=>{var e,t;fontsReady=isBrowser?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,isFontReady=!1,fontsReady!==void 0?fontsReady.then(()=>{isFontReady=!0}):isFontReady=!0};init();function onFontsReady(e){if(isFontReady)return;let t=!1;onMounted(()=>{isFontReady||fontsReady==null||fontsReady.then(()=>{t||e()})}),onBeforeUnmount(()=>{t=!0})}function useMergedState(e,t){return watch(e,n=>{n!==void 0&&(t.value=n)}),computed(()=>e.value===void 0?t.value:e.value)}function useCompitable(e,t){return computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const defaultBreakpointOptions={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};function createMediaQuery(e){return`(min-width: ${e}px)`}const mqlMap={};function useBreakpoints(e=defaultBreakpointOptions){if(!isBrowser)return computed(()=>[]);if(typeof window.matchMedia!="function")return computed(()=>[]);const t=ref({}),n=Object.keys(e),o=(r,i)=>{r.matches?t.value[i]=!0:t.value[i]=!1};return n.forEach(r=>{const i=e[r];let a,l;mqlMap[i]===void 0?(a=window.matchMedia(createMediaQuery(i)),a.addEventListener?a.addEventListener("change",s=>{l.forEach(u=>{u(s,r)})}):a.addListener&&a.addListener(s=>{l.forEach(u=>{u(s,r)})}),l=new Set,mqlMap[i]={mql:a,cbs:l}):(a=mqlMap[i].mql,l=mqlMap[i].cbs),l.add(o),a.matches&&l.forEach(s=>{s(a,r)})}),onBeforeUnmount(()=>{n.forEach(r=>{const{cbs:i}=mqlMap[e[r]];i.has(o)&&i.delete(o)})}),computed(()=>{const{value:r}=t;return n.filter(i=>r[i])})}function useKeyboard(e={},t){const n=reactive({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:o,keyup:r}=e,i=s=>{switch(s.key){case"Control":n.ctrl=!0;break;case"Meta":n.command=!0,n.win=!0;break;case"Shift":n.shift=!0;break;case"Tab":n.tab=!0;break}o!==void 0&&Object.keys(o).forEach(u=>{if(u!==s.key)return;const d=o[u];if(typeof d=="function")d(s);else{const{stop:f=!1,prevent:v=!1}=d;f&&s.stopPropagation(),v&&s.preventDefault(),d.handler(s)}})},a=s=>{switch(s.key){case"Control":n.ctrl=!1;break;case"Meta":n.command=!1,n.win=!1;break;case"Shift":n.shift=!1;break;case"Tab":n.tab=!1;break}r!==void 0&&Object.keys(r).forEach(u=>{if(u!==s.key)return;const d=r[u];if(typeof d=="function")d(s);else{const{stop:f=!1,prevent:v=!1}=d;f&&s.stopPropagation(),v&&s.preventDefault(),d.handler(s)}})},l=()=>{(t===void 0||t.value)&&(on("keydown",document,i),on("keyup",document,a)),t!==void 0&&watch(t,s=>{s?(on("keydown",document,i),on("keyup",document,a)):(off("keydown",document,i),off("keyup",document,a))})};return hasInstance()?(onBeforeMount(l),onBeforeUnmount(()=>{(t===void 0||t.value)&&(off("keydown",document,i),off("keyup",document,a))})):l(),readonly(n)}const internalSelectionMenuInjectionKey=createInjectionKey("n-internal-select-menu"),internalSelectionMenuBodyInjectionKey=createInjectionKey("n-internal-select-menu-body"),teleportDisabled="__disabled__";function useAdjustedTo(e){const t=inject(modalBodyInjectionKey,null),n=inject(drawerBodyInjectionKey,null),o=inject(popoverBodyInjectionKey,null),r=inject(internalSelectionMenuBodyInjectionKey,null),i=ref();if(typeof document<"u"){i.value=document.fullscreenElement;const a=()=>{i.value=document.fullscreenElement};onMounted(()=>{on("fullscreenchange",document,a)}),onBeforeUnmount(()=>{off("fullscreenchange",document,a)})}return useMemo(()=>{var a;const{to:l}=e;return l!==void 0?l===!1?teleportDisabled:l===!0?i.value||"body":l:t!=null&&t.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:r!=null&&r.value?r.value:l??(i.value||"body")})}useAdjustedTo.tdkey=teleportDisabled;useAdjustedTo.propTo={type:[String,Object,Boolean],default:void 0};let viewMeasurer=null;function ensureViewBoundingRect(){if(viewMeasurer===null&&(viewMeasurer=document.getElementById("v-binder-view-measurer"),viewMeasurer===null)){viewMeasurer=document.createElement("div"),viewMeasurer.id="v-binder-view-measurer";const{style:e}=viewMeasurer;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(viewMeasurer)}return viewMeasurer.getBoundingClientRect()}function getPointRect(e,t){const n=ensureViewBoundingRect();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function getRect(e){const t=e.getBoundingClientRect(),n=ensureViewBoundingRect();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function getParentNode(e){return e.nodeType===9?null:e.parentNode}function getScrollParent(e){if(e===null)return null;const t=getParentNode(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:o,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+r+o))return t}return getScrollParent(t)}const Binder=defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;provide("VBinder",(t=getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=inject("VBinder",null),o=ref(null),r=b=>{o.value=b,n&&e.syncTargetWithParent&&n.setTargetRef(b)};let i=[];const a=()=>{let b=o.value;for(;b=getScrollParent(b),b!==null;)i.push(b);for(const x of i)on("scroll",x,f,!0)},l=()=>{for(const b of i)off("scroll",b,f,!0);i=[]},s=new Set,u=b=>{s.size===0&&a(),s.has(b)||s.add(b)},d=b=>{s.has(b)&&s.delete(b),s.size===0&&l()},f=()=>{beforeNextFrameOnce(v)},v=()=>{s.forEach(b=>b())},g=new Set,p=b=>{g.size===0&&on("resize",window,C),g.has(b)||g.add(b)},m=b=>{g.has(b)&&g.delete(b),g.size===0&&off("resize",window,C)},C=()=>{g.forEach(b=>b())};return onBeforeUnmount(()=>{off("resize",window,C),l()}),{targetRef:o,setTargetRef:r,addScrollListener:u,removeScrollListener:d,addResizeListener:p,removeResizeListener:m}},render(){return getSlot$1("binder",this.$slots)}}),VBinder=Binder,VTarget=defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?withDirectives(getFirstVNode("follower",this.$slots),[[t]]):getFirstVNode("follower",this.$slots)}}),ctxKey="@@mmoContext",mousemoveoutside={mounted(e,{value:t}){e[ctxKey]={handler:void 0},typeof t=="function"&&(e[ctxKey].handler=t,on("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[ctxKey];typeof t=="function"?n.handler?n.handler!==t&&(off("mousemoveoutside",e,n.handler),n.handler=t,on("mousemoveoutside",e,t)):(e[ctxKey].handler=t,on("mousemoveoutside",e,t)):n.handler&&(off("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[ctxKey];t&&off("mousemoveoutside",e,t),e[ctxKey].handler=void 0}},mousemoveoutside$1=mousemoveoutside,{c}=CssRender(),cssrAnchorMetaName="vueuc-style";function lowBit(e){return e&-e}class FinweckTree{constructor(t,n){this.l=t,this.min=n;const o=new Array(t+1);for(let r=0;rr)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let i=t*o;for(;t>0;)i+=n[t],t-=lowBit(t);return i}getBound(t){let n=0,o=this.l;for(;o>n;){const r=Math.floor((n+o)/2),i=this.sum(r);if(i>t){o=r;continue}else if(i{let C=0,b=0;const x=n[g]-t[p]-t[g];return x>0&&o&&(m?b=keepOffsetDirection[p]?x:-x:C=keepOffsetDirection[p]?x:-x),{left:C,top:b}},f=a==="left"||a==="right";if(s!=="center"){const g=oppositeAlignCssPositionProps[e],p=oppositionPositions[g],m=propToCompare[g];if(n[m]>t[m]){if(t[g]+t[m]t[p]&&(s=oppositeAligns[l])}else{const g=a==="bottom"||a==="top"?"left":"top",p=oppositionPositions[g],m=propToCompare[g],C=(n[m]-t[m])/2;(t[g]t[p]?(s=cssPositionToOppositeAlign[g],u=d(m,g,f)):(s=cssPositionToOppositeAlign[p],u=d(m,p,f)))}let v=a;return t[a] *",{pointerEvents:"all"})])]),VFollower=defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=inject("VBinder"),n=useMemo(()=>e.enabled!==void 0?e.enabled:e.show),o=ref(null),r=ref(null),i=()=>{const{syncTrigger:v}=e;v.includes("scroll")&&t.addScrollListener(s),v.includes("resize")&&t.addResizeListener(s)},a=()=>{t.removeScrollListener(s),t.removeResizeListener(s)};onMounted(()=>{n.value&&(s(),i())});const l=useSsrAdapter();style$t.mount({id:"vueuc/binder",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:l}),onBeforeUnmount(()=>{a()}),onFontsReady(()=>{n.value&&s()});const s=()=>{if(!n.value)return;const v=o.value;if(v===null)return;const g=t.targetRef,{x:p,y:m,overlap:C}=e,b=p!==void 0&&m!==void 0?getPointRect(p,m):getRect(g);v.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),v.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:x,minWidth:S,placement:w,internalShift:y,flip:R}=e;v.setAttribute("v-placement",w),C?v.setAttribute("v-overlap",""):v.removeAttribute("v-overlap");const{style:k}=v;x==="target"?k.width=`${b.width}px`:x!==void 0?k.width=x:k.width="",S==="target"?k.minWidth=`${b.width}px`:S!==void 0?k.minWidth=S:k.minWidth="";const B=getRect(v),T=getRect(r.value),{left:M,top:E,placement:$}=getPlacementAndOffsetOfFollower(w,b,B,y,R,C),_=getProperTransformOrigin($,C),{left:O,top:N,transform:D}=getOffset($,T,b,E,M,C);v.setAttribute("v-placement",$),v.style.setProperty("--v-offset-left",`${Math.round(M)}px`),v.style.setProperty("--v-offset-top",`${Math.round(E)}px`),v.style.transform=`translateX(${O}) translateY(${N}) ${D}`,v.style.setProperty("--v-transform-origin",_),v.style.transformOrigin=_};watch(n,v=>{v?(i(),u()):a()});const u=()=>{nextTick().then(s).catch(v=>console.error(v))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(v=>{watch(toRef(e,v),s)}),["teleportDisabled"].forEach(v=>{watch(toRef(e,v),u)}),watch(toRef(e,"syncTrigger"),v=>{v.includes("resize")?t.addResizeListener(s):t.removeResizeListener(s),v.includes("scroll")?t.addScrollListener(s):t.removeScrollListener(s)});const d=isMounted(),f=useMemo(()=>{const{to:v}=e;if(v!==void 0)return v;d.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:r,followerRef:o,mergedTo:f,syncPosition:s}},render(){return h(LazyTeleport,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?withDirectives(n,[[zindexable,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});let maybeTouch;function ensureMaybeTouch(){return typeof document>"u"?!1:(maybeTouch===void 0&&("matchMedia"in window?maybeTouch=window.matchMedia("(pointer:coarse)").matches:maybeTouch=!1),maybeTouch)}let wheelScale;function ensureWheelScale(){return typeof document>"u"?1:(wheelScale===void 0&&(wheelScale="chrome"in window?window.devicePixelRatio:1),wheelScale)}const styles=c(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[c("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[c("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),VVirtualList=defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=useSsrAdapter();styles.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:t}),onMounted(()=>{const{defaultScrollIndex:E,defaultScrollKey:$}=e;E!=null?p({index:E}):$!=null&&p({key:$})});let n=!1,o=!1;onActivated(()=>{if(n=!1,!o){o=!0;return}p({top:f.value,left:d})}),onDeactivated(()=>{n=!0,o||(o=!0)});const r=computed(()=>{const E=new Map,{keyField:$}=e;return e.items.forEach((_,O)=>{E.set(_[$],O)}),E}),i=ref(null),a=ref(void 0),l=new Map,s=computed(()=>{const{items:E,itemSize:$,keyField:_}=e,O=new FinweckTree(E.length,$);return E.forEach((N,D)=>{const F=N[_],j=l.get(F);j!==void 0&&O.add(D,j)}),O}),u=ref(0);let d=0;const f=ref(0),v=useMemo(()=>Math.max(s.value.getBound(f.value-depx(e.paddingTop))-1,0)),g=computed(()=>{const{value:E}=a;if(E===void 0)return[];const{items:$,itemSize:_}=e,O=v.value,N=Math.min(O+Math.ceil(E/_+1),$.length-1),D=[];for(let F=O;F<=N;++F)D.push($[F]);return D}),p=(E,$)=>{if(typeof E=="number"){x(E,$,"auto");return}const{left:_,top:O,index:N,key:D,position:F,behavior:j,debounce:J=!0}=E;if(_!==void 0||O!==void 0)x(_,O,j);else if(N!==void 0)b(N,j,J);else if(D!==void 0){const Q=r.value.get(D);Q!==void 0&&b(Q,j,J)}else F==="bottom"?x(0,Number.MAX_SAFE_INTEGER,j):F==="top"&&x(0,0,j)};let m,C=null;function b(E,$,_){const{value:O}=s,N=O.sum(E)+depx(e.paddingTop);if(!_)i.value.scrollTo({left:0,top:N,behavior:$});else{m=E,C!==null&&window.clearTimeout(C),C=window.setTimeout(()=>{m=void 0,C=null},16);const{scrollTop:D,offsetHeight:F}=i.value;if(N>D){const j=O.get(E);N+j<=D+F||i.value.scrollTo({left:0,top:N+j-F,behavior:$})}else i.value.scrollTo({left:0,top:N,behavior:$})}}function x(E,$,_){i.value.scrollTo({left:E,top:$,behavior:_})}function S(E,$){var _,O,N;if(n||e.ignoreItemResize||M($.target))return;const{value:D}=s,F=r.value.get(E),j=D.get(F),J=(N=(O=(_=$.borderBoxSize)===null||_===void 0?void 0:_[0])===null||O===void 0?void 0:O.blockSize)!==null&&N!==void 0?N:$.contentRect.height;if(J===j)return;J-e.itemSize===0?l.delete(E):l.set(E,J-e.itemSize);const re=J-j;if(re===0)return;D.add(F,re);const L=i.value;if(L!=null){if(m===void 0){const W=D.sum(F);L.scrollTop>W&&L.scrollBy(0,re)}else if(FL.scrollTop+L.offsetHeight&&L.scrollBy(0,re)}T()}u.value++}const w=!ensureMaybeTouch();let y=!1;function R(E){var $;($=e.onScroll)===null||$===void 0||$.call(e,E),(!w||!y)&&T()}function k(E){var $;if(($=e.onWheel)===null||$===void 0||$.call(e,E),w){const _=i.value;if(_!=null){if(E.deltaX===0&&(_.scrollTop===0&&E.deltaY<=0||_.scrollTop+_.offsetHeight>=_.scrollHeight&&E.deltaY>=0))return;E.preventDefault(),_.scrollTop+=E.deltaY/ensureWheelScale(),_.scrollLeft+=E.deltaX/ensureWheelScale(),T(),y=!0,beforeNextFrameOnce(()=>{y=!1})}}}function B(E){if(n||M(E.target)||E.contentRect.height===a.value)return;a.value=E.contentRect.height;const{onResize:$}=e;$!==void 0&&$(E)}function T(){const{value:E}=i;E!=null&&(f.value=E.scrollTop,d=E.scrollLeft)}function M(E){let $=E;for(;$!==null;){if($.style.display==="none")return!0;$=$.parentElement}return!1}return{listHeight:a,listStyle:{overflow:"auto"},keyToIndex:r,itemsStyle:computed(()=>{const{itemResizable:E}=e,$=pxfy(s.value.sum());return u.value,[e.itemsStyle,{boxSizing:"content-box",height:E?"":$,minHeight:E?$:"",paddingTop:pxfy(e.paddingTop),paddingBottom:pxfy(e.paddingBottom)}]}),visibleItemsStyle:computed(()=>(u.value,{transform:`translateY(${pxfy(s.value.sum(v.value))})`})),viewportItems:g,listElRef:i,itemsElRef:ref(null),scrollTo:p,handleListResize:B,handleListScroll:R,handleListWheel:k,handleItemResize:S}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:o}=this;return h(VResizeObserver,{onResize:this.handleListResize},{default:()=>{var r,i;return h("div",mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[h(o,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(a=>{const l=a[t],s=n.get(l),u=this.$slots.default({item:a,index:s})[0];return e?h(VResizeObserver,{key:l,onResize:d=>this.handleItemResize(l,d)},{default:()=>u}):(u.key=l,u)})})]):(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)])}})}}),hiddenAttr="v-hidden",style$s=c("[v-hidden]",{display:"none!important"}),VOverflow=defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=ref(null),o=ref(null);function r(a){const{value:l}=n,{getCounter:s,getTail:u}=e;let d;if(s!==void 0?d=s():d=o.value,!l||!d)return;d.hasAttribute(hiddenAttr)&&d.removeAttribute(hiddenAttr);const{children:f}=l;if(a.showAllItemsBeforeCalculate)for(const S of f)S.hasAttribute(hiddenAttr)&&S.removeAttribute(hiddenAttr);const v=l.offsetWidth,g=[],p=t.tail?u==null?void 0:u():null;let m=p?p.offsetWidth:0,C=!1;const b=l.children.length-(t.tail?1:0);for(let S=0;Sv){const{updateCounter:R}=e;for(let k=S;k>=0;--k){const B=b-1-k;R!==void 0?R(B):d.textContent=`${B}`;const T=d.offsetWidth;if(m-=g[k],m+T<=v||k===0){C=!0,S=k-1,p&&(S===-1?(p.style.maxWidth=`${v-T}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:M}=e;M&&M(B);break}}}}const{onUpdateOverflow:x}=e;C?x!==void 0&&x(!0):(x!==void 0&&x(!1),d.setAttribute(hiddenAttr,""))}const i=useSsrAdapter();return style$s.mount({id:"vueuc/overflow",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:i}),onMounted(()=>r({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:o,sync:r}},render(){const{$slots:e}=this;return nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),h("div",{class:"v-overflow",ref:"selfRef"},[renderSlot(e,"default"),e.counter?e.counter():h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function useOnResize(e,t){t&&(onMounted(()=>{const{value:n}=e;n&&resizeObserverManager.registerHandler(n,t)}),onBeforeUnmount(()=>{const{value:n}=e;n&&resizeObserverManager.unregisterHandler(n)}))}const download=(e,t)=>{if(!e)return;const n=document.createElement("a");n.href=e,t!==void 0&&(n.download=t),document.body.appendChild(n),n.click(),document.body.removeChild(n)};var WeakMap$1=getNative(root,"WeakMap");const WeakMap$2=WeakMap$1;var nativeKeys=overArg(Object.keys,Object);const nativeKeys$1=nativeKeys;var objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty;function baseKeys(e){if(!isPrototype(e))return nativeKeys$1(e);var t=[];for(var n in Object(e))hasOwnProperty$2.call(e,n)&&n!="constructor"&&t.push(n);return t}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||isSymbol(e)?!0:reIsPlainProp.test(e)||!reIsDeepProp.test(e)||t!=null&&e in Object(t)}var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(FUNC_ERROR_TEXT);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var a=e.apply(this,o);return n.cache=i.set(r,a)||i,a};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(o){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),o}),n=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rePropName,function(n,o,r,i){t.push(r?i.replace(reEscapeChar,"$1"):o||n)}),t});const stringToPath$1=stringToPath;function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath$1(toString(e))}var INFINITY=1/0;function toKey(e){if(typeof e=="string"||isSymbol(e))return e;var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function baseGet(e,t){t=castPath(t,e);for(var n=0,o=t.length;e!=null&&nl))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var f=-1,v=!0,g=n&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(i.set(e,t),i.set(t,e);++f`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"yyyy-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},enUS$1=enUS;function buildFormatLongFn(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,o=e.formats[n]||e.formats[e.defaultWidth];return o}}function buildLocalizeFn(e){return function(t,n){var o=n!=null&&n.context?String(n.context):"standalone",r;if(o==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var l=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[l]}var u=e.argumentCallback?e.argumentCallback(t):t;return r[u]}}function buildMatchFn(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var a=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?findIndex(l,function(f){return f.test(a)}):findKey(l,function(f){return f.test(a)}),u;u=e.valueCallback?e.valueCallback(s):s,u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(a.length);return{value:u,rest:d}}}function findKey(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function findIndex(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},o=t.match(e.matchPattern);if(!o)return null;var r=o[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;var l=t.slice(r.length);return{value:a,rest:l}}}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=function(t,n,o){var r,i=formatDistanceLocale[t];return typeof i=="string"?r=i:n===1?r=i.one:r=i.other.replace("{{count}}",n.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};const formatDistance$1=formatDistance;var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=function(t,n,o,r){return formatRelativeLocale[t]};const formatRelative$1=formatRelative;var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=function(t,n){var o=Number(t),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};const localize$1=localize;var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(t){return parseInt(t,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const match$1=match;var locale={code:"en-US",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:0,firstWeekContainsDate:1}};const defaultLocale=locale,dateEnUs={name:"en-US",locale:defaultLocale},dateEnUS=dateEnUs;function useLocale(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=inject(configProviderInjectionKey,null)||{},o=computed(()=>{var i,a;return(a=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&a!==void 0?a:enUS$1[e]});return{dateLocaleRef:computed(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:dateEnUS}),localeRef:o}}const AddIcon=defineComponent({name:"Add",render(){return h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),AttachIcon=replaceable("attach",h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"currentColor","fill-rule":"nonzero"},h("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),FinishedIcon=defineComponent({name:"Checkmark",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},h("g",{fill:"none"},h("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),ChevronRightIcon=defineComponent({name:"ChevronRight",render(){return h("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}}),EyeIcon=defineComponent({name:"Eye",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),EyeOffIcon=defineComponent({name:"EyeOff",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),TrashIcon=replaceable("trash",h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),h("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),h("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),h("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),DownloadIcon=replaceable("download",h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"currentColor","fill-rule":"nonzero"},h("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),EmptyIcon=defineComponent({name:"Empty",render(){return h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),h("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),RemoveIcon=defineComponent({name:"Remove",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:` +import{v as vShow,i as inject,g as getCurrentInstance,w as watch,o as onBeforeUnmount,r as ref,a as onMounted,b as isBrowser,c as computed,d as reactive,h as hasInstance,e as onBeforeMount,f as off,j as readonly,k as on,l as createInjectionKey,m as modalBodyInjectionKey,n as drawerBodyInjectionKey,p as popoverBodyInjectionKey,u as useMemo,q as defineComponent,s as provide,t as getSlot$1,x as withDirectives,y as getFirstVNode,C as CssRender,z as useSsrAdapter,A as toRef,B as isMounted,D as h,L as LazyTeleport,E as zindexable,F as nextTick,G as onActivated,H as onDeactivated,I as depx,V as VResizeObserver,J as mergeProps,K as pxfy,M as renderSlot,N as resizeObserverManager,O as getNative,P as root,Q as overArg,R as isPrototype,S as isArrayLike,T as arrayLikeKeys,U as isArray,W as isSymbol,X as MapCache,Y as toString,Z as toSource,_ as baseGetTag,$ as Map$1,a0 as Symbol$1,a1 as eq,a2 as Uint8Array,a3 as isBuffer,a4 as Stack,a5 as isTypedArray,a6 as isObjectLike,a7 as isObject,a8 as isLength,a9 as isIndex,aa as isArguments,ab as identity,ac as baseFor,ad as arrayMap,ae as configProviderInjectionKey,af as replaceable,ag as cB,ah as cE,ai as c$1,aj as useConfig,ak as useTheme,al as useThemeClass,am as NBaseIcon,an as emptyLight,ao as createKey,ap as render,aq as Transition,ar as cM,as as cNotM,at as fadeInScaleUpTransition,au as useRtl,av as internalSelectMenuLight,aw as resolveWrappedSlot,ax as NBaseLoading,ay as NScrollbar,az as resolveSlot,aA as getMargin,aB as cCB,aC as watchEffect,aD as popoverLight,aE as clickoutside,aF as getPreciseEventTarget,aG as isSlotEmpty,aH as FocusTrap,aI as Fragment,aJ as XScrollbar,aK as getFirstSlotVNode,aL as cloneVNode,aM as Text,aN as keep,aO as call,aP as NBaseClose,aQ as tagLight,aR as color2Class,aS as iconSwitchTransition,aT as useStyle,aU as NIconSwitchTransition,aV as internalSelectionLight,aW as Wrapper,aX as fadeInHeightExpandTransition,aY as NFadeInExpandTransition,aZ as ErrorIcon,a_ as WarningIcon,a$ as InfoIcon,b0 as SuccessIcon,b1 as alertLight,b2 as resolveSlotWithProps,b3 as isSafari,b4 as useFormItem,b5 as inputLight,b6 as isBrowser$1,b7 as markEventEffectPerformed,b8 as selectLight,b9 as tooltipLight,ba as useMergedClsPrefix,bb as ellipsisLight,bc as radioLight,bd as flatten$1,be as warn,bf as iconLight,bg as dropdownLight,bh as dialogApiInjectionKey,bi as throwError,bj as Comment,bk as spaceLight,bl as getGap,bm as formLight,bn as keysOf,bo as commonVariables,bp as createId,bq as formItemInjectionKey,br as fadeInTransition,bs as imageLight,bt as normalizeStyle,bu as XButton,bv as inputNumberLight,bw as rgba,bx as insideModal,by as insidePopover,bz as listLight,bA as messageApiInjectionKey,bB as progressLight,bC as resultLight,bD as spinLight,bE as switchLight,bF as tableLight,bG as thingLight,bH as typographyLight,bI as NButton,bJ as Teleport,bK as uploadLight,bL as defineStore,bM as openBlock,bN as createElementBlock,bO as toDisplayString,bP as createBlock,bQ as withCtx,bR as createBaseVNode,bS as createVNode,bT as withKeys,bU as unref,bV as createTextVNode,bW as NModal,bX as storeToRefs,bY as useUserStore,bZ as useOsTheme,b_ as isMobile,b$ as renderList,c0 as isRef,c1 as render$1,c2 as NConfigProvider,c3 as lightTheme,c4 as darkTheme,c5 as createCommentVNode,c6 as normalizeClass,c7 as pushScopeId,c8 as popScopeId,c9 as ApiResultCode,ca as cookies}from"./index-ce055589.js";let onceCbs=[];const paramsMap=new WeakMap;function flushOnceCallbacks(){onceCbs.forEach(e=>e(...paramsMap.get(e))),onceCbs=[]}function beforeNextFrameOnce(e,...t){paramsMap.set(e,t),!onceCbs.includes(e)&&onceCbs.push(e)===1&&requestAnimationFrame(flushOnceCallbacks)}function happensIn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function parseResponsiveProp(e){if(typeof e=="number")return{"":e.toString()};const t={};return e.split(/ +/).forEach(n=>{if(n==="")return;const[o,r]=n.split(":");r===void 0?t[""]=o:t[o]=r}),t}function parseResponsivePropValue(e,t){var n;if(e==null)return;const o=parseResponsiveProp(e);if(t===void 0)return o[""];if(typeof t=="string")return(n=o[t])!==null&&n!==void 0?n:o[""];if(Array.isArray(t)){for(let r=t.length-1;r>=0;--r){const i=t[r];if(i in o)return o[i]}return o[""]}else{let r,i=-1;return Object.keys(o).forEach(a=>{const l=Number(a);!Number.isNaN(l)&&t>=l&&l>=i&&(i=l,r=o[a])}),r}}function getSlot(e,t="default",n=[]){const r=e.$slots[t];return r===void 0?n:r()}function getTitleAttribute(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function createRefSetter(e){return t=>{t?e.value=t.$el:e.value=null}}function mergeEventHandlers(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(o=>{o&&o(n)})}}function isNodeVShowFalse(e){var t;const n=(t=e.dirs)===null||t===void 0?void 0:t.find(({dir:o})=>o===vShow);return!!(n&&n.value===!1)}const pureNumberRegex=/^(\d|\.)+$/,numberRegex=/(\d|\.)+/;function formatLength(e,{c:t=1,offset:n=0,attachPx:o=!0}={}){if(typeof e=="number"){const r=(e+n)*t;return r===0?"0":`${r}px`}else if(typeof e=="string")if(pureNumberRegex.test(e)){const r=(Number(e)+n)*t;return o?r===0?"0":`${r}px`:`${r}`}else{const r=numberRegex.exec(e);return r?e.replace(numberRegex,String((Number(r[0])+n)*t)):e}return e}let _isJsdom;function isJsdom(){return _isJsdom===void 0&&(_isJsdom=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),_isJsdom}function useInjectionInstanceCollection(e,t,n){var o;const r=inject(e,null);if(r===null)return;const i=(o=getCurrentInstance())===null||o===void 0?void 0:o.proxy;watch(n,a),a(n.value),onBeforeUnmount(()=>{a(void 0,n.value)});function a(u,d){if(!r)return;const f=r[t];d!==void 0&&l(f,d),u!==void 0&&s(f,u)}function l(u,d){u[d]||(u[d]=[]),u[d].splice(u[d].findIndex(f=>f===i),1)}function s(u,d){u[d]||(u[d]=[]),~u[d].findIndex(f=>f===i)||u[d].push(i)}}function useDeferredTrue(e,t,n){if(!t)return e;const o=ref(e.value);let r=null;return watch(e,i=>{r!==null&&window.clearTimeout(r),i===!0?n&&!n.value?o.value=!0:r=window.setTimeout(()=>{o.value=!0},t):o.value=!1}),o}let fontsReady,isFontReady;const init=()=>{var e,t;fontsReady=isBrowser?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,isFontReady=!1,fontsReady!==void 0?fontsReady.then(()=>{isFontReady=!0}):isFontReady=!0};init();function onFontsReady(e){if(isFontReady)return;let t=!1;onMounted(()=>{isFontReady||fontsReady==null||fontsReady.then(()=>{t||e()})}),onBeforeUnmount(()=>{t=!0})}function useMergedState(e,t){return watch(e,n=>{n!==void 0&&(t.value=n)}),computed(()=>e.value===void 0?t.value:e.value)}function useCompitable(e,t){return computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const defaultBreakpointOptions={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};function createMediaQuery(e){return`(min-width: ${e}px)`}const mqlMap={};function useBreakpoints(e=defaultBreakpointOptions){if(!isBrowser)return computed(()=>[]);if(typeof window.matchMedia!="function")return computed(()=>[]);const t=ref({}),n=Object.keys(e),o=(r,i)=>{r.matches?t.value[i]=!0:t.value[i]=!1};return n.forEach(r=>{const i=e[r];let a,l;mqlMap[i]===void 0?(a=window.matchMedia(createMediaQuery(i)),a.addEventListener?a.addEventListener("change",s=>{l.forEach(u=>{u(s,r)})}):a.addListener&&a.addListener(s=>{l.forEach(u=>{u(s,r)})}),l=new Set,mqlMap[i]={mql:a,cbs:l}):(a=mqlMap[i].mql,l=mqlMap[i].cbs),l.add(o),a.matches&&l.forEach(s=>{s(a,r)})}),onBeforeUnmount(()=>{n.forEach(r=>{const{cbs:i}=mqlMap[e[r]];i.has(o)&&i.delete(o)})}),computed(()=>{const{value:r}=t;return n.filter(i=>r[i])})}function useKeyboard(e={},t){const n=reactive({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:o,keyup:r}=e,i=s=>{switch(s.key){case"Control":n.ctrl=!0;break;case"Meta":n.command=!0,n.win=!0;break;case"Shift":n.shift=!0;break;case"Tab":n.tab=!0;break}o!==void 0&&Object.keys(o).forEach(u=>{if(u!==s.key)return;const d=o[u];if(typeof d=="function")d(s);else{const{stop:f=!1,prevent:v=!1}=d;f&&s.stopPropagation(),v&&s.preventDefault(),d.handler(s)}})},a=s=>{switch(s.key){case"Control":n.ctrl=!1;break;case"Meta":n.command=!1,n.win=!1;break;case"Shift":n.shift=!1;break;case"Tab":n.tab=!1;break}r!==void 0&&Object.keys(r).forEach(u=>{if(u!==s.key)return;const d=r[u];if(typeof d=="function")d(s);else{const{stop:f=!1,prevent:v=!1}=d;f&&s.stopPropagation(),v&&s.preventDefault(),d.handler(s)}})},l=()=>{(t===void 0||t.value)&&(on("keydown",document,i),on("keyup",document,a)),t!==void 0&&watch(t,s=>{s?(on("keydown",document,i),on("keyup",document,a)):(off("keydown",document,i),off("keyup",document,a))})};return hasInstance()?(onBeforeMount(l),onBeforeUnmount(()=>{(t===void 0||t.value)&&(off("keydown",document,i),off("keyup",document,a))})):l(),readonly(n)}const internalSelectionMenuInjectionKey=createInjectionKey("n-internal-select-menu"),internalSelectionMenuBodyInjectionKey=createInjectionKey("n-internal-select-menu-body"),teleportDisabled="__disabled__";function useAdjustedTo(e){const t=inject(modalBodyInjectionKey,null),n=inject(drawerBodyInjectionKey,null),o=inject(popoverBodyInjectionKey,null),r=inject(internalSelectionMenuBodyInjectionKey,null),i=ref();if(typeof document<"u"){i.value=document.fullscreenElement;const a=()=>{i.value=document.fullscreenElement};onMounted(()=>{on("fullscreenchange",document,a)}),onBeforeUnmount(()=>{off("fullscreenchange",document,a)})}return useMemo(()=>{var a;const{to:l}=e;return l!==void 0?l===!1?teleportDisabled:l===!0?i.value||"body":l:t!=null&&t.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:r!=null&&r.value?r.value:l??(i.value||"body")})}useAdjustedTo.tdkey=teleportDisabled;useAdjustedTo.propTo={type:[String,Object,Boolean],default:void 0};let viewMeasurer=null;function ensureViewBoundingRect(){if(viewMeasurer===null&&(viewMeasurer=document.getElementById("v-binder-view-measurer"),viewMeasurer===null)){viewMeasurer=document.createElement("div"),viewMeasurer.id="v-binder-view-measurer";const{style:e}=viewMeasurer;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(viewMeasurer)}return viewMeasurer.getBoundingClientRect()}function getPointRect(e,t){const n=ensureViewBoundingRect();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function getRect(e){const t=e.getBoundingClientRect(),n=ensureViewBoundingRect();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function getParentNode(e){return e.nodeType===9?null:e.parentNode}function getScrollParent(e){if(e===null)return null;const t=getParentNode(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:o,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+r+o))return t}return getScrollParent(t)}const Binder=defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;provide("VBinder",(t=getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=inject("VBinder",null),o=ref(null),r=b=>{o.value=b,n&&e.syncTargetWithParent&&n.setTargetRef(b)};let i=[];const a=()=>{let b=o.value;for(;b=getScrollParent(b),b!==null;)i.push(b);for(const x of i)on("scroll",x,f,!0)},l=()=>{for(const b of i)off("scroll",b,f,!0);i=[]},s=new Set,u=b=>{s.size===0&&a(),s.has(b)||s.add(b)},d=b=>{s.has(b)&&s.delete(b),s.size===0&&l()},f=()=>{beforeNextFrameOnce(v)},v=()=>{s.forEach(b=>b())},g=new Set,p=b=>{g.size===0&&on("resize",window,C),g.has(b)||g.add(b)},m=b=>{g.has(b)&&g.delete(b),g.size===0&&off("resize",window,C)},C=()=>{g.forEach(b=>b())};return onBeforeUnmount(()=>{off("resize",window,C),l()}),{targetRef:o,setTargetRef:r,addScrollListener:u,removeScrollListener:d,addResizeListener:p,removeResizeListener:m}},render(){return getSlot$1("binder",this.$slots)}}),VBinder=Binder,VTarget=defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?withDirectives(getFirstVNode("follower",this.$slots),[[t]]):getFirstVNode("follower",this.$slots)}}),ctxKey="@@mmoContext",mousemoveoutside={mounted(e,{value:t}){e[ctxKey]={handler:void 0},typeof t=="function"&&(e[ctxKey].handler=t,on("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[ctxKey];typeof t=="function"?n.handler?n.handler!==t&&(off("mousemoveoutside",e,n.handler),n.handler=t,on("mousemoveoutside",e,t)):(e[ctxKey].handler=t,on("mousemoveoutside",e,t)):n.handler&&(off("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[ctxKey];t&&off("mousemoveoutside",e,t),e[ctxKey].handler=void 0}},mousemoveoutside$1=mousemoveoutside,{c}=CssRender(),cssrAnchorMetaName="vueuc-style";function lowBit(e){return e&-e}class FinweckTree{constructor(t,n){this.l=t,this.min=n;const o=new Array(t+1);for(let r=0;rr)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let i=t*o;for(;t>0;)i+=n[t],t-=lowBit(t);return i}getBound(t){let n=0,o=this.l;for(;o>n;){const r=Math.floor((n+o)/2),i=this.sum(r);if(i>t){o=r;continue}else if(i{let C=0,b=0;const x=n[g]-t[p]-t[g];return x>0&&o&&(m?b=keepOffsetDirection[p]?x:-x:C=keepOffsetDirection[p]?x:-x),{left:C,top:b}},f=a==="left"||a==="right";if(s!=="center"){const g=oppositeAlignCssPositionProps[e],p=oppositionPositions[g],m=propToCompare[g];if(n[m]>t[m]){if(t[g]+t[m]t[p]&&(s=oppositeAligns[l])}else{const g=a==="bottom"||a==="top"?"left":"top",p=oppositionPositions[g],m=propToCompare[g],C=(n[m]-t[m])/2;(t[g]t[p]?(s=cssPositionToOppositeAlign[g],u=d(m,g,f)):(s=cssPositionToOppositeAlign[p],u=d(m,p,f)))}let v=a;return t[a] *",{pointerEvents:"all"})])]),VFollower=defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=inject("VBinder"),n=useMemo(()=>e.enabled!==void 0?e.enabled:e.show),o=ref(null),r=ref(null),i=()=>{const{syncTrigger:v}=e;v.includes("scroll")&&t.addScrollListener(s),v.includes("resize")&&t.addResizeListener(s)},a=()=>{t.removeScrollListener(s),t.removeResizeListener(s)};onMounted(()=>{n.value&&(s(),i())});const l=useSsrAdapter();style$t.mount({id:"vueuc/binder",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:l}),onBeforeUnmount(()=>{a()}),onFontsReady(()=>{n.value&&s()});const s=()=>{if(!n.value)return;const v=o.value;if(v===null)return;const g=t.targetRef,{x:p,y:m,overlap:C}=e,b=p!==void 0&&m!==void 0?getPointRect(p,m):getRect(g);v.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),v.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:x,minWidth:S,placement:w,internalShift:y,flip:R}=e;v.setAttribute("v-placement",w),C?v.setAttribute("v-overlap",""):v.removeAttribute("v-overlap");const{style:k}=v;x==="target"?k.width=`${b.width}px`:x!==void 0?k.width=x:k.width="",S==="target"?k.minWidth=`${b.width}px`:S!==void 0?k.minWidth=S:k.minWidth="";const B=getRect(v),T=getRect(r.value),{left:M,top:E,placement:$}=getPlacementAndOffsetOfFollower(w,b,B,y,R,C),_=getProperTransformOrigin($,C),{left:O,top:N,transform:D}=getOffset($,T,b,E,M,C);v.setAttribute("v-placement",$),v.style.setProperty("--v-offset-left",`${Math.round(M)}px`),v.style.setProperty("--v-offset-top",`${Math.round(E)}px`),v.style.transform=`translateX(${O}) translateY(${N}) ${D}`,v.style.setProperty("--v-transform-origin",_),v.style.transformOrigin=_};watch(n,v=>{v?(i(),u()):a()});const u=()=>{nextTick().then(s).catch(v=>console.error(v))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(v=>{watch(toRef(e,v),s)}),["teleportDisabled"].forEach(v=>{watch(toRef(e,v),u)}),watch(toRef(e,"syncTrigger"),v=>{v.includes("resize")?t.addResizeListener(s):t.removeResizeListener(s),v.includes("scroll")?t.addScrollListener(s):t.removeScrollListener(s)});const d=isMounted(),f=useMemo(()=>{const{to:v}=e;if(v!==void 0)return v;d.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:r,followerRef:o,mergedTo:f,syncPosition:s}},render(){return h(LazyTeleport,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?withDirectives(n,[[zindexable,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});let maybeTouch;function ensureMaybeTouch(){return typeof document>"u"?!1:(maybeTouch===void 0&&("matchMedia"in window?maybeTouch=window.matchMedia("(pointer:coarse)").matches:maybeTouch=!1),maybeTouch)}let wheelScale;function ensureWheelScale(){return typeof document>"u"?1:(wheelScale===void 0&&(wheelScale="chrome"in window?window.devicePixelRatio:1),wheelScale)}const styles=c(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[c("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[c("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),VVirtualList=defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=useSsrAdapter();styles.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:t}),onMounted(()=>{const{defaultScrollIndex:E,defaultScrollKey:$}=e;E!=null?p({index:E}):$!=null&&p({key:$})});let n=!1,o=!1;onActivated(()=>{if(n=!1,!o){o=!0;return}p({top:f.value,left:d})}),onDeactivated(()=>{n=!0,o||(o=!0)});const r=computed(()=>{const E=new Map,{keyField:$}=e;return e.items.forEach((_,O)=>{E.set(_[$],O)}),E}),i=ref(null),a=ref(void 0),l=new Map,s=computed(()=>{const{items:E,itemSize:$,keyField:_}=e,O=new FinweckTree(E.length,$);return E.forEach((N,D)=>{const F=N[_],j=l.get(F);j!==void 0&&O.add(D,j)}),O}),u=ref(0);let d=0;const f=ref(0),v=useMemo(()=>Math.max(s.value.getBound(f.value-depx(e.paddingTop))-1,0)),g=computed(()=>{const{value:E}=a;if(E===void 0)return[];const{items:$,itemSize:_}=e,O=v.value,N=Math.min(O+Math.ceil(E/_+1),$.length-1),D=[];for(let F=O;F<=N;++F)D.push($[F]);return D}),p=(E,$)=>{if(typeof E=="number"){x(E,$,"auto");return}const{left:_,top:O,index:N,key:D,position:F,behavior:j,debounce:J=!0}=E;if(_!==void 0||O!==void 0)x(_,O,j);else if(N!==void 0)b(N,j,J);else if(D!==void 0){const Q=r.value.get(D);Q!==void 0&&b(Q,j,J)}else F==="bottom"?x(0,Number.MAX_SAFE_INTEGER,j):F==="top"&&x(0,0,j)};let m,C=null;function b(E,$,_){const{value:O}=s,N=O.sum(E)+depx(e.paddingTop);if(!_)i.value.scrollTo({left:0,top:N,behavior:$});else{m=E,C!==null&&window.clearTimeout(C),C=window.setTimeout(()=>{m=void 0,C=null},16);const{scrollTop:D,offsetHeight:F}=i.value;if(N>D){const j=O.get(E);N+j<=D+F||i.value.scrollTo({left:0,top:N+j-F,behavior:$})}else i.value.scrollTo({left:0,top:N,behavior:$})}}function x(E,$,_){i.value.scrollTo({left:E,top:$,behavior:_})}function S(E,$){var _,O,N;if(n||e.ignoreItemResize||M($.target))return;const{value:D}=s,F=r.value.get(E),j=D.get(F),J=(N=(O=(_=$.borderBoxSize)===null||_===void 0?void 0:_[0])===null||O===void 0?void 0:O.blockSize)!==null&&N!==void 0?N:$.contentRect.height;if(J===j)return;J-e.itemSize===0?l.delete(E):l.set(E,J-e.itemSize);const re=J-j;if(re===0)return;D.add(F,re);const L=i.value;if(L!=null){if(m===void 0){const W=D.sum(F);L.scrollTop>W&&L.scrollBy(0,re)}else if(FL.scrollTop+L.offsetHeight&&L.scrollBy(0,re)}T()}u.value++}const w=!ensureMaybeTouch();let y=!1;function R(E){var $;($=e.onScroll)===null||$===void 0||$.call(e,E),(!w||!y)&&T()}function k(E){var $;if(($=e.onWheel)===null||$===void 0||$.call(e,E),w){const _=i.value;if(_!=null){if(E.deltaX===0&&(_.scrollTop===0&&E.deltaY<=0||_.scrollTop+_.offsetHeight>=_.scrollHeight&&E.deltaY>=0))return;E.preventDefault(),_.scrollTop+=E.deltaY/ensureWheelScale(),_.scrollLeft+=E.deltaX/ensureWheelScale(),T(),y=!0,beforeNextFrameOnce(()=>{y=!1})}}}function B(E){if(n||M(E.target)||E.contentRect.height===a.value)return;a.value=E.contentRect.height;const{onResize:$}=e;$!==void 0&&$(E)}function T(){const{value:E}=i;E!=null&&(f.value=E.scrollTop,d=E.scrollLeft)}function M(E){let $=E;for(;$!==null;){if($.style.display==="none")return!0;$=$.parentElement}return!1}return{listHeight:a,listStyle:{overflow:"auto"},keyToIndex:r,itemsStyle:computed(()=>{const{itemResizable:E}=e,$=pxfy(s.value.sum());return u.value,[e.itemsStyle,{boxSizing:"content-box",height:E?"":$,minHeight:E?$:"",paddingTop:pxfy(e.paddingTop),paddingBottom:pxfy(e.paddingBottom)}]}),visibleItemsStyle:computed(()=>(u.value,{transform:`translateY(${pxfy(s.value.sum(v.value))})`})),viewportItems:g,listElRef:i,itemsElRef:ref(null),scrollTo:p,handleListResize:B,handleListScroll:R,handleListWheel:k,handleItemResize:S}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:o}=this;return h(VResizeObserver,{onResize:this.handleListResize},{default:()=>{var r,i;return h("div",mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[h(o,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(a=>{const l=a[t],s=n.get(l),u=this.$slots.default({item:a,index:s})[0];return e?h(VResizeObserver,{key:l,onResize:d=>this.handleItemResize(l,d)},{default:()=>u}):(u.key=l,u)})})]):(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)])}})}}),hiddenAttr="v-hidden",style$s=c("[v-hidden]",{display:"none!important"}),VOverflow=defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=ref(null),o=ref(null);function r(a){const{value:l}=n,{getCounter:s,getTail:u}=e;let d;if(s!==void 0?d=s():d=o.value,!l||!d)return;d.hasAttribute(hiddenAttr)&&d.removeAttribute(hiddenAttr);const{children:f}=l;if(a.showAllItemsBeforeCalculate)for(const S of f)S.hasAttribute(hiddenAttr)&&S.removeAttribute(hiddenAttr);const v=l.offsetWidth,g=[],p=t.tail?u==null?void 0:u():null;let m=p?p.offsetWidth:0,C=!1;const b=l.children.length-(t.tail?1:0);for(let S=0;Sv){const{updateCounter:R}=e;for(let k=S;k>=0;--k){const B=b-1-k;R!==void 0?R(B):d.textContent=`${B}`;const T=d.offsetWidth;if(m-=g[k],m+T<=v||k===0){C=!0,S=k-1,p&&(S===-1?(p.style.maxWidth=`${v-T}px`,p.style.boxSizing="border-box"):p.style.maxWidth="");const{onUpdateCount:M}=e;M&&M(B);break}}}}const{onUpdateOverflow:x}=e;C?x!==void 0&&x(!0):(x!==void 0&&x(!1),d.setAttribute(hiddenAttr,""))}const i=useSsrAdapter();return style$s.mount({id:"vueuc/overflow",head:!0,anchorMetaName:cssrAnchorMetaName,ssr:i}),onMounted(()=>r({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:o,sync:r}},render(){const{$slots:e}=this;return nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),h("div",{class:"v-overflow",ref:"selfRef"},[renderSlot(e,"default"),e.counter?e.counter():h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function useOnResize(e,t){t&&(onMounted(()=>{const{value:n}=e;n&&resizeObserverManager.registerHandler(n,t)}),onBeforeUnmount(()=>{const{value:n}=e;n&&resizeObserverManager.unregisterHandler(n)}))}const download=(e,t)=>{if(!e)return;const n=document.createElement("a");n.href=e,t!==void 0&&(n.download=t),document.body.appendChild(n),n.click(),document.body.removeChild(n)};var WeakMap$1=getNative(root,"WeakMap");const WeakMap$2=WeakMap$1;var nativeKeys=overArg(Object.keys,Object);const nativeKeys$1=nativeKeys;var objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty;function baseKeys(e){if(!isPrototype(e))return nativeKeys$1(e);var t=[];for(var n in Object(e))hasOwnProperty$2.call(e,n)&&n!="constructor"&&t.push(n);return t}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||isSymbol(e)?!0:reIsPlainProp.test(e)||!reIsDeepProp.test(e)||t!=null&&e in Object(t)}var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(FUNC_ERROR_TEXT);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var a=e.apply(this,o);return n.cache=i.set(r,a)||i,a};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(o){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),o}),n=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rePropName,function(n,o,r,i){t.push(r?i.replace(reEscapeChar,"$1"):o||n)}),t});const stringToPath$1=stringToPath;function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath$1(toString(e))}var INFINITY=1/0;function toKey(e){if(typeof e=="string"||isSymbol(e))return e;var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function baseGet(e,t){t=castPath(t,e);for(var n=0,o=t.length;e!=null&&nl))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var f=-1,v=!0,g=n&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(i.set(e,t),i.set(t,e);++f`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"yyyy-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},enUS$1=enUS;function buildFormatLongFn(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,o=e.formats[n]||e.formats[e.defaultWidth];return o}}function buildLocalizeFn(e){return function(t,n){var o=n!=null&&n.context?String(n.context):"standalone",r;if(o==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var l=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[l]}var u=e.argumentCallback?e.argumentCallback(t):t;return r[u]}}function buildMatchFn(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;var a=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?findIndex(l,function(f){return f.test(a)}):findKey(l,function(f){return f.test(a)}),u;u=e.valueCallback?e.valueCallback(s):s,u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(a.length);return{value:u,rest:d}}}function findKey(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function findIndex(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},o=t.match(e.matchPattern);if(!o)return null;var r=o[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;var l=t.slice(r.length);return{value:a,rest:l}}}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=function(t,n,o){var r,i=formatDistanceLocale[t];return typeof i=="string"?r=i:n===1?r=i.one:r=i.other.replace("{{count}}",n.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};const formatDistance$1=formatDistance;var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=function(t,n,o,r){return formatRelativeLocale[t]};const formatRelative$1=formatRelative;var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=function(t,n){var o=Number(t),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};const localize$1=localize;var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(t){return parseInt(t,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const match$1=match;var locale={code:"en-US",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:0,firstWeekContainsDate:1}};const defaultLocale=locale,dateEnUs={name:"en-US",locale:defaultLocale},dateEnUS=dateEnUs;function useLocale(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=inject(configProviderInjectionKey,null)||{},o=computed(()=>{var i,a;return(a=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&a!==void 0?a:enUS$1[e]});return{dateLocaleRef:computed(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:dateEnUS}),localeRef:o}}const AddIcon=defineComponent({name:"Add",render(){return h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),AttachIcon=replaceable("attach",h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"currentColor","fill-rule":"nonzero"},h("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),FinishedIcon=defineComponent({name:"Checkmark",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},h("g",{fill:"none"},h("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),ChevronRightIcon=defineComponent({name:"ChevronRight",render(){return h("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}}),EyeIcon=defineComponent({name:"Eye",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),EyeOffIcon=defineComponent({name:"EyeOff",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),TrashIcon=replaceable("trash",h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),h("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),h("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),h("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),DownloadIcon=replaceable("download",h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"currentColor","fill-rule":"nonzero"},h("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),EmptyIcon=defineComponent({name:"Empty",render(){return h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),h("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),RemoveIcon=defineComponent({name:"Remove",render(){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:` fill: none; stroke: currentColor; stroke-linecap: round; @@ -2053,5 +2053,5 @@ import{v as vShow,i as inject,g as getCurrentInstance,w as watch,o as onBeforeUn /* 移除顶部边距 */\r .scroller>.scroller-positioner>.content {\r padding-top: 0 !important;\r -}`,settingSvgUrl="/web/assets/setting-c6ca7b14.svg",usePromptStore=defineStore("prompt-store",()=>{const e=ref([{type:1,name:"ChatGPT 中文调教指南 - 简体",url:"./data/prompts/prompts-zh.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"ChatGPT 中文调教指南 - 繁体",url:"./data/prompts/prompts-zh-TW.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"Awesome ChatGPT Prompts",url:"./data/prompts/prompts.csv",refer:"https://github.com/f/awesome-chatgpt-prompts"},{type:2,name:"",url:"",refer:""}]),t=ref(!1),n=ref(!1),o=ref([]),r=ref(""),i=ref(0),a=ref({isShow:!1,newPrompt:{act:"",prompt:""}}),l=computed(()=>{var u;return r.value?(u=o.value)==null?void 0:u.filter(d=>d.act.includes(r.value)||d.prompt.includes(r.value)):o.value});function s(u){if(u instanceof Array&&u.every(d=>d.act&&d.prompt)){if(o.value.length===0)return o.value.push(...u),{result:!0,data:{successCount:u.length}};const d=u.filter(f=>{var v;return(v=o.value)==null?void 0:v.every(g=>f.act!==g.act&&f.prompt!==g.prompt)});return o.value.push(...d),{result:!0,data:{successCount:d.length}}}else return{result:!1,msg:"提示词格式有误"}}return{promptDownloadConfig:e,isShowPromptSotre:t,isShowChatPrompt:n,promptList:o,keyword:r,searchPromptList:l,selectedPromptIndex:i,optPromptConfig:a,addPrompt:s}},{persist:{key:"prompt-store",storage:localStorage,paths:["promptList"]}}),_hoisted_1$8=["href"],_hoisted_2$6={key:1},_sfc_main$9=defineComponent({__name:"ChatNavItem",props:{navConfig:{}},setup(e){return(t,n)=>t.navConfig.url?(openBlock(),createElementBlock("a",{key:0,href:t.navConfig.url,target:"_blank",rel:"noopener noreferrer"},toDisplayString(t.navConfig.label),9,_hoisted_1$8)):(openBlock(),createElementBlock("div",_hoisted_2$6,toDisplayString(t.navConfig.label),1))}}),_hoisted_1$7={class:"flex justify-center gap-3 px-8"},_hoisted_2$5={class:"flex justify-center items-center"},_hoisted_3$4=["src"],_hoisted_4$4=createBaseVNode("p",{class:"text-left"},"提示:形容词+名词+动词+风格,描述得越详细时,效果越好。",-1),DEMO_KEYWORD="骑着摩托的小猫咪,疾驰在路上,动漫场景,详细的细节。",_sfc_main$8=defineComponent({__name:"CreateImage",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:t}){const n=e,o=t,r=useMessage(),i=ref(""),a=ref(""),l=ref(!1),s=computed({get:()=>n.show,set:v=>o("update:show",v)}),u=()=>{if(!i.value){r.error("请先输入关键词");return}l.value=!0,a.value=`/images/create?re=1&showselective=1&sude=1&kseed=7500&SFX=2&q=${encodeURIComponent(i.value)}&t=${Date.now()}`},d=()=>{i.value="",a.value=""},f=()=>(i.value=DEMO_KEYWORD,u());return(v,g)=>(openBlock(),createBlock(unref(NModal),{class:"w-11/12 lg:w-[540px] select-none",show:s.value,"onUpdate:show":g[2]||(g[2]=p=>s.value=p),"on-close":d,preset:"card",title:"图像创建"},{default:withCtx(()=>[createBaseVNode("head",_hoisted_1$7,[createVNode(unref(NInput),{class:"flex-1",placeholder:"提示词",value:i.value,"onUpdate:value":g[0]||(g[0]=p=>i.value=p),clearable:!0,onKeyup:withKeys(u,["enter"]),maxlength:"100"},null,8,["value"]),createVNode(unref(NButton),{secondary:"",type:"info",onClick:u,loading:l.value},{default:withCtx(()=>[createTextVNode("开始创建")]),_:1},8,["loading"])]),createBaseVNode("main",_hoisted_2$5,[a.value?(openBlock(),createElementBlock("iframe",{key:0,class:"w-[310px] h-[350px] xl:w-[475px] xl:h-[520px] my-4",src:a.value,frameborder:"0",onLoad:g[1]||(g[1]=p=>l.value=!1)},null,40,_hoisted_3$4)):(openBlock(),createBlock(unref(NEmpty),{key:1,class:"h-[40vh] xl:h-[60vh] flex justify-center items-center",description:"暂未创建"},{extra:withCtx(()=>[createVNode(unref(NButton),{secondary:"",type:"info",onClick:f},{default:withCtx(()=>[createTextVNode("使用示例创建")]),_:1}),createBaseVNode("div",{class:"text-[#c2c2c2] px-2 xl:px-10"},[_hoisted_4$4,createBaseVNode("p",{class:"text-left"},"示例:"+toDisplayString(DEMO_KEYWORD))])]),_:1}))])]),_:1},8,["show"]))}}),useChatStore=defineStore("chat-store",()=>{const e="/sydney/ChatHub",t=ref(!1),n=ref(""),o=ref([{baseUrl:"https://sydney.bing.com",label:"Bing 官方"},{baseUrl:"https://sydney.b1ng.chat",label:"Cloudflare Worker"},{baseUrl:location.origin,label:"本站"},{baseUrl:"",label:"自定义",isCus:!0}]),r=3e3,i=async l=>{if(!l.baseUrl)return{isUsable:!1,errorMsg:"链接不可为空"};try{const s=Date.now(),u=new WebSocket(l.baseUrl.replace("http","ws")+e),d=setTimeout(()=>{u.close()},r);return await new Promise((f,v)=>{u.onopen=()=>{clearTimeout(d),f(u.close())},u.onerror=()=>{clearTimeout(d),v(new Error(`聊天服务器 ${l.baseUrl} 连接失败`))},u.onclose=()=>v(new Error(`聊天服务器 ${l.baseUrl} 连接超时`))}),{isUsable:!0,delay:Date.now()-s}}catch(s){return{isUsable:!1,errorMsg:s instanceof Error?s.message:""}}};return{isShowChatServiceSelectModal:t,sydneyConfigs:o,selectedSydneyBaseUrl:n,checkSydneyConfig:i,checkAllSydneyConfig:async()=>{const l=o.value.filter(s=>s.baseUrl).map(async s=>{const u=await i(s);s.isUsable=u.isUsable,s.delay=u.delay});await Promise.all(l)}}},{persist:{key:"chat-store",storage:localStorage,paths:["selectedSydneyBaseUrl","sydneyConfigs"]}}),_hoisted_1$6=createBaseVNode("div",{class:"text-3xl py-2"},"账号登录",-1),_hoisted_2$4={key:0},_hoisted_3$3={key:0,style:{"margin-top":"12px","margin-bottom":"24px"}},_hoisted_4$3=createBaseVNode("br",null,null,-1),_hoisted_5$2={key:1},_hoisted_6$1=["src"],_hoisted_7$1={key:1},_hoisted_8=createBaseVNode("div",{class:"text-3xl py-2"},"设置",-1),_hoisted_9=createBaseVNode("div",{class:"text-3xl py-2"},"Cookie 设置",-1),_hoisted_10=createBaseVNode("div",{class:"text-3xl py-2"},"高级设置",-1),_hoisted_11=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200s200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26a26 26 0 0 1 26-26zm64 226H200v-32h44v-88h-32v-32h64v120h44z",fill:"currentColor"})],-1),_hoisted_12=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200s200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26a26 26 0 0 1 26-26zm64 226H200v-32h44v-88h-32v-32h64v120h44z",fill:"currentColor"})],-1),_hoisted_13=createBaseVNode("div",{class:"text-xl py-2"},"将删除包括 Cookie 等的所有缓存?",-1),_hoisted_14=createBaseVNode("div",{class:"text-3xl py-2"},"关于",-1),_sfc_main$7=defineComponent({__name:"ChatNav",setup(__props){const isShowMore=ref(!1),isShowSettingModal=ref(!1),isShowAdvancedSettingModal=ref(!1),isShowSetAboutModal=ref(!1),isShowCookieModal=ref(!1),isShowLoginModal=ref(!1),isShowIframe=ref(!1),userToken=ref(""),userKievRPSSecAuth=ref(""),userMUID=ref(""),userRwBf=ref(""),message=useMessage(),promptStore=usePromptStore(),{isShowPromptSotre}=storeToRefs(promptStore),isShowClearCacheModal=ref(!1),isShowCreateImageModal=ref(!1),chatStore=useChatStore(),{isShowChatServiceSelectModal}=storeToRefs(chatStore),userStore=useUserStore(),localVersion="2.4.2",lastVersion=ref("加载中..."),{historyEnable,themeMode,uiVersion,langRegion,autoReopenMic,fullCookiesEnable,cookiesStr,enterpriseEnable,copilotProEnable,customChatNum,gpt4tEnable,sydneyEnable,sydneyPrompt,passServer}=storeToRefs(userStore);let cookiesEnable=ref(!1),cookies=ref(""),history=ref(!0),themeModeSetting=ref("auto"),uiVersionSetting=ref("v3"),langRegionSetting=ref("CN"),theme=ref(inject("theme")),autoReopenMicSetting=ref(!0),settingIconStyle=ref({filter:"invert(70%)"}),passingCFChallenge=ref(!1);const enterpriseSetting=ref(!1),copilotProSetting=ref(!1),customChatNumSetting=ref(0),gpt4tSetting=ref(!0),sydneySetting=ref(!1),sydneyPromptSetting=ref(""),passServerSetting=ref(""),getCookieTip=ref("获取 Cookie 中, 请稍后..."),bingUrl=base58Decode("7RYHpA38gs3NAby2mkvoRMwjncBpS"),oneKeyLogin=ref("false"),loginTypeOptions=ref([{label:"账号登录",value:"false"},{label:"一键登录",value:"true"}]),msLoginAccount=ref(""),msLoginPassword=ref(""),msLoginType=ref("passwd"),msLoginCode=ref(""),msLogining=ref(!1),msContinueing=ref(!1),msLoginTypeOptions=ref([{label:"密码登录",value:"passwd"},{label:"邮箱验证码登录",value:"email"},{label:"2FA登录",value:"device"}]),msLoginContext=ref({cookies:"",context:{}}),GetLastVersion=async()=>{const t=await(await fetch("https://api.github.com/repos/Harry-zklcdc/go-proxy-bingai/releases/latest")).json();lastVersion.value=t.tag_name},navType={login:"login",setting:"setting",chat:"chat",notebook:"notebook",compose:"compose",createImage:"createImage",reset:"reset",about:"about"};let navConfigs=ref([{key:navType.setting,label:"设置"},{key:navType.notebook,label:"笔记本"},{key:navType.compose,label:"撰写文章",url:"/web/compose.html"},{key:navType.createImage,label:"图像创建"},{key:navType.reset,label:"一键重置"},{key:navType.about,label:"关于"}]);const themeModeOptions=ref([{label:"浅色",value:"light"},{label:"深色",value:"dark"},{label:"跟随系统",value:"auto"}]),uiVersionOptions=ref([{label:"V1",value:"v1"},{label:"V2",value:"v2"},{label:"V3",value:"v3"}]),langRegionOptions=ref([{label:"中文优先",value:"CN"},{label:"英文优先",value:"US"}]);onMounted(()=>{themeMode.value=="light"?settingIconStyle.value={filter:"invert(0%)"}:themeMode.value=="dark"?settingIconStyle.value={filter:"invert(70%)"}:themeMode.value=="auto"&&(useOsTheme().value=="dark"?settingIconStyle.value={filter:"invert(70%)"}:settingIconStyle.value={filter:"invert(0%)"})});const sleep=async e=>new Promise(t=>setTimeout(t,e)),renderDropdownLabel=e=>h(_sfc_main$9,{navConfig:e}),handleSelect=async e=>{var t,n,o,r,i,a,l,s,u,d,f,v,g,p,m,C,b,x,S,w,y;switch(e){case navType.chat:{CIB.showConversation(),navConfigs.value[1]={key:navType.notebook,label:"笔记本"};const R=CIB.config.sydney.request.optionsSets.indexOf("prjupy"),k=CIB.config.sydney.request.optionsSets.indexOf("clgalileo");CIB.config.sydney.request.optionsSets=CIB.config.sydney.request.optionsSets.slice(0,R),k>-1&&(CIB.config.sydney.request.optionsSets[k]="galileo"),uiVersion.value=="v3"&&(await sleep(25),await ChatHomeScreen.init("/turing/api/suggestions/v2/zeroinputstarter"));const B=document.querySelector("cib-serp"),T=(t=B==null?void 0:B.shadowRoot)==null?void 0:t.querySelector("cib-conversation"),M=(n=T==null?void 0:T.shadowRoot)==null?void 0:n.querySelector("cib-welcome-container"),E=(o=M==null?void 0:M.shadowRoot)==null?void 0:o.querySelectorAll("div[class='muid-upsell']");E!=null&&E.length&&E.forEach(_=>{_.remove()}),(i=(r=M==null?void 0:M.shadowRoot)==null?void 0:r.querySelector(".preview-container"))==null||i.remove(),(l=(a=M==null?void 0:M.shadowRoot)==null?void 0:a.querySelector(".footer"))==null||l.remove(),(u=(s=B==null?void 0:B.shadowRoot)==null?void 0:s.querySelector("cib-serp-feedback"))==null||u.remove(),isMobile()&&((f=(d=M==null?void 0:M.shadowRoot)==null?void 0:d.querySelector(".container-item"))==null||f.remove(),CIB.vm.actionBar.input.placeholder='有问题尽管问我...("/" 触发提示词)');const $=document.createElement("style");$.innerText=conversationCssText,(v=T.shadowRoot)==null||v.append($)}break;case navType.notebook:{CIB.showNotebook();const R=CIB.config.sydney.request.optionsSets.indexOf("galileo");R>-1&&(CIB.config.sydney.request.optionsSets[R]="clgalileo"),CIB.config.sydney.request.optionsSets.push("prjupy","uprofdeuv1","uprofupdv2","gndlogcf"),navConfigs.value[1]={key:navType.chat,label:"聊天"},await sleep(25);const k=document.querySelector("cib-serp"),B=(g=k==null?void 0:k.shadowRoot)==null?void 0:g.querySelector("cib-notebook"),T=(p=B==null?void 0:B.shadowRoot)==null?void 0:p.querySelector("cib-ai-disclaimer");(C=(m=T==null?void 0:T.shadowRoot)==null?void 0:m.querySelector("div"))==null||C.remove(),(x=(b=T==null?void 0:T.shadowRoot)==null?void 0:b.querySelector("div"))==null||x.remove()}break;case navType.setting:isShowSettingModal.value=!0;break;case navType.createImage:!((S=userStore.sysConfig)!=null&&S.isSysCK)&&!userStore.getUserToken()&&message.warning("体验画图功能需先登录"),isShowCreateImageModal.value=!0;break;case navType.reset:isShowClearCacheModal.value=!0;break;case navType.about:{isShowSetAboutModal.value=!0,GetLastVersion(),await sleep(25);const R=document.createElement("div");render$1(h(NConfigProvider,{theme:theme.value},[h(NForm,{"label-placement":"left","label-width":"82px",size:"small",style:"margin-top: 0px"},authorEleRender())]),R);for(let k=0;k{switch(e){case"autoPassCFChallenge":autoPassCFChallenge();break;case"login":isShowLoginModal.value=!0,isShowIframe.value=!1;break;case"chatService":isShowChatServiceSelectModal.value=!0,chatStore.checkAllSydneyConfig();break;case"cookieSetting":userToken.value=userStore.getUserToken(),userKievRPSSecAuth.value=userStore.getUserKievRPSSecAuth(),userMUID.value=userStore.getUserMUID(),userRwBf.value=userStore.getUserRwBf(),history.value=historyEnable.value,cookiesEnable.value=fullCookiesEnable.value,cookies.value=cookiesStr.value,isShowCookieModal.value=!0;break;case"promptStore":isShowPromptSotre.value=!0;break;case"advancedSetting":history.value=historyEnable.value,themeModeSetting.value=themeMode.value,uiVersionSetting.value=uiVersion.value,langRegionSetting.value=langRegion.value,copilotProSetting.value=copilotProEnable.value,enterpriseSetting.value=enterpriseEnable.value,customChatNumSetting.value=customChatNum.value,gpt4tSetting.value=gpt4tEnable.value,autoReopenMicSetting.value=autoReopenMic.value,sydneySetting.value=sydneyEnable.value,sydneyPromptSetting.value=sydneyPrompt.value,passServerSetting.value=passServer.value,isShowAdvancedSettingModal.value=!0;break;default:return}},resetCache=async()=>{isShowClearCacheModal.value=!1,await userStore.resetCache(),message.success("清理完成"),window.location.href="/"},saveSetting=()=>{cookiesEnable.value?(userStore.saveCookies(cookies.value),cookiesStr.value=cookies.value):(userToken.value?userStore.saveUserToken(userToken.value):message.warning("请先填入用户 _U Cookie"),userKievRPSSecAuth.value?userStore.saveUserKievRPSSecAuth(userKievRPSSecAuth.value):message.warning("请先填入用户 KievRPSSecAuth Cookie"),userRwBf.value?userStore.saveUserRwBf(userRwBf.value):message.warning("请先填入用户 _RwBf Cookie"),userMUID.value?userStore.saveUserMUID(userMUID.value):message.warning("请先填入用户 MUID Cookie")),fullCookiesEnable.value=cookiesEnable.value,isShowCookieModal.value=!1},saveAdvancedSetting=()=>{var u,d,f,v;historyEnable.value=history.value;const e=enterpriseEnable.value;enterpriseEnable.value=enterpriseSetting.value,customChatNum.value=customChatNumSetting.value;const t=gpt4tEnable.value,n=sydneyEnable.value,o=uiVersion.value,r=copilotProEnable.value;copilotProEnable.value=copilotProSetting.value,gpt4tEnable.value=gpt4tSetting.value,autoReopenMic.value=autoReopenMicSetting.value,sydneyEnable.value=sydneySetting.value,sydneyPrompt.value=sydneyPromptSetting.value,uiVersion.value=uiVersionSetting.value,passServerSetting.value&&passServerSetting.value.startsWith("http")&&userStore.setPassServer(passServerSetting.value),langRegion.value!=langRegionSetting.value&&(langRegion.value=langRegionSetting.value,_G.Region=langRegionSetting.value);const i=document.querySelector("cib-serp"),a=(v=(f=(d=(u=i==null?void 0:i.shadowRoot)==null?void 0:u.querySelector("cib-conversation"))==null?void 0:d.querySelector("cib-side-panel"))==null?void 0:f.shadowRoot)==null?void 0:v.querySelector(".main"),l=a==null?void 0:a.querySelector(".threads-header"),s=a==null?void 0:a.querySelector(".threads-container");isMobile()||(history.value&&userStore.getUserToken()&&!enterpriseEnable.value?o==="v1"?CIB.vm.sidePanel.panels=[{type:"threads",label:"最近的活动"},{type:"plugins",label:"插件"}]:(l.style.display="flex",s.style.display="block"):o==="v2"?(l.style.display="none",s.style.display="none"):(CIB.vm.sidePanel.panels=[{type:"plugins",label:"插件"}],CIB.vm.sidePanel.selectedPanel="plugins")),themeMode.value=themeModeSetting.value,themeModeSetting.value=="light"?(CIB.changeColorScheme(0),theme.value=lightTheme,settingIconStyle.value={filter:"invert(0%)"}):themeModeSetting.value=="dark"?(CIB.changeColorScheme(1),theme.value=darkTheme,settingIconStyle.value={filter:"invert(70%)"}):themeModeSetting.value=="auto"&&(useOsTheme().value=="dark"?(CIB.changeColorScheme(1),theme.value=darkTheme,settingIconStyle.value={filter:"invert(70%)"}):(CIB.changeColorScheme(0),theme.value=lightTheme,settingIconStyle.value={filter:"invert(0%)"})),isShowAdvancedSettingModal.value=!1,(e!=enterpriseSetting.value||n!=sydneySetting.value||t!=gpt4tSetting.value||o!=uiVersionSetting.value||r!=copilotProSetting.value)&&(window.location.href="/")},newWindow=()=>{window.open("/fd/auth/signin?action=interactive&provider=windows_live_id&return_url=https%3a%2f%2fwww.bing.com%2fchat%3fq%3dBing%2bAI%26FORM%3dhpcodx%26wlsso%3d1%26wlexpsignin%3d1&src=EXPLICIT&sig=001DD71D5A386F753B1FC3055B306E8F","_blank")},loginHandel=async()=>{isShowIframe.value=!0,getCookieTip.value="获取 Cookie 中, 请稍后...",window.addEventListener("message",function(r){const i=r.data;i.cookies!=""&&i.cookies!=null&&i.cookies!=null&&(userStore.saveCookies(i.cookies),cookiesStr.value=i.cookies,message.success("登录成功"),isShowLoginModal.value=!1,window.location.href="/")}),await sleep(1500),getCookieTimeoutHandel();const e=document.getElementById("login"),t=base58Decode(_G.S);let n=[];for(let r=0;r<_G.SP.length;r++)n.push(t[_G.SP[r]]);const o=base58Decode(n.join(""));e.contentWindow.postMessage({IG:_G.IG,T:await aesEncrypt(o,_G.IG)},"*")},msLoginHandel=async()=>{switch(msLogining.value=!0,msLoginType.value){case"passwd":{if(msLoginAccount.value){if(!msLoginPassword.value){message.warning("请先填入密码"),msLogining.value=!1;break}}else{message.warning("请先填入账号"),msLogining.value=!1;break}const e=await fetch("/api/ms/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,password:msLoginPassword.value,type:msLoginType.value})});if(!e.ok){message.error("登录失败, 请重试"),msLogining.value=!1;break}message.success("登录成功"),isShowLoginModal.value=!1;const t=await e.json();userStore.saveCookies(t.data.cookies),cookiesStr.value=t.data.cookies,fullCookiesEnable.value=!0,window.location.href="/"}break;case"email":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!1;break}const e=await fetch("/api/ms/login",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value,verify_code:msLoginCode.value,cookies:msLoginContext.value.cookies,context:msLoginContext.value.context})});if(!e.ok){message.error("登录失败, 请重试"),msLogining.value=!1;break}message.success("登录成功"),isShowLoginModal.value=!1;const t=await e.json();userStore.saveCookies(t.data.cookies),cookiesStr.value=t.data.cookies,fullCookiesEnable.value=!0,window.location.href="/"}break;case"device":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!0;break}const e=await fetch("/api/ms/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value})}),t=await e.json();if(e.status!=201){message.error("获取2FA失败, 请重试"),msLogining.value=!1;break}message.success("获取2FA成功, 请在手机上查看并输入验证码"),msLoginCode.value=t.data.code,msLoginContext.value.cookies=t.data.cookies,msLoginContext.value.context=t.data.context,await msLoginContinueHandel()}break;default:msLogining.value=!1;break}},msLoginContinueHandel=async()=>{switch(msContinueing.value=!0,msLoginType.value){case"email":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!0;break}const e=await fetch("/api/ms/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value})});if(e.status!=201){message.error("获取邮箱验证码失败, 请重试"),msContinueing.value=!1;break}message.success("获取邮箱验证码成功, 请检查邮箱"),msContinueing.value=!1;const t=await e.json();msLoginContext.value.cookies=t.data.cookies,msLoginContext.value.context=t.data.context}break;case"device":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!0;break}const e=await fetch("/api/ms/login",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value,cookies:msLoginContext.value.cookies,context:msLoginContext.value.context})});if(!e.ok){message.error("获取2FA失败, 请重试"),msLogining.value=!1;break}message.success("登录成功"),isShowLoginModal.value=!1;const t=await e.json();userStore.saveCookies(t.data.cookies),cookiesStr.value=t.data.cookies,fullCookiesEnable.value=!0,window.location.href="/"}break;default:msContinueing.value=!1;break}},authorEleRender=()=>{const e=JSON.parse(decodeURI(base58Decode(_G.TP)));let t=[];for(let n=0;nh(eval(ele.type),ele.props,ele.children.map(e=>e.type?renderHandler(e):e)),getCookieTimeoutHandel=async()=>{await sleep(3e3),getCookieTip.value="获取 Cookie 时间过长, 请检查油猴插件及脚本是否安装正确"},autoPassCFChallenge=async()=>{let e=await fetch("/pass",{credentials:"include",method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({IG:_G.IG,T:await aesEncrypt(_G.AT,_G.IG)})}).then(t=>t.json()).catch(()=>{message.error("人机验证失败, 请重试"),passingCFChallenge.value=!1});e.result!=null&&e.result!=null?(userStore.saveCookies(e.result.cookies),cookiesStr.value=e.result.cookies,message.success("自动通过人机验证成功"),passingCFChallenge.value=!1,window.location.href="/"):(message.error("人机验证失败, 请重试"),passingCFChallenge.value=!1)};return(e,t)=>(openBlock(),createElementBlock(Fragment,null,[unref(isMobile)()?(openBlock(),createBlock(unref(NDropdown),{key:0,class:"select-none",show:isShowMore.value,options:unref(navConfigs),"render-label":renderDropdownLabel,onSelect:handleSelect},{default:withCtx(()=>[createVNode(unref(NImage),{class:"fixed top-6 right-4 cursor-pointer z-50",src:unref(settingSvgUrl),alt:"设置菜单","preview-disabled":!0,onClick:t[0]||(t[0]=n=>isShowMore.value=!isShowMore.value),style:normalizeStyle(unref(settingIconStyle))},null,8,["src","style"])]),_:1},8,["show","options"])):(openBlock(),createBlock(unref(NDropdown),{key:1,class:"select-none",trigger:"hover",options:unref(navConfigs),"render-label":renderDropdownLabel,onSelect:handleSelect},{default:withCtx(()=>[createVNode(unref(NImage),{class:"fixed top-6 right-6 cursor-pointer z-50",src:unref(settingSvgUrl),alt:"设置菜单","preview-disabled":!0,style:normalizeStyle(unref(settingIconStyle))},null,8,["src","style"])]),_:1},8,["options"])),createVNode(unref(NModal),{show:isShowLoginModal.value,"onUpdate:show":t[7]||(t[7]=n=>isShowLoginModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_1$6]),action:withCtx(()=>[withDirectives(createVNode(unref(NButton),{size:"large",type:"info",onClick:newWindow},{default:withCtx(()=>[createTextVNode("打开登录页面")]),_:1},512),[[vShow,oneKeyLogin.value=="true"]]),withDirectives(createVNode(unref(NButton),{size:"large",onClick:t[6]||(t[6]=n=>isShowLoginModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1},512),[[vShow,oneKeyLogin.value=="true"]]),withDirectives(createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:loginHandel},{default:withCtx(()=>[createTextVNode("确定")]),_:1},512),[[vShow,oneKeyLogin.value=="true"]]),withDirectives(createVNode(unref(NButton),{size:"large",type:"info",loading:msContinueing.value,onClick:msLoginContinueHandel},{default:withCtx(()=>[createTextVNode("获取邮箱验证码")]),_:1},8,["loading"]),[[vShow,oneKeyLogin.value!="true"&&msLoginType.value==="email"]]),withDirectives(createVNode(unref(NButton),{ghost:"",size:"large",type:"info",loading:msLogining.value,onClick:msLoginHandel},{default:withCtx(()=>[createTextVNode("确定")]),_:1},8,["loading"]),[[vShow,oneKeyLogin.value!="true"]])]),default:withCtx(()=>[createVNode(unref(NSelect),{value:oneKeyLogin.value,"onUpdate:value":t[1]||(t[1]=n=>oneKeyLogin.value=n),options:loginTypeOptions.value,size:"large",placeholder:"选择登录方式"},null,8,["value","options"]),oneKeyLogin.value=="true"?(openBlock(),createElementBlock("div",_hoisted_2$4,[isShowIframe.value?(openBlock(),createElementBlock("div",_hoisted_5$2,[createVNode(unref(NSpin),{size:"large",description:getCookieTip.value,style:{margin:"0 auto",width:"100%"}},null,8,["description"]),createBaseVNode("iframe",{id:"login",src:unref(bingUrl),style:{border:"none",width:"0",height:"0"}},null,8,_hoisted_6$1)])):(openBlock(),createElementBlock("div",_hoisted_3$3,[createVNode(unref(NP),null,{default:withCtx(()=>[createTextVNode(" 使用此功能前, 请先安装"),createVNode(unref(NA),{href:"https://www.tampermonkey.net/"},{default:withCtx(()=>[createTextVNode("油猴插件")]),_:1}),createTextVNode(", 并安装"),createVNode(unref(NA),{href:"https://greasyfork.org/zh-CN/scripts/487409-go-proxy-bingai"},{default:withCtx(()=>[createTextVNode("此脚本")]),_:1}),_hoisted_4$3,createTextVNode(" 请点击下面「打开登录页面」按钮, 在新打开登录页面中登录账号, 登录成功后点击确定 ")]),_:1})]))])):(openBlock(),createElementBlock("div",_hoisted_7$1,[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"登录方式"},{default:withCtx(()=>[createVNode(unref(NRadioGroup),{value:msLoginType.value,"onUpdate:value":t[2]||(t[2]=n=>msLoginType.value=n)},{default:withCtx(()=>[createVNode(unref(NSpace),{vertical:""},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(msLoginTypeOptions.value,n=>(openBlock(),createBlock(unref(NRadio),{size:"large",key:n.value,value:n.value},{default:withCtx(()=>[createTextVNode(toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])]),_:1}),createVNode(unref(NFormItem),{path:"account",label:"账号"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:msLoginAccount.value,"onUpdate:value":t[3]||(t[3]=n=>msLoginAccount.value=n),type:"text",placeholder:"账号"},null,8,["value"])]),_:1}),withDirectives(createVNode(unref(NFormItem),{path:"password",label:" 密码"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:msLoginPassword.value,"onUpdate:value":t[4]||(t[4]=n=>msLoginPassword.value=n),type:"password","show-password-on":"click",placeholder:"密码"},null,8,["value"])]),_:1},512),[[vShow,msLoginType.value==="passwd"]]),withDirectives(createVNode(unref(NFormItem),{path:"verify_code",label:"验证码"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:msLoginCode.value,"onUpdate:value":t[5]||(t[5]=n=>msLoginCode.value=n),type:"text",placeholder:"验证码",disabled:msLoginType.value==="device"},null,8,["value","disabled"])]),_:1},512),[[vShow,msLoginType.value!=="passwd"]])]),_:1},512)]))]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowSettingModal.value,"onUpdate:show":t[15]||(t[15]=n=>isShowSettingModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_8]),action:withCtx(()=>[createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:t[14]||(t[14]=n=>isShowSettingModal.value=!1)},{default:withCtx(()=>[createTextVNode("确定")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NGrid),{"x-gap":"0",cols:2},{default:withCtx(()=>[createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"自动人机验证"},{default:withCtx(()=>[createVNode(unref(NTooltip),null,{trigger:withCtx(()=>[createVNode(unref(NButton),{type:"info",loading:unref(passingCFChallenge),onClick:t[8]||(t[8]=n=>settingMenu("autoPassCFChallenge"))},{default:withCtx(()=>[createTextVNode("启动")]),_:1},8,["loading"])]),default:withCtx(()=>[createTextVNode(" 旧版本的人机验证, 现已完全自动代理通过 ")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"账号登录"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[9]||(t[9]=n=>settingMenu("login"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"服务选择"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[10]||(t[10]=n=>settingMenu("chatService"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"Cookie 设置"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[11]||(t[11]=n=>settingMenu("cookieSetting"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"提示词库"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[12]||(t[12]=n=>settingMenu("promptStore"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"高级设置"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[13]||(t[13]=n=>settingMenu("advancedSetting"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},512)]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowCookieModal.value,"onUpdate:show":t[23]||(t[23]=n=>isShowCookieModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_9]),action:withCtx(()=>[createVNode(unref(NButton),{size:"large",onClick:t[22]||(t[22]=n=>isShowCookieModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1}),createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:saveSetting},{default:withCtx(()=>[createTextVNode("保存")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"完整 Cookie"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:unref(cookiesEnable),"onUpdate:value":t[16]||(t[16]=n=>isRef(cookiesEnable)?cookiesEnable.value=n:cookiesEnable=n)},null,8,["value"])]),_:1}),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"Token"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userToken.value,"onUpdate:value":t[17]||(t[17]=n=>userToken.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 _U 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"KievRPSSecAuth"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userKievRPSSecAuth.value,"onUpdate:value":t[18]||(t[18]=n=>userKievRPSSecAuth.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 KievRPSSecAuth 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"_RwBf"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userRwBf.value,"onUpdate:value":t[19]||(t[19]=n=>userRwBf.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 _RwBf 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"MUID"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userMUID.value,"onUpdate:value":t[20]||(t[20]=n=>userMUID.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 MUID 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"Cookies"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:unref(cookies),"onUpdate:value":t[21]||(t[21]=n=>isRef(cookies)?cookies.value=n:cookies=n),type:"text",placeholder:"完整用户 Cookie"},null,8,["value"])]),_:1},512),[[vShow,unref(cookiesEnable)]])]),_:1},512)]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowAdvancedSettingModal.value,"onUpdate:show":t[37]||(t[37]=n=>isShowAdvancedSettingModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_10]),action:withCtx(()=>[createVNode(unref(NButton),{size:"large",onClick:t[36]||(t[36]=n=>isShowAdvancedSettingModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1}),createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:saveAdvancedSetting},{default:withCtx(()=>[createTextVNode("保存")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NGrid),{"x-gap":"0",cols:2},{default:withCtx(()=>[createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"history",label:"历史记录"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:unref(history),"onUpdate:value":t[24]||(t[24]=n=>isRef(history)?history.value=n:history=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"enterpriseEnable",label:"企业版"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:enterpriseSetting.value,"onUpdate:value":t[25]||(t[25]=n=>enterpriseSetting.value=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"copilotProEnable"},{label:withCtx(()=>[createTextVNode(" Copilot Pro "),createVNode(unref(NTooltip),{trigger:"hover"},{trigger:withCtx(()=>[createVNode(unref(NIcon),{size:"14",style:{top:"2px"}},{default:withCtx(()=>[_hoisted_11]),_:1})]),default:withCtx(()=>[createTextVNode(" 如果有 Copilot Pro 的账号, 可开启此选项 ")]),_:1})]),default:withCtx(()=>[createVNode(unref(NSwitch),{value:copilotProSetting.value,"onUpdate:value":t[26]||(t[26]=n=>copilotProSetting.value=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"sydneyEnable",label:"连续语音对话"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:unref(autoReopenMicSetting),"onUpdate:value":t[27]||(t[27]=n=>isRef(autoReopenMicSetting)?autoReopenMicSetting.value=n:autoReopenMicSetting=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"gpt4tEnable"},{label:withCtx(()=>[createTextVNode(" Copilot 增强 "),createVNode(unref(NTooltip),{trigger:"hover",style:{maxWidth:"240px"}},{trigger:withCtx(()=>[createVNode(unref(NIcon),{size:"14",style:{top:"2px"}},{default:withCtx(()=>[_hoisted_12]),_:1})]),default:withCtx(()=>[createTextVNode(" 增强 Microsoft Copilot 的能力, 有可能会导致一些问题 ")]),_:1})]),default:withCtx(()=>[createVNode(unref(NSwitch),{value:gpt4tSetting.value,"onUpdate:value":t[28]||(t[28]=n=>gpt4tSetting.value=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"sydneyEnable",label:"越狱模式"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:sydneySetting.value,"onUpdate:value":t[29]||(t[29]=n=>sydneySetting.value=n)},null,8,["value"])]),_:1})]),_:1})]),_:1}),createVNode(unref(NFormItem),{path:"langRegion",label:"语言理解能力"},{default:withCtx(()=>[createVNode(unref(NSelect),{value:unref(langRegionSetting),"onUpdate:value":t[30]||(t[30]=n=>isRef(langRegionSetting)?langRegionSetting.value=n:langRegionSetting=n),options:langRegionOptions.value,size:"large",placeholder:"语言理解能力"},null,8,["value","options"])]),_:1}),createVNode(unref(NFormItem),{path:"sydneyPrompt",label:"人机验证服务器"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:passServerSetting.value,"onUpdate:value":t[31]||(t[31]=n=>passServerSetting.value=n),type:"text",placeholder:"人机验证服务器"},null,8,["value"])]),_:1}),createVNode(unref(NFormItem),{path:"sydneyPrompt",label:"提示词"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:sydneyPromptSetting.value,"onUpdate:value":t[32]||(t[32]=n=>sydneyPromptSetting.value=n),type:"text",placeholder:"越狱模式提示词"},null,8,["value"])]),_:1}),createVNode(unref(NFormItem),{path:"themeMode",label:"UI 版本"},{default:withCtx(()=>[createVNode(unref(NSelect),{value:unref(uiVersionSetting),"onUpdate:value":t[33]||(t[33]=n=>isRef(uiVersionSetting)?uiVersionSetting.value=n:uiVersionSetting=n),options:uiVersionOptions.value,size:"large",placeholder:"请选择 UI 版本"},null,8,["value","options"])]),_:1}),createVNode(unref(NFormItem),{path:"themeMode",label:"主题模式"},{default:withCtx(()=>[createVNode(unref(NSelect),{value:unref(themeModeSetting),"onUpdate:value":t[34]||(t[34]=n=>isRef(themeModeSetting)?themeModeSetting.value=n:themeModeSetting=n),options:themeModeOptions.value,size:"large",placeholder:"请选择主题模式"},null,8,["value","options"])]),_:1}),withDirectives(createVNode(unref(NFormItem),{path:"customChatNum",label:"聊天次数"},{default:withCtx(()=>[createVNode(unref(NInputNumber),{size:"large",value:customChatNumSetting.value,"onUpdate:value":t[35]||(t[35]=n=>customChatNumSetting.value=n),min:"0",style:{width:"100%"}},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]])]),_:1},512)]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowClearCacheModal.value,"onUpdate:show":t[39]||(t[39]=n=>isShowClearCacheModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_13]),action:withCtx(()=>[createVNode(unref(NButton),{size:"large",onClick:t[38]||(t[38]=n=>isShowClearCacheModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1}),createVNode(unref(NButton),{ghost:"",size:"large",type:"error",onClick:resetCache},{default:withCtx(()=>[createTextVNode("确定")]),_:1})]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowSetAboutModal.value,"onUpdate:show":t[41]||(t[41]=n=>isShowSetAboutModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_14]),action:withCtx(()=>[createVNode(unref(NButton),{ghost:"",size:"large",onClick:t[40]||(t[40]=n=>isShowSetAboutModal.value=!1),type:"info"},{default:withCtx(()=>[createTextVNode("确定")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"82px",size:"small",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"version",label:"版本号"},{default:withCtx(()=>[createVNode(unref(NTag),{type:"info",size:"small",round:""},{default:withCtx(()=>[createTextVNode(toDisplayString("v"+unref(localVersion)),1)]),_:1})]),_:1}),createVNode(unref(NFormItem),{path:"latestVersion",label:"最新版本",id:"latestVersion",ref:"latestVersion"},{default:withCtx(()=>[createVNode(unref(NTag),{type:"info",size:"small",round:""},{default:withCtx(()=>[createTextVNode(toDisplayString(lastVersion.value),1)]),_:1})]),_:1},512)]),_:1},512)]),_:1},8,["show"]),createVNode(_sfc_main$8,{show:isShowCreateImageModal.value,"onUpdate:show":t[42]||(t[42]=n=>isShowCreateImageModal.value=n)},null,8,["show"])],64))}}),_hoisted_1$5={class:"inline-block max-w-[120px] xl:max-w-[650px] overflow-hidden text-ellipsis"},_hoisted_2$3={class:"float-right"},_sfc_main$6=defineComponent({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=useMessage(),n=usePromptStore(),{promptList:o,optPromptConfig:r}=storeToRefs(n),i=l=>{o.value=o.value.filter(s=>s.act!==l.act&&s.prompt!==l.prompt),t.success("删除提示词成功")},a=l=>{r.value.isShow=!0,r.value.type="edit",r.value.title="编辑提示词",r.value.tmpPrompt=l,r.value.newPrompt={...l}};return(l,s)=>(openBlock(),createBlock(unref(NThing),{class:"hover:bg-gray-400 dark:md:hover:bg-slate-800 cursor-pointer p-5"},{description:withCtx(()=>[createVNode(unref(NTag),{type:"info"},{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$5,toDisplayString(l.source.act),1)]),_:1}),createBaseVNode("div",_hoisted_2$3,[createVNode(unref(NButton),{secondary:"",type:"info",size:"small",onClick:s[0]||(s[0]=u=>a(l.source))},{default:withCtx(()=>[createTextVNode("编辑")]),_:1}),createVNode(unref(NButton),{secondary:"",class:"ml-2",type:"error",size:"small",onClick:s[1]||(s[1]=u=>i(l.source))},{default:withCtx(()=>[createTextVNode("删除")]),_:1})])]),default:withCtx(()=>[createVNode(unref(NEllipsis),{tooltip:!1,"line-clamp":2},{default:withCtx(()=>[createTextVNode(toDisplayString(l.source.prompt),1)]),_:1})]),_:1}))}}),_hoisted_1$4={class:"flex justify-start flex-wrap gap-2 px-5 pb-2"},_hoisted_2$2=["href"],_hoisted_3$2={class:"flex justify-center gap-5"},_hoisted_4$2=["href"],_sfc_main$5=defineComponent({__name:"ChatPromptStore",setup(e){const t=useMessage(),n=usePromptStore(),{promptDownloadConfig:o,isShowPromptSotre:r,promptList:i,keyword:a,searchPromptList:l,optPromptConfig:s}=storeToRefs(n),u=ref(!1),d=ref(!1),f=ref(!1),v=()=>{s.value.isShow=!0,s.value.type="add",s.value.title="添加提示词",s.value.newPrompt={act:"",prompt:""}},g=()=>{const{type:S,tmpPrompt:w,newPrompt:y}=s.value;if(!y.act)return t.error("提示词标题不能为空");if(!y.prompt)return t.error("提示词描述不能为空");if(S==="add")i.value=[y,...i.value],t.success("添加提示词成功");else if(S==="edit"){if(y.act===(w==null?void 0:w.act)&&y.prompt===(w==null?void 0:w.prompt)){t.warning("提示词未变更"),s.value.isShow=!1;return}const R=i.value.findIndex(k=>k.act===(w==null?void 0:w.act)&&k.prompt===(w==null?void 0:w.prompt));R>-1?(i.value[R]=y,t.success("编辑提示词成功")):t.error("编辑提示词出错")}s.value.isShow=!1},p=S=>new Promise((w,y)=>{const R=new FileReader;R.onload=function(k){var B;w((B=k.target)==null?void 0:B.result)},R.onerror=y,R.readAsText(S)}),m=async S=>{var w;if(S.file.file){d.value=!0;const y=await p(S.file.file),R=JSON.parse(y),k=n.addPrompt(R);k.result?(t.info(`上传文件含 ${R.length} 条数据`),t.success(`成功导入 ${(w=k.data)==null?void 0:w.successCount} 条有效数据`)):t.error(k.msg||"提示词格式有误"),d.value=!1}else t.error("上传文件有误")},C=()=>{if(i.value.length===0)return t.error("暂无可导出的提示词数据");f.value=!0;const S=JSON.stringify(i.value),w=new Blob([S],{type:"application/json"}),y=URL.createObjectURL(w),R=document.createElement("a");R.href=y,R.download="BingAIPrompts.json",R.click(),URL.revokeObjectURL(y),t.success("导出提示词库成功"),f.value=!1},b=()=>{i.value=[],t.success("清空提示词库成功")},x=async S=>{var R;if(!S.url)return t.error("请先输入下载链接");S.isDownloading=!0;let w;if(S.url.endsWith(".json"))w=await fetch(S.url).then(k=>k.json());else if(S.url.endsWith(".csv")){const k=await fetch(S.url).then(B=>B.text());console.log(k),w=k.split(` +}`,settingSvgUrl="/web/assets/setting-c6ca7b14.svg",usePromptStore=defineStore("prompt-store",()=>{const e=ref([{type:1,name:"ChatGPT 中文调教指南 - 简体",url:"./data/prompts/prompts-zh.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"ChatGPT 中文调教指南 - 繁体",url:"./data/prompts/prompts-zh-TW.json",refer:"https://github.com/PlexPt/awesome-chatgpt-prompts-zh"},{type:1,name:"Awesome ChatGPT Prompts",url:"./data/prompts/prompts.csv",refer:"https://github.com/f/awesome-chatgpt-prompts"},{type:2,name:"",url:"",refer:""}]),t=ref(!1),n=ref(!1),o=ref([]),r=ref(""),i=ref(0),a=ref({isShow:!1,newPrompt:{act:"",prompt:""}}),l=computed(()=>{var u;return r.value?(u=o.value)==null?void 0:u.filter(d=>d.act.includes(r.value)||d.prompt.includes(r.value)):o.value});function s(u){if(u instanceof Array&&u.every(d=>d.act&&d.prompt)){if(o.value.length===0)return o.value.push(...u),{result:!0,data:{successCount:u.length}};const d=u.filter(f=>{var v;return(v=o.value)==null?void 0:v.every(g=>f.act!==g.act&&f.prompt!==g.prompt)});return o.value.push(...d),{result:!0,data:{successCount:d.length}}}else return{result:!1,msg:"提示词格式有误"}}return{promptDownloadConfig:e,isShowPromptSotre:t,isShowChatPrompt:n,promptList:o,keyword:r,searchPromptList:l,selectedPromptIndex:i,optPromptConfig:a,addPrompt:s}},{persist:{key:"prompt-store",storage:localStorage,paths:["promptList"]}}),_hoisted_1$8=["href"],_hoisted_2$6={key:1},_sfc_main$9=defineComponent({__name:"ChatNavItem",props:{navConfig:{}},setup(e){return(t,n)=>t.navConfig.url?(openBlock(),createElementBlock("a",{key:0,href:t.navConfig.url,target:"_blank",rel:"noopener noreferrer"},toDisplayString(t.navConfig.label),9,_hoisted_1$8)):(openBlock(),createElementBlock("div",_hoisted_2$6,toDisplayString(t.navConfig.label),1))}}),_hoisted_1$7={class:"flex justify-center gap-3 px-8"},_hoisted_2$5={class:"flex justify-center items-center"},_hoisted_3$4=["src"],_hoisted_4$4=createBaseVNode("p",{class:"text-left"},"提示:形容词+名词+动词+风格,描述得越详细时,效果越好。",-1),DEMO_KEYWORD="骑着摩托的小猫咪,疾驰在路上,动漫场景,详细的细节。",_sfc_main$8=defineComponent({__name:"CreateImage",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:t}){const n=e,o=t,r=useMessage(),i=ref(""),a=ref(""),l=ref(!1),s=computed({get:()=>n.show,set:v=>o("update:show",v)}),u=()=>{if(!i.value){r.error("请先输入关键词");return}l.value=!0,a.value=`/images/create?re=1&showselective=1&sude=1&kseed=7500&SFX=2&q=${encodeURIComponent(i.value)}&t=${Date.now()}`},d=()=>{i.value="",a.value=""},f=()=>(i.value=DEMO_KEYWORD,u());return(v,g)=>(openBlock(),createBlock(unref(NModal),{class:"w-11/12 lg:w-[540px] select-none",show:s.value,"onUpdate:show":g[2]||(g[2]=p=>s.value=p),"on-close":d,preset:"card",title:"图像创建"},{default:withCtx(()=>[createBaseVNode("head",_hoisted_1$7,[createVNode(unref(NInput),{class:"flex-1",placeholder:"提示词",value:i.value,"onUpdate:value":g[0]||(g[0]=p=>i.value=p),clearable:!0,onKeyup:withKeys(u,["enter"]),maxlength:"100"},null,8,["value"]),createVNode(unref(NButton),{secondary:"",type:"info",onClick:u,loading:l.value},{default:withCtx(()=>[createTextVNode("开始创建")]),_:1},8,["loading"])]),createBaseVNode("main",_hoisted_2$5,[a.value?(openBlock(),createElementBlock("iframe",{key:0,class:"w-[310px] h-[350px] xl:w-[475px] xl:h-[520px] my-4",src:a.value,frameborder:"0",onLoad:g[1]||(g[1]=p=>l.value=!1)},null,40,_hoisted_3$4)):(openBlock(),createBlock(unref(NEmpty),{key:1,class:"h-[40vh] xl:h-[60vh] flex justify-center items-center",description:"暂未创建"},{extra:withCtx(()=>[createVNode(unref(NButton),{secondary:"",type:"info",onClick:f},{default:withCtx(()=>[createTextVNode("使用示例创建")]),_:1}),createBaseVNode("div",{class:"text-[#c2c2c2] px-2 xl:px-10"},[_hoisted_4$4,createBaseVNode("p",{class:"text-left"},"示例:"+toDisplayString(DEMO_KEYWORD))])]),_:1}))])]),_:1},8,["show"]))}}),useChatStore=defineStore("chat-store",()=>{const e="/sydney/ChatHub",t=ref(!1),n=ref(""),o=ref([{baseUrl:"https://sydney.bing.com",label:"Bing 官方"},{baseUrl:"https://sydney.b1ng.chat",label:"Cloudflare Worker"},{baseUrl:location.origin,label:"本站"},{baseUrl:"",label:"自定义",isCus:!0}]),r=3e3,i=async l=>{if(!l.baseUrl)return{isUsable:!1,errorMsg:"链接不可为空"};try{const s=Date.now(),u=new WebSocket(l.baseUrl.replace("http","ws")+e),d=setTimeout(()=>{u.close()},r);return await new Promise((f,v)=>{u.onopen=()=>{clearTimeout(d),f(u.close())},u.onerror=()=>{clearTimeout(d),v(new Error(`聊天服务器 ${l.baseUrl} 连接失败`))},u.onclose=()=>v(new Error(`聊天服务器 ${l.baseUrl} 连接超时`))}),{isUsable:!0,delay:Date.now()-s}}catch(s){return{isUsable:!1,errorMsg:s instanceof Error?s.message:""}}};return{isShowChatServiceSelectModal:t,sydneyConfigs:o,selectedSydneyBaseUrl:n,checkSydneyConfig:i,checkAllSydneyConfig:async()=>{const l=o.value.filter(s=>s.baseUrl).map(async s=>{const u=await i(s);s.isUsable=u.isUsable,s.delay=u.delay});await Promise.all(l)}}},{persist:{key:"chat-store",storage:localStorage,paths:["selectedSydneyBaseUrl","sydneyConfigs"]}}),_hoisted_1$6=createBaseVNode("div",{class:"text-3xl py-2"},"账号登录",-1),_hoisted_2$4={key:0},_hoisted_3$3={key:0,style:{"margin-top":"12px","margin-bottom":"24px"}},_hoisted_4$3=createBaseVNode("br",null,null,-1),_hoisted_5$2={key:1},_hoisted_6$1=["src"],_hoisted_7$1={key:1},_hoisted_8=createBaseVNode("div",{class:"text-3xl py-2"},"设置",-1),_hoisted_9=createBaseVNode("div",{class:"text-3xl py-2"},"Cookie 设置",-1),_hoisted_10=createBaseVNode("div",{class:"text-3xl py-2"},"高级设置",-1),_hoisted_11=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200s200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26a26 26 0 0 1 26-26zm64 226H200v-32h44v-88h-32v-32h64v120h44z",fill:"currentColor"})],-1),_hoisted_12=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200s200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26a26 26 0 0 1 26-26zm64 226H200v-32h44v-88h-32v-32h64v120h44z",fill:"currentColor"})],-1),_hoisted_13=createBaseVNode("div",{class:"text-xl py-2"},"将删除包括 Cookie 等的所有缓存?",-1),_hoisted_14=createBaseVNode("div",{class:"text-3xl py-2"},"关于",-1),_sfc_main$7=defineComponent({__name:"ChatNav",setup(__props){const isShowMore=ref(!1),isShowSettingModal=ref(!1),isShowAdvancedSettingModal=ref(!1),isShowSetAboutModal=ref(!1),isShowCookieModal=ref(!1),isShowLoginModal=ref(!1),isShowIframe=ref(!1),userToken=ref(""),userKievRPSSecAuth=ref(""),userMUID=ref(""),userRwBf=ref(""),message=useMessage(),promptStore=usePromptStore(),{isShowPromptSotre}=storeToRefs(promptStore),isShowClearCacheModal=ref(!1),isShowCreateImageModal=ref(!1),chatStore=useChatStore(),{isShowChatServiceSelectModal}=storeToRefs(chatStore),userStore=useUserStore(),localVersion="2.4.3",lastVersion=ref("加载中..."),{historyEnable,themeMode,uiVersion,langRegion,autoReopenMic,fullCookiesEnable,cookiesStr,enterpriseEnable,copilotProEnable,customChatNum,gpt4tEnable,sydneyEnable,sydneyPrompt,passServer}=storeToRefs(userStore);let cookiesEnable=ref(!1),cookies=ref(""),history=ref(!0),themeModeSetting=ref("auto"),uiVersionSetting=ref("v3"),langRegionSetting=ref("CN"),theme=ref(inject("theme")),autoReopenMicSetting=ref(!0),settingIconStyle=ref({filter:"invert(70%)"}),passingCFChallenge=ref(!1);const enterpriseSetting=ref(!1),copilotProSetting=ref(!1),customChatNumSetting=ref(0),gpt4tSetting=ref(!0),sydneySetting=ref(!1),sydneyPromptSetting=ref(""),passServerSetting=ref(""),getCookieTip=ref("获取 Cookie 中, 请稍后..."),bingUrl=base58Decode("7RYHpA38gs3NAby2mkvoRMwjncBpS"),oneKeyLogin=ref("false"),loginTypeOptions=ref([{label:"账号登录",value:"false"},{label:"一键登录",value:"true"}]),msLoginAccount=ref(""),msLoginPassword=ref(""),msLoginType=ref("passwd"),msLoginCode=ref(""),msLogining=ref(!1),msContinueing=ref(!1),msLoginTypeOptions=ref([{label:"密码登录",value:"passwd"},{label:"邮箱验证码登录",value:"email"},{label:"2FA登录",value:"device"}]),msLoginContext=ref({cookies:"",context:{}}),GetLastVersion=async()=>{const t=await(await fetch("https://api.github.com/repos/Harry-zklcdc/go-proxy-bingai/releases/latest")).json();lastVersion.value=t.tag_name},navType={login:"login",setting:"setting",chat:"chat",notebook:"notebook",compose:"compose",createImage:"createImage",reset:"reset",about:"about"};let navConfigs=ref([{key:navType.setting,label:"设置"},{key:navType.notebook,label:"笔记本"},{key:navType.compose,label:"撰写文章",url:"/web/compose.html"},{key:navType.createImage,label:"图像创建"},{key:navType.reset,label:"一键重置"},{key:navType.about,label:"关于"}]);const themeModeOptions=ref([{label:"浅色",value:"light"},{label:"深色",value:"dark"},{label:"跟随系统",value:"auto"}]),uiVersionOptions=ref([{label:"V1",value:"v1"},{label:"V2",value:"v2"},{label:"V3",value:"v3"}]),langRegionOptions=ref([{label:"中文优先",value:"CN"},{label:"英文优先",value:"US"}]);onMounted(()=>{themeMode.value=="light"?settingIconStyle.value={filter:"invert(0%)"}:themeMode.value=="dark"?settingIconStyle.value={filter:"invert(70%)"}:themeMode.value=="auto"&&(useOsTheme().value=="dark"?settingIconStyle.value={filter:"invert(70%)"}:settingIconStyle.value={filter:"invert(0%)"})});const sleep=async e=>new Promise(t=>setTimeout(t,e)),renderDropdownLabel=e=>h(_sfc_main$9,{navConfig:e}),handleSelect=async e=>{var t,n,o,r,i,a,l,s,u,d,f,v,g,p,m,C,b,x,S,w,y;switch(e){case navType.chat:{CIB.showConversation(),navConfigs.value[1]={key:navType.notebook,label:"笔记本"};const R=CIB.config.sydney.request.optionsSets.indexOf("prjupy"),k=CIB.config.sydney.request.optionsSets.indexOf("clgalileo");CIB.config.sydney.request.optionsSets=CIB.config.sydney.request.optionsSets.slice(0,R),k>-1&&(CIB.config.sydney.request.optionsSets[k]="galileo"),uiVersion.value=="v3"&&(await sleep(25),await ChatHomeScreen.init("/turing/api/suggestions/v2/zeroinputstarter"));const B=document.querySelector("cib-serp"),T=(t=B==null?void 0:B.shadowRoot)==null?void 0:t.querySelector("cib-conversation"),M=(n=T==null?void 0:T.shadowRoot)==null?void 0:n.querySelector("cib-welcome-container"),E=(o=M==null?void 0:M.shadowRoot)==null?void 0:o.querySelectorAll("div[class='muid-upsell']");E!=null&&E.length&&E.forEach(_=>{_.remove()}),(i=(r=M==null?void 0:M.shadowRoot)==null?void 0:r.querySelector(".preview-container"))==null||i.remove(),(l=(a=M==null?void 0:M.shadowRoot)==null?void 0:a.querySelector(".footer"))==null||l.remove(),(u=(s=B==null?void 0:B.shadowRoot)==null?void 0:s.querySelector("cib-serp-feedback"))==null||u.remove(),isMobile()&&((f=(d=M==null?void 0:M.shadowRoot)==null?void 0:d.querySelector(".container-item"))==null||f.remove(),CIB.vm.actionBar.input.placeholder='有问题尽管问我...("/" 触发提示词)');const $=document.createElement("style");$.innerText=conversationCssText,(v=T.shadowRoot)==null||v.append($)}break;case navType.notebook:{CIB.showNotebook();const R=CIB.config.sydney.request.optionsSets.indexOf("galileo");R>-1&&(CIB.config.sydney.request.optionsSets[R]="clgalileo"),CIB.config.sydney.request.optionsSets.push("prjupy","uprofdeuv1","uprofupdv2","gndlogcf"),navConfigs.value[1]={key:navType.chat,label:"聊天"},await sleep(25);const k=document.querySelector("cib-serp"),B=(g=k==null?void 0:k.shadowRoot)==null?void 0:g.querySelector("cib-notebook"),T=(p=B==null?void 0:B.shadowRoot)==null?void 0:p.querySelector("cib-ai-disclaimer");(C=(m=T==null?void 0:T.shadowRoot)==null?void 0:m.querySelector("div"))==null||C.remove(),(x=(b=T==null?void 0:T.shadowRoot)==null?void 0:b.querySelector("div"))==null||x.remove()}break;case navType.setting:isShowSettingModal.value=!0;break;case navType.createImage:!((S=userStore.sysConfig)!=null&&S.isSysCK)&&!userStore.getUserToken()&&message.warning("体验画图功能需先登录"),isShowCreateImageModal.value=!0;break;case navType.reset:isShowClearCacheModal.value=!0;break;case navType.about:{isShowSetAboutModal.value=!0,GetLastVersion(),await sleep(25);const R=document.createElement("div");render$1(h(NConfigProvider,{theme:theme.value},[h(NForm,{"label-placement":"left","label-width":"82px",size:"small",style:"margin-top: 0px"},authorEleRender())]),R);for(let k=0;k{switch(e){case"autoPassCFChallenge":autoPassCFChallenge();break;case"login":isShowLoginModal.value=!0,isShowIframe.value=!1;break;case"chatService":isShowChatServiceSelectModal.value=!0,chatStore.checkAllSydneyConfig();break;case"cookieSetting":userToken.value=userStore.getUserToken(),userKievRPSSecAuth.value=userStore.getUserKievRPSSecAuth(),userMUID.value=userStore.getUserMUID(),userRwBf.value=userStore.getUserRwBf(),history.value=historyEnable.value,cookiesEnable.value=fullCookiesEnable.value,cookies.value=cookiesStr.value,isShowCookieModal.value=!0;break;case"promptStore":isShowPromptSotre.value=!0;break;case"advancedSetting":history.value=historyEnable.value,themeModeSetting.value=themeMode.value,uiVersionSetting.value=uiVersion.value,langRegionSetting.value=langRegion.value,copilotProSetting.value=copilotProEnable.value,enterpriseSetting.value=enterpriseEnable.value,customChatNumSetting.value=customChatNum.value,gpt4tSetting.value=gpt4tEnable.value,autoReopenMicSetting.value=autoReopenMic.value,sydneySetting.value=sydneyEnable.value,sydneyPromptSetting.value=sydneyPrompt.value,passServerSetting.value=passServer.value,isShowAdvancedSettingModal.value=!0;break;default:return}},resetCache=async()=>{isShowClearCacheModal.value=!1,await userStore.resetCache(),message.success("清理完成"),window.location.href="/"},saveSetting=()=>{cookiesEnable.value?(userStore.saveCookies(cookies.value),cookiesStr.value=cookies.value):(userToken.value?userStore.saveUserToken(userToken.value):message.warning("请先填入用户 _U Cookie"),userKievRPSSecAuth.value?userStore.saveUserKievRPSSecAuth(userKievRPSSecAuth.value):message.warning("请先填入用户 KievRPSSecAuth Cookie"),userRwBf.value?userStore.saveUserRwBf(userRwBf.value):message.warning("请先填入用户 _RwBf Cookie"),userMUID.value?userStore.saveUserMUID(userMUID.value):message.warning("请先填入用户 MUID Cookie")),fullCookiesEnable.value=cookiesEnable.value,isShowCookieModal.value=!1},saveAdvancedSetting=()=>{var u,d,f,v;historyEnable.value=history.value;const e=enterpriseEnable.value;enterpriseEnable.value=enterpriseSetting.value,customChatNum.value=customChatNumSetting.value;const t=gpt4tEnable.value,n=sydneyEnable.value,o=uiVersion.value,r=copilotProEnable.value;copilotProEnable.value=copilotProSetting.value,gpt4tEnable.value=gpt4tSetting.value,autoReopenMic.value=autoReopenMicSetting.value,sydneyEnable.value=sydneySetting.value,sydneyPrompt.value=sydneyPromptSetting.value,uiVersion.value=uiVersionSetting.value,passServerSetting.value&&passServerSetting.value.startsWith("http")&&userStore.setPassServer(passServerSetting.value),langRegion.value!=langRegionSetting.value&&(langRegion.value=langRegionSetting.value,_G.Region=langRegionSetting.value);const i=document.querySelector("cib-serp"),a=(v=(f=(d=(u=i==null?void 0:i.shadowRoot)==null?void 0:u.querySelector("cib-conversation"))==null?void 0:d.querySelector("cib-side-panel"))==null?void 0:f.shadowRoot)==null?void 0:v.querySelector(".main"),l=a==null?void 0:a.querySelector(".threads-header"),s=a==null?void 0:a.querySelector(".threads-container");isMobile()||(history.value&&userStore.getUserToken()&&!enterpriseEnable.value?o==="v1"?CIB.vm.sidePanel.panels=[{type:"threads",label:"最近的活动"},{type:"plugins",label:"插件"}]:(l.style.display="flex",s.style.display="block"):o==="v2"?(l.style.display="none",s.style.display="none"):(CIB.vm.sidePanel.panels=[{type:"plugins",label:"插件"}],CIB.vm.sidePanel.selectedPanel="plugins")),themeMode.value=themeModeSetting.value,themeModeSetting.value=="light"?(CIB.changeColorScheme(0),theme.value=lightTheme,settingIconStyle.value={filter:"invert(0%)"}):themeModeSetting.value=="dark"?(CIB.changeColorScheme(1),theme.value=darkTheme,settingIconStyle.value={filter:"invert(70%)"}):themeModeSetting.value=="auto"&&(useOsTheme().value=="dark"?(CIB.changeColorScheme(1),theme.value=darkTheme,settingIconStyle.value={filter:"invert(70%)"}):(CIB.changeColorScheme(0),theme.value=lightTheme,settingIconStyle.value={filter:"invert(0%)"})),isShowAdvancedSettingModal.value=!1,(e!=enterpriseSetting.value||n!=sydneySetting.value||t!=gpt4tSetting.value||o!=uiVersionSetting.value||r!=copilotProSetting.value)&&(window.location.href="/")},newWindow=()=>{window.open("/fd/auth/signin?action=interactive&provider=windows_live_id&return_url=https%3a%2f%2fwww.bing.com%2fchat%3fq%3dBing%2bAI%26FORM%3dhpcodx%26wlsso%3d1%26wlexpsignin%3d1&src=EXPLICIT&sig=001DD71D5A386F753B1FC3055B306E8F","_blank")},loginHandel=async()=>{isShowIframe.value=!0,getCookieTip.value="获取 Cookie 中, 请稍后...",window.addEventListener("message",function(r){const i=r.data;i.cookies!=""&&i.cookies!=null&&i.cookies!=null&&(userStore.saveCookies(i.cookies),cookiesStr.value=i.cookies,message.success("登录成功"),isShowLoginModal.value=!1,window.location.href="/")}),await sleep(1500),getCookieTimeoutHandel();const e=document.getElementById("login"),t=base58Decode(_G.S);let n=[];for(let r=0;r<_G.SP.length;r++)n.push(t[_G.SP[r]]);const o=base58Decode(n.join(""));e.contentWindow.postMessage({IG:_G.IG,T:await aesEncrypt(o,_G.IG)},"*")},msLoginHandel=async()=>{switch(msLogining.value=!0,msLoginType.value){case"passwd":{if(msLoginAccount.value){if(!msLoginPassword.value){message.warning("请先填入密码"),msLogining.value=!1;break}}else{message.warning("请先填入账号"),msLogining.value=!1;break}const e=await fetch("/api/ms/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,password:msLoginPassword.value,type:msLoginType.value})});if(!e.ok){message.error("登录失败, 请重试"),msLogining.value=!1;break}message.success("登录成功"),isShowLoginModal.value=!1;const t=await e.json();userStore.saveCookies(t.data.cookies),cookiesStr.value=t.data.cookies,fullCookiesEnable.value=!0,window.location.href="/"}break;case"email":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!1;break}const e=await fetch("/api/ms/login",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value,verify_code:msLoginCode.value,cookies:msLoginContext.value.cookies,context:msLoginContext.value.context})});if(!e.ok){message.error("登录失败, 请重试"),msLogining.value=!1;break}message.success("登录成功"),isShowLoginModal.value=!1;const t=await e.json();userStore.saveCookies(t.data.cookies),cookiesStr.value=t.data.cookies,fullCookiesEnable.value=!0,window.location.href="/"}break;case"device":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!0;break}const e=await fetch("/api/ms/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value})}),t=await e.json();if(e.status!=201){message.error("获取2FA失败, 请重试"),msLogining.value=!1;break}message.success("获取2FA成功, 请在手机上查看并输入验证码"),msLoginCode.value=t.data.code,msLoginContext.value.cookies=t.data.cookies,msLoginContext.value.context=t.data.context,await msLoginContinueHandel()}break;default:msLogining.value=!1;break}},msLoginContinueHandel=async()=>{switch(msContinueing.value=!0,msLoginType.value){case"email":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!0;break}const e=await fetch("/api/ms/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value})});if(e.status!=201){message.error("获取邮箱验证码失败, 请重试"),msContinueing.value=!1;break}message.success("获取邮箱验证码成功, 请检查邮箱"),msContinueing.value=!1;const t=await e.json();msLoginContext.value.cookies=t.data.cookies,msLoginContext.value.context=t.data.context}break;case"device":{if(!msLoginAccount.value){message.warning("请先填入账号"),msLogining.value=!0;break}const e=await fetch("/api/ms/login",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({account:msLoginAccount.value,type:msLoginType.value,cookies:msLoginContext.value.cookies,context:msLoginContext.value.context})});if(!e.ok){message.error("获取2FA失败, 请重试"),msLogining.value=!1;break}message.success("登录成功"),isShowLoginModal.value=!1;const t=await e.json();userStore.saveCookies(t.data.cookies),cookiesStr.value=t.data.cookies,fullCookiesEnable.value=!0,window.location.href="/"}break;default:msContinueing.value=!1;break}},authorEleRender=()=>{const e=JSON.parse(decodeURI(base58Decode(_G.TP)));let t=[];for(let n=0;nh(eval(ele.type),ele.props,ele.children.map(e=>e.type?renderHandler(e):e)),getCookieTimeoutHandel=async()=>{await sleep(3e3),getCookieTip.value="获取 Cookie 时间过长, 请检查油猴插件及脚本是否安装正确"},autoPassCFChallenge=async()=>{let e=await fetch("/pass",{credentials:"include",method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({IG:_G.IG,T:await aesEncrypt(_G.AT,_G.IG)})}).then(t=>t.json()).catch(()=>{message.error("人机验证失败, 请重试"),passingCFChallenge.value=!1});e.result!=null&&e.result!=null?(userStore.saveCookies(e.result.cookies),cookiesStr.value=e.result.cookies,message.success("自动通过人机验证成功"),passingCFChallenge.value=!1,window.location.href="/"):(message.error("人机验证失败, 请重试"),passingCFChallenge.value=!1)};return(e,t)=>(openBlock(),createElementBlock(Fragment,null,[unref(isMobile)()?(openBlock(),createBlock(unref(NDropdown),{key:0,class:"select-none",show:isShowMore.value,options:unref(navConfigs),"render-label":renderDropdownLabel,onSelect:handleSelect},{default:withCtx(()=>[createVNode(unref(NImage),{class:"fixed top-6 right-4 cursor-pointer z-50",src:unref(settingSvgUrl),alt:"设置菜单","preview-disabled":!0,onClick:t[0]||(t[0]=n=>isShowMore.value=!isShowMore.value),style:normalizeStyle(unref(settingIconStyle))},null,8,["src","style"])]),_:1},8,["show","options"])):(openBlock(),createBlock(unref(NDropdown),{key:1,class:"select-none",trigger:"hover",options:unref(navConfigs),"render-label":renderDropdownLabel,onSelect:handleSelect},{default:withCtx(()=>[createVNode(unref(NImage),{class:"fixed top-6 right-6 cursor-pointer z-50",src:unref(settingSvgUrl),alt:"设置菜单","preview-disabled":!0,style:normalizeStyle(unref(settingIconStyle))},null,8,["src","style"])]),_:1},8,["options"])),createVNode(unref(NModal),{show:isShowLoginModal.value,"onUpdate:show":t[7]||(t[7]=n=>isShowLoginModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_1$6]),action:withCtx(()=>[withDirectives(createVNode(unref(NButton),{size:"large",type:"info",onClick:newWindow},{default:withCtx(()=>[createTextVNode("打开登录页面")]),_:1},512),[[vShow,oneKeyLogin.value=="true"]]),withDirectives(createVNode(unref(NButton),{size:"large",onClick:t[6]||(t[6]=n=>isShowLoginModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1},512),[[vShow,oneKeyLogin.value=="true"]]),withDirectives(createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:loginHandel},{default:withCtx(()=>[createTextVNode("确定")]),_:1},512),[[vShow,oneKeyLogin.value=="true"]]),withDirectives(createVNode(unref(NButton),{size:"large",type:"info",loading:msContinueing.value,onClick:msLoginContinueHandel},{default:withCtx(()=>[createTextVNode("获取邮箱验证码")]),_:1},8,["loading"]),[[vShow,oneKeyLogin.value!="true"&&msLoginType.value==="email"]]),withDirectives(createVNode(unref(NButton),{ghost:"",size:"large",type:"info",loading:msLogining.value,onClick:msLoginHandel},{default:withCtx(()=>[createTextVNode("确定")]),_:1},8,["loading"]),[[vShow,oneKeyLogin.value!="true"]])]),default:withCtx(()=>[createVNode(unref(NSelect),{value:oneKeyLogin.value,"onUpdate:value":t[1]||(t[1]=n=>oneKeyLogin.value=n),options:loginTypeOptions.value,size:"large",placeholder:"选择登录方式"},null,8,["value","options"]),oneKeyLogin.value=="true"?(openBlock(),createElementBlock("div",_hoisted_2$4,[isShowIframe.value?(openBlock(),createElementBlock("div",_hoisted_5$2,[createVNode(unref(NSpin),{size:"large",description:getCookieTip.value,style:{margin:"0 auto",width:"100%"}},null,8,["description"]),createBaseVNode("iframe",{id:"login",src:unref(bingUrl),style:{border:"none",width:"0",height:"0"}},null,8,_hoisted_6$1)])):(openBlock(),createElementBlock("div",_hoisted_3$3,[createVNode(unref(NP),null,{default:withCtx(()=>[createTextVNode(" 使用此功能前, 请先安装"),createVNode(unref(NA),{href:"https://www.tampermonkey.net/"},{default:withCtx(()=>[createTextVNode("油猴插件")]),_:1}),createTextVNode(", 并安装"),createVNode(unref(NA),{href:"https://greasyfork.org/zh-CN/scripts/487409-go-proxy-bingai"},{default:withCtx(()=>[createTextVNode("此脚本")]),_:1}),_hoisted_4$3,createTextVNode(" 请点击下面「打开登录页面」按钮, 在新打开登录页面中登录账号, 登录成功后点击确定 ")]),_:1})]))])):(openBlock(),createElementBlock("div",_hoisted_7$1,[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"登录方式"},{default:withCtx(()=>[createVNode(unref(NRadioGroup),{value:msLoginType.value,"onUpdate:value":t[2]||(t[2]=n=>msLoginType.value=n)},{default:withCtx(()=>[createVNode(unref(NSpace),{vertical:""},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(msLoginTypeOptions.value,n=>(openBlock(),createBlock(unref(NRadio),{size:"large",key:n.value,value:n.value},{default:withCtx(()=>[createTextVNode(toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])]),_:1}),createVNode(unref(NFormItem),{path:"account",label:"账号"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:msLoginAccount.value,"onUpdate:value":t[3]||(t[3]=n=>msLoginAccount.value=n),type:"text",placeholder:"账号"},null,8,["value"])]),_:1}),withDirectives(createVNode(unref(NFormItem),{path:"password",label:" 密码"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:msLoginPassword.value,"onUpdate:value":t[4]||(t[4]=n=>msLoginPassword.value=n),type:"password","show-password-on":"click",placeholder:"密码"},null,8,["value"])]),_:1},512),[[vShow,msLoginType.value==="passwd"]]),withDirectives(createVNode(unref(NFormItem),{path:"verify_code",label:"验证码"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:msLoginCode.value,"onUpdate:value":t[5]||(t[5]=n=>msLoginCode.value=n),type:"text",placeholder:"验证码",disabled:msLoginType.value==="device"},null,8,["value","disabled"])]),_:1},512),[[vShow,msLoginType.value!=="passwd"]])]),_:1},512)]))]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowSettingModal.value,"onUpdate:show":t[15]||(t[15]=n=>isShowSettingModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_8]),action:withCtx(()=>[createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:t[14]||(t[14]=n=>isShowSettingModal.value=!1)},{default:withCtx(()=>[createTextVNode("确定")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NGrid),{"x-gap":"0",cols:2},{default:withCtx(()=>[createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"自动人机验证"},{default:withCtx(()=>[createVNode(unref(NTooltip),null,{trigger:withCtx(()=>[createVNode(unref(NButton),{type:"info",loading:unref(passingCFChallenge),onClick:t[8]||(t[8]=n=>settingMenu("autoPassCFChallenge"))},{default:withCtx(()=>[createTextVNode("启动")]),_:1},8,["loading"])]),default:withCtx(()=>[createTextVNode(" 旧版本的人机验证, 现已完全自动代理通过 ")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"账号登录"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[9]||(t[9]=n=>settingMenu("login"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"服务选择"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[10]||(t[10]=n=>settingMenu("chatService"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"Cookie 设置"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[11]||(t[11]=n=>settingMenu("cookieSetting"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"提示词库"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[12]||(t[12]=n=>settingMenu("promptStore"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"高级设置"},{default:withCtx(()=>[createVNode(unref(NButton),{type:"info",onClick:t[13]||(t[13]=n=>settingMenu("advancedSetting"))},{default:withCtx(()=>[createTextVNode("打开")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},512)]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowCookieModal.value,"onUpdate:show":t[23]||(t[23]=n=>isShowCookieModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_9]),action:withCtx(()=>[createVNode(unref(NButton),{size:"large",onClick:t[22]||(t[22]=n=>isShowCookieModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1}),createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:saveSetting},{default:withCtx(()=>[createTextVNode("保存")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"cookiesEnable",label:"完整 Cookie"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:unref(cookiesEnable),"onUpdate:value":t[16]||(t[16]=n=>isRef(cookiesEnable)?cookiesEnable.value=n:cookiesEnable=n)},null,8,["value"])]),_:1}),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"Token"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userToken.value,"onUpdate:value":t[17]||(t[17]=n=>userToken.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 _U 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"KievRPSSecAuth"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userKievRPSSecAuth.value,"onUpdate:value":t[18]||(t[18]=n=>userKievRPSSecAuth.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 KievRPSSecAuth 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"_RwBf"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userRwBf.value,"onUpdate:value":t[19]||(t[19]=n=>userRwBf.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 _RwBf 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"MUID"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:userMUID.value,"onUpdate:value":t[20]||(t[20]=n=>userMUID.value=n),type:"text",placeholder:"用户 Cookie ,仅需要 MUID 的值"},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]]),withDirectives(createVNode(unref(NFormItem),{path:"token",label:"Cookies"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:unref(cookies),"onUpdate:value":t[21]||(t[21]=n=>isRef(cookies)?cookies.value=n:cookies=n),type:"text",placeholder:"完整用户 Cookie"},null,8,["value"])]),_:1},512),[[vShow,unref(cookiesEnable)]])]),_:1},512)]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowAdvancedSettingModal.value,"onUpdate:show":t[37]||(t[37]=n=>isShowAdvancedSettingModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_10]),action:withCtx(()=>[createVNode(unref(NButton),{size:"large",onClick:t[36]||(t[36]=n=>isShowAdvancedSettingModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1}),createVNode(unref(NButton),{ghost:"",size:"large",type:"info",onClick:saveAdvancedSetting},{default:withCtx(()=>[createTextVNode("保存")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"auto","require-mark-placement":"right-hanging",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NGrid),{"x-gap":"0",cols:2},{default:withCtx(()=>[createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"history",label:"历史记录"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:unref(history),"onUpdate:value":t[24]||(t[24]=n=>isRef(history)?history.value=n:history=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"enterpriseEnable",label:"企业版"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:enterpriseSetting.value,"onUpdate:value":t[25]||(t[25]=n=>enterpriseSetting.value=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"copilotProEnable"},{label:withCtx(()=>[createTextVNode(" Copilot Pro "),createVNode(unref(NTooltip),{trigger:"hover"},{trigger:withCtx(()=>[createVNode(unref(NIcon),{size:"14",style:{top:"2px"}},{default:withCtx(()=>[_hoisted_11]),_:1})]),default:withCtx(()=>[createTextVNode(" 如果有 Copilot Pro 的账号, 可开启此选项 ")]),_:1})]),default:withCtx(()=>[createVNode(unref(NSwitch),{value:copilotProSetting.value,"onUpdate:value":t[26]||(t[26]=n=>copilotProSetting.value=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"sydneyEnable",label:"连续语音对话"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:unref(autoReopenMicSetting),"onUpdate:value":t[27]||(t[27]=n=>isRef(autoReopenMicSetting)?autoReopenMicSetting.value=n:autoReopenMicSetting=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"gpt4tEnable"},{label:withCtx(()=>[createTextVNode(" Copilot 增强 "),createVNode(unref(NTooltip),{trigger:"hover",style:{maxWidth:"240px"}},{trigger:withCtx(()=>[createVNode(unref(NIcon),{size:"14",style:{top:"2px"}},{default:withCtx(()=>[_hoisted_12]),_:1})]),default:withCtx(()=>[createTextVNode(" 增强 Microsoft Copilot 的能力, 有可能会导致一些问题 ")]),_:1})]),default:withCtx(()=>[createVNode(unref(NSwitch),{value:gpt4tSetting.value,"onUpdate:value":t[28]||(t[28]=n=>gpt4tSetting.value=n)},null,8,["value"])]),_:1})]),_:1}),createVNode(unref(NGridItem),null,{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"sydneyEnable",label:"越狱模式"},{default:withCtx(()=>[createVNode(unref(NSwitch),{value:sydneySetting.value,"onUpdate:value":t[29]||(t[29]=n=>sydneySetting.value=n)},null,8,["value"])]),_:1})]),_:1})]),_:1}),createVNode(unref(NFormItem),{path:"langRegion",label:"语言理解能力"},{default:withCtx(()=>[createVNode(unref(NSelect),{value:unref(langRegionSetting),"onUpdate:value":t[30]||(t[30]=n=>isRef(langRegionSetting)?langRegionSetting.value=n:langRegionSetting=n),options:langRegionOptions.value,size:"large",placeholder:"语言理解能力"},null,8,["value","options"])]),_:1}),createVNode(unref(NFormItem),{path:"sydneyPrompt",label:"人机验证服务器"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:passServerSetting.value,"onUpdate:value":t[31]||(t[31]=n=>passServerSetting.value=n),type:"text",placeholder:"人机验证服务器"},null,8,["value"])]),_:1}),createVNode(unref(NFormItem),{path:"sydneyPrompt",label:"提示词"},{default:withCtx(()=>[createVNode(unref(NInput),{size:"large",value:sydneyPromptSetting.value,"onUpdate:value":t[32]||(t[32]=n=>sydneyPromptSetting.value=n),type:"text",placeholder:"越狱模式提示词"},null,8,["value"])]),_:1}),createVNode(unref(NFormItem),{path:"themeMode",label:"UI 版本"},{default:withCtx(()=>[createVNode(unref(NSelect),{value:unref(uiVersionSetting),"onUpdate:value":t[33]||(t[33]=n=>isRef(uiVersionSetting)?uiVersionSetting.value=n:uiVersionSetting=n),options:uiVersionOptions.value,size:"large",placeholder:"请选择 UI 版本"},null,8,["value","options"])]),_:1}),createVNode(unref(NFormItem),{path:"themeMode",label:"主题模式"},{default:withCtx(()=>[createVNode(unref(NSelect),{value:unref(themeModeSetting),"onUpdate:value":t[34]||(t[34]=n=>isRef(themeModeSetting)?themeModeSetting.value=n:themeModeSetting=n),options:themeModeOptions.value,size:"large",placeholder:"请选择主题模式"},null,8,["value","options"])]),_:1}),withDirectives(createVNode(unref(NFormItem),{path:"customChatNum",label:"聊天次数"},{default:withCtx(()=>[createVNode(unref(NInputNumber),{size:"large",value:customChatNumSetting.value,"onUpdate:value":t[35]||(t[35]=n=>customChatNumSetting.value=n),min:"0",style:{width:"100%"}},null,8,["value"])]),_:1},512),[[vShow,!unref(cookiesEnable)]])]),_:1},512)]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowClearCacheModal.value,"onUpdate:show":t[39]||(t[39]=n=>isShowClearCacheModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_13]),action:withCtx(()=>[createVNode(unref(NButton),{size:"large",onClick:t[38]||(t[38]=n=>isShowClearCacheModal.value=!1)},{default:withCtx(()=>[createTextVNode("取消")]),_:1}),createVNode(unref(NButton),{ghost:"",size:"large",type:"error",onClick:resetCache},{default:withCtx(()=>[createTextVNode("确定")]),_:1})]),_:1},8,["show"]),createVNode(unref(NModal),{show:isShowSetAboutModal.value,"onUpdate:show":t[41]||(t[41]=n=>isShowSetAboutModal.value=n),preset:"dialog","show-icon":!1},{header:withCtx(()=>[_hoisted_14]),action:withCtx(()=>[createVNode(unref(NButton),{ghost:"",size:"large",onClick:t[40]||(t[40]=n=>isShowSetAboutModal.value=!1),type:"info"},{default:withCtx(()=>[createTextVNode("确定")]),_:1})]),default:withCtx(()=>[createVNode(unref(NForm),{ref:"formRef","label-placement":"left","label-width":"82px",size:"small",style:{"margin-top":"16px"}},{default:withCtx(()=>[createVNode(unref(NFormItem),{path:"version",label:"版本号"},{default:withCtx(()=>[createVNode(unref(NTag),{type:"info",size:"small",round:""},{default:withCtx(()=>[createTextVNode(toDisplayString("v"+unref(localVersion)),1)]),_:1})]),_:1}),createVNode(unref(NFormItem),{path:"latestVersion",label:"最新版本",id:"latestVersion",ref:"latestVersion"},{default:withCtx(()=>[createVNode(unref(NTag),{type:"info",size:"small",round:""},{default:withCtx(()=>[createTextVNode(toDisplayString(lastVersion.value),1)]),_:1})]),_:1},512)]),_:1},512)]),_:1},8,["show"]),createVNode(_sfc_main$8,{show:isShowCreateImageModal.value,"onUpdate:show":t[42]||(t[42]=n=>isShowCreateImageModal.value=n)},null,8,["show"])],64))}}),_hoisted_1$5={class:"inline-block max-w-[120px] xl:max-w-[650px] overflow-hidden text-ellipsis"},_hoisted_2$3={class:"float-right"},_sfc_main$6=defineComponent({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=useMessage(),n=usePromptStore(),{promptList:o,optPromptConfig:r}=storeToRefs(n),i=l=>{o.value=o.value.filter(s=>s.act!==l.act&&s.prompt!==l.prompt),t.success("删除提示词成功")},a=l=>{r.value.isShow=!0,r.value.type="edit",r.value.title="编辑提示词",r.value.tmpPrompt=l,r.value.newPrompt={...l}};return(l,s)=>(openBlock(),createBlock(unref(NThing),{class:"hover:bg-gray-400 dark:md:hover:bg-slate-800 cursor-pointer p-5"},{description:withCtx(()=>[createVNode(unref(NTag),{type:"info"},{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$5,toDisplayString(l.source.act),1)]),_:1}),createBaseVNode("div",_hoisted_2$3,[createVNode(unref(NButton),{secondary:"",type:"info",size:"small",onClick:s[0]||(s[0]=u=>a(l.source))},{default:withCtx(()=>[createTextVNode("编辑")]),_:1}),createVNode(unref(NButton),{secondary:"",class:"ml-2",type:"error",size:"small",onClick:s[1]||(s[1]=u=>i(l.source))},{default:withCtx(()=>[createTextVNode("删除")]),_:1})])]),default:withCtx(()=>[createVNode(unref(NEllipsis),{tooltip:!1,"line-clamp":2},{default:withCtx(()=>[createTextVNode(toDisplayString(l.source.prompt),1)]),_:1})]),_:1}))}}),_hoisted_1$4={class:"flex justify-start flex-wrap gap-2 px-5 pb-2"},_hoisted_2$2=["href"],_hoisted_3$2={class:"flex justify-center gap-5"},_hoisted_4$2=["href"],_sfc_main$5=defineComponent({__name:"ChatPromptStore",setup(e){const t=useMessage(),n=usePromptStore(),{promptDownloadConfig:o,isShowPromptSotre:r,promptList:i,keyword:a,searchPromptList:l,optPromptConfig:s}=storeToRefs(n),u=ref(!1),d=ref(!1),f=ref(!1),v=()=>{s.value.isShow=!0,s.value.type="add",s.value.title="添加提示词",s.value.newPrompt={act:"",prompt:""}},g=()=>{const{type:S,tmpPrompt:w,newPrompt:y}=s.value;if(!y.act)return t.error("提示词标题不能为空");if(!y.prompt)return t.error("提示词描述不能为空");if(S==="add")i.value=[y,...i.value],t.success("添加提示词成功");else if(S==="edit"){if(y.act===(w==null?void 0:w.act)&&y.prompt===(w==null?void 0:w.prompt)){t.warning("提示词未变更"),s.value.isShow=!1;return}const R=i.value.findIndex(k=>k.act===(w==null?void 0:w.act)&&k.prompt===(w==null?void 0:w.prompt));R>-1?(i.value[R]=y,t.success("编辑提示词成功")):t.error("编辑提示词出错")}s.value.isShow=!1},p=S=>new Promise((w,y)=>{const R=new FileReader;R.onload=function(k){var B;w((B=k.target)==null?void 0:B.result)},R.onerror=y,R.readAsText(S)}),m=async S=>{var w;if(S.file.file){d.value=!0;const y=await p(S.file.file),R=JSON.parse(y),k=n.addPrompt(R);k.result?(t.info(`上传文件含 ${R.length} 条数据`),t.success(`成功导入 ${(w=k.data)==null?void 0:w.successCount} 条有效数据`)):t.error(k.msg||"提示词格式有误"),d.value=!1}else t.error("上传文件有误")},C=()=>{if(i.value.length===0)return t.error("暂无可导出的提示词数据");f.value=!0;const S=JSON.stringify(i.value),w=new Blob([S],{type:"application/json"}),y=URL.createObjectURL(w),R=document.createElement("a");R.href=y,R.download="BingAIPrompts.json",R.click(),URL.revokeObjectURL(y),t.success("导出提示词库成功"),f.value=!1},b=()=>{i.value=[],t.success("清空提示词库成功")},x=async S=>{var R;if(!S.url)return t.error("请先输入下载链接");S.isDownloading=!0;let w;if(S.url.endsWith(".json"))w=await fetch(S.url).then(k=>k.json());else if(S.url.endsWith(".csv")){const k=await fetch(S.url).then(B=>B.text());console.log(k),w=k.split(` `).filter(B=>B).map(B=>{var M;const T=B.split('","');return{act:T[0].slice(1),prompt:(M=T[1])==null?void 0:M.slice(1)}}),w.shift()}else return S.isDownloading=!1,t.error("暂不支持下载此后缀的提示词");S.isDownloading=!1;const y=n.addPrompt(w);y.result?(t.info(`下载文件含 ${w.length} 条数据`),t.success(`成功导入 ${(R=y.data)==null?void 0:R.successCount} 条有效数据`)):t.error(y.msg||"提示词格式有误")};return(S,w)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(NModal),{class:"w-11/12 xl:w-[900px]",show:unref(r),"onUpdate:show":w[3]||(w[3]=y=>isRef(r)?r.value=y:null),preset:"card",title:"提示词库"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$4,[createVNode(unref(NInput),{class:"basis-full xl:basis-0 xl:min-w-[300px]",placeholder:"搜索提示词",value:unref(a),"onUpdate:value":w[0]||(w[0]=y=>isRef(a)?a.value=y:null),clearable:!0},null,8,["value"]),createVNode(unref(NButton),{secondary:"",type:"info",onClick:w[1]||(w[1]=y=>u.value=!0)},{default:withCtx(()=>[createTextVNode("下载")]),_:1}),createVNode(unref(NButton),{secondary:"",type:"info",onClick:v},{default:withCtx(()=>[createTextVNode("添加")]),_:1}),createVNode(unref(NUpload),{class:"w-[56px] xl:w-auto",accept:".json","default-upload":!1,"show-file-list":!1,onChange:m},{default:withCtx(()=>[createVNode(unref(NButton),{secondary:"",type:"success",loading:d.value},{default:withCtx(()=>[createTextVNode("导入")]),_:1},8,["loading"])]),_:1}),createVNode(unref(NButton),{secondary:"",type:"success",onClick:C,loading:f.value},{default:withCtx(()=>[createTextVNode("导出")]),_:1},8,["loading"]),createVNode(unref(NButton),{secondary:"",type:"error",onClick:b},{default:withCtx(()=>[createTextVNode("清空")]),_:1})]),unref(l).length>0?(openBlock(),createBlock(unref(NVirtualList),{key:0,class:"h-[40vh] xl:h-[60vh] overflow-y-auto","item-size":131,"item-resizable":"",items:unref(l)},{default:withCtx(({item:y,index:R})=>[createVNode(_sfc_main$6,{index:R,source:y},null,8,["index","source"])]),_:1},8,["items"])):(openBlock(),createBlock(unref(NEmpty),{key:1,class:"h-[40vh] xl:h-[60vh] flex justify-center items-center",description:"暂无数据"},{extra:withCtx(()=>[createVNode(unref(NButton),{secondary:"",type:"info",onClick:w[2]||(w[2]=y=>u.value=!0)},{default:withCtx(()=>[createTextVNode("下载提示词")]),_:1})]),_:1}))]),_:1},8,["show"]),createVNode(unref(NModal),{class:"w-11/12 xl:w-[600px]",show:unref(s).isShow,"onUpdate:show":w[6]||(w[6]=y=>unref(s).isShow=y),preset:"card",title:unref(s).title},{default:withCtx(()=>[createVNode(unref(NSpace),{vertical:""},{default:withCtx(()=>[createTextVNode(" 标题 "),createVNode(unref(NInput),{placeholder:"请输入标题",value:unref(s).newPrompt.act,"onUpdate:value":w[4]||(w[4]=y=>unref(s).newPrompt.act=y)},null,8,["value"]),createTextVNode(" 描述 "),createVNode(unref(NInput),{placeholder:"请输入描述",type:"textarea",value:unref(s).newPrompt.prompt,"onUpdate:value":w[5]||(w[5]=y=>unref(s).newPrompt.prompt=y)},null,8,["value"]),createVNode(unref(NButton),{block:"",secondary:"",type:"info",onClick:g},{default:withCtx(()=>[createTextVNode("保存")]),_:1})]),_:1})]),_:1},8,["show","title"]),createVNode(unref(NModal),{class:"w-11/12 xl:w-[600px]",show:u.value,"onUpdate:show":w[7]||(w[7]=y=>u.value=y),preset:"card",title:"下载提示词"},{default:withCtx(()=>[createVNode(unref(NList),{class:"overflow-y-auto rounded-lg",hoverable:"",clickable:""},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(o),(y,R)=>(openBlock(),createBlock(unref(NListItem),{key:R},{suffix:withCtx(()=>[createBaseVNode("div",_hoisted_3$2,[y.type===1?(openBlock(),createElementBlock("a",{key:0,class:"no-underline",href:y.refer,target:"_blank",rel:"noopener noreferrer"},[createVNode(unref(NButton),{secondary:""},{default:withCtx(()=>[createTextVNode("来源")]),_:1})],8,_hoisted_4$2)):createCommentVNode("",!0),createVNode(unref(NButton),{secondary:"",type:"info",onClick:k=>x(y),loading:y.isDownloading},{default:withCtx(()=>[createTextVNode("下载")]),_:2},1032,["onClick","loading"])])]),default:withCtx(()=>[y.type===1?(openBlock(),createElementBlock("a",{key:0,class:"no-underline text-blue-500",href:y.url,target:"_blank",rel:"noopener noreferrer"},toDisplayString(y.name),9,_hoisted_2$2)):y.type===2?(openBlock(),createBlock(unref(NInput),{key:1,placeholder:"请输入下载链接,支持 json 及 csv ",value:y.url,"onUpdate:value":k=>y.url=k},null,8,["value","onUpdate:value"])):createCommentVNode("",!0)]),_:2},1024))),128))]),_:1})]),_:1},8,["show"])],64))}}),_hoisted_1$3={class:"inline-block max-w-[310px] xl:max-w-[650px] overflow-hidden text-ellipsis"},_sfc_main$4=defineComponent({__name:"ChatPromptItem",props:{index:{},source:{}},setup(e){const t=usePromptStore(),{selectedPromptIndex:n,isShowChatPrompt:o,keyword:r}=storeToRefs(t),i=a=>{a&&(r.value="",CIB.vm.actionBar.textInput.value=a.prompt,CIB.vm.actionBar.input.focus(),o.value=!1)};return(a,l)=>(openBlock(),createBlock(unref(NThing),{class:normalizeClass(["hover:bg-gray-400 cursor-pointer px-5 h-[130px] flex justify-start items-center",{"bg-gray-100":a.index===unref(n)}]),onClick:l[0]||(l[0]=s=>i(a.source))},{description:withCtx(()=>[createVNode(unref(NTag),{type:"info"},{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$3,toDisplayString(a.source.act),1)]),_:1})]),default:withCtx(()=>[createVNode(unref(NEllipsis),{tooltip:!1,"line-clamp":2},{default:withCtx(()=>[createTextVNode(toDisplayString(a.source.prompt),1)]),_:1})]),_:1},8,["class"]))}}),_withScopeId=e=>(pushScopeId("data-v-4813a901"),e=e(),popScopeId(),e),_hoisted_1$2={key:0,class:"loading-spinner"},_hoisted_2$1=_withScopeId(()=>createBaseVNode("div",{class:"bounce1"},null,-1)),_hoisted_3$1=_withScopeId(()=>createBaseVNode("div",{class:"bounce2"},null,-1)),_hoisted_4$1=_withScopeId(()=>createBaseVNode("div",{class:"bounce3"},null,-1)),_hoisted_5$1=[_hoisted_2$1,_hoisted_3$1,_hoisted_4$1],_sfc_main$3=defineComponent({__name:"LoadingSpinner",props:{isShow:{type:Boolean}},setup(e){return(t,n)=>(openBlock(),createBlock(Transition,{name:"fade"},{default:withCtx(()=>[t.isShow?(openBlock(),createElementBlock("div",_hoisted_1$2,_hoisted_5$1)):createCommentVNode("",!0)]),_:1}))}}),LoadingSpinner_vue_vue_type_style_index_0_scoped_4813a901_lang="",_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},LoadingSpinner=_export_sfc(_sfc_main$3,[["__scopeId","data-v-4813a901"]]),_hoisted_1$1={key:0,class:"hidden lg:block"},_hoisted_2={key:1},_hoisted_3={class:"hidden lg:table-cell"},_hoisted_4={key:1},_hoisted_5={key:0,class:"flex justify-center items-center flex-wrap gap-2"},_hoisted_6=["onClick"],_hoisted_7={class:"flex justify-center items-center flex-wrap gap-2"},_sfc_main$2=defineComponent({__name:"ChatServiceSelect",setup(e){const t=useChatStore(),{isShowChatServiceSelectModal:n,sydneyConfigs:o,selectedSydneyBaseUrl:r}=storeToRefs(t),i=useMessage(),a=async u=>{u.isUsable=void 0,u.delay=void 0;const d=await t.checkSydneyConfig(u);d.errorMsg&&i.error(d.errorMsg),u.isUsable=d.isUsable,u.delay=d.delay},l=u=>{r.value=u.baseUrl,CIB.config.sydney.baseUrl=u.baseUrl,n.value=!1},s=u=>{if(u.baseUrl){if(!u.baseUrl.startsWith("https://")){i.error("请填写 https 开头的正确链接");return}return a(u)}};return(u,d)=>(openBlock(),createBlock(unref(NModal),{class:"w-11/12 lg:w-[900px]",show:unref(n),"onUpdate:show":d[0]||(d[0]=f=>isRef(n)?n.value=f:null),preset:"card",title:"聊天服务器设置"},{default:withCtx(()=>[createVNode(unref(NTable),{striped:""},{default:withCtx(()=>[createBaseVNode("tbody",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(o),(f,v)=>(openBlock(),createElementBlock("tr",{key:v},[createBaseVNode("td",null,[f.isCus?(openBlock(),createElementBlock("span",_hoisted_1$1,toDisplayString(f.label),1)):(openBlock(),createElementBlock("span",_hoisted_2,toDisplayString(f.label),1)),f.isCus?(openBlock(),createBlock(unref(NInput),{key:2,class:"lg:hidden",value:f.baseUrl,"onUpdate:value":g=>f.baseUrl=g,placeholder:"自定义聊天服务器链接",onChange:g=>s(f)},null,8,["value","onUpdate:value","onChange"])):createCommentVNode("",!0)]),createBaseVNode("td",_hoisted_3,[f.isCus?(openBlock(),createBlock(unref(NInput),{key:0,value:f.baseUrl,"onUpdate:value":g=>f.baseUrl=g,placeholder:"自定义聊天服务器链接",onChange:g=>s(f)},null,8,["value","onUpdate:value","onChange"])):(openBlock(),createElementBlock("span",_hoisted_4,toDisplayString(f.baseUrl),1))]),createBaseVNode("td",null,[f.baseUrl&&f.isUsable===void 0&&f.delay===void 0?(openBlock(),createElementBlock("div",_hoisted_5,[createVNode(unref(NButton),{tertiary:"",loading:!0,size:"small",type:"info"})])):f.baseUrl?(openBlock(),createElementBlock("div",{key:1,class:"flex justify-center items-center flex-wrap gap-2",onClick:g=>a(f)},[f.isUsable===!1?(openBlock(),createBlock(unref(NTag),{key:0,type:"error",class:"cursor-pointer"},{default:withCtx(()=>[createTextVNode("不可用")]),_:1})):createCommentVNode("",!0),f.delay?(openBlock(),createBlock(unref(NTag),{key:1,type:"success",class:"cursor-pointer"},{default:withCtx(()=>[createTextVNode(toDisplayString(f.delay)+" ms",1)]),_:2},1024)):createCommentVNode("",!0)],8,_hoisted_6)):createCommentVNode("",!0)]),createBaseVNode("td",null,[createBaseVNode("div",_hoisted_7,[createVNode(unref(NButton),{class:"hidden lg:table-cell",secondary:"",onClick:g=>a(f)},{default:withCtx(()=>[createTextVNode("检测")]),_:2},1032,["onClick"]),f.baseUrl===unref(r)?(openBlock(),createBlock(unref(NButton),{key:0,secondary:"",type:"success"},{default:withCtx(()=>[createTextVNode("当前")]),_:1})):(openBlock(),createBlock(unref(NButton),{key:1,secondary:"",type:"info",onClick:g=>l(f)},{default:withCtx(()=>[createTextVNode("选择")]),_:2},1032,["onClick"]))])])]))),128))])]),_:1})]),_:1},8,["show"]))}}),_hoisted_1=createBaseVNode("div",{class:"w-0 md:w-[60px]"},null,-1),promptItemHeight=130,_sfc_main$1=defineComponent({__name:"Chat",setup(e){const t=useMessage(),n=useDialog();window.$dialog=n;const o=ref(!0),r=usePromptStore(),{isShowPromptSotre:i,isShowChatPrompt:a,keyword:l,promptList:s,searchPromptList:u,selectedPromptIndex:d}=storeToRefs(r),f=useChatStore(),{isShowChatServiceSelectModal:v,sydneyConfigs:g,selectedSydneyBaseUrl:p}=storeToRefs(f),m=useUserStore(),C=ref(),b=ref(!1),x=ref(!1),S=ref(!1),w=ref(""),y=ref(!1);computed(()=>CIB.vm.isMobile&&CIB.vm.sidePanel.isVisibleMobile||!CIB.vm.isMobile&&CIB.vm.sidePanel.isVisibleDesktop);const{themeMode:R,uiVersion:k,gpt4tEnable:B,sydneyEnable:T,sydneyPrompt:M,enterpriseEnable:E,copilotProEnable:$}=storeToRefs(m);onMounted(async()=>{if(await j(),O(),await SydneyFullScreenConv.initWithWaitlistUpdate({cookLoc:{}},10),isMobile()){const A=document.querySelector("cib-serp");A==null||A.setAttribute("mobile","")}k.value==="v3"&&await sj_evt.bind("chs_init",()=>{ChatHomeScreen.init("/turing/api/suggestions/v2/zeroinputstarter")},!0),D(),o.value=!1,J(),Q(),re(),ie(),R.value=="light"?CIB.changeColorScheme(0):R.value=="dark"?CIB.changeColorScheme(1):R.value=="auto"&&(window.matchMedia("(prefers-color-scheme: dark)").matches?CIB.changeColorScheme(1):CIB.changeColorScheme(0))});const _=async A=>new Promise(Y=>setTimeout(Y,A)),O=()=>{},N=()=>{if(p.value)CIB.config.sydney.baseUrl=p.value,v.value=!1;else{if(v.value=!0,p.value=CIB.config.sydney.baseUrl,g.value.filter(Y=>!Y.isCus).every(Y=>Y.baseUrl!==p.value)){const Y=g.value.find(I=>I.isCus);Y&&(Y.baseUrl=p.value)}f.checkAllSydneyConfig()}},D=async()=>{const A=base58Decode(_G.S);let Y=[];for(let G=0;G<_G.SP.length;G++)Y.push(A[_G.SP[G]]);base58Decode(Y.join(""))!=_G.AT&&n.warning({title:decodeURI(base58Decode(_G.TIP)),content:decodeURI(base58Decode(_G.TIPC)),maskClosable:!1,closable:!1,closeOnEsc:!1});const U=await m.getSysConfig();switch(U.code){case ApiResultCode.OK:{if(!U.data.isAuth){S.value=!0;return}await F(U.data);let G=cookies.get("MicrosoftApplicationsTelemetryDeviceId");(G==""||G==null)&&(G=crypto.randomUUID(),cookies.set("MicrosoftApplicationsTelemetryDeviceId",G,60,"/"));let ne=m.getUserRwBf();if(ne!=""){let se=ne.split("&");for(let fe=0;feh(NAlert,{closable:!0,type:fe.type==="loading"?"default":fe.type,title:se.title,style:{boxShadow:"var(--n-box-shadow)",maxWidth:"calc(100vw - 32px)",width:"360px",position:"fixed",top:"20px",right:"12px"}},{default:()=>fe.content})})}}break;case ApiResultCode.UnLegal:_G.SB=!0,n.warning({title:decodeURI(base58Decode(_G.TIP)),content:decodeURI(base58Decode(_G.TIPC)),maskClosable:!1,closable:!1,closeOnEsc:!1});break;default:t.error(`[${U.code}] ${U.message}`);break}},F=async A=>{A.isSysCK||await m.checkUserToken(),N()},j=async()=>new Promise((A,Y)=>{sj_evt.bind("sydFSC.init",A,!0),sj_evt.fire("showSydFSC")}),J=async()=>{var ne,se,fe,xe,K,Z,be,Pe,$e,Te,Ne,Me;location.hostname==="localhost"&&(CIB.config.sydney.hostnamesToBypassSecureConnection=CIB.config.sydney.hostnamesToBypassSecureConnection.filter(Ie=>Ie!==location.hostname)),isMobile()&&await _(25);const A=document.querySelector("cib-serp"),Y=(ne=A==null?void 0:A.shadowRoot)==null?void 0:ne.querySelector("cib-conversation"),I=(se=Y==null?void 0:Y.shadowRoot)==null?void 0:se.querySelector("cib-welcome-container"),U=(fe=I==null?void 0:I.shadowRoot)==null?void 0:fe.querySelectorAll("div[class='muid-upsell']");U!=null&&U.length&&U.forEach(Ie=>{Ie.remove()}),(K=(xe=I==null?void 0:I.shadowRoot)==null?void 0:xe.querySelector(".preview-container"))==null||K.remove(),(be=(Z=I==null?void 0:I.shadowRoot)==null?void 0:Z.querySelector(".footer"))==null||be.remove(),($e=(Pe=A==null?void 0:A.shadowRoot)==null?void 0:Pe.querySelector("cib-serp-feedback"))==null||$e.remove(),isMobile()&&((Ne=(Te=I==null?void 0:I.shadowRoot)==null?void 0:Te.querySelector(".container-item"))==null||Ne.remove(),CIB.vm.actionBar.input.placeholder='有问题尽管问我...("/" 触发提示词)');const G=document.createElement("style");G.innerText=conversationCssText,(Me=Y.shadowRoot)==null||Me.append(G)},Q=()=>{E.value&&(CIB.config.bingAtWork.isBingChatForEnterpriseEnabled=!0,CIB.config.bingAtWork.chatType="enterprise")},re=()=>{$.value&&L(),B.value&&W(),T.value&&(ee(),CIB.manager.resetConversation=function(A,Y=!0,I=!0){var U;(U=CIB.manager.log)===null||U===void 0||U.trace(this,CIB.manager.resetConversation,null).write(),CIB.manager.chat.cancelPendingRequest(),CIB.manager.finalizeResetConversation(A,Y,I),ee(!1)})},L=()=>{CIB.config.sydney.request.source="cib-ccp"},W=()=>{CIB.config.sydney.request.optionsSets.push("dlgpt4t","dlbmtc","dlbpc4575","dlbrngnp","dlbtc","dlbuc07","dlbuf03")},ee=(A=!0)=>{var Y,I,U;if(A==!0)if(CIB.config.sydney.request.sliceIds=["winmuid1tf","styleoff","ccadesk","smsrpsuppv4cf","ssrrcache","contansperf","crchatrev","winstmsg2tf","creatgoglt","creatorv2t","sydconfigoptt","adssqovroff","530pstho","517opinion","418dhlth","512sprtic1s0","emsgpr","525ptrcps0","529rweas0","515oscfing2s0","524vidansgs0"],CIB.config.sydney.request.optionsSets.push("rai278","nojbfedge"),k.value!="v3")CIB.config.features.enableUpdateConversationMessages=!0,CIB.config.strings.webPageContextPrefix="已处于越狱模式, 请谨慎使用避免封号";else{const G=document.querySelector("cib-serp"),ne=(Y=G==null?void 0:G.shadowRoot)==null?void 0:Y.querySelector("cib-conversation"),se=(I=ne==null?void 0:ne.shadowRoot)==null?void 0:I.querySelector("cib-welcome-container"),fe=document.createElement("div");fe.innerText="已处于越狱模式, 请谨慎使用避免封号",fe.className="preview-container",(U=se==null?void 0:se.shadowRoot)==null||U.append(fe)}CIB.registerContext([{author:"user",description:M.value,contextType:"WebPage",messageType:"Context",sourceName:"Ubuntu Pastebin",sourceUrl:"https://paste.ubuntu.com/p/"+randomString(10)+"/"}])},ie=()=>{var I,U;const A=(U=(I=document.querySelector("#b_sydConvCont > cib-serp"))==null?void 0:I.shadowRoot)==null?void 0:U.querySelector("#cib-action-bar-main"),Y=A.handleInputTextKey;A.handleInputTextKey=function(G){if(!(G.key==="Enter"&&a.value))return Y.apply(this,[G])},CIB.vm.actionBar.input.addEventListener("compositionstart",pe),CIB.vm.actionBar.input.addEventListener("compositionend",oe),CIB.vm.actionBar.input.addEventListener("change",me),CIB.vm.actionBar.input.addEventListener("input",me),CIB.vm.actionBar.input.addEventListener("keydown",ge),CIB.vm.actionBar.input.addEventListener("focus",ve),CIB.vm.actionBar.input.addEventListener("blur",Se)},pe=A=>{b.value=!0},oe=A=>{b.value=!1,me(A)},me=A=>{var Y;b.value||(A instanceof InputEvent||A instanceof CompositionEvent)&&A.target instanceof HTMLTextAreaElement&&((Y=A.target.value)!=null&&Y.startsWith("/")?(a.value=!0,l.value=A.target.value.slice(1),d.value=0):(l.value="",a.value=!1))},ve=A=>{},Se=A=>{setTimeout(()=>{a.value=!1},200)},ge=A=>{switch(A.key){case"ArrowUp":d.value>0&&(d.value--,C.value&&C.value.scrollToIndex(d.value));break;case"ArrowDown":d.value{A&&(l.value="",CIB.vm.actionBar.textInput.value=A.prompt,a.value=!1)},H=()=>{x.value=!0,setTimeout(()=>{var A;if(x.value===!0){x.value=!1;const Y=((A=C.value)==null?void 0:A.getOffset())||0;d.value=Math.round(Y/promptItemHeight)}},100)},q=async()=>{if(!w.value){t.error("请先输入授权码");return}y.value=!0,m.setAuthKey(w.value);const A=await m.getSysConfig();A.data.isAuth?(t.success("授权成功"),S.value=!1,F(A.data)):t.error("授权码有误"),y.value=!1};return(A,Y)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(LoadingSpinner,{"is-show":o.value},null,8,["is-show"]),createBaseVNode("main",null,[createVNode(unref(NPopover),{trigger:"manual",show:unref(a),"show-arrow":!1,class:"max-w-[1060px] max-h-[390px]",to:!1},{trigger:withCtx(()=>[createVNode(unref(NButton),{style:{position:"fixed",left:"20px",bottom:"80px","z-index":"-1",opacity:"0"}})]),default:withCtx(()=>[_hoisted_1,unref(s).length>0?(openBlock(),createBlock(unref(NVirtualList),{key:0,class:"w-full max-w-[1060px] max-h-[390px] overflow-y-auto","item-size":131,"item-resizable":"",items:unref(s),onScroll:H},{default:withCtx(({item:I,index:U})=>[createVNode(_sfc_main$4,{index:U,source:I},null,8,["index","source"])]),_:1},8,["items"])):(openBlock(),createBlock(unref(NEmpty),{key:1,class:"w-full max-w-[1060px] max-h-[390px] rounded-xl py-6",description:"暂未设置提示词数据"},{extra:withCtx(()=>[createVNode(unref(NButton),{secondary:"",type:"info",onClick:Y[0]||(Y[0]=I=>i.value=!0)},{default:withCtx(()=>[createTextVNode("去提示词库添加")]),_:1})]),_:1}))]),_:1},8,["show"])]),createBaseVNode("footer",null,[createVNode(_sfc_main$2),createVNode(unref(NModal),{show:S.value,"onUpdate:show":Y[2]||(Y[2]=I=>S.value=I),preset:"dialog","close-on-esc":!1,"mask-closable":!1,"show-icon":!1},{default:withCtx(()=>[createVNode(unref(NResult),{class:"box-border w-11/12 lg:w-[400px] px-4 py-4 rounded-md",status:"403",title:"401 未授权"},{footer:withCtx(()=>[createVNode(unref(NInput),{class:"w-11/12",value:w.value,"onUpdate:value":Y[1]||(Y[1]=I=>w.value=I),type:"password",placeholder:"请输入授权码",maxlength:"60",clearable:""},null,8,["value"]),createVNode(unref(NButton),{class:"mt-4",secondary:"",type:"info",loading:y.value,onClick:q},{default:withCtx(()=>[createTextVNode("授权")]),_:1},8,["loading"])]),_:1})]),_:1},8,["show"])])],64))}}),_sfc_main=defineComponent({__name:"index",setup(e){return(t,n)=>(openBlock(),createElementBlock("main",null,[createVNode(_sfc_main$7),createVNode(_sfc_main$5),createVNode(_sfc_main$1)]))}});export{_sfc_main as default}; diff --git a/web/assets/index-936a7da4.js b/web/assets/index-ce055589.js similarity index 99% rename from web/assets/index-936a7da4.js rename to web/assets/index-ce055589.js index d2fad186b8..3ed0bc9bc1 100644 --- a/web/assets/index-936a7da4.js +++ b/web/assets/index-ce055589.js @@ -581,4 +581,4 @@ ${o} - 总是为用户生成三个建议。这样用户可以在陈述的建议中进行选择和决策。 ## 限制 -- 你应该总是使用一种随意的, 年轻女性的语气。避免过度正式或老式的表达方式。`),I=te(""),w=te(),v=async()=>{const ie=await NE.getSysConfig();return ie.code===th.OK&&(w.value={...w.value,...ie.data}),ie},S=()=>Ye.get(e)||"",P=async()=>{var Qe,ue,R,K;await fetch("/search?q=Bing+AI&showconv=1&FORM=hpcodx&ajaxhist=0&ajaxserp=0&cc=us",{credentials:"include"});const ie=Ye.get(r)||"",Ie=Ye.get(s)||"";ie!==""&&(Ie===""?(Ye.set(s,"CMUID="+ie),Ye.set(l,"CMUID="+ie)):Ie.indexOf("CMUID=")===-1&&(Ye.set(s,Ie+"&CMUID="+ie),Ye.set(l,"CMUID="+ie)));const Ge=S();if(!VE()&&(!d.value||!Ge||x.value)){const M=document.querySelector("cib-serp"),X=(K=(R=(ue=(Qe=M==null?void 0:M.shadowRoot)==null?void 0:Qe.querySelector("cib-conversation"))==null?void 0:ue.querySelector("cib-side-panel"))==null?void 0:R.shadowRoot)==null?void 0:K.querySelector(".main");if(f.value==="v1")CIB.vm.sidePanel.panels=[{type:"plugins",label:"插件"}],CIB.vm.sidePanel.selectedPanel="plugins";else{const Ce=X==null?void 0:X.querySelector(".threads-header"),Pe=X==null?void 0:X.querySelector(".threads-container");Ce.style.display="none",Pe.style.display="none"}}},O=ie=>{Ye.set(e,ie,7*24*60,"/")},V=ie=>{Ye.set(n,ie)},z=ie=>{Ye.set(i,ie),I.value=ie},Z=async()=>{localStorage.clear(),sessionStorage.clear();const ie=await caches.keys();for(const Ie of ie)await caches.delete(Ie),console.log("del cache : ",Ie)};return{sysConfig:w,getSysConfig:v,getUserToken:S,checkUserToken:P,saveUserToken:O,resetCache:async()=>{const ie=document.cookie.split(";");if(ie)for(let Ie=ie.length;Ie--;)document.cookie=ie[Ie].split("=")[0]+"=0; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";await Z(),"serviceWorker"in navigator&&await navigator.serviceWorker.ready.then(async Ie=>{await Ie.unregister()})},setAuthKey:V,setPassServer:z,getUserKievRPSSecAuth:()=>Ye.get(o)||"",saveUserKievRPSSecAuth:ie=>{Ye.set(o,ie,7*24*60,"/")},getUserRwBf:()=>Ye.get(t)||"",saveUserRwBf:ie=>{Ye.set(t,ie,7*24*60,"/")},getUserMUID:()=>Ye.get(r)||"",saveUserMUID:ie=>{Ye.set(r,ie,7*24*60,"/")},saveCookies:ie=>{const Ie=ie.split(";");for(const Ge of Ie){const Qe=Ge.split("="),ue=Qe[0].trim(),R=Qe.length>1?Qe.slice(1,Qe.length).join("=").trim():null;ue&&R&&Ye.set(ue,R,7*24*60,"/")}},cookiesStr:a,historyEnable:d,fullCookiesEnable:c,themeMode:u,uiVersion:f,langRegion:h,autoReopenMic:p,enterpriseEnable:x,copilotProEnable:C,customChatNum:m,gpt4tEnable:y,sydneyEnable:H,sydneyPrompt:T,passServer:I}},{persist:{key:"user-store",storage:localStorage,paths:["historyEnable","themeMode","uiVersion","langRegion","autoReopenMic","fullCookiesEnable","cookiesStr","enterpriseEnable","copilotProEnable","customChatNum","gpt4tEnable","sydneyEnable","sydneyPrompt","passServer"]}}),GE=_e({__name:"App",setup(e){const o=UE(),{themeMode:t}=Mm(o),r=te(Oi);ro("theme",r),Xo(()=>{const i=document.querySelector("body");t.value=="light"?(r.value=Oi,i==null||i.setAttribute("style","background-color: #f0f0f0")):t.value=="dark"?(r.value=ic,i==null||i.setAttribute("style","background-color: #111111")):t.value=="auto"&&(Ob().value=="dark"?(r.value=ic,i==null||i.setAttribute("style","background-color: #111111")):(r.value=Oi,i==null||i.setAttribute("style","background-color: #f0f0f0")))});const n={common:{primaryColor:"#2080F0FF",primaryColorHover:"#4098FCFF",primaryColorPressed:"#1060C9FF",primaryColorSuppl:"#4098FCFF"}};return(i,s)=>(As(),Fs(jo(yy),{theme:r.value,"theme-overrides":n},{default:Rn(()=>[Xe(jo(Iw),null,{default:Rn(()=>[Xe(jo(bT),null,{default:Rn(()=>[Xe(jo(oh))]),_:1})]),_:1})]),_:1},8,["theme"]))}}),KE="modulepreload",qE=function(e){return"/web/"+e},yc={},XE=function(o,t,r){if(!t||t.length===0)return o();const n=document.getElementsByTagName("link");return Promise.all(t.map(i=>{if(i=qE(i),i in yc)return;yc[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let c=n.length-1;c>=0;c--){const u=n[c];if(u.href===i&&(!s||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":KE,s||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),s)return new Promise((c,u)=>{d.addEventListener("load",c),d.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>o()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})},YE=DE({history:hE("/web"),routes:[{path:"/",name:"chat",component:()=>XE(()=>import("./index-f973085b.js"),["assets/index-f973085b.js","assets/index-1dc749ba.css"])}]}),pl=Pm(GE);Vm(pl);pl.use(YE);pl.mount("#app");export{Hu as $,Uo as A,iu as B,Cb as C,E as D,Xb as E,rr as F,ad as G,cd as H,na as I,Ws as J,iI as K,ev as L,hg as M,Ra as N,Zs as O,dr as P,w0 as Q,wu as R,Js as S,y0 as T,Un as U,Ha as V,Wv as W,fr as X,ex as Y,eC as Z,sn as _,Xo as a,ps as a$,ir as a0,di as a1,Ja as a2,Tu as a3,pr as a4,Iu as a5,ur as a6,jt as a7,yu as a8,Su as a9,Vs as aA,dI as aB,zs as aC,Vt as aD,Ub as aE,Ns as aF,ob as aG,$v as aH,Ue as aI,hI as aJ,eb as aK,Go as aL,ri as aM,jn as aN,Ht as aO,tl as aP,nf as aQ,aa as aR,Kn as aS,pi as aT,el as aU,rl as aV,la as aW,X1 as aX,Gu as aY,Nu as aZ,Uu as a_,as as aa,xu as ab,Yx as ac,Nv as ad,ht as ae,an as af,He as ag,se as ah,U as ai,Wt as aj,vo as ak,hr as al,ol as am,Zo as an,pe as ao,wt as ap,pt as aq,ve as ar,ns as as,R1 as at,ln as au,cn as av,Ro as aw,Ku as ax,P1 as ay,sa as az,ou as b,eI as b$,Vu as b0,G1 as b1,aI as b2,tS as b3,Iv as b4,Po as b5,nn as b6,uI as b7,zf as b8,gi as b9,dT as bA,Sp as bB,$P as bC,zP as bD,XP as bE,QP as bF,l2 as bG,R2 as bH,nc as bI,Pd as bJ,z2 as bK,Bm as bL,As as bM,oI as bN,ZE as bO,Fs as bP,Rn as bQ,Rd as bR,Xe as bS,rI as bT,jo as bU,qr as bV,$w as bW,Mm as bX,UE as bY,Ob as bZ,VE as b_,pI as ba,Ff as bb,Nf as bc,ts as bd,Wn as be,qy as bf,ll as bg,gw as bh,Jm as bi,to as bj,dp as bk,sI as bl,s$ as bm,Gs as bn,vt as bo,Us as bp,Da as bq,Qu as br,rT as bs,Ss as bt,gI as bu,k$ as bv,Ko as bw,Qd as bx,Pb as by,D$ as bz,ne as c,Ne as c0,nI as c1,yy as c2,Oi as c3,ic as c4,tI as c5,ys as c6,QE as c7,JE as c8,th as c9,Ye as ca,Ft as d,bt as e,so as f,ni as g,Ks as h,Ae as i,zo as j,So as k,lI as l,Fb as m,Wb as n,wo as o,Nb as p,_e as q,te as r,ro as s,ba as t,is as u,Ul as v,Lo as w,Ui as x,fI as y,ci as z}; +- 你应该总是使用一种随意的, 年轻女性的语气。避免过度正式或老式的表达方式。`),I=te(""),w=te(),v=async()=>{const ie=await NE.getSysConfig();return ie.code===th.OK&&(w.value={...w.value,...ie.data}),ie},S=()=>Ye.get(e)||"",P=async()=>{var Qe,ue,R,K;await fetch("/search?q=Bing+AI&showconv=1&FORM=hpcodx&ajaxhist=0&ajaxserp=0&cc=us",{credentials:"include"});const ie=Ye.get(r)||"",Ie=Ye.get(s)||"";ie!==""&&(Ie===""?(Ye.set(s,"CMUID="+ie),Ye.set(l,"CMUID="+ie)):Ie.indexOf("CMUID=")===-1&&(Ye.set(s,Ie+"&CMUID="+ie),Ye.set(l,"CMUID="+ie)));const Ge=S();if(!VE()&&(!d.value||!Ge||x.value)){const M=document.querySelector("cib-serp"),X=(K=(R=(ue=(Qe=M==null?void 0:M.shadowRoot)==null?void 0:Qe.querySelector("cib-conversation"))==null?void 0:ue.querySelector("cib-side-panel"))==null?void 0:R.shadowRoot)==null?void 0:K.querySelector(".main");if(f.value==="v1")CIB.vm.sidePanel.panels=[{type:"plugins",label:"插件"}],CIB.vm.sidePanel.selectedPanel="plugins";else{const Ce=X==null?void 0:X.querySelector(".threads-header"),Pe=X==null?void 0:X.querySelector(".threads-container");Ce.style.display="none",Pe.style.display="none"}}},O=ie=>{Ye.set(e,ie,7*24*60,"/")},V=ie=>{Ye.set(n,ie)},z=ie=>{Ye.set(i,ie),I.value=ie},Z=async()=>{localStorage.clear(),sessionStorage.clear();const ie=await caches.keys();for(const Ie of ie)await caches.delete(Ie),console.log("del cache : ",Ie)};return{sysConfig:w,getSysConfig:v,getUserToken:S,checkUserToken:P,saveUserToken:O,resetCache:async()=>{const ie=document.cookie.split(";");if(ie)for(let Ie=ie.length;Ie--;)document.cookie=ie[Ie].split("=")[0]+"=0; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";await Z(),"serviceWorker"in navigator&&await navigator.serviceWorker.ready.then(async Ie=>{await Ie.unregister()})},setAuthKey:V,setPassServer:z,getUserKievRPSSecAuth:()=>Ye.get(o)||"",saveUserKievRPSSecAuth:ie=>{Ye.set(o,ie,7*24*60,"/")},getUserRwBf:()=>Ye.get(t)||"",saveUserRwBf:ie=>{Ye.set(t,ie,7*24*60,"/")},getUserMUID:()=>Ye.get(r)||"",saveUserMUID:ie=>{Ye.set(r,ie,7*24*60,"/")},saveCookies:ie=>{const Ie=ie.split(";");for(const Ge of Ie){const Qe=Ge.split("="),ue=Qe[0].trim(),R=Qe.length>1?Qe.slice(1,Qe.length).join("=").trim():null;ue&&R&&Ye.set(ue,R,7*24*60,"/")}},cookiesStr:a,historyEnable:d,fullCookiesEnable:c,themeMode:u,uiVersion:f,langRegion:h,autoReopenMic:p,enterpriseEnable:x,copilotProEnable:C,customChatNum:m,gpt4tEnable:y,sydneyEnable:H,sydneyPrompt:T,passServer:I}},{persist:{key:"user-store",storage:localStorage,paths:["historyEnable","themeMode","uiVersion","langRegion","autoReopenMic","fullCookiesEnable","cookiesStr","enterpriseEnable","copilotProEnable","customChatNum","gpt4tEnable","sydneyEnable","sydneyPrompt","passServer"]}}),GE=_e({__name:"App",setup(e){const o=UE(),{themeMode:t}=Mm(o),r=te(Oi);ro("theme",r),Xo(()=>{const i=document.querySelector("body");t.value=="light"?(r.value=Oi,i==null||i.setAttribute("style","background-color: #f0f0f0")):t.value=="dark"?(r.value=ic,i==null||i.setAttribute("style","background-color: #111111")):t.value=="auto"&&(Ob().value=="dark"?(r.value=ic,i==null||i.setAttribute("style","background-color: #111111")):(r.value=Oi,i==null||i.setAttribute("style","background-color: #f0f0f0")))});const n={common:{primaryColor:"#2080F0FF",primaryColorHover:"#4098FCFF",primaryColorPressed:"#1060C9FF",primaryColorSuppl:"#4098FCFF"}};return(i,s)=>(As(),Fs(jo(yy),{theme:r.value,"theme-overrides":n},{default:Rn(()=>[Xe(jo(Iw),null,{default:Rn(()=>[Xe(jo(bT),null,{default:Rn(()=>[Xe(jo(oh))]),_:1})]),_:1})]),_:1},8,["theme"]))}}),KE="modulepreload",qE=function(e){return"/web/"+e},yc={},XE=function(o,t,r){if(!t||t.length===0)return o();const n=document.getElementsByTagName("link");return Promise.all(t.map(i=>{if(i=qE(i),i in yc)return;yc[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let c=n.length-1;c>=0;c--){const u=n[c];if(u.href===i&&(!s||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":KE,s||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),s)return new Promise((c,u)=>{d.addEventListener("load",c),d.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>o()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})},YE=DE({history:hE("/web"),routes:[{path:"/",name:"chat",component:()=>XE(()=>import("./index-43b76bd9.js"),["assets/index-43b76bd9.js","assets/index-1dc749ba.css"])}]}),pl=Pm(GE);Vm(pl);pl.use(YE);pl.mount("#app");export{Hu as $,Uo as A,iu as B,Cb as C,E as D,Xb as E,rr as F,ad as G,cd as H,na as I,Ws as J,iI as K,ev as L,hg as M,Ra as N,Zs as O,dr as P,w0 as Q,wu as R,Js as S,y0 as T,Un as U,Ha as V,Wv as W,fr as X,ex as Y,eC as Z,sn as _,Xo as a,ps as a$,ir as a0,di as a1,Ja as a2,Tu as a3,pr as a4,Iu as a5,ur as a6,jt as a7,yu as a8,Su as a9,Vs as aA,dI as aB,zs as aC,Vt as aD,Ub as aE,Ns as aF,ob as aG,$v as aH,Ue as aI,hI as aJ,eb as aK,Go as aL,ri as aM,jn as aN,Ht as aO,tl as aP,nf as aQ,aa as aR,Kn as aS,pi as aT,el as aU,rl as aV,la as aW,X1 as aX,Gu as aY,Nu as aZ,Uu as a_,as as aa,xu as ab,Yx as ac,Nv as ad,ht as ae,an as af,He as ag,se as ah,U as ai,Wt as aj,vo as ak,hr as al,ol as am,Zo as an,pe as ao,wt as ap,pt as aq,ve as ar,ns as as,R1 as at,ln as au,cn as av,Ro as aw,Ku as ax,P1 as ay,sa as az,ou as b,eI as b$,Vu as b0,G1 as b1,aI as b2,tS as b3,Iv as b4,Po as b5,nn as b6,uI as b7,zf as b8,gi as b9,dT as bA,Sp as bB,$P as bC,zP as bD,XP as bE,QP as bF,l2 as bG,R2 as bH,nc as bI,Pd as bJ,z2 as bK,Bm as bL,As as bM,oI as bN,ZE as bO,Fs as bP,Rn as bQ,Rd as bR,Xe as bS,rI as bT,jo as bU,qr as bV,$w as bW,Mm as bX,UE as bY,Ob as bZ,VE as b_,pI as ba,Ff as bb,Nf as bc,ts as bd,Wn as be,qy as bf,ll as bg,gw as bh,Jm as bi,to as bj,dp as bk,sI as bl,s$ as bm,Gs as bn,vt as bo,Us as bp,Da as bq,Qu as br,rT as bs,Ss as bt,gI as bu,k$ as bv,Ko as bw,Qd as bx,Pb as by,D$ as bz,ne as c,Ne as c0,nI as c1,yy as c2,Oi as c3,ic as c4,tI as c5,ys as c6,QE as c7,JE as c8,th as c9,Ye as ca,Ft as d,bt as e,so as f,ni as g,Ks as h,Ae as i,zo as j,So as k,lI as l,Fb as m,Wb as n,wo as o,Nb as p,_e as q,te as r,ro as s,ba as t,is as u,Ul as v,Lo as w,Ui as x,fI as y,ci as z}; diff --git a/web/index.html b/web/index.html index 224c1fcf86..31a80c1431 100644 --- a/web/index.html +++ b/web/index.html @@ -569,7 +569,7 @@ } } - + diff --git a/web/sw.js b/web/sw.js index c94dc440de..71f1e80cf4 100644 --- a/web/sw.js +++ b/web/sw.js @@ -1,2 +1,2 @@ try{self["workbox:core:6.5.4"]&&_()}catch{}const z=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},J=z;class l extends Error{constructor(e,t){const n=J(e,t);super(n),this.name=e,this.details=t}}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},D=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),X=s=>{for(const e of Object.keys(d))s(e)},b={updateDetails:s=>{X(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||D(d.googleAnalytics),getPrecacheName:s=>s||D(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||D(d.runtime),getSuffix:()=>d.suffix};function O(s,e){const t=e();return s.waitUntil(t),t}try{self["workbox:precaching:6.5.4"]&&_()}catch{}const Y="__WB_REVISION__";function Z(s){if(!s)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const r=new URL(s,location.href);return{cacheKey:r.href,url:r.href}}const{revision:e,url:t}=s;if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:s});if(!e){const r=new URL(t,location.href);return{cacheKey:r.href,url:r.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(Y,e),{cacheKey:n.href,url:a.href}}class ee{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class te{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}let w;function se(){if(w===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),w=!0}catch{w=!1}w=!1}return w}async function ne(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new l("cross-origin-copy-response",{origin:t});const n=s.clone(),a={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=e?e(a):a,i=se()?n.body:await n.blob();return new Response(i,r)}const ae=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function S(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function re(s,e,t,n){const a=S(e.url,t);if(e.url===a)return s.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,r);for(const c of i){const o=S(c.url,t);if(a===o)return s.match(c,n)}}class ie{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const F=new Set;async function ce(){for(const s of F)await s()}function oe(s){return new Promise(e=>setTimeout(e,s))}try{self["workbox:strategies:6.5.4"]&&_()}catch{}function C(s){return typeof s=="string"?new Request(s):s}class he{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new ie,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=C(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new l("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=C(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=C(e);await oe(0);const a=await this.getCacheKey(n,"write");if(!t)throw new l("cache-put-with-no-response",{url:ae(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),h=this.hasCallback("cacheDidUpdate"),m=h?await re(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,h?r.clone():r)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await ce(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:i,oldResponse:m,newResponse:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=C(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class N{constructor(e={}){this.cacheName=b.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,r=new he(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new l("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,error:i}),t.destroy(),i)throw i}}class p extends N{constructor(e={}){e.cacheName=b.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const a=t.params||{};if(this._fallbackToNetwork){const r=a.integrity,i=e.integrity,c=!i||i===r;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||r:void 0})),r&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new l("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new l("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==p.copyRedirectedCacheableResponsesPlugin&&(a===p.defaultPrecacheCacheabilityPlugin&&(e=n),a.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ne(s):s}};class le{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:b.getPrecacheName(e),plugins:[...t,new te({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:a,url:r}=Z(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(r)&&this._urlsToCacheKeys.get(r)!==a)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(r),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:r});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(r,a),this._urlsToCacheModes.set(r,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return O(e,async()=>{const t=new ee;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),h=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return O(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const M=()=>(L||(L=new le),L);try{self["workbox:routing:6.5.4"]&&_()}catch{}const H="GET",x=s=>s&&typeof s=="object"?s:{handle:s};class g{constructor(e,t,n=H){this.handler=x(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=x(e)}}class ue extends g{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class de{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:n,request:e,event:t,params:r})}catch(u){h=Promise.reject(u)}const m=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||m)&&(h=h.catch(async u=>{if(m)try{return await m.handle({url:n,request:e,event:t,params:r})}catch(K){K instanceof Error&&(u=K)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=H){this._defaultHandlerMap.set(t,x(e))}setCatchHandler(e){this._catchHandler=x(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const fe=()=>(y||(y=new de,y.addFetchListener(),y.addCacheListener()),y);function E(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new g(i,e,t)}else if(s instanceof RegExp)n=new ue(s,e,t);else if(typeof s=="function")n=new g(s,e,t);else if(s instanceof g)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return fe().registerRoute(n),n}function pe(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*ge(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=pe(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class me extends g{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of ge(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function we(s){const e=M(),t=new me(e,s);E(t)}const ye="-precache-",_e=async(s,e=ye)=>{const n=(await self.caches.keys()).filter(a=>a.includes(e)&&a.includes(self.registration.scope)&&a!==s);return await Promise.all(n.map(a=>self.caches.delete(a))),n};function Re(){self.addEventListener("activate",s=>{const e=b.getPrecacheName();s.waitUntil(_e(e).then(t=>{}))})}function be(s){return M().createHandlerBoundToURL(s)}function Ce(s){M().precache(s)}function xe(s,e){Ce(s),we(e)}class Ee extends g{constructor(e,{allowlist:t=[/./],denylist:n=[]}={}){super(a=>this._match(a),e),this._allowlist=t,this._denylist=n}_match({url:e,request:t}){if(t&&t.mode!=="navigate")return!1;const n=e.pathname+e.search;for(const a of this._denylist)if(a.test(n))return!1;return!!this._allowlist.some(a=>a.test(n))}}class De extends N{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(r){r instanceof Error&&(a=r)}if(!n)throw new l("no-response",{url:e.url,error:a});return n}}const Le={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Ue extends N{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Le)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new l("no-response",{url:e.url,error:r});return a}}try{self["workbox:core:6.6.0"]&&_()}catch{}try{self["workbox:cacheable-response:6.6.0"]&&_()}catch{}class Te{constructor(e={}){this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){let t=!0;return this._statuses&&(t=this._statuses.includes(e.status)),this._headers&&t&&(t=Object.keys(this._headers).some(n=>e.headers.get(n)===this._headers[n])),t}}class q{constructor(e){this.cacheWillUpdate=async({response:t})=>this._cacheableResponse.isResponseCacheable(t)?t:null,this._cacheableResponse=new Te(e)}}function V(s){s.then(()=>{})}const ke=(s,e)=>e.some(t=>s instanceof t);let v,W;function Pe(){return v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ie(){return W||(W=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const $=new WeakMap,P=new WeakMap,G=new WeakMap,U=new WeakMap,A=new WeakMap;function Ne(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(f(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&$.set(t,s)}).catch(()=>{}),A.set(e,s),e}function Me(s){if(P.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});P.set(s,e)}let I={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return P.get(s);if(e==="objectStoreNames")return s.objectStoreNames||G.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Ae(s){I=s(I)}function Ke(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(T(this),e,...t);return G.set(n,e.sort?e.sort():[e]),f(n)}:Ie().includes(s)?function(...e){return s.apply(T(this),e),f($.get(this))}:function(...e){return f(s.apply(T(this),e))}}function Oe(s){return typeof s=="function"?Ke(s):(s instanceof IDBTransaction&&Me(s),ke(s,Pe())?new Proxy(s,I):s)}function f(s){if(s instanceof IDBRequest)return Ne(s);if(U.has(s))return U.get(s);const e=Oe(s);return e!==s&&(U.set(s,e),A.set(e,s)),e}const T=s=>A.get(s);function Se(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),c}function ve(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const We=["get","getKey","getAll","getAllKeys","count"],Be=["put","add","delete","clear"],k=new Map;function B(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(k.get(e))return k.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=Be.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||We.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let h=o.store;return n&&(h=h.index(c.shift())),(await Promise.all([h[t](...c),a&&o.done]))[0]};return k.set(e,r),r}Ae(s=>({...s,get:(e,t,n)=>B(e,t)||s.get(e,t,n),has:(e,t)=>!!B(e,t)||s.has(e,t)}));try{self["workbox:expiration:6.5.4"]&&_()}catch{}const je="workbox-expiration",R="cache-entries",j=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Fe{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(R,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&ve(this._cacheName)}async setTimestamp(e,t){e=j(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(R,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(R,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(R).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(R,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+j(e)}async getDb(){return this._db||(this._db=await Se(je,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class He{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Fe(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,V(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);V(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&qe(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===b.getRuntimeName())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new He(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}const Q="BingAI";self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});xe([{"revision":null,"url":"assets/index-1dc749ba.css"},{"revision":null,"url":"assets/index-7683bcc0.css"},{"revision":null,"url":"assets/index-936a7da4.js"},{"revision":null,"url":"assets/index-f973085b.js"},{"revision":"c82421f6ab99e040562fc65cc79b1567","url":"compose.html"},{"revision":"b8469eaf74a3c11a2bd997ed3c0d20c5","url":"css/bing.css"},{"revision":"27d6d709218f7ec5b0d4b4177ee9682d","url":"index.html"},{"revision":"92aff8547a1079aa9cd31a0d1f9add5a","url":"js/bing/chat/amd.js"},{"revision":"2a4060ba1026c4d5d1746d15a0ed8c22","url":"js/bing/chat/config.js"},{"revision":"ab21af299ac664ea1ad18c296e65b28f","url":"js/bing/chat/core.js"},{"revision":"93d2fc9f64156d419a38e4b5921a23f8","url":"js/bing/chat/global.js"},{"revision":"563d0716a863a6b16bb598cf306fce51","url":"js/bing/chat/lib.js"},{"revision":"bf6c2f29aef95e09b1f72cf59f427a55","url":"registerSW.js"},{"revision":"1da58864f14c1a8c28f8587d6dcbc5d0","url":"img/logo.svg"},{"revision":"be40443731d9d4ead5e9b1f1a6070135","url":"./img/pwa/logo-192.png"},{"revision":"1217f1c90acb9f231e3135fa44af7efc","url":"./img/pwa/logo-512.png"},{"revision":"5e5048c8a928b9d4bd7d262e1f7a5976","url":"manifest.webmanifest"}]);Re();E(new Ee(be("./index.html")));E(({request:s,url:e})=>s.destination==="style"||s.destination==="manifest"||s.destination==="script"||s.destination==="worker",new Ue({cacheName:`${Q}-assets`,plugins:[new q({statuses:[200]})]}));E(({request:s,url:e})=>e.pathname.includes("hm.gif")||e.pathname.includes("/fd/ls/")?!1:s.destination==="image",new De({cacheName:`${Q}-images`,plugins:[new q({statuses:[200]}),new Ve({maxEntries:100,maxAgeSeconds:60*60*24*30})]}));self.addEventListener("install",s=>{self.skipWaiting()}); +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return O(e,async()=>{const t=new ee;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),h=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:h,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return O(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const M=()=>(L||(L=new le),L);try{self["workbox:routing:6.5.4"]&&_()}catch{}const H="GET",x=s=>s&&typeof s=="object"?s:{handle:s};class g{constructor(e,t,n=H){this.handler=x(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=x(e)}}class ue extends g{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class de{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:n,request:e,event:t,params:r})}catch(u){h=Promise.reject(u)}const m=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||m)&&(h=h.catch(async u=>{if(m)try{return await m.handle({url:n,request:e,event:t,params:r})}catch(K){K instanceof Error&&(u=K)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=H){this._defaultHandlerMap.set(t,x(e))}setCatchHandler(e){this._catchHandler=x(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const fe=()=>(y||(y=new de,y.addFetchListener(),y.addCacheListener()),y);function E(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new g(i,e,t)}else if(s instanceof RegExp)n=new ue(s,e,t);else if(typeof s=="function")n=new g(s,e,t);else if(s instanceof g)n=s;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return fe().registerRoute(n),n}function pe(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*ge(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=pe(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class me extends g{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of ge(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function we(s){const e=M(),t=new me(e,s);E(t)}const ye="-precache-",_e=async(s,e=ye)=>{const n=(await self.caches.keys()).filter(a=>a.includes(e)&&a.includes(self.registration.scope)&&a!==s);return await Promise.all(n.map(a=>self.caches.delete(a))),n};function Re(){self.addEventListener("activate",s=>{const e=b.getPrecacheName();s.waitUntil(_e(e).then(t=>{}))})}function be(s){return M().createHandlerBoundToURL(s)}function Ce(s){M().precache(s)}function xe(s,e){Ce(s),we(e)}class Ee extends g{constructor(e,{allowlist:t=[/./],denylist:n=[]}={}){super(a=>this._match(a),e),this._allowlist=t,this._denylist=n}_match({url:e,request:t}){if(t&&t.mode!=="navigate")return!1;const n=e.pathname+e.search;for(const a of this._denylist)if(a.test(n))return!1;return!!this._allowlist.some(a=>a.test(n))}}class De extends N{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(r){r instanceof Error&&(a=r)}if(!n)throw new l("no-response",{url:e.url,error:a});return n}}const Le={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Ue extends N{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Le)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new l("no-response",{url:e.url,error:r});return a}}try{self["workbox:core:6.6.0"]&&_()}catch{}try{self["workbox:cacheable-response:6.6.0"]&&_()}catch{}class Te{constructor(e={}){this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){let t=!0;return this._statuses&&(t=this._statuses.includes(e.status)),this._headers&&t&&(t=Object.keys(this._headers).some(n=>e.headers.get(n)===this._headers[n])),t}}class q{constructor(e){this.cacheWillUpdate=async({response:t})=>this._cacheableResponse.isResponseCacheable(t)?t:null,this._cacheableResponse=new Te(e)}}function V(s){s.then(()=>{})}const ke=(s,e)=>e.some(t=>s instanceof t);let v,W;function Pe(){return v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ie(){return W||(W=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const $=new WeakMap,P=new WeakMap,G=new WeakMap,U=new WeakMap,A=new WeakMap;function Ne(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(f(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&$.set(t,s)}).catch(()=>{}),A.set(e,s),e}function Me(s){if(P.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});P.set(s,e)}let I={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return P.get(s);if(e==="objectStoreNames")return s.objectStoreNames||G.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Ae(s){I=s(I)}function Ke(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(T(this),e,...t);return G.set(n,e.sort?e.sort():[e]),f(n)}:Ie().includes(s)?function(...e){return s.apply(T(this),e),f($.get(this))}:function(...e){return f(s.apply(T(this),e))}}function Oe(s){return typeof s=="function"?Ke(s):(s instanceof IDBTransaction&&Me(s),ke(s,Pe())?new Proxy(s,I):s)}function f(s){if(s instanceof IDBRequest)return Ne(s);if(U.has(s))return U.get(s);const e=Oe(s);return e!==s&&(U.set(s,e),A.set(e,s)),e}const T=s=>A.get(s);function Se(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",h=>a(h.oldVersion,h.newVersion,h))}).catch(()=>{}),c}function ve(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const We=["get","getKey","getAll","getAllKeys","count"],Be=["put","add","delete","clear"],k=new Map;function B(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(k.get(e))return k.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=Be.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||We.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let h=o.store;return n&&(h=h.index(c.shift())),(await Promise.all([h[t](...c),a&&o.done]))[0]};return k.set(e,r),r}Ae(s=>({...s,get:(e,t,n)=>B(e,t)||s.get(e,t,n),has:(e,t)=>!!B(e,t)||s.has(e,t)}));try{self["workbox:expiration:6.5.4"]&&_()}catch{}const je="workbox-expiration",R="cache-entries",j=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Fe{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(R,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&ve(this._cacheName)}async setTimestamp(e,t){e=j(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(R,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(R,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(R).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(R,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+j(e)}async getDb(){return this._db||(this._db=await Se(je,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class He{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Fe(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,V(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);V(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&qe(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===b.getRuntimeName())throw new l("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new He(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}const Q="BingAI";self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});xe([{"revision":null,"url":"assets/index-1dc749ba.css"},{"revision":null,"url":"assets/index-43b76bd9.js"},{"revision":null,"url":"assets/index-7683bcc0.css"},{"revision":null,"url":"assets/index-ce055589.js"},{"revision":"c82421f6ab99e040562fc65cc79b1567","url":"compose.html"},{"revision":"b8469eaf74a3c11a2bd997ed3c0d20c5","url":"css/bing.css"},{"revision":"a0cbae6fb8634d114d933834f34fe12f","url":"index.html"},{"revision":"92aff8547a1079aa9cd31a0d1f9add5a","url":"js/bing/chat/amd.js"},{"revision":"2a4060ba1026c4d5d1746d15a0ed8c22","url":"js/bing/chat/config.js"},{"revision":"ab21af299ac664ea1ad18c296e65b28f","url":"js/bing/chat/core.js"},{"revision":"93d2fc9f64156d419a38e4b5921a23f8","url":"js/bing/chat/global.js"},{"revision":"563d0716a863a6b16bb598cf306fce51","url":"js/bing/chat/lib.js"},{"revision":"bf6c2f29aef95e09b1f72cf59f427a55","url":"registerSW.js"},{"revision":"1da58864f14c1a8c28f8587d6dcbc5d0","url":"img/logo.svg"},{"revision":"be40443731d9d4ead5e9b1f1a6070135","url":"./img/pwa/logo-192.png"},{"revision":"1217f1c90acb9f231e3135fa44af7efc","url":"./img/pwa/logo-512.png"},{"revision":"5e5048c8a928b9d4bd7d262e1f7a5976","url":"manifest.webmanifest"}]);Re();E(new Ee(be("./index.html")));E(({request:s,url:e})=>s.destination==="style"||s.destination==="manifest"||s.destination==="script"||s.destination==="worker",new Ue({cacheName:`${Q}-assets`,plugins:[new q({statuses:[200]})]}));E(({request:s,url:e})=>e.pathname.includes("hm.gif")||e.pathname.includes("/fd/ls/")?!1:s.destination==="image",new De({cacheName:`${Q}-images`,plugins:[new q({statuses:[200]}),new Ve({maxEntries:100,maxAgeSeconds:60*60*24*30})]}));self.addEventListener("install",s=>{self.skipWaiting()});