it-tools/dist/client/assets/chunks/chunk-8de767d1.js

54 lines
21 KiB
JavaScript
Raw Normal View History

2024-04-28 00:48:29 +08:00
import{_ as Se}from"./chunk-606d31d4.js";import{_ as Ve}from"./chunk-6deddc2e.js";import{c as Ce,a as oe}from"./chunk-a740628f.js";import{T as Ie}from"./chunk-f1ca2155.js";import{f as Re}from"./chunk-2749dac9.js";import{b as $e,N as ee,B as j}from"./chunk-015e5c20.js";import{d as $,h as o,p as ye,i as ae,r as te,C as N,c as U,aK as K,aL as q,A as Ae,j as S,D as W,E as Z,F as H,U as ne,q as V,m as Y,l as J,M as se,k as F,z as Be,L as Me,_ as De}from"./chunk-449c23a2.js";import{o as v,M as ue,n as k,q as C,p as L,u as ge,t as be,j as xe,b as Oe,O as Ue,v as ve,x as je,al as ce,am as pe,y as Ee,P as Q}from"../entries/src_pages_Home.page.16dc467b.js";import{c as Le}from"./chunk-202f2abd.js";import{i as Ne}from"./chunk-26a03a7a.js";import{b as We}from"./chunk-af6e0163.js";import{u as Fe}from"./chunk-66ac4853.js";import{N as E}from"./chunk-9519e52e.js";import{A as de,R as ze}from"./chunk-05af1949.js";import{u as Ge}from"./chunk-416dc92c.js";import{_ as Ke}from"./chunk-4515d3e7.js";import{_ as qe}from"./chunk-387ba65a.js";import{_ as Ze}from"./chunk-4ee2916e.js";import"./chunk-a3974c29.js";import"./chunk-27eb844d.js";import"./chunk-9a43cce8.js";import"./chunk-340feaf0.js";import"./chunk-767079b6.js";import"./chunk-55ba3dae.js";import"./chunk-baa77311.js";import"./chunk-78769b89.js";import"./chunk-567e13ca.js";import"./chunk-f823181b.js";import"./chunk-f94e2689.js";import"./chunk-1d5b5526.js";import"./chunk-fc34c9a6.js";import"./chunk-b0332f36.js";import"./chunk-f206ee20.js";import"./chunk-cf010ec4.js";import"./chunk-ee54c1e8.js";import"./chunk-6d336811.js";const He=$({name:"ArrowDown",render(){return o("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o("g",{"fill-rule":"nonzero"},o("path",{d:"M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z"}))))}}),Ye=$({name:"ArrowUp",render(){return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},o("g",{fill:"none"},o("path",{d:"M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z",fill:"currentColor"})))}}),d="0!important",ke="-1px!important";function x(e){return C(e+"-type",[k("& +",[v("button",{},[C(e+"-type",[L("border",{borderLeftWidth:d}),L("state-border",{left:ke})])])])])}function O(e){return C(e+"-type",[k("& +",[v("button",[C(e+"-type",[L("border",{borderTopWidth:d}),L("state-border",{top:ke})])])])])}const Je=v("button-group",`
flex-wrap: nowrap;
display: inline-flex;
position: relative;
`,[ue("vertical",{flexDirection:"row"},[ue("rtl",[v("button",[k("&:first-child:not(:last-child)",`
margin-right: ${d};
border-top-right-radius: ${d};
border-bottom-right-radius: ${d};
`),k("&:last-child:not(:first-child)",`
margin-left: ${d};
border-top-left-radius: ${d};
border-bottom-left-radius: ${d};
`),k("&:not(:first-child):not(:last-child)",`
margin-left: ${d};
margin-right: ${d};
border-radius: ${d};
`),x("default"),C("ghost",[x("primary"),x("info"),x("success"),x("warning"),x("error")])])])]),C("vertical",{flexDirection:"column"},[v("button",[k("&:first-child:not(:last-child)",`
margin-bottom: ${d};
margin-left: ${d};
margin-right: ${d};
border-bottom-left-radius: ${d};
border-bottom-right-radius: ${d};
`),k("&:last-child:not(:first-child)",`
margin-top: ${d};
margin-left: ${d};
margin-right: ${d};
border-top-left-radius: ${d};
border-top-right-radius: ${d};
`),k("&:not(:first-child):not(:last-child)",`
margin: ${d};
border-radius: ${d};
`),O("default"),C("ghost",[O("primary"),O("info"),O("success"),O("warning"),O("error")])])])]),Qe={size:{type:String,default:void 0},vertical:Boolean},Xe=$({name:"ButtonGroup",props:Qe,setup(e){const{mergedClsPrefixRef:a,mergedRtlRef:i}=ge(e);return Ge("-button-group",Je,a),ye($e,e),{rtlEnabled:be("ButtonGroup",i,a),mergedClsPrefix:a}},render(){const{mergedClsPrefix:e}=this;return o("div",{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:"group"},this.$slots)}}),et=()=>Le,tt=xe({name:"DynamicInput",common:Oe,peers:{Input:Ne,Button:We},self:et}),at=tt,ie=Ce("n-dynamic-input"),it=$({name:"DynamicInputInputPreset",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:""},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){const{mergedThemeRef:e,placeholderRef:a}=ae(ie);return{mergedTheme:e,placeholder:a}},render(){const{mergedTheme:e,placeholder:a,value:i,clsPrefix:n,onUpdateValue:u,disabled:r}=this;return o("div",{class:`${n}-dynamic-input-preset-input`},o(ee,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:i,placeholder:a,onUpdateValue:u,disabled:r}))}}),lt=$({name:"DynamicInputPairPreset",props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:"",value:""})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(e){const{mergedThemeRef:a,keyPlaceholderRef:i,valuePlaceholderRef:n}=ae(ie);return{mergedTheme:a,keyPlaceholder:i,valuePlaceholder:n,handleKeyInput(u){e.onUpdateValue({key:u,value:e.value.value})},handleValueInput(u){e.onUpdateValue({key:e.value.key,value:u})}}},render(){const{mergedTheme:e,keyPlaceholder:a,valuePlaceholder:i,value:n,clsPrefix:u,disabled:r}=this;return o("div",{class:`${u}-dynamic-input-preset-pair`},o(ee,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n.key,class:`${u}-dynamic-input-pair-input`,placeholder:a,onUpdateValue:this.handleKeyInput,disabled:r}),o(ee,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n.value,class:`${u}-dynamic-input-pair-input`,placeholder:i,onUpdateValue:this.handleValueInput,disabled:r}))}}),rt=v("dynamic-input",{width:"100%"},[v("dynamic-input-item",`
margin-bottom: 10px;
display: flex;
flex-wrap: nowrap;
`,[v("dynamic-input-preset-input",{flex:1,alignItems:"center"}),v("dynamic-input-preset-pair",`
flex: 1;
display: flex;
align-items: center;
`,[v("dynamic-input-pair-input",[k("&:first-child",{"margin-right":"12px"})])]),L("action",`
align-self: flex-start;
display: flex;
justify-content: flex-end;
flex-shrink: 0;
flex-grow: 0;
margin: var(--action-margin);
`,[C("icon",{cursor:"pointer"})]),k("&:last-child",{marginBottom:0})]),v("form-item",`
padding-top: 0 !important;
margin-right: 0 !important;
`,[v("form-item-blank",{paddingTop:"0 !important"})])]),z=new WeakMap,ot=Object.assign(Object.assign({},ve.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:"input"},keyField:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:""},valuePlaceholder:{type:String,default:""},placeholder:{type:String,default:""},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),nt=$({name:"DynamicInput",props:ot,setup(e,{slots:a}){const{mergedComponentPropsRef:i,mergedClsPrefixRef:n,mergedRtlRef:u,inlineThemeDisabled:r}=ge(),m=ae(Re,null),h=te(e.defaultValue),w=N(e,"value"),y=Ue(w,h),f=ve("DynamicInput","-dynamic-input",rt,at,e,n),A=U(()=>{const{value:t}=y;if(Array.isArray(t)){const{max:l}=e;return l!==void 0&&t.length>=l}return!1}),I=U(()=>{const{value:t}=y;return Array.isArray(t)?t.length<=e.min:!0}),B=U(()=>{var t,l;return(l=(t=i?.value)===null||t===void 0?void 0:t.DynamicInput)===null||l===void 0?void 0:l.buttonSize});function g(t){const{onInput:l,"onUpdate:value":p,onUpdateValue:s}=e;l&&Q(l,t),p&&Q(p,t),s&&Q(s,t),h.value=t}function _(t,l){if(t==null||typeof t!="object")return l;const p=K(t)?q(t):t;let s=z.get(p);return s===void 0&&z.set(p,s=Ee()),s}function R(t,l){const{value:p}=y,s=Array.from(p??[]),P=s[t];if(s[t]=l,P&&l&&typeof P=="object"&&typeof l=="object"){const Te=K(P)?q(P):P,Pe=K(l)?q(l):l,re=z.get(Te);re!==void 0&&z.set(Pe,re)}g(s)}function b(){T(-1)}function T(t){const{value:l}=y,{onCreate:p}=e,s=Array.from(l??[]);if(p)s.splice(t+1,0,p(t+1)),g(s);else if(a.default)s.splice(t+1,0,null),g(s);else switch(e.preset){case"input":s.splice(t+1,0,""),g(s);break;case"pair":s.splice(t+1,0,{key:"",value:""}),g(s);break}}function c(t){const{value:l}=y;if(!Array.isArray(l))return;const{min:p}=e;if(l.length<=p)return;const{onRemove:s}=e;s&&s(t);const P=Array.from(l);P.splice(t,1),g(P)}function M(t,l,p){if(l<0||p<0||l>=t.length||p>=t.length||l===p)return;const s=t[l];t[l]=t[p],t[p]=s}function we(t,l){const{value:p}=y;if(!Array.isArray(p))return;const s=Array.from(p);t==="up"&&M(s,l,l-1),t==="down"&&M(s,l,l+1),g(s)}ye(ie,{mergedThemeRef:f,keyPlaceholderRef:N(e,"keyPlaceholder"),valuePlaceholderRef:N(e,"valuePlaceholder"),placeholderRef:N(e,"placeholder")});const _e=be("DynamicInput",u,n),le=U(()=>{const{self:{actionMargin:t,actionMarginRtl:l}}=f.value;return{"--action-margin":t,"--action-margin-rtl":l}}),D=r?je("dynamic-input",void 0,le,e):void 0;return{locale:Fe("DynamicInput").localeRef,rtlEnabled:_e,buttonSize:B,mergedClsPrefix:n,NFormItem:m,uncontrolledValue:h,mergedValue:y,insertionDisabled:A,removeDisabled:I,handleCreateClick:b,ensureKey:_,handleValueChange:R,remove:c,move:we,createItem:T,mergedTheme:f,cssVars:r?void 0:le,themeClass:D?.themeClass,onRender:D?.onRender}},render(){const{$slots:e,buttonSize:a,mergedClsPrefix:i,mergedValue:n,locale:u,mergedTheme:r,keyField:m,itemStyle:h,preset:w,showSortButton:y,NFormItem:f,ensureKey:A,handleValueChange:I,remove:B,createItem:g,move:_,onRender:R,disabled:b}=this;return R?.(),o("div",{class:[`${i}-dynamic-input`,this.rtlEnabled&&`${i}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(n)||n.length===0?o(j,Object.assign({block:!0,ghost:!0,dashed:!0,size:a},this.createButtonProps,{disabled:this.insertionDisabled||b,theme:r.peers.Button,themeOverrides:r.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>ce(e["create-button-default"],()=>[u.create]),icon:()=>ce(e["create-button-icon"],()=>[o(E,{clsPrefix:i},{default:()=>o(de,null)})])}):n.map((T,c)=>o("div",{key:m?T[m]:A(T,c),"data-key":m?T[m]:A(T,c),class:`${i}-dynamic-input-item`,style:h},pe(e.default,{value:n[c],index:c},()=>[w==="input"?o(it,{disabled:b,clsPrefix:i,value:n[c],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${c}]`:void 0,onUpdateValue:M=>{I(c,M)}}):w==="pair"?o(lt,{disabled:b,clsPrefix:i,value:n[c],parentPath:f?f.path.v
`)).join(`
`)}function mt(e){return e instanceof Date?e.toISOString():String(e)}function he(e,{separator:a=":",basePrefix:i=""}={}){const n=[],u=(r,m="")=>{if(!(r===void 0||r===""))if(ut(r))for(const[h,w]of Object.entries(r)){const y=[m,ct(h)].filter(Boolean).join(a);u(w,y)}else if(Array.isArray(r))for(const h of r)u(h,m);else n.push({key:m,value:mt(r)})};return u(e,i),n}function ht({flatMetadata:{key:e,value:a},type:i}){return`<meta ${i.trim()}="${e.trim()}" value="${a.trim()}" />`}function ft({flatMetadata:e,type:a}){return e.map(i=>ht({flatMetadata:i,type:a}))}const yt={name:"Article",elements:[{type:"input",label:"Publishing date",key:"article:published_time",placeholder:"When the article was first published..."},{type:"input",label:"Modification date",key:"article:modified_time",placeholder:"When the article was last changed..."},{type:"input",label:"Expiration date",key:"article:expiration_time",placeholder:"When the article is out of date after..."},{type:"input",label:"Author",key:"article:author",placeholder:"Writers of the article..."},{type:"input",label:"Section",key:"article:section",placeholder:"A high-level section name. E.g. Technology.."},{type:"input",label:"Tag",key:"article:tag",placeholder:"Tag words associated with this article..."}]},gt={name:"Book",elements:[{type:"input",label:"Author",key:"book:author",placeholder:"Who wrote this book..."},{type:"input",label:"ISBN",key:"book:isbn",placeholder:"The International Standard Book Number..."},{type:"input",label:"Release date",key:"book:release_date",placeholder:"The date the book was released..."},{type:"input",label:"Tag",key:"book:tag",placeholder:"Tag words associated with this book..."}]},bt={name:"Album details",elements:[{type:"input",label:"Song",key:"music:song",placeholder:"The song on this album..."},{type:"input",label:"Disc",key:"music:song:disc",placeholder:"The same as music:album:disc but in reverse..."},{type:"input",label:"Track",key:"music:song:track",placeholder:"The same as music:album:track but in reverse..."},{type:"input",label:"Musician",key:"music:musician",placeholder:"The musician that made this song..."},{type:"input",label:"Release date",key:"music:release_date",placeholder:"The date the album was released..."}]},vt={name:"Playlist details",elements:[{type:"input",label:"Song",key:"music:song",placeholder:"The song on this album..."},{type:"input",label:"Disc",key:"music:song:disc",placeholder:"The same as music:album:disc but in reverse..."},{type:"input",label:"Track",key:"music:song:track",placeholder:"The same as music:album:track but in reverse..."},{type:"input",label:"Creator",key:"music:creator",placeholder:"The creator of this playlist..."}]},kt={name:"Radio station details",elements:[{type:"input",label:"Creator",key:"music:creator",placeholder:"The creator of this radio station..."}]},wt={name:"Song details",elements:[{type:"input",label:"Duration",placeholder:"The duration of the song...",key:"music:duration"},{type:"input",label:"Album",placeholder:"The album this song is from...",key:"music:album"},{type:"input",label:"Disc",placeholder:"Which disc of the album this song is on...",key:"music:album:disk"},{type:"input",label:"Track",placeholder:" Which track this song is...",key:"music:album:track"},{type:"input-multiple",label:"Musician",placeholder:"The musician that made this song...",key:"music:musician"}]},_t={name:"Profile",elements:[{type:"input",label:"First name",placeholder:"Enter the first name of the person...",key:"profile:first_name"},{type:"input",label:"Last name",placeholder:"Enter the last name of the person...",key:"profile:last_name"},{type:"input",label:"Username",placeholder:"Enter the username of the person...",key:"profile:username"},{type:"input",label:"Gender",placeholder:"Enter the gender of the person...",key:"profile:gender"}]},G={name:"Movie details",elements:[{type:"input-multiple",label:"Actor",key:"video:actor",placeholder:"Name of the actress/actor..."},{type:"input-multiple",label:"Director",key:"video:director",placeholder:"Name of the director..."},{type:"input-multiple",label:"Wri