(self["webpackChunkwordhelper"]=self["webpackChunkwordhelper"]||[]).push([[986],{1576:function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",l="minute",i="hour",o="day",s="week",u="month",d="quarter",c="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var o=t.name;x[o]=t,a=o}return!r&&a&&(y=a),a||!r&&y},$=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},_=b;_.l=A,_.i=k,_.w=function(e,t){return $(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function v(e){this.$L=A(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var a=r[2]-1||0,l=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,l)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,l)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return _},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=$(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return $(e){const t=String(e).split(".")[1];return t?t.length:0},I=t=>{const n=[e.min,e.max,e.step,t].map(e=>void 0===e?0:A(e));return Math.max(...n)},F=(0,x.A)(()=>{const{placeholder:t}=e;return void 0!==t?t:o.value.placeholder}),S=(0,x.A)(()=>{const t=K(e.step);return null!==t?0===t?1:Math.abs(t):1}),E=(0,x.A)(()=>{const t=K(e.min);return null!==t?t:null}),T=(0,x.A)(()=>{const t=K(e.max);return null!==t?t:null}),B=()=>{const{value:t}=w;if(W(t)){const{format:n,precision:r}=e;n?k.value=n(t):null===t||void 0===r||A(t)>r?k.value=j(t,void 0):k.value=j(t,r)}else k.value=String(t)};B();const O=t=>{const{value:n}=w;if(t===n)return void B();const{"onUpdate:value":r,onUpdateValue:a,onChange:l}=e,{nTriggerFormInput:i,nTriggerFormChange:o}=s;l&&(0,D.T)(l,t),a&&(0,D.T)(a,t),r&&(0,D.T)(r,t),h.value=t,i(),o()},z=({offset:t,doUpdateIfValid:n,fixPrecision:r,isInputing:a})=>{const{value:l}=k;if(a&&U(l))return!1;const i=(e.parse||V)(l);if(null===i)return n&&O(null),null;if(W(i)){const l=A(i),{precision:o}=e;if(void 0!==o&&ot){if(!n||a)return!1;s=t}if(null!==r&&s{const e=z({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1});return!1===e}),Y=(0,x.A)(()=>{const{value:t}=w;if(e.validator&&null===t)return!1;const{value:n}=S,r=z({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1});return!1!==r}),q=(0,x.A)(()=>{const{value:t}=w;if(e.validator&&null===t)return!1;const{value:n}=S,r=z({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1});return!1!==r});function Q(t){const{onFocus:n}=e,{nTriggerFormFocus:r}=s;n&&(0,D.T)(n,t),r()}function G(t){var n,a;if(t.target===(null===(n=f.value)||void 0===n?void 0:n.wrapperElRef))return;const l=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(!1!==l){const e=null===(a=f.value)||void 0===a?void 0:a.inputElRef;e&&(e.value=String(l||"")),w.value===l&&B()}else B();const{onBlur:i}=e,{nTriggerFormBlur:o}=s;i&&(0,D.T)(i,t),o(),(0,r.dY)(()=>{B()})}function Z(t){const{onClear:n}=e;n&&(0,D.T)(n,t)}function J(){const{value:t}=q;if(!t)return void ce();const{value:n}=w;if(null===n)e.validator||O(re());else{const{value:e}=S;z({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function ee(){const{value:t}=Y;if(!t)return void ue();const{value:n}=w;if(null===n)e.validator||O(re());else{const{value:e}=S;z({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const te=Q,ne=G;function re(){if(e.validator)return null;const{value:t}=E,{value:n}=T;return null!==t?Math.max(0,t):null!==n?Math.min(0,n):0}function ae(e){Z(e),O(null)}function le(e){var t,n,r;(null===(t=m.value)||void 0===t?void 0:t.$el.contains(e.target))&&e.preventDefault(),(null===(n=p.value)||void 0===n?void 0:n.$el.contains(e.target))&&e.preventDefault(),null===(r=f.value)||void 0===r||r.activate()}let ie=null,oe=null,se=null;function ue(){se&&(window.clearTimeout(se),se=null),ie&&(window.clearInterval(ie),ie=null)}let de=null;function ce(){de&&(window.clearTimeout(de),de=null),oe&&(window.clearInterval(oe),oe=null)}function fe(){ue(),se=window.setTimeout(()=>{ie=window.setInterval(()=>{ee()},X)},H),(0,g.on)("mouseup",document,ue,{once:!0})}function pe(){ce(),de=window.setTimeout(()=>{oe=window.setInterval(()=>{J()},X)},H),(0,g.on)("mouseup",document,ce,{once:!0})}const me=()=>{oe||J()},he=()=>{ie||ee()};function ve(t){var n,r;if("Enter"===t.key){if(t.target===(null===(n=f.value)||void 0===n?void 0:n.wrapperElRef))return;const e=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});!1!==e&&(null===(r=f.value)||void 0===r||r.deactivate())}else if("ArrowUp"===t.key){if(!q.value)return;if(!1===e.keyboard.ArrowUp)return;t.preventDefault();const n=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});!1!==n&&J()}else if("ArrowDown"===t.key){if(!Y.value)return;if(!1===e.keyboard.ArrowDown)return;t.preventDefault();const n=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});!1!==n&&ee()}}function ge(t){k.value=t,!e.updateValueOnInput||e.format||e.parse||void 0!==e.precision||z({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}(0,r.wB)(w,()=>{B()});const be={focus:()=>{var e;return null===(e=f.value)||void 0===e?void 0:e.focus()},blur:()=>{var e;return null===(e=f.value)||void 0===e?void 0:e.blur()},select:()=>{var e;return null===(e=f.value)||void 0===e?void 0:e.select()}},ye=(0,R.I)("InputNumber",l,n);return Object.assign(Object.assign({},be),{rtlEnabled:ye,inputInstRef:f,minusButtonInstRef:p,addButtonInstRef:m,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:h,mergedValue:w,mergedPlaceholder:F,displayedValueInvalid:L,mergedSize:u,mergedDisabled:d,displayedValue:k,addable:q,minusable:Y,mergedStatus:c,handleFocus:te,handleBlur:ne,handleClear:ae,handleMouseDown:le,handleAddClick:me,handleMinusClick:he,handleAddMousedown:pe,handleMinusMousedown:fe,handleKeyDown:ve,handleUpdateDisplayedValue:ge,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:(0,r.EW)(()=>{const{self:{iconColorDisabled:e}}=i.value,[t,n,r,a]=(0,b.B3)(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${a}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>(0,r.h)(F.b2,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>(0,I.Nj)(t["minus-icon"],()=>[(0,r.h)(w.A,{clsPrefix:e},{default:()=>(0,r.h)(k,null)})])}),a=()=>(0,r.h)(F.b2,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>(0,I.Nj)(t["add-icon"],()=>[(0,r.h)(w.A,{clsPrefix:e},{default:()=>(0,r.h)(A.A,null)})])});return(0,r.h)("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},(0,r.h)(S.A,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var a;return this.showButton&&"both"===this.buttonPlacement?[n(),(0,I.iQ)(t.prefix,t=>t?(0,r.h)("span",{class:`${e}-input-number-prefix`},t):null)]:null===(a=t.prefix)||void 0===a?void 0:a.call(t)},suffix:()=>{var l;return this.showButton?[(0,I.iQ)(t.suffix,t=>t?(0,r.h)("span",{class:`${e}-input-number-suffix`},t):null),"right"===this.buttonPlacement?n():null,a()]:null===(l=t.suffix)||void 0===l?void 0:l.call(t)}}))}}),Q=n(19605),G=n(92720),Z=n(68042),J=(n(44114),n(25216)),ee=n(77727),te=n(14764),ne=n(92548),re=(0,L.cB)("collapse","width: 100%;",[(0,L.cB)("collapse-item","\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n margin: var(--n-item-margin);\n ",[(0,L.cM)("disabled",[(0,L.cE)("header","cursor: not-allowed;",[(0,L.cE)("header-main","\n color: var(--n-title-text-color-disabled);\n "),(0,L.cB)("collapse-item-arrow","\n color: var(--n-arrow-color-disabled);\n ")])]),(0,L.cB)("collapse-item","margin-left: 32px;"),(0,L.c)("&:first-child","margin-top: 0;"),(0,L.c)("&:first-child >",[(0,L.cE)("header","padding-top: 0;")]),(0,L.cM)("left-arrow-placement",[(0,L.cE)("header",[(0,L.cB)("collapse-item-arrow","margin-right: 4px;")])]),(0,L.cM)("right-arrow-placement",[(0,L.cE)("header",[(0,L.cB)("collapse-item-arrow","margin-left: 4px;")])]),(0,L.cE)("content-wrapper",[(0,L.cE)("content-inner","padding-top: 16px;"),(0,ne._)({duration:"0.15s"})]),(0,L.cM)("active",[(0,L.cE)("header",[(0,L.cM)("active",[(0,L.cB)("collapse-item-arrow","transform: rotate(90deg);")])])]),(0,L.c)("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),(0,L.C5)("disabled",[(0,L.cM)("trigger-area-main",[(0,L.cE)("header",[(0,L.cE)("header-main","cursor: pointer;"),(0,L.cB)("collapse-item-arrow","cursor: default;")])]),(0,L.cM)("trigger-area-arrow",[(0,L.cE)("header",[(0,L.cB)("collapse-item-arrow","cursor: pointer;")])]),(0,L.cM)("trigger-area-extra",[(0,L.cE)("header",[(0,L.cE)("header-extra","cursor: pointer;")])])]),(0,L.cE)("header","\n font-size: var(--n-title-font-size);\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n transition: color .3s var(--n-bezier);\n position: relative;\n padding: var(--n-title-padding);\n color: var(--n-title-text-color);\n ",[(0,L.cE)("header-main","\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n color: var(--n-title-text-color);\n "),(0,L.cE)("header-extra","\n display: flex;\n align-items: center;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n "),(0,L.cB)("collapse-item-arrow","\n display: flex;\n transition:\n transform .15s var(--n-bezier),\n color .3s var(--n-bezier);\n font-size: 18px;\n color: var(--n-arrow-color);\n ")])])]);const ae=Object.assign(Object.assign({},$.A.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:"left"},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:"if"},triggerAreas:{type:Array,default:()=>["main","extra","arrow"]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),le=(0,ee.D)("n-collapse");var ie=(0,r.pM)({name:"Collapse",props:ae,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,inlineThemeDisabled:l,mergedRtlRef:i}=(0,_.Ay)(e),o=(0,a.KR)(e.defaultExpandedNames),s=(0,r.EW)(()=>e.expandedNames),u=(0,y.A)(s,o),d=(0,$.A)("Collapse","-collapse",re,te.A,e,n);function c(t){const{"onUpdate:expandedNames":n,onUpdateExpandedNames:r,onExpandedNamesChange:a}=e;r&&(0,D.T)(r,t),n&&(0,D.T)(n,t),a&&(0,D.T)(a,t),o.value=t}function f(t){const{onItemHeaderClick:n}=e;n&&(0,D.T)(n,t)}function p(t,n,r){const{accordion:a}=e,{value:l}=u;if(a)t?(c([n]),f({name:n,expanded:!0,event:r})):(c([]),f({name:n,expanded:!1,event:r}));else if(Array.isArray(l)){const e=l.slice(),t=e.findIndex(e=>n===e);~t?(e.splice(t,1),c(e),f({name:n,expanded:!1,event:r})):(e.push(n),c(e),f({name:n,expanded:!0,event:r}))}else c([n]),f({name:n,expanded:!0,event:r})}(0,r.Gt)(le,{props:e,mergedClsPrefixRef:n,expandedNamesRef:u,slots:t,toggleItem:p});const m=(0,R.I)("Collapse",i,n),h=(0,r.EW)(()=>{const{common:{cubicBezierEaseInOut:e},self:{titleFontWeight:t,dividerColor:n,titlePadding:r,titleTextColor:a,titleTextColorDisabled:l,textColor:i,arrowColor:o,fontSize:s,titleFontSize:u,arrowColorDisabled:c,itemMargin:f}}=d.value;return{"--n-font-size":s,"--n-bezier":e,"--n-text-color":i,"--n-divider-color":n,"--n-title-padding":r,"--n-title-font-size":u,"--n-title-text-color":a,"--n-title-text-color-disabled":l,"--n-title-font-weight":t,"--n-arrow-color":o,"--n-arrow-color-disabled":c,"--n-item-margin":f}}),v=l?(0,J.R)("collapse",void 0,h,e):void 0;return{rtlEnabled:m,mergedTheme:d,mergedClsPrefix:n,cssVars:l?void 0:h,themeClass:null===v||void 0===v?void 0:v.themeClass,onRender:null===v||void 0===v?void 0:v.onRender}},render(){var e;return null===(e=this.onRender)||void 0===e||e.call(this),(0,r.h)("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),oe=n(65049),se=n(11336),ue=(0,r.pM)({name:"ChevronLeft",render(){return(0,r.h)("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),de=n(86074),ce=n(35268),fe=n(74978),pe=n(55405),me=(0,r.pM)({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){const t=(0,fe.A)((0,a.lW)(e,"show"));return{onceTrue:t}},render(){return(0,r.h)(pe.A,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:n,clsPrefix:a}=this,i="show"===t&&n,o=(0,r.h)("div",{class:`${a}-collapse-item__content-wrapper`},(0,r.h)("div",{class:`${a}-collapse-item__content-inner`},this.$slots));return i?(0,r.bo)(o,[[l.aG,e]]):e?o:null}})}});const he={title:String,name:[String,Number],disabled:Boolean,displayDirective:String};var ve=(0,r.pM)({name:"CollapseItem",props:he,setup(e){const{mergedRtlRef:t}=(0,_.Ay)(e),n=(0,oe.sX)(),l=(0,x.A)(()=>{var t;return null!==(t=e.name)&&void 0!==t?t:n}),i=(0,r.WQ)(le);i||(0,ce.$8)("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:o,props:s,mergedClsPrefixRef:u,slots:d}=i,c=(0,r.EW)(()=>{const{value:e}=o;if(Array.isArray(e)){const{value:t}=l;return!~e.findIndex(e=>e===t)}if(e){const{value:t}=l;return t!==e}return!0}),f=(0,R.I)("Collapse",t,u);return{rtlEnabled:f,collapseSlots:d,randomName:n,mergedClsPrefix:u,collapsed:c,triggerAreas:(0,a.lW)(s,"triggerAreas"),mergedDisplayDirective:(0,r.EW)(()=>{const{displayDirective:t}=e;return t||s.displayDirective}),arrowPlacement:(0,r.EW)(()=>s.arrowPlacement),handleClick(t){let n="main";(0,se.d)(t,"arrow")&&(n="arrow"),(0,se.d)(t,"extra")&&(n="extra"),s.triggerAreas.includes(n)&&i&&!e.disabled&&i.toggleItem(c.value,l.value,t)}}},render(){const{collapseSlots:e,$slots:t,arrowPlacement:n,collapsed:a,mergedDisplayDirective:l,mergedClsPrefix:i,disabled:o,triggerAreas:s}=this,u=(0,I.Vu)(t.header,{collapsed:a},()=>[this.title]),d=t["header-extra"]||e["header-extra"],c=t.arrow||e.arrow;return(0,r.h)("div",{class:[`${i}-collapse-item`,`${i}-collapse-item--${n}-arrow-placement`,o&&`${i}-collapse-item--disabled`,!a&&`${i}-collapse-item--active`,s.map(e=>`${i}-collapse-item--trigger-area-${e}`)]},(0,r.h)("div",{class:[`${i}-collapse-item__header`,!a&&`${i}-collapse-item__header--active`]},(0,r.h)("div",{class:`${i}-collapse-item__header-main`,onClick:this.handleClick},"right"===n&&u,(0,r.h)("div",{class:`${i}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},(0,I.Vu)(c,{collapsed:a},()=>[(0,r.h)(w.A,{clsPrefix:i},{default:()=>this.rtlEnabled?(0,r.h)(ue,null):(0,r.h)(de.A,null)})])),"left"===n&&u),(0,I.aD)(d,{collapsed:a},e=>(0,r.h)("div",{class:`${i}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},e))),(0,r.h)(me,{clsPrefix:i,displayDirective:l,show:!a},t))}}),ge=n(22695),be=n(82089),ye=n(45525); /** * @license lucide-vue-next v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const xe=(0,ye.A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var we=n(91733); /** * @license lucide-vue-next v0.562.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const ke=(0,ye.A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var Ae=n(7023),$e=n(1576),_e=n.n($e),Ce=n(74911),Me=n(35720),Re=n(98728),De=n(15227);const Ie={class:"passage-view max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},Fe={class:"flex flex-col gap-4 mb-8"},Se={class:"flex items-center gap-2"},Ee={key:0},Te={key:0,class:"bg-blue-50 dark:bg-blue-900/20 p-4 rounded-lg flex items-start gap-3 mt-2"},Be={key:1,class:"bg-yellow-50 dark:bg-yellow-900/20 p-4 rounded-lg flex items-start gap-3 mt-2"},Oe={class:"max-w-2xl mx-auto"},ze={key:1,class:"text-gray-400 text-sm"},Pe={class:"max-w-4xl mx-auto space-y-6"},Le={key:0,class:"flex justify-center py-12"},Ne={key:1,class:"flex flex-col items-center justify-center py-16 text-center"},Ve={key:2,class:"space-y-6"},Ue={class:"flex items-center gap-1"},We=["innerHTML"],je=["innerHTML"],Ke=["innerHTML"],He={class:"mt-6 pt-4 border-t border-gray-100 dark:border-gray-800"},Xe={class:"flex items-center gap-2 mb-3"},Ye={class:"flex flex-wrap gap-2"},qe=["onClick"],Qe={key:0,class:"flex justify-center mt-8"},Ge={key:1,class:"text-center text-gray-400 text-sm mt-8"},Ze='Google Gemini',Je='OpenAI';var et={__name:"PassageView",setup(e){const t=(0,s.J)(),n=(0,Re.rd)(),g=(0,o.Pj)(),b=new Ce.A({html:!0,breaks:!0,linkify:!0}),y=(0,a.KR)("generate"),x=(0,a.KR)(!1),w=(0,a.KR)(!1),k=(0,a.KR)(!1),A=(0,a.KR)(!1),$=(0,a.KR)(!1),_=(0,a.KR)("unlimited"),C=(0,a.KR)(1),M=(0,a.KR)(!0),R=(0,a.KR)([]),D=(0,a.KR)([]),I=(0,a.KR)([]),S=(0,a.KR)([]),E=(0,r.EW)(()=>g.getters.userInfo),T=(0,r.EW)(()=>E.value?.is_vip),B=(0,a.Kh)({mode:0,count:5,dict_ids:[],list_ids:[],word_ids:[],model:"gemini-3-pro"}),O=[{label:"Gemini 3 Pro (推荐)",value:"gemini-3-pro"}],z=e=>_e()(e).format("YYYY年MM月DD日 HH:mm"),P=e=>b.render(e||""),L=e=>{const t=n.resolve({path:"/word",query:{word_id:e}});window.open(t.href,"_blank")},N=async()=>{k.value=!0;try{const e=await Me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/dict/list");0===e.data.code&&(D.value=e.data.data.map(e=>({label:e.name,value:e.id})))}catch(e){console.error("Fetch dicts error:",e)}finally{k.value=!1}},V=async e=>{if(e){A.value=!0;try{const t=await Me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/search",{keyword:e,page:1,limit:5}),n=t.data.data||t.data,r=new Set(B.word_ids),a=I.value.filter(e=>r.has(e.value)),l=(n.list||[]).map(e=>({label:e.word+(e.translations&&e.translations[0]?` (${e.translations[0].meaning})`:""),value:e.id})),i=[...a,...l],o=new Map;i.forEach(e=>o.set(e.value,e)),I.value=Array.from(o.values())}catch(t){console.error("Search words error:",t)}finally{A.value=!1}}},U=e=>{B.list_ids=B.list_ids.filter(t=>t!==e),S.value=S.value.filter(t=>t.id!==e)},W=async(e=!1)=>{if(!w.value){w.value=!0;try{const t=await Me.A.get("https://newfront.xn--xhq44jb2fzpc.com/word_helper/ai_passage/list",{params:{page:C.value}}),n=t.data,r=n.list||[],a=n.pagination||{};R.value=e?[...R.value,...r]:r,M.value=C.value<(a.total_pages||0)}catch(n){console.error("Fetch history error:",n),t.error("获取历史记录失败")}finally{w.value=!1}}},j=()=>{M.value&&(C.value++,W(!0))},K=async()=>{if(1===B.mode&&B.dict_ids.length,3!==B.mode||0!==B.list_ids.length)if(4!==B.mode||0!==B.word_ids.length){x.value=!0;try{const e={mode:B.mode,model:B.model,count:B.count};1===B.mode&&(e.dict_ids=B.dict_ids),3===B.mode&&(e.dict_ids=B.list_ids),4===B.mode&&(e.word_ids=B.word_ids);const n=await Me.A.post("https://newfront.xn--xhq44jb2fzpc.com/word_helper/ai_passage/generate",e);void 0!==n.data.remaining_usage&&(_.value=n.data.remaining_usage),t.success(`生成成功!剩余试用次数:${n.data.remaining_usage}`),y.value="history",C.value=1,W()}catch(e){console.error("Generate error:",e),e.response?.data?.message?t.error(e.response.data.message):t.error("生成失败,请稍后重试")}finally{x.value=!1}}else t.warning("请至少选择一个单词");else t.warning("请至少选择一个词单")};return(0,r.wB)(()=>B.mode,e=>{1===e&&0===D.value.length&&N()}),(0,r.wB)(y,e=>{"history"===e&&0===R.value.length&&W()}),(0,r.sV)(()=>{document.title="AI 助记短文 - Word Helper"}),(e,t)=>{const n=(0,r.gN)("motion-fade"),o=(0,r.gN)("motion-slide-visible-once-left");return(0,r.uX)(),(0,r.CE)("div",Ie,[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Fe,[(0,r.Lk)("div",Se,[(0,r.bF)((0,a.R1)(u._),{size:"32",class:"text-primary"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(ge.A))]),_:1}),t[10]||(t[10]=(0,r.Lk)("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white"},"AI 助记短文",-1))]),t[13]||(t[13]=(0,r.Lk)("p",{class:"text-gray-500 dark:text-gray-400"}," 利用 AI 生成包含目标单词的趣味短文,帮助您在语境中记忆单词。 ",-1)),E.value?(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Ee,[T.value?((0,r.uX)(),(0,r.CE)("div",Te,[(0,r.bF)((0,a.R1)(be.A),{class:"w-5 h-5 text-blue-500 mt-0.5 flex-shrink-0"}),t[11]||(t[11]=(0,r.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"}," 您是VIP用户,可无限量畅享AI助记短文功能。 ",-1))])):((0,r.uX)(),(0,r.CE)("div",Be,[(0,r.bF)((0,a.R1)(xe),{class:"w-5 h-5 text-yellow-500 mt-0.5 flex-shrink-0"}),t[12]||(t[12]=(0,r.Lk)("p",{class:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed"},[(0,r.eW)(" 非VIP用户可试用3次AI助记短文功能,"),(0,r.Lk)("a",{href:"https://www.xn--xhq44jb2fzpc.com/subscribe",target:"_blank",class:"text-yellow-600 dark:text-yellow-400 font-bold hover:underline"},"赞助"),(0,r.eW)("可获得会员权限。 ")],-1))]))])),[[n]]):(0,r.Q3)("",!0)])),[[o]]),(0,r.bF)((0,a.R1)(d.A),{type:"segment",animated:"",value:y.value,"onUpdate:value":t[6]||(t[6]=e=>y.value=e),class:"mb-8"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(c.A),{name:"generate",tab:"生成短文"},{default:(0,r.k6)(()=>[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Oe,[(0,r.bF)((0,a.R1)(f.Ay),{title:"生成配置",class:"rounded-xl shadow-sm"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(p.A),{ref:"formRef",model:B,"label-placement":"top"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(m.Ay),{label:"单词来源"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(h.A),{value:B.mode,"onUpdate:value":t[0]||(t[0]=e=>B.mode=e),name:"mode",class:"grid grid-cols-2 gap-2 w-full"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(v.A),{value:0,label:"最近学习"}),(0,r.bF)((0,a.R1)(v.A),{value:1,label:"词书"}),(0,r.bF)((0,a.R1)(v.A),{value:2,label:"生词本"}),(0,r.bF)((0,a.R1)(v.A),{value:3,label:"词单"}),(0,r.bF)((0,a.R1)(v.A),{value:4,label:"自定义"})]),_:1},8,["value"])]),_:1}),4!==B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:0,label:"单词数量"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(q),{value:B.count,"onUpdate:value":t[1]||(t[1]=e=>B.count=e),min:1,max:20,class:"w-full"},null,8,["value"])]),_:1})):(0,r.Q3)("",!0),1===B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:1,label:"选择词书"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Q.A),{value:B.dict_ids,"onUpdate:value":t[2]||(t[2]=e=>B.dict_ids=e),multiple:"",filterable:"",placeholder:"请选择词书(不选代表全部)",options:D.value,loading:k.value,clearable:""},null,8,["value","options","loading"])]),_:1})):(0,r.Q3)("",!0),3===B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:2,label:"选择词单"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",{class:"w-full border border-gray-300 dark:border-gray-700 rounded p-2 cursor-pointer hover:border-primary transition-colors min-h-[34px] flex flex-wrap gap-2",onClick:t[3]||(t[3]=e=>$.value=!0)},[S.value.length>0?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:0},(0,r.pI)(S.value,e=>((0,r.uX)(),(0,r.Wv)((0,a.R1)(G.Ay),{key:e.id,closable:"",onClose:(0,l.D$)(t=>U(e.id),["stop"]),size:"small"},{default:(0,r.k6)(()=>[(0,r.eW)((0,i.v_)(e.name),1)]),_:2},1032,["onClose"]))),128)):((0,r.uX)(),(0,r.CE)("span",ze,"点击选择词单..."))])]),_:1})):(0,r.Q3)("",!0),4===B.mode?((0,r.uX)(),(0,r.Wv)((0,a.R1)(m.Ay),{key:3,label:"选择单词 (最多20个)"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Q.A),{value:B.word_ids,"onUpdate:value":t[4]||(t[4]=e=>B.word_ids=e),multiple:"",filterable:"",remote:"",placeholder:"输入单词搜索...",options:I.value,loading:A.value,onSearch:V,"max-tag-count":5,clearable:""},null,8,["value","options","loading"])]),_:1})):(0,r.Q3)("",!0),(0,r.bF)((0,a.R1)(m.Ay),{label:"AI 模型"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Q.A),{value:B.model,"onUpdate:value":t[5]||(t[5]=e=>B.model=e),options:O},null,8,["value"])]),_:1}),(0,r.bF)((0,a.R1)(F.Ay),{type:"primary",block:"",size:"large",loading:x.value,onClick:K},{default:(0,r.k6)(()=>[...t[14]||(t[14]=[(0,r.eW)(" 生成短文 ",-1)])]),_:1},8,["loading"])]),_:1},8,["model"])]),_:1})])),[[n]])]),_:1}),(0,r.bF)((0,a.R1)(c.A),{name:"history",tab:"历史记录"},{default:(0,r.k6)(()=>[(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",Pe,[w.value&&1===C.value?((0,r.uX)(),(0,r.CE)("div",Le,[(0,r.bF)((0,a.R1)(Z.A),{size:"large"})])):0===R.value.length?((0,r.uX)(),(0,r.CE)("div",Ne,[(0,r.bF)((0,a.R1)(u._),{size:"64",class:"text-gray-300 dark:text-gray-600 mb-4"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(we.A))]),_:1}),t[15]||(t[15]=(0,r.Lk)("p",{class:"text-gray-500 dark:text-gray-400"},"暂无生成记录,快去生成第一篇吧!",-1))])):((0,r.uX)(),(0,r.CE)("div",Ve,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(R.value,e=>((0,r.uX)(),(0,r.Wv)((0,a.R1)(f.Ay),{key:e.id,class:"rounded-xl shadow-sm hover:shadow-md transition-shadow",title:z(e.created_at),size:"medium"},{"header-extra":(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(G.Ay),{size:"small",type:"gpt-5"===e.model?"success":"info",bordered:!1},{default:(0,r.k6)(()=>[(0,r.Lk)("div",Ue,[(0,r.Lk)("span",{class:"w-4 h-4 flex items-center justify-center",innerHTML:"gpt-5"===e.model?Je:Ze},null,8,We),(0,r.Lk)("span",null,(0,i.v_)("gpt-5"===e.model?"GPT-5":"Gemini 3 Pro"),1)])]),_:2},1032,["type"])]),default:(0,r.k6)(()=>[(0,r.Lk)("div",{class:"prose dark:prose-invert max-w-none mb-6 text-base leading-relaxed",innerHTML:P(e.content)},null,8,je),(0,r.bF)((0,a.R1)(ie),null,{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(ve),{title:"查看中文翻译",name:"1"},{default:(0,r.k6)(()=>[(0,r.Lk)("div",{class:"prose dark:prose-invert max-w-none text-gray-600 dark:text-gray-300 p-4 bg-gray-50 dark:bg-gray-800/50 rounded-lg",innerHTML:P(e.translation)},null,8,Ke)]),_:2},1024)]),_:2},1024),(0,r.Lk)("div",He,[(0,r.Lk)("div",Xe,[(0,r.bF)((0,a.R1)(u._),{size:"16",class:"text-gray-400"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(ke))]),_:1}),t[16]||(t[16]=(0,r.Lk)("span",{class:"text-xs text-gray-500 font-medium"},"关联单词",-1))]),(0,r.Lk)("div",Ye,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.words,e=>((0,r.uX)(),(0,r.CE)("div",{key:e.id,class:"group cursor-pointer px-3 py-1.5 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg text-sm hover:border-primary hover:text-primary transition-all flex items-center gap-1 shadow-sm",onClick:t=>L(e.id)},[(0,r.Lk)("span",null,(0,i.v_)(e.word),1),(0,r.bF)((0,a.R1)(u._),{size:"12",class:"opacity-0 group-hover:opacity-100 transition-opacity"},{default:(0,r.k6)(()=>[(0,r.bF)((0,a.R1)(Ae.A))]),_:1})],8,qe))),128))])])]),_:2},1032,["title"]))),128)),M.value?((0,r.uX)(),(0,r.CE)("div",Qe,[(0,r.bF)((0,a.R1)(F.Ay),{loading:w.value,onClick:j,secondary:""},{default:(0,r.k6)(()=>[...t[17]||(t[17]=[(0,r.eW)(" 加载更多历史记录 ",-1)])]),_:1},8,["loading"])])):R.value.length>0?((0,r.uX)(),(0,r.CE)("div",Ge," 没有更多记录了 ")):(0,r.Q3)("",!0)]))])),[[n]])]),_:1})]),_:1},8,["value"]),(0,r.bF)(De.A,{show:$.value,"onUpdate:show":t[7]||(t[7]=e=>$.value=e),modelValue:B.list_ids,"onUpdate:modelValue":t[8]||(t[8]=e=>B.list_ids=e),selectedList:S.value,"onUpdate:selectedList":t[9]||(t[9]=e=>S.value=e),"max-count":10},null,8,["show","modelValue","selectedList"])])}}},tt=n(71241);const nt=(0,tt.A)(et,[["__scopeId","data-v-27b499a4"]]);var rt=nt}}]); //# sourceMappingURL=986.ef9ba720.js.map