@smartos-lib/components 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,4 +58,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
58
58
|
`);gt.forEach((Lr,Rs)=>{Lr&&D.insertText(t,Lr),Rs!==gt.length-1&&D.insertSoftBreak(t)})},{at:V});if(A.equals(V.anchor.path,V.focus.path)){var[Le,Pe]=_.edges(V),Ne={start:Le.offset,end:Pe.offset,text:me};if(me&&l&&$==="insertCompositionText"){var mt=l.start+l.text.search(/\S|$/),$r=Ne.start+Ne.text.search(/\S|$/);$r===mt+1&&Ne.end===l.start+l.text.length?(Ne.start-=1,l=null,O()):l=!1}else $==="insertText"?l===null?l=Ne:l&&_.isCollapsed(V)&&l.end+l.text.length===Le.offset?l=Ts(Ts({},l),{},{text:l.text+me}):l=!1:l=!1;if(Q){w(Le.path,Ne);return}}return h(()=>D.insertText(t,me),{at:V})}}}},C=()=>!!ar.get(t),E=()=>{var P;return!!((P=ht.get(t))!==null&&P!==void 0&&P.length)},B=()=>C()||E(),x=()=>o,b=P=>{ir.set(t,P),a&&(clearTimeout(a),a=null);var{selection:W}=t;if(P){var $=!W||!A.equals(W.anchor.path,P.anchor.path),V=!W||!A.equals(W.anchor.path.slice(0,-1),P.anchor.path.slice(0,-1));($&&l||V)&&(l=!1),($||E())&&(a=setTimeout(p,M3))}},S=()=>{(C()||!E())&&p()},k=P=>{E()||(f(!0),setTimeout(f))},O=()=>{C()||(i=setTimeout(p))},H=P=>{if(!(E()||C())&&P.some($=>Bd(t,$,P))){var W;(W=Zy.get(t))===null||W===void 0||W()}};return{flush:p,scheduleFlush:O,hasPendingDiffs:E,hasPendingAction:C,hasPendingChanges:B,isFlushing:x,handleUserSelect:b,handleCompositionEnd:y,handleCompositionStart:m,handleDOMBeforeInput:g,handleKeyDown:k,handleDomMutations:H,handleInput:S}}function V3(){var e=L.useRef(!1);return L.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var la=Os?L.useLayoutEffect:L.useEffect;function W3(e,t,n){var[r]=L.useState(()=>new MutationObserver(t));la(()=>{r.takeRecords()}),L.useEffect(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}var U3=["node"];function s1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var K3={subtree:!0,childList:!0,characterData:!0},q3=at?e=>{var{node:t}=e,n=No(e,U3);if(!at)return null;var r=rr(),o=V3(),[u]=L.useState(()=>z3(H3({editor:r},n)));return W3(t,u.handleDomMutations,K3),Cd.set(r,u.scheduleFlush),o&&u.flush(),u}:()=>null,Y3=["anchor","focus"],Q3=["anchor","focus"],G3=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),l1=(e,t)=>{var n=No(e,Y3),r=No(t,Q3);return e[Io]===t[Io]&&G3(n,r)},X3=(e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(!_.equals(r,o)||!l1(r,o))return!1}return!0},Z3=(e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.anchor.offset!==o.anchor.offset||r.focus.offset!==o.focus.offset||!l1(r,o))return!1}return!0};function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function J3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c1(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var eP=e=>{var{isLast:t,leaf:n,parent:r,text:o}=e,u=rr(),a=T.findPath(u,o),i=A.parent(a),s=!!n[Jy];return u.isVoid(r)?re.createElement(xd,{length:q.string(r).length}):n.text===""&&r.children[r.children.length-1]===o&&!u.isInline(r)&&D.string(u,i)===""?re.createElement(xd,{isLineBreak:!0,isMarkPlaceholder:s}):n.text===""?re.createElement(xd,{isMarkPlaceholder:s}):t&&n.text.slice(-1)===`
|
59
59
|
`?re.createElement(f1,{isTrailing:!0,text:n.text}):re.createElement(f1,{text:n.text})},f1=e=>{var{text:t,isTrailing:n=!1}=e,r=L.useRef(null),o=()=>"".concat(t??"").concat(n?`
|
60
60
|
`:""),[u]=L.useState(o);return la(()=>{var a=o();r.current&&r.current.textContent!==a&&(r.current.textContent=a)}),re.createElement(tP,{ref:r},u)},tP=L.memo(L.forwardRef((e,t)=>re.createElement("span",{"data-slate-string":!0,ref:t},e.children))),xd=e=>{var{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,o={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return r&&(o["data-slate-mark-placeholder"]=!0),re.createElement("span",J3({},o),!at||!n?"\uFEFF":null,n?re.createElement("br",null):null)};function d1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function p1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d1(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nP=at?300:0;function rP(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function v1(e){e.current&&(clearTimeout(e.current),e.current=null)}var oP=e=>{var{leaf:t,isLast:n,text:r,parent:o,renderPlaceholder:u,renderLeaf:a=g=>re.createElement(aP,p1({},g))}=e,i=rr(),s=L.useRef(null),l=L.useRef(null),[c,d]=L.useState(!1),p=L.useRef(null),y=L.useCallback(g=>{if(rP(s,g==null),g==null){var C;gd.delete(i),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(gd.set(i,g),!s.current){var E=window.ResizeObserver||i3;s.current=new E(()=>{var B;(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,g)})}s.current.observe(g),l.current=g}},[l,t,i]),m=re.createElement(eP,{isLast:n,leaf:t,parent:o,text:r}),f=!!t[Io];if(L.useEffect(()=>(f?p.current||(p.current=setTimeout(()=>{d(!0),p.current=null},nP)):(v1(p),d(!1)),()=>v1(p)),[f,d]),f&&c){var w={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:aa?"inherit":void 0},contentEditable:!1,ref:y}};m=re.createElement(re.Fragment,null,u(w),m)}var h={"data-slate-leaf":!0};return a({attributes:h,children:m,leaf:t,text:r})},uP=re.memo(oP,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Z.equals(t.leaf,e.leaf)&&t.leaf[Io]===e.leaf[Io]),aP=e=>{var{attributes:t,children:n}=e;return re.createElement("span",p1({},t),n)},iP=e=>{for(var{decorations:t,isLast:n,parent:r,renderPlaceholder:o,renderLeaf:u,text:a}=e,i=rr(),s=L.useRef(null),l=Z.decorations(a,t),c=T.findKey(i,a),d=[],p=0;p<l.length;p++){var y=l[p];d.push(re.createElement(uP,{isLast:n&&p===l.length-1,key:"".concat(c.id,"-").concat(p),renderPlaceholder:o,leaf:y,text:a,parent:r,renderLeaf:u}))}var m=L.useCallback(f=>{var w=ks.get(i);f?(w==null||w.set(c,f),Ir.set(a,f),ia.set(f,a)):(w==null||w.delete(c),Ir.delete(a),s.current&&ia.delete(s.current)),s.current=f},[s,i,c,a]);return re.createElement("span",{"data-slate-node":"text",ref:m},d)},h1=re.memo(iP,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Z3(t.decorations,e.decorations));function m1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m1(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var sP=e=>{var{decorations:t,element:n,renderElement:r=g=>re.createElement(cP,Fd({},g)),renderPlaceholder:o,renderLeaf:u,selection:a}=e,i=rr(),s=pP(),l=i.isInline(n),c=T.findKey(i,n),d=L.useCallback(g=>{var C=ks.get(i);g?(C==null||C.set(c,g),Ir.set(n,g),ia.set(g,n)):(C==null||C.delete(c),Ir.delete(n))},[i,c,n]),p=y1({decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:a}),y={"data-slate-node":"element",ref:d};if(l&&(y["data-slate-inline"]=!0),!l&&D.hasInlines(i,n)){var m=q.string(n),f=hy(m);f==="rtl"&&(y.dir=f)}if(D.isVoid(i,n)){y["data-slate-void"]=!0,!s&&l&&(y.contentEditable=!1);var w=l?"span":"div",[[h]]=q.texts(n);p=re.createElement(w,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},re.createElement(h1,{renderPlaceholder:o,decorations:[],isLast:!1,parent:n,text:h})),hd.set(h,0),md.set(h,n)}return r({attributes:y,children:p,element:n})},lP=re.memo(sP,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&X3(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&_.equals(e.selection,t.selection))),cP=e=>{var{attributes:t,children:n,element:r}=e,o=rr(),u=o.isInline(r)?"span":"div";return re.createElement(u,Fd(Fd({},t),{},{style:{position:"relative"}}),n)},g1=L.createContext(()=>[]),fP=()=>L.useContext(g1),dP=L.createContext(!1),y1=e=>{for(var{decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:a}=e,i=fP(),s=rr(),l=T.findPath(s,n),c=[],d=X.isElement(n)&&!s.isInline(n)&&D.hasInlines(s,n),p=0;p<n.children.length;p++){var y=l.concat(p),m=n.children[p],f=T.findKey(s,m),w=D.range(s,y),h=a&&_.intersection(w,a),g=i([m,y]);for(var C of t){var E=_.intersection(C,w);E&&g.push(E)}X.isElement(m)?c.push(re.createElement(dP.Provider,{key:"provider-".concat(f.id),value:!!h},re.createElement(lP,{decorations:g,element:m,key:f.id,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:h}))):c.push(re.createElement(h1,{decorations:g,key:f.id,isLast:d&&p===n.children.length-1,parent:n,renderPlaceholder:o,renderLeaf:u,text:m})),hd.set(m,p),md.set(m,n)}return c},D1=L.createContext(!1),pP=()=>L.useContext(D1),C1=L.createContext(null),vP=()=>{var e=L.useContext(C1);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function hP(){var e=rr(),t=L.useRef(!1),n=L.useRef(0),r=L.useCallback(()=>{if(!t.current){t.current=!0;var o=T.getWindow(e);o.cancelAnimationFrame(n.current),n.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return L.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}var mP=3,gP={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},yP={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},DP={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Be=e=>{var t=gP[e],n=yP[e],r=DP[e],o=t&&pd(t),u=n&&pd(n),a=r&&pd(r);return i=>!!(o&&o(i)||Qy&&u&&u(i)||!Qy&&a&&a(i))},Se={isBold:Be("bold"),isCompose:Be("compose"),isMoveBackward:Be("moveBackward"),isMoveForward:Be("moveForward"),isDeleteBackward:Be("deleteBackward"),isDeleteForward:Be("deleteForward"),isDeleteLineBackward:Be("deleteLineBackward"),isDeleteLineForward:Be("deleteLineForward"),isDeleteWordBackward:Be("deleteWordBackward"),isDeleteWordForward:Be("deleteWordForward"),isExtendBackward:Be("extendBackward"),isExtendForward:Be("extendForward"),isExtendLineBackward:Be("extendLineBackward"),isExtendLineForward:Be("extendLineForward"),isItalic:Be("italic"),isMoveLineBackward:Be("moveLineBackward"),isMoveLineForward:Be("moveLineForward"),isMoveWordBackward:Be("moveWordBackward"),isMoveWordForward:Be("moveWordForward"),isRedo:Be("redo"),isSoftBreak:Be("insertSoftBreak"),isSplitBlock:Be("splitBlock"),isTransposeCharacter:Be("transposeCharacter"),isUndo:Be("undo")},CP=(e,t)=>{var n=[],r=()=>{n=[]},o=a=>{if(t.current){var i=a.filter(s=>Bd(e,s,a));n.push(...i)}};function u(){n.length>0&&(n.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(i=>{a.target.insertBefore(i,a.nextSibling)}),a.addedNodes.forEach(i=>{a.target.removeChild(i)}))}),r())}return{registerMutations:o,restoreDOM:u,clear:r}},wP={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class w1 extends L.Component{constructor(){super(...arguments),$t(this,"context",null),$t(this,"manager",null),$t(this,"mutationObserver",null)}observe(){var t,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,wP)}componentDidMount(){var{receivedUserInput:t}=this.props,n=this.context;this.manager=CP(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var u;(u=this.manager)===null||u===void 0||u.registerMutations(o)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}$t(w1,"contextType",vd);var EP=at?w1:e=>{var{children:t}=e;return re.createElement(re.Fragment,null,t)},BP=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],bP=["text"];function E1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E1(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var AP=e=>re.createElement(re.Fragment,null,y1(e)),xP=e=>{var t=L.useCallback(F=>re.createElement(FP,fn({},F)),[]),{autoFocus:n,decorate:r=SP,onDOMBeforeInput:o,placeholder:u,readOnly:a=!1,renderElement:i,renderLeaf:s,renderPlaceholder:l=t,scrollSelectionIntoView:c=OP,style:d={},as:p="div",disableDefaultStyles:y=!1}=e,m=No(e,BP),f=vP(),[w,h]=L.useState(!1),g=L.useRef(null),C=L.useRef([]),[E,B]=L.useState(),{onUserInput:x,receivedUserInput:b}=hP(),[,S]=L.useReducer(F=>F+1,0);Zy.set(f,S),yd.set(f,a);var k=L.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);L.useEffect(()=>{g.current&&n&&g.current.focus()},[n]);var O=L.useRef(),H=L.useMemo(()=>I_(()=>{var F=O.current;if((at||!T.isComposing(f))&&(!k.isUpdatingSelection||F!=null&&F.isFlushing())&&!k.isDraggingInternally){var j=T.findDocumentOrShadowRoot(f),{activeElement:N}=j,Y=T.toDOMNode(f,f),oe=j.getSelection();if(N===Y?(k.latestElement=N,ur.set(f,!0)):ur.delete(f),!oe)return I.deselect(f);var{anchorNode:ee,focusNode:ie}=oe,ce=T.hasEditableTarget(f,ee)||T.isTargetInsideNonReadonlyVoid(f,ee),de=T.hasEditableTarget(f,ie)||T.isTargetInsideNonReadonlyVoid(f,ie);if(ce&&de){var he=T.toSlateRange(f,oe,{exactMatch:!1,suppressThrow:!0});he&&(!T.isComposing(f)&&!(F!=null&&F.hasPendingChanges())&&!(F!=null&&F.isFlushing())?I.select(f,he):F==null||F.handleUserSelect(he))}a&&(!ce||!de)&&I.deselect(f)}},100),[f,a,k]),P=L.useMemo(()=>P_(H,0),[H]);O.current=q3({node:g,onDOMSelectionChange:H,scheduleOnDOMSelectionChange:P}),la(()=>{var F,j,N;g.current&&(N=wd(g.current))?(Xy.set(f,N),_s.set(f,g.current),Ir.set(f,g.current),ia.set(g.current,f)):Ir.delete(f);var{selection:Y}=f,oe=T.findDocumentOrShadowRoot(f),ee=oe.getSelection();if(!(!ee||!T.isFocused(f)||(F=O.current)!==null&&F!==void 0&&F.hasPendingAction())){var ie=le=>{var Ie=ee.type!=="None";if(!(!Y&&!Ie)){var Re=ee.focusNode,be;if(jo&&ee.rangeCount>1){var Ft=ee.getRangeAt(0),zt=ee.getRangeAt(ee.rangeCount-1);Ft.startContainer===Re?be=zt.endContainer:be=Ft.startContainer}else be=ee.anchorNode;var _e=_s.get(f),et=!1;if(_e.contains(be)&&_e.contains(Re)&&(et=!0),Ie&&et&&Y&&!le){var me=T.toSlateRange(f,ee,{exactMatch:!0,suppressThrow:!0});if(me&&_.equals(me,Y)){var Le;if(!k.hasMarkPlaceholder||(Le=be)!==null&&Le!==void 0&&(Le=Le.parentElement)!==null&&Le!==void 0&&Le.hasAttribute("data-slate-mark-placeholder"))return}}if(Y&&!T.hasRange(f,Y)){f.selection=T.toSlateRange(f,ee,{exactMatch:!1,suppressThrow:!0});return}k.isUpdatingSelection=!0;var Pe=Y&&T.toDOMRange(f,Y);return Pe?(T.isComposing(f)&&!at?ee.collapseToEnd():_.isBackward(Y)?ee.setBaseAndExtent(Pe.endContainer,Pe.endOffset,Pe.startContainer,Pe.startOffset):ee.setBaseAndExtent(Pe.startContainer,Pe.startOffset,Pe.endContainer,Pe.endOffset),c(f,Pe)):ee.removeAllRanges(),Pe}};ee.rangeCount<=1&&ie();var ce=((j=O.current)===null||j===void 0?void 0:j.isFlushing())==="action";if(!at||!ce){setTimeout(()=>{k.isUpdatingSelection=!1});return}var de=null,he=requestAnimationFrame(()=>{if(ce){var le=Ie=>{try{var Re=T.toDOMNode(f,f);Re.focus(),ie(Ie)}catch{}};le(),de=setTimeout(()=>{le(!0),k.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(he),de&&clearTimeout(de)}}});var W=L.useCallback(F=>{if(x(),!a&&T.hasEditableTarget(f,F.target)&&!_P(F,o)){var j;if(O.current)return O.current.handleDOMBeforeInput(F);P.flush(),H.flush();var{selection:N}=f,{inputType:Y}=F,oe=F.dataTransfer||F.data||void 0,ee=Y==="insertCompositionText"||Y==="deleteCompositionText";if(ee&&T.isComposing(f))return;var ie=!1;if(Y==="insertText"&&N&&_.isCollapsed(N)&&F.data&&F.data.length===1&&/[a-z ]/i.test(F.data)&&N.anchor.offset!==0){var ce,de;ie=!0,f.marks&&(ie=!1);var{anchor:he}=N,[le,Ie]=T.toDOMPoint(f,he),Re=(ce=le.parentElement)===null||ce===void 0?void 0:ce.closest("a"),be=T.getWindow(f);if(ie&&Re&&T.hasDOMNode(f,Re)){var Ft,zt=be==null?void 0:be.document.createTreeWalker(Re,NodeFilter.SHOW_TEXT).lastChild();zt===le&&((Ft=zt.textContent)===null||Ft===void 0?void 0:Ft.length)===Ie&&(ie=!1)}if(ie&&le.parentElement&&(be==null||(de=be.getComputedStyle(le.parentElement))===null||de===void 0?void 0:de.whiteSpace)==="pre"){var _e=D.above(f,{at:he.path,match:mt=>X.isElement(mt)&&D.isBlock(f,mt)});_e&&q.string(_e[0]).includes(" ")&&(ie=!1)}}if(!Y.startsWith("delete")||Y.startsWith("deleteBy")){var[et]=F.getTargetRanges();if(et){var me=T.toSlateRange(f,et,{exactMatch:!1,suppressThrow:!1});if(!N||!_.equals(N,me)){ie=!1;var Le=!ee&&f.selection&&D.rangeRef(f,f.selection);I.select(f,me),Le&&sa.set(f,Le)}}}if(ee)return;if(ie||F.preventDefault(),N&&_.isExpanded(N)&&Y.startsWith("delete")){var Pe=Y.endsWith("Backward")?"backward":"forward";D.deleteFragment(f,{direction:Pe});return}switch(Y){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{D.deleteFragment(f);break}case"deleteContent":case"deleteContentForward":{D.deleteForward(f);break}case"deleteContentBackward":{D.deleteBackward(f);break}case"deleteEntireSoftLine":{D.deleteBackward(f,{unit:"line"}),D.deleteForward(f,{unit:"line"});break}case"deleteHardLineBackward":{D.deleteBackward(f,{unit:"block"});break}case"deleteSoftLineBackward":{D.deleteBackward(f,{unit:"line"});break}case"deleteHardLineForward":{D.deleteForward(f,{unit:"block"});break}case"deleteSoftLineForward":{D.deleteForward(f,{unit:"line"});break}case"deleteWordBackward":{D.deleteBackward(f,{unit:"word"});break}case"deleteWordForward":{D.deleteForward(f,{unit:"word"});break}case"insertLineBreak":D.insertSoftBreak(f);break;case"insertParagraph":{D.insertBreak(f);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Y==="insertFromComposition"&&T.isComposing(f)&&(h(!1),Mr.set(f,!1)),(oe==null?void 0:oe.constructor.name)==="DataTransfer"?T.insertData(f,oe):typeof oe=="string"&&(ie?C.current.push(()=>D.insertText(f,oe)):D.insertText(f,oe));break}}var Ne=(j=sa.get(f))===null||j===void 0?void 0:j.unref();sa.delete(f),Ne&&(!f.selection||!_.equals(f.selection,Ne))&&I.select(f,Ne)}},[f,H,x,o,a,P]),$=L.useCallback(F=>{F==null?(H.cancel(),P.cancel(),_s.delete(f),Ir.delete(f),g.current&&or&&g.current.removeEventListener("beforeinput",W)):or&&F.addEventListener("beforeinput",W),g.current=F},[H,P,f,W]);la(()=>{var F=T.getWindow(f);return F.document.addEventListener("selectionchange",P),()=>{F.document.removeEventListener("selectionchange",P)}},[P]);var V=r([f,[]]),G=u&&f.children.length===1&&Array.from(q.texts(f)).length===1&&q.string(f)===""&&!w,R=L.useCallback(F=>{if(F&&G){var j;B((j=F.getBoundingClientRect())===null||j===void 0?void 0:j.height)}else B(void 0)},[G]);if(G){var M=D.start(f,[]);V.push({[Io]:!0,placeholder:u,onPlaceholderResize:R,anchor:M,focus:M})}var{marks:U}=f;if(k.hasMarkPlaceholder=!1,f.selection&&_.isCollapsed(f.selection)&&U){var{anchor:Q}=f.selection,ne=q.leaf(f,Q.path),te=No(ne,bP);if(!Z.equals(ne,U,{loose:!0})){k.hasMarkPlaceholder=!0;var ve=Object.fromEntries(Object.keys(te).map(F=>[F,null]));V.push(fn(fn(fn({[Jy]:!0},ve),U),{},{anchor:Q,focus:Q}))}}return L.useEffect(()=>{setTimeout(()=>{var{selection:F}=f;if(F){var{anchor:j}=F,N=q.leaf(f,j.path);if(U&&!Z.equals(N,U,{loose:!0})){Zt.set(f,U);return}}Zt.delete(f)})}),re.createElement(D1.Provider,{value:a},re.createElement(g1.Provider,{value:r},re.createElement(EP,{node:g,receivedUserInput:b},re.createElement(p,fn(fn({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},m),{},{spellCheck:or||!Os?m.spellCheck:!1,autoCorrect:or||!Os?m.autoCorrect:"false",autoCapitalize:or||!Os?m.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:$,style:fn(fn({},y?{}:fn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),d),onBeforeInput:L.useCallback(F=>{if(!or&&!a&&!it(F,m.onBeforeInput)&&T.hasSelectableTarget(f,F.target)&&(F.preventDefault(),!T.isComposing(f))){var j=F.data;D.insertText(f,j)}},[m.onBeforeInput,f,a]),onInput:L.useCallback(F=>{if(!it(F,m.onInput)){if(O.current){O.current.handleInput();return}for(var j of C.current)j();C.current=[]}},[m.onInput]),onBlur:L.useCallback(F=>{if(!(a||k.isUpdatingSelection||!T.hasSelectableTarget(f,F.target)||it(F,m.onBlur))){var j=T.findDocumentOrShadowRoot(f);if(k.latestElement!==j.activeElement){var{relatedTarget:N}=F,Y=T.toDOMNode(f,f);if(N!==Y&&!(Lt(N)&&N.hasAttribute("data-slate-spacer"))){if(N!=null&&sr(N)&&T.hasDOMNode(f,N)){var oe=T.toSlateNode(f,N);if(X.isElement(oe)&&!f.isVoid(oe))return}if(aa){var ee=j.getSelection();ee==null||ee.removeAllRanges()}ur.delete(f)}}}},[a,k.isUpdatingSelection,k.latestElement,f,m.onBlur]),onClick:L.useCallback(F=>{if(T.hasTarget(f,F.target)&&!it(F,m.onClick)&&sr(F.target)){var j=T.toSlateNode(f,F.target),N=T.findPath(f,j);if(!D.hasPath(f,N)||q.get(f,N)!==j)return;if(F.detail===mP&&N.length>=1){var Y=N;if(!(X.isElement(j)&&D.isBlock(f,j))){var oe,ee=D.above(f,{match:Re=>X.isElement(Re)&&D.isBlock(f,Re),at:N});Y=(oe=ee==null?void 0:ee[1])!==null&&oe!==void 0?oe:N.slice(0,1)}var ie=D.range(f,Y);I.select(f,ie);return}if(a)return;var ce=D.start(f,N),de=D.end(f,N),he=D.void(f,{at:ce}),le=D.void(f,{at:de});if(he&&le&&A.equals(he[1],le[1])){var Ie=D.range(f,ce);I.select(f,Ie)}}},[f,m.onClick,a]),onCompositionEnd:L.useCallback(F=>{if(T.hasSelectableTarget(f,F.target)){var j;if(T.isComposing(f)&&Promise.resolve().then(()=>{h(!1),Mr.set(f,!1)}),(j=O.current)===null||j===void 0||j.handleCompositionEnd(F),it(F,m.onCompositionEnd)||at)return;if(!aa&&!y3&&!v3&&!C3&&!D3&&F.data){var N=Zt.get(f);Zt.delete(f),N!==void 0&&(Fn.set(f,f.marks),f.marks=N),D.insertText(f,F.data);var Y=Fn.get(f);Fn.delete(f),Y!==void 0&&(f.marks=Y)}}},[m.onCompositionEnd,f]),onCompositionUpdate:L.useCallback(F=>{T.hasSelectableTarget(f,F.target)&&!it(F,m.onCompositionUpdate)&&(T.isComposing(f)||(h(!0),Mr.set(f,!0)))},[m.onCompositionUpdate,f]),onCompositionStart:L.useCallback(F=>{if(T.hasSelectableTarget(f,F.target)){var j;if((j=O.current)===null||j===void 0||j.handleCompositionStart(F),it(F,m.onCompositionStart)||at)return;h(!0);var{selection:N}=f;if(N&&_.isExpanded(N)){D.deleteFragment(f);return}}},[m.onCompositionStart,f]),onCopy:L.useCallback(F=>{T.hasSelectableTarget(f,F.target)&&!it(F,m.onCopy)&&!B1(F)&&(F.preventDefault(),T.setFragmentData(f,F.clipboardData,"copy"))},[m.onCopy,f]),onCut:L.useCallback(F=>{if(!a&&T.hasSelectableTarget(f,F.target)&&!it(F,m.onCut)&&!B1(F)){F.preventDefault(),T.setFragmentData(f,F.clipboardData,"cut");var{selection:j}=f;if(j)if(_.isExpanded(j))D.deleteFragment(f);else{var N=q.parent(f,j.anchor.path);D.isVoid(f,N)&&I.delete(f)}}},[a,f,m.onCut]),onDragOver:L.useCallback(F=>{if(T.hasTarget(f,F.target)&&!it(F,m.onDragOver)){var j=T.toSlateNode(f,F.target);X.isElement(j)&&D.isVoid(f,j)&&F.preventDefault()}},[m.onDragOver,f]),onDragStart:L.useCallback(F=>{if(!a&&T.hasTarget(f,F.target)&&!it(F,m.onDragStart)){var j=T.toSlateNode(f,F.target),N=T.findPath(f,j),Y=X.isElement(j)&&D.isVoid(f,j)||D.void(f,{at:N,voids:!0});if(Y){var oe=D.range(f,N);I.select(f,oe)}k.isDraggingInternally=!0,T.setFragmentData(f,F.dataTransfer,"drag")}},[a,f,m.onDragStart,k]),onDrop:L.useCallback(F=>{if(!a&&T.hasTarget(f,F.target)&&!it(F,m.onDrop)){F.preventDefault();var j=f.selection,N=T.findEventRange(f,F),Y=F.dataTransfer;I.select(f,N),k.isDraggingInternally&&j&&!_.equals(j,N)&&!D.void(f,{at:N,voids:!0})&&I.delete(f,{at:j}),T.insertData(f,Y),T.isFocused(f)||T.focus(f)}k.isDraggingInternally=!1},[a,f,m.onDrop,k]),onDragEnd:L.useCallback(F=>{!a&&k.isDraggingInternally&&m.onDragEnd&&T.hasTarget(f,F.target)&&m.onDragEnd(F),k.isDraggingInternally=!1},[a,k,m,f]),onFocus:L.useCallback(F=>{if(!a&&!k.isUpdatingSelection&&T.hasEditableTarget(f,F.target)&&!it(F,m.onFocus)){var j=T.toDOMNode(f,f),N=T.findDocumentOrShadowRoot(f);if(k.latestElement=N.activeElement,jo&&F.target!==j){j.focus();return}ur.set(f,!0)}},[a,k,f,m.onFocus]),onKeyDown:L.useCallback(F=>{if(!a&&T.hasEditableTarget(f,F.target)){var j;(j=O.current)===null||j===void 0||j.handleKeyDown(F);var{nativeEvent:N}=F;if(T.isComposing(f)&&N.isComposing===!1&&(Mr.set(f,!1),h(!1)),it(F,m.onKeyDown)||T.isComposing(f))return;var{selection:Y}=f,oe=f.children[Y!==null?Y.focus.path[0]:0],ee=hy(q.string(oe))==="rtl";if(Se.isRedo(N)){F.preventDefault();var ie=f;typeof ie.redo=="function"&&ie.redo();return}if(Se.isUndo(N)){F.preventDefault();var ce=f;typeof ce.undo=="function"&&ce.undo();return}if(Se.isMoveLineBackward(N)){F.preventDefault(),I.move(f,{unit:"line",reverse:!0});return}if(Se.isMoveLineForward(N)){F.preventDefault(),I.move(f,{unit:"line"});return}if(Se.isExtendLineBackward(N)){F.preventDefault(),I.move(f,{unit:"line",edge:"focus",reverse:!0});return}if(Se.isExtendLineForward(N)){F.preventDefault(),I.move(f,{unit:"line",edge:"focus"});return}if(Se.isMoveBackward(N)){F.preventDefault(),Y&&_.isCollapsed(Y)?I.move(f,{reverse:!ee}):I.collapse(f,{edge:ee?"end":"start"});return}if(Se.isMoveForward(N)){F.preventDefault(),Y&&_.isCollapsed(Y)?I.move(f,{reverse:ee}):I.collapse(f,{edge:ee?"start":"end"});return}if(Se.isMoveWordBackward(N)){F.preventDefault(),Y&&_.isExpanded(Y)&&I.collapse(f,{edge:"focus"}),I.move(f,{unit:"word",reverse:!ee});return}if(Se.isMoveWordForward(N)){F.preventDefault(),Y&&_.isExpanded(Y)&&I.collapse(f,{edge:"focus"}),I.move(f,{unit:"word",reverse:ee});return}if(or){if((Gy||aa)&&Y&&(Se.isDeleteBackward(N)||Se.isDeleteForward(N))&&_.isCollapsed(Y)){var de=q.parent(f,Y.anchor.path);if(X.isElement(de)&&D.isVoid(f,de)&&(D.isInline(f,de)||D.isBlock(f,de))){F.preventDefault(),D.deleteBackward(f,{unit:"block"});return}}}else{if(Se.isBold(N)||Se.isItalic(N)||Se.isTransposeCharacter(N)){F.preventDefault();return}if(Se.isSoftBreak(N)){F.preventDefault(),D.insertSoftBreak(f);return}if(Se.isSplitBlock(N)){F.preventDefault(),D.insertBreak(f);return}if(Se.isDeleteBackward(N)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f);return}if(Se.isDeleteForward(N)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f);return}if(Se.isDeleteLineBackward(N)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"line"});return}if(Se.isDeleteLineForward(N)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"line"});return}if(Se.isDeleteWordBackward(N)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"word"});return}if(Se.isDeleteWordForward(N)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"word"});return}}}},[a,f,m.onKeyDown]),onPaste:L.useCallback(F=>{!a&&T.hasEditableTarget(f,F.target)&&!it(F,m.onPaste)&&(!or||B3(F.nativeEvent)||aa)&&(F.preventDefault(),T.insertData(f,F.clipboardData))},[a,f,m.onPaste])}),re.createElement(AP,{decorations:V,node:f,renderElement:i,renderPlaceholder:l,renderLeaf:s,selection:f.selection})))))},FP=e=>{var{attributes:t,children:n}=e;return re.createElement("span",fn({},t),n,at&&re.createElement("br",null))},SP=()=>[],OP=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&_.isCollapsed(e.selection))){var n=t.startContainer.parentElement;n.getBoundingClientRect=t.getBoundingClientRect.bind(t),L_(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},it=(e,t)=>{if(!t)return!1;var n=t(e);return n??(e.isDefaultPrevented()||e.isPropagationStopped())},B1=e=>sr(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),_P=(e,t)=>{if(!t)return!1;var n=t(e);return n??e.defaultPrevented},PP=L.createContext(!1),kP=L.createContext({});function TP(e){var t=L.useRef([]).current,n=L.useRef({editor:e}).current,r=L.useCallback(u=>{n.editor=u,t.forEach(a=>a(u))},[t,n]),o=L.useMemo(()=>({getSlate:()=>n.editor,addEventListener:u=>(t.push(u),()=>{t.splice(t.indexOf(u),1)})}),[t,n]);return{selectorContext:o,onChange:r}}var RP=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],NP=e=>{var{editor:t,children:n,onChange:r,onSelectionChange:o,onValueChange:u,initialValue:a}=e,i=No(e,RP),[s,l]=re.useState(()=>{if(!q.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(ze.stringify(a)));if(!D.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(ze.stringify(t)));return t.children=a,Object.assign(t,i),{v:0,editor:t}}),{selectorContext:c,onChange:d}=TP(t),p=L.useCallback(f=>{var w;switch(r&&r(t.children),f==null||(w=f.operation)===null||w===void 0?void 0:w.type){case"set_selection":o==null||o(t.selection);break;default:u==null||u(t.children)}l(h=>({v:h.v+1,editor:t})),d(t)},[t,d,r,o,u]);L.useEffect(()=>(Dd.set(t,p),()=>{Dd.set(t,()=>{})}),[t,p]);var[y,m]=L.useState(T.isFocused(t));return L.useEffect(()=>{m(T.isFocused(t))},[t]),la(()=>{var f=()=>m(T.isFocused(t));return Yy>=17?(document.addEventListener("focusin",f),document.addEventListener("focusout",f),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",f)}):(document.addEventListener("focus",f,!0),document.addEventListener("blur",f,!0),()=>{document.removeEventListener("focus",f,!0),document.removeEventListener("blur",f,!0)})},[]),re.createElement(kP.Provider,{value:c},re.createElement(C1.Provider,{value:s},re.createElement(vd.Provider,{value:s.editor},re.createElement(PP.Provider,{value:y},n))))},b1=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},A1=(e,t,n)=>{var r=T.toDOMRange(e,t).getBoundingClientRect(),o=T.toDOMRange(e,n).getBoundingClientRect();return b1(r,o)&&b1(o,r)},jP=(e,t)=>{var n=D.range(e,_.end(t)),r=Array.from(D.positions(e,{at:t})),o=0,u=r.length,a=Math.floor(u/2);if(A1(e,D.range(e,r[o]),n))return D.range(e,r[o],n);if(r.length<2)return D.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)A1(e,D.range(e,r[a]),n)?u=a:o=a,a=Math.floor((o+u)/2);return D.range(e,r[u],n)};function x1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x1(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var IP=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=t,{apply:o,onChange:u,deleteBackward:a,addMark:i,removeMark:s}=r;return ks.set(r,new WeakMap),r.addMark=(l,c)=>{var d,p;(d=Cd.get(r))===null||d===void 0||d(),!Zt.get(r)&&(p=ht.get(r))!==null&&p!==void 0&&p.length&&Zt.set(r,null),Fn.delete(r),i(l,c)},r.removeMark=l=>{var c;!Zt.get(r)&&(c=ht.get(r))!==null&&c!==void 0&&c.length&&Zt.set(r,null),Fn.delete(r),s(l)},r.deleteBackward=l=>{if(l!=="line")return a(l);if(r.selection&&_.isCollapsed(r.selection)){var c=D.above(r,{match:m=>X.isElement(m)&&D.isBlock(r,m),at:r.selection});if(c){var[,d]=c,p=D.range(r,d,r.selection.anchor),y=jP(r,p);_.isCollapsed(y)||I.delete(r,{at:y})}}},r.apply=l=>{var c=[],d=[],p=ht.get(r);if(p!=null&&p.length){var y=p.map($=>j3($,l)).filter(Boolean);ht.set(r,y)}var m=ir.get(r);m&&ir.set(r,a1(r,m,l));var f=ar.get(r);if(f!=null&&f.at){var w=ae.isPoint(f==null?void 0:f.at)?Ad(r,f.at,l):a1(r,f.at,l);ar.set(r,w?F1(F1({},f),{},{at:w}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...Mo(r,l.path));break}case"set_selection":{var h;(h=sa.get(r))===null||h===void 0||h.unref(),sa.delete(r);break}case"insert_node":case"remove_node":{c.push(...Mo(r,A.parent(l.path)));break}case"merge_node":{var g=A.previous(l.path);c.push(...Mo(r,g));break}case"move_node":{var C=A.common(A.parent(l.path),A.parent(l.newPath));c.push(...Mo(r,C));var E;A.isBefore(l.path,l.newPath)?(c.push(...Mo(r,A.parent(l.path))),E=l.newPath):(c.push(...Mo(r,A.parent(l.newPath))),E=l.path);var B=q.get(t,A.parent(E)),x=T.findKey(r,B),b=D.pathRef(r,A.parent(E));d.push([b,x]);break}}o(l);for(var[S,k]of c){var[O]=D.node(r,S);Ps.set(O,k)}for(var[H,P]of d)if(H.current){var[W]=D.node(r,H.current);Ps.set(W,P)}},r.setFragmentData=l=>{var{selection:c}=r;if(c){var[d,p]=_.edges(c),y=D.void(r,{at:d.path}),m=D.void(r,{at:p.path});if(!(_.isCollapsed(c)&&!y)){var f=T.toDOMRange(r,c),w=f.cloneContents(),h=w.childNodes[0];if(w.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(h=O)}),m){var[g]=m,C=f.cloneRange(),E=T.toDOMNode(r,g);C.setEndAfter(E),w=C.cloneContents()}if(y&&(h=w.querySelector("[data-slate-spacer]")),Array.from(w.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var H=O.getAttribute("data-slate-zero-width")==="n";O.textContent=H?`
|
61
|
-
`:""}),e1(h)){var B=h.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(h),w.appendChild(B),h=B}var x=r.getFragment(),b=JSON.stringify(x),S=window.btoa(encodeURIComponent(b));h.setAttribute("data-slate-fragment",S),l.setData("application/".concat(n),S);var k=w.ownerDocument.createElement("div");return k.appendChild(w),k.setAttribute("hidden","true"),w.ownerDocument.body.appendChild(k),l.setData("text/html",k.innerHTML),l.setData("text/plain",n1(k)),w.ownerDocument.body.removeChild(k),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||S3(l);if(c){var d=decodeURIComponent(window.atob(c)),p=JSON.parse(d);return r.insertFragment(p),!0}return!1},r.insertTextData=l=>{var c=l.getData("text/plain");if(c){var d=c.split(/\r\n|\r|\n/),p=!1;for(var y of d)p&&I.splitNodes(r,{always:!0}),r.insertText(y),p=!0;return!0}return!1},r.onChange=l=>{var c=Yy<18?ko.unstable_batchedUpdates:d=>d();c(()=>{var d=Dd.get(r);d&&d(l),u(l)})},r},Mo=(e,t)=>{var n=[];for(var[r,o]of D.levels(e,{at:t})){var u=T.findKey(e,r);n.push([o,u])}return n},MP={isHistory(e){return Ue(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Nn.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Nn.isOperationList(e.undos[0].operations))}},Sd=new WeakMap,Od=new WeakMap,$o={isHistoryEditor(e){return MP.isHistory(e.history)&&D.isEditor(e)},isMerging(e){return Od.get(e)},isSaving(e){return Sd.get(e)},redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=$o.isMerging(e);Od.set(e,!1),t(),Od.set(e,n)},withoutSaving(e,t){var n=$o.isSaving(e);Sd.set(e,!1),t(),Sd.set(e,n)}},$P=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:r}=t,{redos:o}=r;if(o.length>0){var u=o[o.length-1];u.selectionBefore&&I.setSelection(t,u.selectionBefore),$o.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{for(var a of u.operations)t.apply(a)})}),r.redos.pop(),t.writeHistory("undos",u)}},t.undo=()=>{var{history:r}=t,{undos:o}=r;if(o.length>0){var u=o[o.length-1];$o.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{var a=u.operations.map(Nn.inverse).reverse();for(var i of a)t.apply(i);u.selectionBefore&&I.setSelection(t,u.selectionBefore)})}),t.writeHistory("redos",u),r.undos.pop()}},t.apply=r=>{var{operations:o,history:u}=t,{undos:a}=u,i=a[a.length-1],s=i&&i.operations[i.operations.length-1],l=$o.isSaving(t),c=$o.isMerging(t);if(l==null&&(l=zP(r)),l){if(c==null&&(i==null?c=!1:o.length!==0?c=!0:c=LP(r,s)),i&&c)i.operations.push(r);else{var d={operations:[r],selectionBefore:t.selection};t.writeHistory("undos",d)}for(;a.length>100;)a.shift();u.redos=[]}n(r)},t.writeHistory=(r,o)=>{t.history[r].push(o)},t},LP=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&A.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&A.equals(e.path,t.path)),zP=(e,t)=>e.type!=="set_selection";function VP(e){const n=`docx-h${e.element.level}`;return Te.jsx(n,{...e.attributes,children:e.children})}function WP(e){return Te.jsx("docx-blockquote",{...e.attributes,children:e.children})}const{Provider:UP,Consumer:HP}=L.createContext(!1);function KP(e){const t=e.element,n=`docx-${t.ordered?"o":"u"}l`;return Te.jsx(UP,{value:!!t.ordered,children:Te.jsx(n,{...e.attributes,children:e.children})})}function qP(e){return Te.jsx(HP,{children:t=>Te.jsx("docx-li",{className:t?"ordered":"",children:e.children})})}const YP={"#":"heading","##":"heading","###":"heading","####":"heading","#####":"heading","######":"heading",">":"blockquote","*":"list-item","-":"list-item","+":"list-item"},QP=[[/\*\*(.+?)\*\*$/,"bold"],[/\*(.+?)\*$/,"italic"],[/\~\~(.+?)\~\~$/,"del"],[/\~(.+?)\~$/,"underline"]];function GP(e){return e.element.type==="heading"?Te.jsx(VP,{...e}):e.element.type==="blockquote"?Te.jsx(WP,{...e}):e.element.type==="list"?Te.jsx(KP,{...e}):e.element.type==="list-item"?Te.jsx(qP,{...e}):Te.jsx("p",{...e.attributes,children:e.children})}function XP({attributes:e,children:t,leaf:n}){return n.bold&&(t=Te.jsx("strong",{children:t})),n.code&&(t=Te.jsx("code",{children:t})),n.italic&&(t=Te.jsx("em",{children:t})),n.del&&(t=Te.jsx("del",{children:t})),n.underline&&(t=Te.jsx("u",{children:t})),Te.jsx("span",{...e,children:t})}function ZP(e){const{initialValue:t=[{type:"paragraph",children:[{text:""}]}],onBeforeInput:n,withOverride:r=c=>c}=e,o=L.useMemo(()=>r(IP($P(hx()))),[]),u=L.useCallback(c=>Te.jsx(GP,{...c}),[]),a=L.useCallback(c=>Te.jsx(XP,{...c}),[]),i=L.useCallback(n?c=>{queueMicrotask(()=>n(c))}:()=>{},[o]),s=L.useCallback(c=>kb.trigger(c),[o]),l=L.useCallback(c=>Bv.trigger(c),[o]);return $a.value=o,Te.jsx(NP,{editor:o,initialValue:t,onSelectionChange:s,onValueChange:l,children:Te.jsx(xP,{className:"smart-docx-editor",renderElement:u,renderLeaf:a,onDOMBeforeInput:i})})}const JP=lu(v.defineComponent({__name:"Markdown",props:{initialValue:{type:Array}},setup(e){const t=e,n=DO(ZP);function r(u){return{match:a=>X.isElement(a)&&D.isBlock(u,a)}}const o=u=>{const{insertText:a,deleteBackward:i,insertBreak:s}=u;return u.insertBreak=()=>{const{selection:l}=u;if(l&&_.isCollapsed(l)){const[c,d]=D.above(u,r(u))||[];if(c&&X.isElement(c)&&ae.equals(l.anchor,D.end(u,d))){if(c.type==="list-item")return I.insertNodes(u,{type:"list-item",children:[{text:""}]},r(u));if(c.type!=="paragraph")return I.insertNodes(u,{type:"paragraph",children:[{text:""}]},r(u))}}s()},u.insertText=l=>{const{selection:c}=u;if(l.endsWith(" ")&&c&&_.isCollapsed(c)){const d=D.above(u,r(u)),p=d?d[1]:[],y=D.start(u,p),m={anchor:c.anchor,focus:y},f=D.string(u,m)+l.slice(0,-1),w=YP[f];if(w){I.select(u,m),_.isCollapsed(m)||I.delete(u);const h={type:w};w==="heading"?h.level=`${f.length}`:w==="blockquote"&&(h.type="paragraph"),I.setNodes(u,h,r(u)),w==="blockquote"?I.wrapNodes(u,{type:"blockquote",children:[]},r(u)):w==="list-item"&&I.wrapNodes(u,{type:"list",children:[]},r(u));return}else for(const[h,g]of QP){const[C,E]=f.match(h)||[];if(C){const B=D.before(u,c,{unit:"character",distance:C.length}),x=D.range(u,B,c);return I.insertText(u,E,{at:x}),I.setNodes(u,{[g]:!0},{at:x,match:b=>Z.isText(b),split:!0}),I.insertNodes(u,{text:" "})}}}a(l)},u.deleteBackward=(...l)=>{const{selection:c}=u;if(c&&_.isCollapsed(c)){const[d,p]=D.above(u,r(u))||[];if(d&&ae.equals(c.anchor,D.start(u,p))){const[y,m]=D.parent(u,p);if(y)if(X.isElement(y)){const f=y.children[0]===d,w=y.children.at(-1)===d;let h=!1;if(f&&w?(h=!0,I.unwrapNodes(u,{at:m})):f?(h=!0,I.moveNodes(u,{to:m})):w&&(h=!0,I.moveNodes(u,{to:A.next(m)})),h){I.setNodes(u,{type:"paragraph"});return}}else D.isEditor(y)&&y.children.length===1&&I.setNodes(u,{type:"paragraph"})}i(...l)}},u};{const{isValidSelection:u}=Av();Qe(Ma(),"dragstart",a=>{u.value&&a.preventDefault()})}return(u,a)=>(v.openBlock(),v.createBlock(v.unref(n),v.mergeProps(t,{"with-override":o}),null,16))}}),[["styles",["[data-v-14d7ea7c],[data-v-14d7ea7c]:before,[data-v-14d7ea7c]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-14d7ea7c]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.list-item[data-v-14d7ea7c]{display:list-item}"]],["__scopeId","data-v-14d7ea7c"]]),ek=lu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(JP,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(Cx)],64))}}),[["styles",[`@charset "UTF-8";[data-use-vue-component-wrap],[__use_react_component_wrap]{display:contents}.smart-docx-editor{font-size:1rem;line-height:1.5rem;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.3s;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%}.smart-docx-editor>:first-child{margin-top:0!important}docx-h1,docx-h2,docx-h3,docx-h4,docx-h5,docx-h6{display:block;font-weight:700}docx-h1{margin-top:26px;margin-bottom:10px;font-size:26px}docx-h2{margin-top:22px;margin-bottom:8px;font-size:22px}docx-h3{margin-top:20px;margin-bottom:8px;font-size:20px}docx-h4{margin-top:18px;margin-bottom:8px;font-size:18px}docx-h5{margin-top:18px;margin-bottom:8px;font-size:16px}docx-h6{margin-top:16px;margin-bottom:8px;font-size:16px}docx-blockquote{display:block;--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity));border-left-width:2px;--un-border-opacity:1;--un-border-left-opacity:var(--un-border-opacity);border-left-color:rgb(163 163 163 / var(--un-border-left-opacity));border-left-style:solid;margin-top:.5rem;margin-bottom:.5rem;padding-left:.75rem}:host-context(.dark) docx-blockquote{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}docx-ul,docx-ol,docx-li{display:block}docx-li{list-style-type:none}docx-li:not(.ordered){position:relative;padding-left:1.5rem;line-height:1.5rem}docx-li:not(.ordered):before{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 14a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;pointer-events:none;position:absolute;top:0;left:0;display:flex;--un-translate-x:-25%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));align-items:center;justify-content:left;content:"";width:1.5rem;height:1.5rem}`,"[data-v-1360e702],[data-v-1360e702]:before,[data-v-1360e702]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-1360e702]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-1360e702"]]),tk=lu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(ek,v.normalizeProps(v.guardReactiveProps(t)),null,16))}}),[["styles",["[data-v-9cb0b441],[data-v-9cb0b441]:before,[data-v-9cb0b441]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9cb0b441]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-9cb0b441"]]),nk="2.0.7";function rk(e=Nb()){const t=Ma(),n=`style[cssr-id^="${e}-"]`;return v.onMounted(()=>{function r(){const o=t.value.parentNode;o.querySelectorAll(n).forEach(u=>{o.removeChild(u)}),Array.from(document.querySelectorAll(n)).forEach(u=>{o.appendChild(u.cloneNode()).textContent=u.textContent})}Sb(document.head,r,{childList:!0}),r()}),e}function ok(){const e=Ma();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[nk])??{};if(n&&(t.appendChild(document.createElement("style")).textContent=n),r){const u=document.createElement("style");u.setAttribute("namespace","smart"),t.appendChild(u).textContent=r,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(u.cloneNode()).textContent=r)}}),{classPrefix:rk()}}const uk=lu(v.defineComponent({__name:"App",props:{initialValue:{type:Array}},emits:["change"],setup(e,{emit:t}){const n=t;return ok(),Bv.on(r=>{n("change",r)}),v.onMounted(()=>{La.value=Ma().value.parentNode}),(r,o)=>{const u=HE;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(tk,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",["[data-v-59b0d3b6],[data-v-59b0d3b6]:before,[data-v-59b0d3b6]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-59b0d3b6]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-59b0d3b6"]]),ak="smart-docx-editor";function ik(e,t){var n;jb&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}ik(ak,uk)})((S1=SmartCore["2.0.7"])==null?void 0:S1.Vue);
|
61
|
+
`:""}),e1(h)){var B=h.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(h),w.appendChild(B),h=B}var x=r.getFragment(),b=JSON.stringify(x),S=window.btoa(encodeURIComponent(b));h.setAttribute("data-slate-fragment",S),l.setData("application/".concat(n),S);var k=w.ownerDocument.createElement("div");return k.appendChild(w),k.setAttribute("hidden","true"),w.ownerDocument.body.appendChild(k),l.setData("text/html",k.innerHTML),l.setData("text/plain",n1(k)),w.ownerDocument.body.removeChild(k),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||S3(l);if(c){var d=decodeURIComponent(window.atob(c)),p=JSON.parse(d);return r.insertFragment(p),!0}return!1},r.insertTextData=l=>{var c=l.getData("text/plain");if(c){var d=c.split(/\r\n|\r|\n/),p=!1;for(var y of d)p&&I.splitNodes(r,{always:!0}),r.insertText(y),p=!0;return!0}return!1},r.onChange=l=>{var c=Yy<18?ko.unstable_batchedUpdates:d=>d();c(()=>{var d=Dd.get(r);d&&d(l),u(l)})},r},Mo=(e,t)=>{var n=[];for(var[r,o]of D.levels(e,{at:t})){var u=T.findKey(e,r);n.push([o,u])}return n},MP={isHistory(e){return Ue(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Nn.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Nn.isOperationList(e.undos[0].operations))}},Sd=new WeakMap,Od=new WeakMap,$o={isHistoryEditor(e){return MP.isHistory(e.history)&&D.isEditor(e)},isMerging(e){return Od.get(e)},isSaving(e){return Sd.get(e)},redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=$o.isMerging(e);Od.set(e,!1),t(),Od.set(e,n)},withoutSaving(e,t){var n=$o.isSaving(e);Sd.set(e,!1),t(),Sd.set(e,n)}},$P=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:r}=t,{redos:o}=r;if(o.length>0){var u=o[o.length-1];u.selectionBefore&&I.setSelection(t,u.selectionBefore),$o.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{for(var a of u.operations)t.apply(a)})}),r.redos.pop(),t.writeHistory("undos",u)}},t.undo=()=>{var{history:r}=t,{undos:o}=r;if(o.length>0){var u=o[o.length-1];$o.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{var a=u.operations.map(Nn.inverse).reverse();for(var i of a)t.apply(i);u.selectionBefore&&I.setSelection(t,u.selectionBefore)})}),t.writeHistory("redos",u),r.undos.pop()}},t.apply=r=>{var{operations:o,history:u}=t,{undos:a}=u,i=a[a.length-1],s=i&&i.operations[i.operations.length-1],l=$o.isSaving(t),c=$o.isMerging(t);if(l==null&&(l=zP(r)),l){if(c==null&&(i==null?c=!1:o.length!==0?c=!0:c=LP(r,s)),i&&c)i.operations.push(r);else{var d={operations:[r],selectionBefore:t.selection};t.writeHistory("undos",d)}for(;a.length>100;)a.shift();u.redos=[]}n(r)},t.writeHistory=(r,o)=>{t.history[r].push(o)},t},LP=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&A.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&A.equals(e.path,t.path)),zP=(e,t)=>e.type!=="set_selection";function VP(e){const n=`docx-h${e.element.level}`;return Te.jsx(n,{...e.attributes,children:e.children})}function WP(e){return Te.jsx("docx-blockquote",{...e.attributes,children:e.children})}const{Provider:UP,Consumer:HP}=L.createContext(!1);function KP(e){const t=e.element,n=`docx-${t.ordered?"o":"u"}l`;return Te.jsx(UP,{value:!!t.ordered,children:Te.jsx(n,{...e.attributes,children:e.children})})}function qP(e){return Te.jsx(HP,{children:t=>Te.jsx("docx-li",{className:t?"ordered":"",children:e.children})})}const YP={"#":"heading","##":"heading","###":"heading","####":"heading","#####":"heading","######":"heading",">":"blockquote","*":"list-item","-":"list-item","+":"list-item"},QP=[[/\*\*(.+?)\*\*$/,"bold"],[/\*(.+?)\*$/,"italic"],[/\~\~(.+?)\~\~$/,"del"],[/\~(.+?)\~$/,"underline"]];function GP(e){return e.element.type==="heading"?Te.jsx(VP,{...e}):e.element.type==="blockquote"?Te.jsx(WP,{...e}):e.element.type==="list"?Te.jsx(KP,{...e}):e.element.type==="list-item"?Te.jsx(qP,{...e}):Te.jsx("p",{...e.attributes,children:e.children})}function XP({attributes:e,children:t,leaf:n}){return n.bold&&(t=Te.jsx("strong",{children:t})),n.code&&(t=Te.jsx("code",{children:t})),n.italic&&(t=Te.jsx("em",{children:t})),n.del&&(t=Te.jsx("del",{children:t})),n.underline&&(t=Te.jsx("u",{children:t})),Te.jsx("span",{...e,children:t})}function ZP(e){const{initialValue:t=[{type:"paragraph",children:[{text:""}]}],onBeforeInput:n,withOverride:r=c=>c}=e,o=L.useMemo(()=>r(IP($P(hx()))),[]),u=L.useCallback(c=>Te.jsx(GP,{...c}),[]),a=L.useCallback(c=>Te.jsx(XP,{...c}),[]),i=L.useCallback(n?c=>{queueMicrotask(()=>n(c))}:()=>{},[o]),s=L.useCallback(c=>kb.trigger(c),[o]),l=L.useCallback(c=>Bv.trigger(c),[o]);return $a.value=o,Te.jsx(NP,{editor:o,initialValue:t,onSelectionChange:s,onValueChange:l,children:Te.jsx(xP,{className:"smart-docx-editor",renderElement:u,renderLeaf:a,onDOMBeforeInput:i})})}const JP=lu(v.defineComponent({__name:"Markdown",props:{initialValue:{type:Array}},setup(e){const t=e,n=DO(ZP);function r(u){return{match:a=>X.isElement(a)&&D.isBlock(u,a)}}const o=u=>{const{insertText:a,deleteBackward:i,insertBreak:s}=u;return u.insertBreak=()=>{const{selection:l}=u;if(l&&_.isCollapsed(l)){const[c,d]=D.above(u,r(u))||[];if(c&&X.isElement(c)&&ae.equals(l.anchor,D.end(u,d))){if(c.type==="list-item")return I.insertNodes(u,{type:"list-item",children:[{text:""}]},r(u));if(c.type!=="paragraph")return I.insertNodes(u,{type:"paragraph",children:[{text:""}]},r(u))}}s()},u.insertText=l=>{const{selection:c}=u;if(l.endsWith(" ")&&c&&_.isCollapsed(c)){const d=D.above(u,r(u)),p=d?d[1]:[],y=D.start(u,p),m={anchor:c.anchor,focus:y},f=D.string(u,m)+l.slice(0,-1),w=YP[f];if(w){I.select(u,m),_.isCollapsed(m)||I.delete(u);const h={type:w};w==="heading"?h.level=`${f.length}`:w==="blockquote"&&(h.type="paragraph"),I.setNodes(u,h,r(u)),w==="blockquote"?I.wrapNodes(u,{type:"blockquote",children:[]},r(u)):w==="list-item"&&I.wrapNodes(u,{type:"list",children:[]},r(u));return}else for(const[h,g]of QP){const[C,E]=f.match(h)||[];if(C){const B=D.before(u,c,{unit:"character",distance:C.length}),x=D.range(u,B,c);return I.insertText(u,E,{at:x}),I.setNodes(u,{[g]:!0},{at:x,match:b=>Z.isText(b),split:!0}),I.insertNodes(u,{text:" "})}}}a(l)},u.deleteBackward=(...l)=>{const{selection:c}=u;if(c&&_.isCollapsed(c)){const[d,p]=D.above(u,r(u))||[];if(d&&ae.equals(c.anchor,D.start(u,p))){const[y,m]=D.parent(u,p);if(y)if(X.isElement(y)){const f=y.children[0]===d,w=y.children.at(-1)===d;let h=!1;if(f&&w?(h=!0,I.unwrapNodes(u,{at:m})):f?(h=!0,I.moveNodes(u,{to:m})):w&&(h=!0,I.moveNodes(u,{to:A.next(m)})),h){I.setNodes(u,{type:"paragraph"});return}}else D.isEditor(y)&&y.children.length===1&&I.setNodes(u,{type:"paragraph"})}i(...l)}},u};{const{isValidSelection:u}=Av();Qe(Ma(),"dragstart",a=>{u.value&&a.preventDefault()})}return(u,a)=>(v.openBlock(),v.createBlock(v.unref(n),v.mergeProps(t,{"with-override":o}),null,16))}}),[["styles",["[data-v-14d7ea7c],[data-v-14d7ea7c]:before,[data-v-14d7ea7c]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-14d7ea7c]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.list-item[data-v-14d7ea7c]{display:list-item}"]],["__scopeId","data-v-14d7ea7c"]]),ek=lu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(JP,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(Cx)],64))}}),[["styles",[`@charset "UTF-8";[data-use-vue-component-wrap],[__use_react_component_wrap]{display:contents}.smart-docx-editor{font-size:1rem;line-height:1.5rem;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.3s;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%}.smart-docx-editor>:first-child{margin-top:0!important}docx-h1,docx-h2,docx-h3,docx-h4,docx-h5,docx-h6{display:block;font-weight:700}docx-h1{margin-top:26px;margin-bottom:10px;font-size:26px}docx-h2{margin-top:22px;margin-bottom:8px;font-size:22px}docx-h3{margin-top:20px;margin-bottom:8px;font-size:20px}docx-h4{margin-top:18px;margin-bottom:8px;font-size:18px}docx-h5{margin-top:18px;margin-bottom:8px;font-size:16px}docx-h6{margin-top:16px;margin-bottom:8px;font-size:16px}docx-blockquote{display:block;--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity));border-left-width:2px;--un-border-opacity:1;--un-border-left-opacity:var(--un-border-opacity);border-left-color:rgb(163 163 163 / var(--un-border-left-opacity));border-left-style:solid;margin-top:.5rem;margin-bottom:.5rem;padding-left:.75rem}:host-context(.dark) docx-blockquote{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}docx-ul,docx-ol,docx-li{display:block}docx-li{list-style-type:none}docx-li:not(.ordered){position:relative;padding-left:1.5rem;line-height:1.5rem}docx-li:not(.ordered):before{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 14a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;pointer-events:none;position:absolute;top:0;left:0;display:flex;--un-translate-x:-25%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));align-items:center;justify-content:left;content:"";width:1.5rem;height:1.5rem}`,"[data-v-1360e702],[data-v-1360e702]:before,[data-v-1360e702]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-1360e702]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-1360e702"]]),tk=lu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(ek,v.normalizeProps(v.guardReactiveProps(t)),null,16))}}),[["styles",["[data-v-9cb0b441],[data-v-9cb0b441]:before,[data-v-9cb0b441]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9cb0b441]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-9cb0b441"]]),nk="2.0.8";function rk(e=Nb()){const t=Ma(),n=`style[cssr-id^="${e}-"]`;return v.onMounted(()=>{function r(){const o=t.value.parentNode;o.querySelectorAll(n).forEach(u=>{o.removeChild(u)}),Array.from(document.querySelectorAll(n)).forEach(u=>{o.appendChild(u.cloneNode()).textContent=u.textContent})}Sb(document.head,r,{childList:!0}),r()}),e}function ok(){const e=Ma();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[nk])??{};if(n&&(t.appendChild(document.createElement("style")).textContent=n),r){const u=document.createElement("style");u.setAttribute("namespace","smart"),t.appendChild(u).textContent=r,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(u.cloneNode()).textContent=r)}}),{classPrefix:rk()}}const uk=lu(v.defineComponent({__name:"App",props:{initialValue:{type:Array}},emits:["change"],setup(e,{emit:t}){const n=t;return ok(),Bv.on(r=>{n("change",r)}),v.onMounted(()=>{La.value=Ma().value.parentNode}),(r,o)=>{const u=HE;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(tk,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",["[data-v-59b0d3b6],[data-v-59b0d3b6]:before,[data-v-59b0d3b6]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-59b0d3b6]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-59b0d3b6"]]),ak="smart-docx-editor";function ik(e,t){var n;jb&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}ik(ak,uk)})((S1=SmartCore["2.0.8"])==null?void 0:S1.Vue);
|
@@ -28,4 +28,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
28
28
|
* Released under the MIT license
|
29
29
|
*
|
30
30
|
* Date: 2023-09-17T03:16:35.830Z
|
31
|
-
*/.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#00000080;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;left:0;position:absolute;right:0;top:0;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#00000080;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#00000080;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#00000080}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,.1);border-left-color:#ffffff80;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.viewer-button.viewer-fullscreen{display:none}`,'[data-v-de658cb7],[data-v-de658cb7]:before,[data-v-de658cb7]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-de658cb7]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.inline[data-v-de658cb7]{display:inline}.transition[data-v-de658cb7]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[size-full=""][data-v-de658cb7]{width:100%;height:100%}[hidden=""][data-v-de658cb7]{display:none}']],["__scopeId","data-v-de658cb7"]]),co=["src"],uo=Se(o.defineComponent({__name:"Pdf",props:{file:{type:null}},setup(t){const e=t,n=ft(()=>e.file);return(i,r)=>(o.openBlock(),o.createElementBlock("iframe",{"size-full":"",frameborder:"0",src:o.unref(n)},null,8,co))}}),[["styles",['[data-v-a8464349],[data-v-a8464349]:before,[data-v-a8464349]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-a8464349]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.size-full[data-v-a8464349],[size-full=""][data-v-a8464349]{width:100%;height:100%}']],["__scopeId","data-v-a8464349"]]),fo=Se(o.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=o.ref(),i=ft(()=>e.file);return Fe(i,()=>{const{playing:r}=ga(n,{src:()=>i.value});o.nextTick(()=>{r.value=!0})}),(r,a)=>(o.openBlock(),o.createElementBlock("video",{ref_key:"videoRef",ref:n,class:"size-full absolute top-0 left-0",controls:""},null,512))}}),[["styles",["[data-v-9e308ade],[data-v-9e308ade]:before,[data-v-9e308ade]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9e308ade]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-9e308ade]{position:absolute}.left-0[data-v-9e308ade]{left:0}.top-0[data-v-9e308ade]{top:0}.size-full[data-v-9e308ade]{width:100%;height:100%}"]],["__scopeId","data-v-9e308ade"]]);function ho(t){const e=t.split(".");return{name:e.length>1?e.slice(0,-1).join("."):t,ext:e.length>1?e.reverse()[0].toLowerCase():""}}const po="2.0.7";function go(t=ba()){const e=lt(),n=`style[cssr-id^="${t}-"]`;return o.onMounted(()=>{function i(){const r=e.value.parentNode;r.querySelectorAll(n).forEach(a=>{r.removeChild(a)}),Array.from(document.querySelectorAll(n)).forEach(a=>{r.appendChild(a.cloneNode()).textContent=a.textContent})}dn(document.head,i,{childList:!0}),i()}),t}function mo(){const t=lt();return o.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[po])??{};if(n&&(e.appendChild(document.createElement("style")).textContent=n),i){const a=document.createElement("style");a.setAttribute("namespace","smart"),e.appendChild(a).textContent=i,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(a.cloneNode()).textContent=i)}}),{classPrefix:go()}}const vo={"size-full":"",relative:""},bo=Se(o.defineComponent({__name:"index",setup(t,{expose:e}){const n=o.useAttrs(),i=o.shallowRef(),r=o.ref(),a=o.ref(),s=o.computed(()=>Zi[a.value]),l={image:lo,pdf:uo,video:fo},u=(f,d)=>{const{name:c,ext:h}=ho(f);i.value=d,r.value=c,a.value=h};return mo(),o.onMounted(()=>{const f=lt();qt.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=xi;return o.openBlock(),o.createBlock(c,{namespace:"smart"},{default:o.withCtx(()=>[o.createElementVNode("div",vo,[o.createCommentVNode(" File / Blob 文件打开 "),o.unref(i)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l[o.unref(s)]||Ta),o.mergeProps({key:0,file:o.unref(i),"file-name":o.unref(r),"file-ext":o.unref(a)},o.unref(n)),null,16,["file","file-name","file-ext"])):o.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",['[data-v-576658dd],[data-v-576658dd]:before,[data-v-576658dd]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-576658dd]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[relative=""][data-v-576658dd]{position:relative}.size-full[data-v-576658dd],[size-full=""][data-v-576658dd]{width:100%;height:100%}']],["__scopeId","data-v-576658dd"]]),yo="smart-file-preview";function wo(t,e){var n;ya&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:o.defineCustomElement(e))}function xo(t,e){return t._instance.exposed[e]}const Yn=o.defineCustomElement(bo);Object.assign(Yn.prototype,{previewFile(...t){return xo(this,"previewFile")(...t)}}),wo(yo,Yn)})((Kn=SmartCore["2.0.7"])==null?void 0:Kn.Vue);
|
31
|
+
*/.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#00000080;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;left:0;position:absolute;right:0;top:0;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#00000080;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#00000080;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#00000080}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,.1);border-left-color:#ffffff80;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.viewer-button.viewer-fullscreen{display:none}`,'[data-v-de658cb7],[data-v-de658cb7]:before,[data-v-de658cb7]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-de658cb7]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.inline[data-v-de658cb7]{display:inline}.transition[data-v-de658cb7]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[size-full=""][data-v-de658cb7]{width:100%;height:100%}[hidden=""][data-v-de658cb7]{display:none}']],["__scopeId","data-v-de658cb7"]]),co=["src"],uo=Se(o.defineComponent({__name:"Pdf",props:{file:{type:null}},setup(t){const e=t,n=ft(()=>e.file);return(i,r)=>(o.openBlock(),o.createElementBlock("iframe",{"size-full":"",frameborder:"0",src:o.unref(n)},null,8,co))}}),[["styles",['[data-v-a8464349],[data-v-a8464349]:before,[data-v-a8464349]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-a8464349]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.size-full[data-v-a8464349],[size-full=""][data-v-a8464349]{width:100%;height:100%}']],["__scopeId","data-v-a8464349"]]),fo=Se(o.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=o.ref(),i=ft(()=>e.file);return Fe(i,()=>{const{playing:r}=ga(n,{src:()=>i.value});o.nextTick(()=>{r.value=!0})}),(r,a)=>(o.openBlock(),o.createElementBlock("video",{ref_key:"videoRef",ref:n,class:"size-full absolute top-0 left-0",controls:""},null,512))}}),[["styles",["[data-v-9e308ade],[data-v-9e308ade]:before,[data-v-9e308ade]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9e308ade]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-9e308ade]{position:absolute}.left-0[data-v-9e308ade]{left:0}.top-0[data-v-9e308ade]{top:0}.size-full[data-v-9e308ade]{width:100%;height:100%}"]],["__scopeId","data-v-9e308ade"]]);function ho(t){const e=t.split(".");return{name:e.length>1?e.slice(0,-1).join("."):t,ext:e.length>1?e.reverse()[0].toLowerCase():""}}const po="2.0.8";function go(t=ba()){const e=lt(),n=`style[cssr-id^="${t}-"]`;return o.onMounted(()=>{function i(){const r=e.value.parentNode;r.querySelectorAll(n).forEach(a=>{r.removeChild(a)}),Array.from(document.querySelectorAll(n)).forEach(a=>{r.appendChild(a.cloneNode()).textContent=a.textContent})}dn(document.head,i,{childList:!0}),i()}),t}function mo(){const t=lt();return o.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[po])??{};if(n&&(e.appendChild(document.createElement("style")).textContent=n),i){const a=document.createElement("style");a.setAttribute("namespace","smart"),e.appendChild(a).textContent=i,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(a.cloneNode()).textContent=i)}}),{classPrefix:go()}}const vo={"size-full":"",relative:""},bo=Se(o.defineComponent({__name:"index",setup(t,{expose:e}){const n=o.useAttrs(),i=o.shallowRef(),r=o.ref(),a=o.ref(),s=o.computed(()=>Zi[a.value]),l={image:lo,pdf:uo,video:fo},u=(f,d)=>{const{name:c,ext:h}=ho(f);i.value=d,r.value=c,a.value=h};return mo(),o.onMounted(()=>{const f=lt();qt.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=xi;return o.openBlock(),o.createBlock(c,{namespace:"smart"},{default:o.withCtx(()=>[o.createElementVNode("div",vo,[o.createCommentVNode(" File / Blob 文件打开 "),o.unref(i)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(l[o.unref(s)]||Ta),o.mergeProps({key:0,file:o.unref(i),"file-name":o.unref(r),"file-ext":o.unref(a)},o.unref(n)),null,16,["file","file-name","file-ext"])):o.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",['[data-v-576658dd],[data-v-576658dd]:before,[data-v-576658dd]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-576658dd]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[relative=""][data-v-576658dd]{position:relative}.size-full[data-v-576658dd],[size-full=""][data-v-576658dd]{width:100%;height:100%}']],["__scopeId","data-v-576658dd"]]),yo="smart-file-preview";function wo(t,e){var n;ya&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:o.defineCustomElement(e))}function xo(t,e){return t._instance.exposed[e]}const Yn=o.defineCustomElement(bo);Object.assign(Yn.prototype,{previewFile(...t){return xo(this,"previewFile")(...t)}}),wo(yo,Yn)})((Kn=SmartCore["2.0.8"])==null?void 0:Kn.Vue);
|
@@ -1 +1 @@
|
|
1
|
-
var P,M,_;(function(f,g,R){"use strict";function C(e){return Object.prototype.toString.call(e)==="[object Object]"}function w(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(w(97,122))}function B(){return String.fromCharCode(w(65,90))}function U(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let u;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?w(0,u-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=w(0,9))}return c}function z(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(C(r)||(o=Array.isArray(r))){let u;if(n.has(r))u=n.get(r);else{let c;u=o?Array.isArray(c=e[t])?c:[]:C(c=e[t])?c:{},A(u,r,n)}e[t]=u}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!C(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(C(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)A(e,t,n);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},x={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},F={common:{fontFamily:x.sans,fontFamilyMono:x.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},F,{}),L({},F,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="2.0.7";function G(e,a){let n,t,r;const o=f.ref(!0),u=()=>{o.value=!0,r()};f.watch(e,u,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const n=a.flat(),t=n[0];return j(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K=e=>e!=null;function J(e,a,n){return f.watch(e,a,{...n,deep:!0})}function Q(e){var a;const n=E(e);return(a=n==null?void 0:n.$el)!=null?a:n}const X=$?window:void 0;function Y(){const e=f.ref(!1),a=f.getCurrentInstance();return a&&f.onMounted(()=>{e.value=!0},a),e}function Z(e){const a=Y();return f.computed(()=>(a.value,!!e()))}function ee(e,a,n={}){const{window:t=X,...r}=n;let o;const u=Z(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(Q).filter(K);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&t&&l.size&&(o=new MutationObserver(a),l.forEach(y=>o.observe(y,r)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),s=()=>{c(),b()};return q(s),{isSupported:u,stop:s,takeRecords:d}}function T(e){const a=f.getCurrentInstance(),n=G(()=>null,()=>a.proxy.$el);return f.onUpdated(n.trigger),f.onMounted(n.trigger),n}function fe(e=z()){const a=T(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,t,{childList:!0}),t()}),e}function ae(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:fe()}}const te=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=W(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const S=d.file,oe=n.beforeUpload??(h=>h),N=new FormData;N.set("file",S);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:N,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});R.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),t.value.find(({fileName:v})=>v===m.url)||t.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(h=>{d.status="error",n.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),l(),console.error(h)})}function b(){setTimeout(()=>{for(let d=0;d<t.value.length;){const s=t.value[d].fileName;c.value.some(l=>l.url===s)?d++:t.value.splice(d,1)}},10)}return J(t,d=>{d.forEach(({fileName:s})=>{c.value.some(l=>l.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const l=c.value[s];l.status==="finished"&&l.url&&!d.some(({fileName:y})=>y===l.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(F),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(u),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=l=>f.isRef(c)?c.value=l:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",["[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-da18f512"]]),ne="smart-upload";function re(e,a){var n;I&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(te);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,D)})((P=SmartCore["2.0.7"])==null?void 0:P.Vue,(M=SmartCore["2.0.7"])==null?void 0:M.NaiveUI,(_=SmartCore["2.0.7"])==null?void 0:_.SmartCore);
|
1
|
+
var P,M,_;(function(f,g,R){"use strict";function C(e){return Object.prototype.toString.call(e)==="[object Object]"}function w(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(w(97,122))}function B(){return String.fromCharCode(w(65,90))}function U(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let u;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?w(0,u-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=w(0,9))}return c}function z(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(C(r)||(o=Array.isArray(r))){let u;if(n.has(r))u=n.get(r);else{let c;u=o?Array.isArray(c=e[t])?c:[]:C(c=e[t])?c:{},A(u,r,n)}e[t]=u}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!C(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(C(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)A(e,t,n);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},x={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},F={common:{fontFamily:x.sans,fontFamilyMono:x.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},F,{}),L({},F,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="2.0.8";function G(e,a){let n,t,r;const o=f.ref(!0),u=()=>{o.value=!0,r()};f.watch(e,u,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const n=a.flat(),t=n[0];return j(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K=e=>e!=null;function J(e,a,n){return f.watch(e,a,{...n,deep:!0})}function Q(e){var a;const n=E(e);return(a=n==null?void 0:n.$el)!=null?a:n}const X=$?window:void 0;function Y(){const e=f.ref(!1),a=f.getCurrentInstance();return a&&f.onMounted(()=>{e.value=!0},a),e}function Z(e){const a=Y();return f.computed(()=>(a.value,!!e()))}function ee(e,a,n={}){const{window:t=X,...r}=n;let o;const u=Z(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(Q).filter(K);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&t&&l.size&&(o=new MutationObserver(a),l.forEach(y=>o.observe(y,r)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),s=()=>{c(),b()};return q(s),{isSupported:u,stop:s,takeRecords:d}}function T(e){const a=f.getCurrentInstance(),n=G(()=>null,()=>a.proxy.$el);return f.onUpdated(n.trigger),f.onMounted(n.trigger),n}function fe(e=z()){const a=T(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,t,{childList:!0}),t()}),e}function ae(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:fe()}}const te=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=W(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const S=d.file,oe=n.beforeUpload??(h=>h),N=new FormData;N.set("file",S);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:N,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});R.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),t.value.find(({fileName:v})=>v===m.url)||t.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(h=>{d.status="error",n.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),l(),console.error(h)})}function b(){setTimeout(()=>{for(let d=0;d<t.value.length;){const s=t.value[d].fileName;c.value.some(l=>l.url===s)?d++:t.value.splice(d,1)}},10)}return J(t,d=>{d.forEach(({fileName:s})=>{c.value.some(l=>l.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const l=c.value[s];l.status==="finished"&&l.url&&!d.some(({fileName:y})=>y===l.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(F),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(u),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=l=>f.isRef(c)?c.value=l:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",["[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-da18f512"]]),ne="smart-upload";function re(e,a){var n;I&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(te);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,D)})((P=SmartCore["2.0.8"])==null?void 0:P.Vue,(M=SmartCore["2.0.8"])==null?void 0:M.NaiveUI,(_=SmartCore["2.0.8"])==null?void 0:_.SmartCore);
|