@tom2012/cc-web 1.5.85 → 1.5.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/backup/providers/dropbox.d.ts +1 -1
  3. package/backend/dist/backup/providers/dropbox.d.ts.map +1 -1
  4. package/backend/dist/backup/providers/dropbox.js +2 -1
  5. package/backend/dist/backup/providers/dropbox.js.map +1 -1
  6. package/backend/dist/backup/providers/google-drive.d.ts +1 -1
  7. package/backend/dist/backup/providers/google-drive.d.ts.map +1 -1
  8. package/backend/dist/backup/providers/google-drive.js +4 -6
  9. package/backend/dist/backup/providers/google-drive.js.map +1 -1
  10. package/backend/dist/backup/providers/onedrive.d.ts +1 -1
  11. package/backend/dist/backup/providers/onedrive.d.ts.map +1 -1
  12. package/backend/dist/backup/providers/onedrive.js +2 -1
  13. package/backend/dist/backup/providers/onedrive.js.map +1 -1
  14. package/backend/dist/backup/types.d.ts +1 -1
  15. package/backend/dist/backup/types.d.ts.map +1 -1
  16. package/backend/dist/config.d.ts.map +1 -1
  17. package/backend/dist/config.js +2 -1
  18. package/backend/dist/config.js.map +1 -1
  19. package/backend/dist/index.d.ts.map +1 -1
  20. package/backend/dist/index.js +6 -10
  21. package/backend/dist/index.js.map +1 -1
  22. package/backend/dist/notify-service.d.ts.map +1 -1
  23. package/backend/dist/notify-service.js +14 -0
  24. package/backend/dist/notify-service.js.map +1 -1
  25. package/backend/dist/plan-control/executor.d.ts +7 -1
  26. package/backend/dist/plan-control/executor.d.ts.map +1 -1
  27. package/backend/dist/plan-control/executor.js +74 -8
  28. package/backend/dist/plan-control/executor.js.map +1 -1
  29. package/backend/dist/plugin-manager.d.ts.map +1 -1
  30. package/backend/dist/plugin-manager.js +3 -0
  31. package/backend/dist/plugin-manager.js.map +1 -1
  32. package/backend/dist/routes/backup.js +1 -1
  33. package/backend/dist/routes/backup.js.map +1 -1
  34. package/backend/dist/routes/filesystem.d.ts.map +1 -1
  35. package/backend/dist/routes/filesystem.js +2 -1
  36. package/backend/dist/routes/filesystem.js.map +1 -1
  37. package/backend/dist/routes/git.d.ts.map +1 -1
  38. package/backend/dist/routes/git.js +42 -0
  39. package/backend/dist/routes/git.js.map +1 -1
  40. package/backend/dist/routes/plan-control.d.ts +8 -1
  41. package/backend/dist/routes/plan-control.d.ts.map +1 -1
  42. package/backend/dist/routes/plan-control.js +41 -8
  43. package/backend/dist/routes/plan-control.js.map +1 -1
  44. package/backend/dist/routes/plugins.d.ts.map +1 -1
  45. package/backend/dist/routes/plugins.js +23 -0
  46. package/backend/dist/routes/plugins.js.map +1 -1
  47. package/backend/dist/routes/projects.d.ts.map +1 -1
  48. package/backend/dist/routes/projects.js +32 -0
  49. package/backend/dist/routes/projects.js.map +1 -1
  50. package/frontend/dist/assets/{GraphPreview-2WXuNUTC.js → GraphPreview-feAPYB5u.js} +1 -1
  51. package/frontend/dist/assets/OfficePreview-Cqsgj27r.js +3 -0
  52. package/frontend/dist/assets/{PlanPanel-CAwoVERS.js → PlanPanel-fI-aULxe.js} +1 -1
  53. package/frontend/dist/assets/{ProjectPage-Bsmij9PR.js → ProjectPage-BtAMiJYD.js} +5 -5
  54. package/frontend/dist/assets/{SettingsPage-D_qkFpli.js → SettingsPage-CYQjVIeH.js} +1 -1
  55. package/frontend/dist/assets/{ShareViewPage-D_qyAmta.js → ShareViewPage-Dn3EcZ5d.js} +1 -1
  56. package/frontend/dist/assets/{SkillHubPage-C0FH24pf.js → SkillHubPage-C-xu9SLm.js} +3 -3
  57. package/frontend/dist/assets/{bot-BlJwFT2K.js → bot-Bif2ovQt.js} +1 -1
  58. package/frontend/dist/assets/{chevron-down-CK5p8rdp.js → chevron-down-OwwVCmlq.js} +1 -1
  59. package/frontend/dist/assets/{download-CUOp54z9.js → download-BP9ssOVk.js} +1 -1
  60. package/frontend/dist/assets/{index-BV5oU0la.js → index-4zUhcEdy.js} +3 -3
  61. package/frontend/dist/assets/index-DT0eASks.css +1 -0
  62. package/frontend/dist/assets/{index-0ybprEWn.js → index-YFMWntDQ.js} +1 -1
  63. package/frontend/dist/assets/{jszip.min-5kkrvu4H.js → jszip.min-CVjUiTKy.js} +1 -1
  64. package/frontend/dist/assets/{maximize-2-CjNiqJGr.js → maximize-2-px9TeTfg.js} +1 -1
  65. package/frontend/dist/assets/{save-DFFb1Eaz.js → save-DmHhw7Kk.js} +1 -1
  66. package/frontend/dist/assets/{user-JyvDYJ0V.js → user-02ng5LoF.js} +1 -1
  67. package/frontend/dist/index.html +2 -2
  68. package/package.json +1 -1
  69. package/frontend/dist/assets/OfficePreview-Ddn426ac.js +0 -2
  70. package/frontend/dist/assets/index-C8OaV-rT.css +0 -1
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-YFMWntDQ.js","assets/index-4zUhcEdy.js","assets/index-DT0eASks.css","assets/jszip.min-CVjUiTKy.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as t,_ as n,b as o,h as r}from"./index-4zUhcEdy.js";
3
+ /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:a,setPrototypeOf:i,isFrozen:l,getPrototypeOf:s,getOwnPropertyDescriptor:c}=Object;let{freeze:u,seal:m,create:p}=Object,{apply:d,construct:f}="undefined"!=typeof Reflect&&Reflect;u||(u=function(e){return e}),m||(m=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),f||(f=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const h=C(Array.prototype.forEach),g=C(Array.prototype.lastIndexOf),T=C(Array.prototype.pop),x=C(Array.prototype.push),y=C(Array.prototype.splice),E=C(String.prototype.toLowerCase),_=C(String.prototype.toString),b=C(String.prototype.match),A=C(String.prototype.replace),S=C(String.prototype.indexOf),N=C(String.prototype.trim),w=C(Object.prototype.hasOwnProperty),v=C(RegExp.prototype.test),D=(R=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f(R,t)});var R;function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return d(e,t,o)}}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;i&&i(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(l(t)||(t[o]=e),r=e)}e[r]=!0}return e}function k(e){for(let t=0;t<e.length;t++){w(e,t)||(e[t]=null)}return e}function L(e){const t=p(null);for(const[n,o]of a(e)){w(e,n)&&(Array.isArray(o)?t[n]=k(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=L(o):t[n]=o)}return t}function I(e,t){for(;null!==e;){const n=c(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=s(e)}return function(){return null}}const M=u(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),z=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=u(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=u(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),F=u(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),H=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=u(["#text"]),B=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),G=u(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),W=u(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),X=m(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=m(/<%[\w\W]*|[\w\W]*%>/gm),q=m(/\$\{[\w\W]*/gm),V=m(/^data-[\-\w.\u00B7-\uFFFF]+$/),K=m(/^aria-[\-\w]+$/),Z=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=m(/^(?:\w+script|data):/i),Q=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=m(/^html$/i),te=m(/^[a-z][.\w]*(-[.\w]+)+$/i);var ne=Object.freeze({__proto__:null,ARIA_ATTR:K,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:te,DATA_ATTR:V,DOCTYPE_NAME:ee,ERB_EXPR:$,IS_ALLOWED_URI:Z,IS_SCRIPT_OR_DATA:J,MUSTACHE_EXPR:X,TMPLIT_EXPR:q});const oe=1,re=3,ae=7,ie=8,le=9;var se=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==le||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const r=o,i=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:s,Node:c,Element:m,NodeFilter:d,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:R,DOMParser:C,trustedTypes:k}=t,X=m.prototype,$=I(X,"cloneNode"),q=I(X,"remove"),V=I(X,"nextSibling"),K=I(X,"childNodes"),J=I(X,"parentNode");if("function"==typeof s){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Q,te="";const{implementation:se,createNodeIterator:ce,createDocumentFragment:ue,getElementsByTagName:me}=o,{importNode:pe}=r;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof a&&"function"==typeof J&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:he,TMPLIT_EXPR:ge,DATA_ATTR:Te,ARIA_ATTR:xe,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:_e}=ne;let{IS_ALLOWED_URI:be}=ne,Ae=null;const Se=O({},[...M,...z,...P,...F,...j]);let Ne=null;const we=O({},[...B,...G,...W,...Y]);let ve=Object.seal(p(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Re=null;const Ce=Object.seal(p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,ke=!0,Le=!1,Ie=!0,Me=!1,ze=!0,Pe=!1,Ue=!1,Fe=!1,He=!1,je=!1,Be=!1,Ge=!0,We=!1,Ye=!0,Xe=!1,$e={},qe=null;const Ve=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ze=O({},["audio","video","img","source","image","track"]);let Je=null;const Qe=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,at=null;const it=O({},[et,tt,nt],_);let lt=O({},["mi","mo","mn","ms","mtext"]),st=O({},["annotation-xml"]);const ct=O({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,dt=null;const ft=o.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=L(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?_:E,Ae=w(e,"ALLOWED_TAGS")?O({},e.ALLOWED_TAGS,pt):Se,Ne=w(e,"ALLOWED_ATTR")?O({},e.ALLOWED_ATTR,pt):we,at=w(e,"ALLOWED_NAMESPACES")?O({},e.ALLOWED_NAMESPACES,_):it,Je=w(e,"ADD_URI_SAFE_ATTR")?O(L(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ke=w(e,"ADD_DATA_URI_TAGS")?O(L(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,qe=w(e,"FORBID_CONTENTS")?O({},e.FORBID_CONTENTS,pt):Ve,De=w(e,"FORBID_TAGS")?O({},e.FORBID_TAGS,pt):L({}),Re=w(e,"FORBID_ATTR")?O({},e.FORBID_ATTR,pt):L({}),$e=!!w(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,He=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Fe=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||Z,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,st=e.HTML_INTEGRATION_POINTS||st,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ke=!1),je&&(He=!0),$e&&(Ae=O({},j),Ne=p(null),!0===$e.html&&(O(Ae,M),O(Ne,B)),!0===$e.svg&&(O(Ae,z),O(Ne,G),O(Ne,Y)),!0===$e.svgFilters&&(O(Ae,P),O(Ne,G),O(Ne,Y)),!0===$e.mathMl&&(O(Ae,F),O(Ne,W),O(Ne,Y))),w(e,"ADD_TAGS")||(Ce.tagCheck=null),w(e,"ADD_ATTR")||(Ce.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ce.tagCheck=e.ADD_TAGS:(Ae===Se&&(Ae=L(Ae)),O(Ae,e.ADD_TAGS,pt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ce.attributeCheck=e.ADD_ATTR:(Ne===we&&(Ne=L(Ne)),O(Ne,e.ADD_ATTR,pt))),e.ADD_URI_SAFE_ATTR&&O(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&(qe===Ve&&(qe=L(qe)),O(qe,e.FORBID_CONTENTS,pt)),e.ADD_FORBID_CONTENTS&&(qe===Ve&&(qe=L(qe)),O(qe,e.ADD_FORBID_CONTENTS,pt)),Ye&&(Ae["#text"]=!0),Pe&&O(Ae,["html","head","body"]),Ae.table&&(O(Ae,["tbody"]),delete De.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,te=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(a){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(k,i)),null!==Q&&"string"==typeof te&&(te=Q.createHTML(""));u&&u(e),dt=e}},Tt=O({},[...z,...P,...U]),xt=O({},[...F,...H]),yt=function(e){x(n.removed,{element:e});try{J(e).removeChild(e)}catch(t){q(e)}},Et=function(e,t){try{x(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(o){x(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(He||je)try{yt(t)}catch(o){}else try{t.setAttribute(e,"")}catch(o){}},_t=function(e){let t=null,n=null;if(Fe)e="<remove></remove>"+e;else{const t=b(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Q?Q.createHTML(e):e;if(ot===nt)try{t=(new C).parseFromString(r,ut)}catch(i){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?te:r}catch(i){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),ot===nt?me.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:a},bt=function(e){return ce.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof R&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof c&&e instanceof c};function Nt(e,t,o){h(e,e=>{e.call(n,t,o,dt)})}const wt=function(e){let t=null;if(Nt(de.beforeSanitizeElements,e,null),At(e))return yt(e),!0;const o=pt(e.nodeName);if(Nt(de.uponSanitizeElement,e,{tagName:o,allowedTags:Ae}),ze&&e.hasChildNodes()&&!St(e.firstElementChild)&&v(/<[/\w!]/g,e.innerHTML)&&v(/<[/\w!]/g,e.textContent))return yt(e),!0;if(e.nodeType===ae)return yt(e),!0;if(ze&&e.nodeType===ie&&v(/<[/\w]/g,e.data))return yt(e),!0;if(!(Ce.tagCheck instanceof Function&&Ce.tagCheck(o))&&(!Ae[o]||De[o])){if(!De[o]&&Dt(o)){if(ve.tagNameCheck instanceof RegExp&&v(ve.tagNameCheck,o))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(o))return!1}if(Ye&&!qe[o]){const t=J(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,V(e))}}}return yt(e),!0}return e instanceof m&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=E(e.tagName),o=E(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&st[o]:Boolean(xt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!st[o])&&!(t.namespaceURI===et&&!lt[o])&&!xt[n]&&(ct[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!at[e.namespaceURI]))}(e)?(yt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===re&&(t=e.textContent,h([fe,he,ge],e=>{t=A(t,e," ")}),e.textContent!==t&&(x(n.removed,{element:e.cloneNode()}),e.textContent=t)),Nt(de.afterSanitizeElements,e,null),!1):(yt(e),!0)},vt=function(e,t,n){if(Re[t])return!1;if(Ge&&("id"===t||"name"===t)&&(n in o||n in ft))return!1;if(ke&&!Re[t]&&v(Te,t));else if(Oe&&v(xe,t));else if(Ce.attributeCheck instanceof Function&&Ce.attributeCheck(t,e));else if(!Ne[t]||Re[t]){if(!(Dt(e)&&(ve.tagNameCheck instanceof RegExp&&v(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&v(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t,e))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&v(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(Je[t]);else if(v(be,A(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!Ke[e]){if(Le&&!v(ye,A(n,Ee,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&b(e,_e)},Rt=function(e){Nt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||At(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:l,namespaceURI:s,value:c}=i,u=pt(l),m=c;let p="value"===l?m:N(m);if(o.attrName=u,o.attrValue=p,o.keepAttr=!0,o.forceKeepAttr=void 0,Nt(de.uponSanitizeAttribute,e,o),p=o.attrValue,!We||"id"!==u&&"name"!==u||(Et(l,e),p="user-content-"+p),ze&&v(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)){Et(l,e);continue}if("attributename"===u&&b(p,"href")){Et(l,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){Et(l,e);continue}if(!Ie&&v(/\/>/i,p)){Et(l,e);continue}Me&&h([fe,he,ge],e=>{p=A(p,e," ")});const d=pt(e.nodeName);if(vt(d,u,p)){if(Q&&"object"==typeof k&&"function"==typeof k.getAttributeType)if(s);else switch(k.getAttributeType(d,u)){case"TrustedHTML":p=Q.createHTML(p);break;case"TrustedScriptURL":p=Q.createScriptURL(p)}if(p!==m)try{s?e.setAttributeNS(s,l,p):e.setAttribute(l,p),At(e)?yt(e):T(n.removed)}catch(a){Et(l,e)}}else Et(l,e)}Nt(de.afterSanitizeAttributes,e,null)},Ct=function e(t){let n=null;const o=bt(t);for(Nt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Nt(de.uponSanitizeShadowNode,n,null),wt(n),Rt(n),n.content instanceof l&&e(n.content);Nt(de.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,a=null,i=null,s=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw D("toString is not a function");if("string"!=typeof(e=e.toString()))throw D("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||gt(t),n.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ae[t]||De[t])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)o=_t("\x3c!----\x3e"),a=o.ownerDocument.importNode(e,!0),a.nodeType===oe&&"BODY"===a.nodeName||"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!He&&!Me&&!Pe&&-1===e.indexOf("<"))return Q&&Be?Q.createHTML(e):e;if(o=_t(e),!o)return He?null:Be?te:""}o&&Fe&&yt(o.firstChild);const u=bt(Xe?e:o);for(;i=u.nextNode();)wt(i),Rt(i),i.content instanceof l&&Ct(i.content);if(Xe)return e;if(He){if(je)for(s=ue.call(o.ownerDocument);o.firstChild;)s.appendChild(o.firstChild);else s=o;return(Ne.shadowroot||Ne.shadowrootmode)&&(s=pe.call(r,s,!0)),s}let m=Pe?o.outerHTML:o.innerHTML;return Pe&&Ae["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&v(ee,o.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+m),Me&&h([fe,he,ge],e=>{m=A(m,e," ")}),Q&&Be?Q.createHTML(m):m},n.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){dt=null,Ue=!1},n.isValidAttribute=function(e,t,n){dt||gt({});const o=pt(e),r=pt(t);return vt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&x(de[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=g(de[e],t);return-1===n?void 0:y(de[e],n,1)[0]}return T(de[e])},n.removeHooks=function(e){de[e]=[]},n.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();async function ce(e){let t=r(e);const n=o();n&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(n)}`);const a=await fetch(t);if(!a.ok)throw new Error(`Failed to fetch file: ${a.status}`);return a.arrayBuffer()}function ue({filePath:o,zoom:r}){const[a,i]=t.useState(""),[l,s]=t.useState(null),[c,u]=t.useState(!0);return t.useEffect(()=>{let e=!1;return u(!0),s(null),(async()=>{try{const t=await n(()=>import("./index-YFMWntDQ.js").then(e=>e.i),__vite__mapDeps([0,1,2,3])),r=await ce(o),a=await t.convertToHtml({arrayBuffer:r});e||i(a.value)}catch(t){e||s(t instanceof Error?t.message:"Failed to render docx")}finally{e||u(!1)}})(),()=>{e=!0}},[o]),c?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Word 文档中..."}):l?e.jsx("p",{className:"text-sm text-destructive p-4",children:l}):e.jsx("div",{className:"p-6 prose dark:prose-invert max-w-none",style:{fontSize:12*r/100+"px"},dangerouslySetInnerHTML:{__html:se.sanitize(a)}})}function me({filePath:o,zoom:r}){var a;const[i,l]=t.useState([]),[s,c]=t.useState(0),[u,m]=t.useState(null),[p,d]=t.useState(!0);return t.useEffect(()=>{let e=!1;return d(!0),m(null),(async()=>{try{const t=await n(()=>import("./xlsx-DfDjAMCE.js"),[]),r=await ce(o),a=t.read(r,{type:"array"}),i=a.SheetNames.map(e=>({name:e,html:t.utils.sheet_to_html(a.Sheets[e],{editable:!1})}));e||(l(i),c(0))}catch(t){e||m(t instanceof Error?t.message:"Failed to render xlsx")}finally{e||d(!1)}})(),()=>{e=!0}},[o]),p?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Excel 文件中..."}):u?e.jsx("p",{className:"text-sm text-destructive p-4",children:u}):0===i.length?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsxs("div",{className:"flex flex-col h-full",children:[i.length>1&&e.jsx("div",{className:"flex gap-0.5 px-3 py-1.5 border-b border-border bg-muted/30 flex-shrink-0 overflow-x-auto",children:i.map((t,n)=>e.jsx("button",{onClick:()=>c(n),className:"px-3 py-1 text-xs rounded-t transition-colors whitespace-nowrap "+(n===s?"bg-background text-foreground border border-b-0 border-border":"text-muted-foreground hover:text-foreground"),children:t.name},n))}),e.jsx("div",{className:"flex-1 overflow-auto p-2 xlsx-preview",style:{fontSize:12*r/100+"px"},dangerouslySetInnerHTML:{__html:se.sanitize((null==(a=i[s])?void 0:a.html)??"")}}),e.jsx("style",{children:"\n .xlsx-preview table { border-collapse: collapse; width: auto; min-width: 100%; }\n .xlsx-preview td, .xlsx-preview th {\n border: 1px solid hsl(var(--border));\n padding: 4px 8px;\n text-align: left;\n white-space: nowrap;\n font-size: inherit;\n }\n .xlsx-preview th { background: hsl(var(--muted)); font-weight: 600; }\n .xlsx-preview tr:hover td { background: hsl(var(--accent) / 0.3); }\n "})]})}function pe({filePath:o,zoom:r}){const[a,i]=t.useState([]),[l,s]=t.useState(null),[c,u]=t.useState(!0);return t.useEffect(()=>{let e=!1;return u(!0),s(null),(async()=>{try{const t=await ce(o),r=await async function(e){const{default:t}=await n(async()=>{const{default:e}=await import("./jszip.min-CVjUiTKy.js").then(e=>e.j);return{default:e}},__vite__mapDeps([3,1,2])),o=await t.loadAsync(e),r=[],a=Object.keys(o.files).filter(e=>/^ppt\/slides\/slide\d+\.xml$/i.test(e)).sort((e,t)=>{var n,o;return parseInt((null==(n=e.match(/slide(\d+)/))?void 0:n[1])??"0")-parseInt((null==(o=t.match(/slide(\d+)/))?void 0:o[1])??"0")});for(let n=0;n<a.length;n++){const e=await o.file(a[n]).async("text"),t=[],i=/<a:t[^>]*>([\s\S]*?)<\/a:t>/g;let l;for(;null!==(l=i.exec(e));){const e=l[1].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').trim();e&&t.push(e)}r.push({index:n+1,texts:t})}return r}(t);e||i(r)}catch(t){e||s(t instanceof Error?t.message:"Failed to render pptx")}finally{e||u(!1)}})(),()=>{e=!0}},[o]),c?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 PPT 文件中..."}):l?e.jsx("p",{className:"text-sm text-destructive p-4",children:l}):0===a.length?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsx("div",{className:"p-4 space-y-4",style:{fontSize:12*r/100+"px"},children:a.map(t=>e.jsxs("div",{className:"border border-border rounded-lg p-5 bg-muted/20",children:[e.jsxs("div",{className:"text-xs text-muted-foreground mb-2 font-medium",children:["Slide ",t.index]}),t.texts.length>0?e.jsx("div",{className:"space-y-1.5",children:t.texts.map((t,n)=>e.jsx("p",{className:"text-foreground leading-relaxed",style:{fontSize:"inherit"},children:t},n))}):e.jsx("p",{className:"text-muted-foreground text-sm italic",children:"(无文本内容)"})]},t.index))})}const de=new Set(["docx","xlsx","xls","pptx"]);function fe({filePath:t,ext:n,zoom:o}){return"docx"===n?e.jsx(ue,{filePath:t,zoom:o}):"xlsx"===n||"xls"===n?e.jsx(me,{filePath:t,zoom:o}):"pptx"===n?e.jsx(pe,{filePath:t,zoom:o}):null}export{de as OFFICE_EXTS,fe as OfficePreview};
@@ -1,4 +1,4 @@
1
- import{c as e,r as s,j as t,b4 as a,b5 as n,b6 as l,t as r,b7 as i,b8 as o,b9 as c,ba as d,bb as h,B as x}from"./index-BV5oU0la.js";import{Z as u,a as m,L as f,P as y,A as g}from"./ProjectPage-Bsmij9PR.js";import{M as b}from"./maximize-2-CjNiqJGr.js";import"./save-DFFb1Eaz.js";import"./download-CUOp54z9.js";import"./chevron-down-CK5p8rdp.js";import"./bot-BlJwFT2K.js";import"./user-JyvDYJ0V.js";
1
+ import{c as e,r as s,j as t,b3 as a,b4 as n,b5 as l,t as r,b6 as i,b7 as o,b8 as c,b9 as d,ba as h,B as x}from"./index-4zUhcEdy.js";import{Z as u,a as m,L as f,P as y,A as g}from"./ProjectPage-BtAMiJYD.js";import{M as b}from"./maximize-2-px9TeTfg.js";import"./save-DmHhw7Kk.js";import"./download-BP9ssOVk.js";import"./chevron-down-OwwVCmlq.js";import"./bot-Bif2ovQt.js";import"./user-02ng5LoF.js";
2
2
  /**
3
3
  * @license lucide-react v0.309.0 - ISC
4
4
  *