@stlite/desktop 0.82.0 → 0.83.1
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.
- package/bin/dump_artifacts.js +31 -31
- package/build/assets/ErrorOutline.esm-Cdc3NAX8.js +1 -0
- package/build/assets/{FileDownload.esm-Bzb3HjS9.js → FileDownload.esm-CbXaPbiH.js} +1 -1
- package/build/assets/{FileHelper-BNpeYRlH.js → FileHelper-WDsMYNBw.js} +4 -4
- package/build/assets/{FormClearHelper-DxeY-rII.js → FormClearHelper-CT0Jwp4X.js} +1 -1
- package/build/assets/{Hooks-BOkao1bO.js → Hooks-BKPTn6xf.js} +1 -1
- package/build/assets/{InputInstructions-DuxSO2sS.js → InputInstructions-Cyg7opie.js} +1 -1
- package/build/assets/MaterialSymbols-Rounded.DsbC8sYI.woff2 +0 -0
- package/build/assets/{ProgressBar-xr2SnNK1.js → ProgressBar-CA-bplbU.js} +2 -2
- package/build/assets/{RenderInPortalIfExists-D-C7LcEp.js → RenderInPortalIfExists-BozYGWdi.js} +1 -1
- package/build/assets/Toolbar-DlGOP7h4.js +1 -0
- package/build/assets/{base-input-NsRtpzFx.js → base-input-BnIlcFzX.js} +4 -4
- package/build/assets/{checkbox-Dj0lswiB.js → checkbox-CGvNPQQ1.js} +1 -1
- package/build/assets/{createSuper-Ipqc67nc.js → createSuper-B8yCxQGq.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-BDv7jlce.js → data-grid-overlay-editor-CltKX1-_.js} +1 -1
- package/build/assets/{downloader-CaOAUbUF.js → downloader-Cof1FiXt.js} +1 -1
- package/build/assets/{es6-BZHzmZtr.js → es6-Ca0BcWDW.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-CHGlD-N9.js → iframeResizer.contentWindow-3AhBUVoO.js} +1 -1
- package/build/assets/{index-GJHR2pBi.js → index--NPqZQqZ.js} +1 -1
- package/build/assets/index-2MeZae5n.js +1 -0
- package/build/assets/{index-Cp10Db30.js → index-BBjBAKoV.js} +1 -1
- package/build/assets/{index-B-ykjfbX.js → index-BMvzOjlv.js} +260 -233
- package/build/assets/index-BUOOlidY.js +1 -0
- package/build/assets/index-BafYTuwa.js +1 -0
- package/build/assets/{index-BTv0oYZW.js → index-Bc7AX3-A.js} +1 -1
- package/build/assets/index-Bcsdrj2S.js +188 -0
- package/build/assets/{index-DhYvQko1.js → index-C8-4FAc1.js} +1 -1
- package/build/assets/index-CLBVu_mK.js +3 -0
- package/build/assets/index-CN5CjLsc.js +1 -0
- package/build/assets/index-COAtiAK0.js +1 -0
- package/build/assets/{index-Dk-OPVLJ.js → index-CS3tnJiL.js} +1 -1
- package/build/assets/index-CVrdwKzt.js +1 -0
- package/build/assets/{index-CTC0h65f.js → index-CWEVeVJ6.js} +1 -1
- package/build/assets/index-C_kIyk9w.js +2 -0
- package/build/assets/{index-OxGwEg3m.js → index-Cbvbjd8C.js} +144 -144
- package/build/assets/{index-B-LSEdUZ.js → index-ChbiMLbp.js} +1 -1
- package/build/assets/{index-CRx6-P3W.js → index-DCoy2PDE.js} +1 -1
- package/build/assets/{index-B4X2D_eW.js → index-DIBxvKdk.js} +1 -1
- package/build/assets/index-DSVyX96W.js +1 -0
- package/build/assets/index-DfeaHlsl.js +3 -0
- package/build/assets/{index-CUa9G_2w.js → index-Do3iUH-x.js} +2 -2
- package/build/assets/index-Dw5G4t9P.js +1 -0
- package/build/assets/{index-D1dbR74e.js → index-Dx-GFi6o.js} +1 -1
- package/build/assets/{index-DJZ72tug.js → index-J-18FLnE.js} +1 -1
- package/build/assets/index-PRsYLT-9.js +12 -0
- package/build/assets/index-TkDz3vqu.js +1 -0
- package/build/assets/{index-CA7xtrC9.js → index-XyUVDWZe.js} +8 -8
- package/build/assets/{index-By6Q65Pf.js → index-Zd66ep5J.js} +1 -1
- package/build/assets/{index-Cns8y39_.js → index-ax2rbmoZ.js} +1 -1
- package/build/assets/index-bQj3l0zc.js +1 -0
- package/build/assets/{index-DrIrAYez.js → index-bfhlF0Xi.js} +2 -2
- package/build/assets/index-dalh9Y65.js +1 -0
- package/build/assets/{index-DvUGK7b6.js → index-ocHxXLCt.js} +1 -1
- package/build/assets/index-uxEQ8qdA.js +1 -0
- package/build/assets/{index-Cyc3gr_v.js → index-wCYAC2ZH.js} +2 -2
- package/build/assets/index-xsH4HHeE.js +6 -0
- package/build/assets/{index.5L7agjmb.css → index.Bqb_jNud.css} +1 -1
- package/build/assets/{inherits-BbfuKc-R.js → inherits-BaopKHev.js} +1 -1
- package/build/assets/{input-CkptI290.js → input-BH9uqfZf.js} +2 -2
- package/build/assets/{memory-BDEJOdDh.js → memory-DWTwf9Ch.js} +1 -1
- package/build/assets/mergeWith-Bt-C9xRx.js +1 -0
- package/build/assets/{number-overlay-editor-cmVGLaYJ.js → number-overlay-editor-Dm8-09pg.js} +1 -1
- package/build/assets/{sandbox-VVt-VWM8.js → sandbox-DGYybjEz.js} +1 -1
- package/build/assets/{slicedToArray-HZKHLTaA.js → slicedToArray-CEuyIGI5.js} +2 -2
- package/build/assets/{textarea-Cy6EVtfz.js → textarea-BKB-3cBX.js} +2 -2
- package/build/assets/{timepicker-DQlSkM-Q.js → timepicker-B1BEcpbo.js} +2 -2
- package/build/assets/{uniqueId-Dka3DuQQ.js → uniqueId-BSuwhGjw.js} +1 -1
- package/build/assets/{useBasicWidgetState-Bm5AJWX7.js → useBasicWidgetState-D3a9XYx3.js} +1 -1
- package/build/assets/{useOnInputChange-C3lvbUNp.js → useOnInputChange-BlFu2GNS.js} +1 -1
- package/build/assets/withFullScreenWrapper-D8NJOCKn.js +1 -0
- package/build/assets/worker-Cy9Gj5BL.js +113 -0
- package/build/electron/worker.js +10 -112
- package/build/index.html +2 -2
- package/package.json +8 -7
- package/wheels/streamlit-1.45.1-cp312-none-any.whl +0 -0
- package/build/assets/MaterialSymbols-Rounded.BFCIvovZ.woff2 +0 -0
- package/build/assets/Toolbar-CJ0mD5An.js +0 -1
- package/build/assets/index-7fVMC6lw.js +0 -1
- package/build/assets/index-BfXMsSNA.js +0 -188
- package/build/assets/index-BtnOdn6v.js +0 -1
- package/build/assets/index-BwTtx5nh.js +0 -1
- package/build/assets/index-C7CxGGAJ.js +0 -3
- package/build/assets/index-CHhIqZol.js +0 -1
- package/build/assets/index-Ck_7L8T4.js +0 -3
- package/build/assets/index-CnyprtY_.js +0 -1
- package/build/assets/index-CoJDuQ5Y.js +0 -1
- package/build/assets/index-D9Fv1oGe.js +0 -1
- package/build/assets/index-D9ZJ5ysG.js +0 -1
- package/build/assets/index-DMVOLuV0.js +0 -1
- package/build/assets/index-DX_vgtQT.js +0 -1
- package/build/assets/index-DbTxB5ik.js +0 -12
- package/build/assets/index-DeRs-vXN.js +0 -1
- package/build/assets/index-SCb8nZ6H.js +0 -2
- package/build/assets/index-t--hEgTQ.js +0 -6
- package/build/assets/index-zPhSbuEH.js +0 -1
- package/build/assets/mergeWith-D2cULMN8.js +0 -1
- package/build/assets/withFullScreenWrapper-CEJUxUJC.js +0 -1
- package/build/assets/worker-eTai8nRu.js +0 -215
- package/wheels/streamlit-1.44.1-cp312-none-any.whl +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as je,r as Rt,bO as Xe,j as wt}from"./index-OxGwEg3m.js";/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:le,setPrototypeOf:se,isFrozen:qe,getPrototypeOf:$e,getOwnPropertyDescriptor:Ke}=Object;let{freeze:y,seal:S,create:ce}=Object,{apply:Ot,construct:Lt}=typeof Reflect<"u"&&Reflect;y||(y=function(r){return r}),S||(S=function(r){return r}),Ot||(Ot=function(r,o,l){return r.apply(o,l)}),Lt||(Lt=function(r,o){return new r(...o)});const it=_(Array.prototype.forEach),Ve=_(Array.prototype.lastIndexOf),ue=_(Array.prototype.pop),j=_(Array.prototype.push),Ze=_(Array.prototype.splice),lt=_(String.prototype.toLowerCase),vt=_(String.prototype.toString),me=_(String.prototype.match),X=_(String.prototype.replace),Je=_(String.prototype.indexOf),Qe=_(String.prototype.trim),R=_(Object.prototype.hasOwnProperty),A=_(RegExp.prototype.test),q=tn(TypeError);function _(r){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var l=arguments.length,a=new Array(l>1?l-1:0),m=1;m<l;m++)a[m-1]=arguments[m];return Ot(r,o,a)}}function tn(r){return function(){for(var o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];return Lt(r,l)}}function i(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt;se&&se(r,null);let a=o.length;for(;a--;){let m=o[a];if(typeof m=="string"){const b=l(m);b!==m&&(qe(o)||(o[a]=b),m=b)}r[m]=!0}return r}function en(r){for(let o=0;o<r.length;o++)R(r,o)||(r[o]=null);return r}function k(r){const o=ce(null);for(const[l,a]of le(r))R(r,l)&&(Array.isArray(a)?o[l]=en(a):a&&typeof a=="object"&&a.constructor===Object?o[l]=k(a):o[l]=a);return o}function $(r,o){for(;r!==null;){const a=Ke(r,o);if(a){if(a.get)return _(a.get);if(typeof a.value=="function")return _(a.value)}r=$e(r)}function l(){return null}return l}const pe=y(["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","section","select","shadow","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"]),Dt=y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ct=y(["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"]),nn=y(["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"]),kt=y(["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"]),on=y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fe=y(["#text"]),de=y(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xt=y(["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","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"]),ge=y(["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"]),st=y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rn=S(/\{\{[\w\W]*|[\w\W]*\}\}/gm),an=S(/<%[\w\W]*|[\w\W]*%>/gm),ln=S(/\$\{[\w\W]*/gm),sn=S(/^data-[\-\w.\u00B7-\uFFFF]+$/),cn=S(/^aria-[\-\w]+$/),he=S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),un=S(/^(?:\w+script|data):/i),mn=S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Te=S(/^html$/i),pn=S(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ee=Object.freeze({__proto__:null,ARIA_ATTR:cn,ATTR_WHITESPACE:mn,CUSTOM_ELEMENT:pn,DATA_ATTR:sn,DOCTYPE_NAME:Te,ERB_EXPR:an,IS_ALLOWED_URI:he,IS_SCRIPT_OR_DATA:un,MUSTACHE_EXPR:rn,TMPLIT_EXPR:ln});const K={element:1,text:3,progressingInstruction:7,comment:8,document:9},fn=function(){return typeof window>"u"?null:window},dn=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let l=null;const a="data-tt-policy-suffix";o&&o.hasAttribute(a)&&(l=o.getAttribute(a));const m="dompurify"+(l?"#"+l:"");try{return r.createPolicy(m,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ye=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ae(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fn();const o=t=>Ae(t);if(o.version="3.2.5",o.removed=[],!r||!r.document||r.document.nodeType!==K.document||!r.Element)return o.isSupported=!1,o;let{document:l}=r;const a=l,m=a.currentScript,{DocumentFragment:b,HTMLTemplateElement:V,Node:ct,Element:Ut,NodeFilter:z,NamedNodeMap:_e=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:be,DOMParser:Ne,trustedTypes:Z}=r,F=Ut.prototype,Se=$(F,"cloneNode"),Re=$(F,"remove"),we=$(F,"nextSibling"),Oe=$(F,"childNodes"),J=$(F,"parentNode");if(typeof V=="function"){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let h,W="";const{implementation:ut,createNodeIterator:Le,createDocumentFragment:ve,getElementsByTagName:De}=l,{importNode:Ce}=a;let T=ye();o.isSupported=typeof le=="function"&&typeof J=="function"&&ut&&ut.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:mt,ERB_EXPR:pt,TMPLIT_EXPR:ft,DATA_ATTR:ke,ARIA_ATTR:xe,IS_SCRIPT_OR_DATA:Ie,ATTR_WHITESPACE:Pt,CUSTOM_ELEMENT:Me}=Ee;let{IS_ALLOWED_URI:Ht}=Ee,p=null;const zt=i({},[...pe,...Dt,...Ct,...kt,...fe]);let d=null;const Ft=i({},[...de,...xt,...ge,...st]);let c=Object.seal(ce(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}})),B=null,dt=null,Wt=!0,gt=!0,Bt=!1,Gt=!0,x=!1,ht=!0,D=!1,Tt=!1,Et=!1,I=!1,Q=!1,tt=!1,Yt=!0,jt=!1;const Ue="user-content-";let yt=!0,G=!1,M={},U=null;const Xt=i({},["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 qt=null;const $t=i({},["audio","video","img","source","image","track"]);let At=null;const Kt=i({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",O="http://www.w3.org/1999/xhtml";let P=O,_t=!1,bt=null;const Pe=i({},[et,nt,O],vt);let ot=i({},["mi","mo","mn","ms","mtext"]),rt=i({},["annotation-xml"]);const He=i({},["title","style","font","a","script"]);let Y=null;const ze=["application/xhtml+xml","text/html"],Fe="text/html";let f=null,H=null;const We=l.createElement("form"),Vt=function(t){return t instanceof RegExp||t instanceof Function},Nt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===t)){if((!t||typeof t!="object")&&(t={}),t=k(t),Y=ze.indexOf(t.PARSER_MEDIA_TYPE)===-1?Fe:t.PARSER_MEDIA_TYPE,f=Y==="application/xhtml+xml"?vt:lt,p=R(t,"ALLOWED_TAGS")?i({},t.ALLOWED_TAGS,f):zt,d=R(t,"ALLOWED_ATTR")?i({},t.ALLOWED_ATTR,f):Ft,bt=R(t,"ALLOWED_NAMESPACES")?i({},t.ALLOWED_NAMESPACES,vt):Pe,At=R(t,"ADD_URI_SAFE_ATTR")?i(k(Kt),t.ADD_URI_SAFE_ATTR,f):Kt,qt=R(t,"ADD_DATA_URI_TAGS")?i(k($t),t.ADD_DATA_URI_TAGS,f):$t,U=R(t,"FORBID_CONTENTS")?i({},t.FORBID_CONTENTS,f):Xt,B=R(t,"FORBID_TAGS")?i({},t.FORBID_TAGS,f):{},dt=R(t,"FORBID_ATTR")?i({},t.FORBID_ATTR,f):{},M=R(t,"USE_PROFILES")?t.USE_PROFILES:!1,Wt=t.ALLOW_ARIA_ATTR!==!1,gt=t.ALLOW_DATA_ATTR!==!1,Bt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Gt=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,x=t.SAFE_FOR_TEMPLATES||!1,ht=t.SAFE_FOR_XML!==!1,D=t.WHOLE_DOCUMENT||!1,I=t.RETURN_DOM||!1,Q=t.RETURN_DOM_FRAGMENT||!1,tt=t.RETURN_TRUSTED_TYPE||!1,Et=t.FORCE_BODY||!1,Yt=t.SANITIZE_DOM!==!1,jt=t.SANITIZE_NAMED_PROPS||!1,yt=t.KEEP_CONTENT!==!1,G=t.IN_PLACE||!1,Ht=t.ALLOWED_URI_REGEXP||he,P=t.NAMESPACE||O,ot=t.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=t.HTML_INTEGRATION_POINTS||rt,c=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Vt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(c.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Vt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(c.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(c.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),x&&(gt=!1),Q&&(I=!0),M&&(p=i({},fe),d=[],M.html===!0&&(i(p,pe),i(d,de)),M.svg===!0&&(i(p,Dt),i(d,xt),i(d,st)),M.svgFilters===!0&&(i(p,Ct),i(d,xt),i(d,st)),M.mathMl===!0&&(i(p,kt),i(d,ge),i(d,st))),t.ADD_TAGS&&(p===zt&&(p=k(p)),i(p,t.ADD_TAGS,f)),t.ADD_ATTR&&(d===Ft&&(d=k(d)),i(d,t.ADD_ATTR,f)),t.ADD_URI_SAFE_ATTR&&i(At,t.ADD_URI_SAFE_ATTR,f),t.FORBID_CONTENTS&&(U===Xt&&(U=k(U)),i(U,t.FORBID_CONTENTS,f)),yt&&(p["#text"]=!0),D&&i(p,["html","head","body"]),p.table&&(i(p,["tbody"]),delete B.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');h=t.TRUSTED_TYPES_POLICY,W=h.createHTML("")}else h===void 0&&(h=dn(Z,m)),h!==null&&typeof W=="string"&&(W=h.createHTML(""));y&&y(t),H=t}},Zt=i({},[...Dt,...Ct,...nn]),Jt=i({},[...kt,...on]),Be=function(t){let n=J(t);(!n||!n.tagName)&&(n={namespaceURI:P,tagName:"template"});const e=lt(t.tagName),s=lt(n.tagName);return bt[t.namespaceURI]?t.namespaceURI===nt?n.namespaceURI===O?e==="svg":n.namespaceURI===et?e==="svg"&&(s==="annotation-xml"||ot[s]):!!Zt[e]:t.namespaceURI===et?n.namespaceURI===O?e==="math":n.namespaceURI===nt?e==="math"&&rt[s]:!!Jt[e]:t.namespaceURI===O?n.namespaceURI===nt&&!rt[s]||n.namespaceURI===et&&!ot[s]?!1:!Jt[e]&&(He[e]||!Zt[e]):!!(Y==="application/xhtml+xml"&&bt[t.namespaceURI]):!1},C=function(t){j(o.removed,{element:t});try{J(t).removeChild(t)}catch{Re(t)}},at=function(t,n){try{j(o.removed,{attribute:n.getAttributeNode(t),from:n})}catch{j(o.removed,{attribute:null,from:n})}if(n.removeAttribute(t),t==="is")if(I||Q)try{C(n)}catch{}else try{n.setAttribute(t,"")}catch{}},Qt=function(t){let n=null,e=null;if(Et)t="<remove></remove>"+t;else{const u=me(t,/^[\r\n\t ]+/);e=u&&u[0]}Y==="application/xhtml+xml"&&P===O&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const s=h?h.createHTML(t):t;if(P===O)try{n=new Ne().parseFromString(s,Y)}catch{}if(!n||!n.documentElement){n=ut.createDocument(P,"template",null);try{n.documentElement.innerHTML=_t?W:s}catch{}}const g=n.body||n.documentElement;return t&&e&&g.insertBefore(l.createTextNode(e),g.childNodes[0]||null),P===O?De.call(n,D?"html":"body")[0]:D?n.documentElement:g},te=function(t){return Le.call(t.ownerDocument||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},St=function(t){return t instanceof be&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof _e)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},ee=function(t){return typeof ct=="function"&&t instanceof ct};function L(t,n,e){it(t,s=>{s.call(o,n,e,H)})}const ne=function(t){let n=null;if(L(T.beforeSanitizeElements,t,null),St(t))return C(t),!0;const e=f(t.nodeName);if(L(T.uponSanitizeElement,t,{tagName:e,allowedTags:p}),t.hasChildNodes()&&!ee(t.firstElementChild)&&A(/<[/\w!]/g,t.innerHTML)&&A(/<[/\w!]/g,t.textContent)||t.nodeType===K.progressingInstruction||ht&&t.nodeType===K.comment&&A(/<[/\w]/g,t.data))return C(t),!0;if(!p[e]||B[e]){if(!B[e]&&re(e)&&(c.tagNameCheck instanceof RegExp&&A(c.tagNameCheck,e)||c.tagNameCheck instanceof Function&&c.tagNameCheck(e)))return!1;if(yt&&!U[e]){const s=J(t)||t.parentNode,g=Oe(t)||t.childNodes;if(g&&s){const u=g.length;for(let v=u-1;v>=0;--v){const N=Se(g[v],!0);N.__removalCount=(t.__removalCount||0)+1,s.insertBefore(N,we(t))}}}return C(t),!0}return t instanceof Ut&&!Be(t)||(e==="noscript"||e==="noembed"||e==="noframes")&&A(/<\/no(script|embed|frames)/i,t.innerHTML)?(C(t),!0):(x&&t.nodeType===K.text&&(n=t.textContent,it([mt,pt,ft],s=>{n=X(n,s," ")}),t.textContent!==n&&(j(o.removed,{element:t.cloneNode()}),t.textContent=n)),L(T.afterSanitizeElements,t,null),!1)},oe=function(t,n,e){if(Yt&&(n==="id"||n==="name")&&(e in l||e in We))return!1;if(!(gt&&!dt[n]&&A(ke,n))&&!(Wt&&A(xe,n))){if(!d[n]||dt[n]){if(!(re(t)&&(c.tagNameCheck instanceof RegExp&&A(c.tagNameCheck,t)||c.tagNameCheck instanceof Function&&c.tagNameCheck(t))&&(c.attributeNameCheck instanceof RegExp&&A(c.attributeNameCheck,n)||c.attributeNameCheck instanceof Function&&c.attributeNameCheck(n))||n==="is"&&c.allowCustomizedBuiltInElements&&(c.tagNameCheck instanceof RegExp&&A(c.tagNameCheck,e)||c.tagNameCheck instanceof Function&&c.tagNameCheck(e))))return!1}else if(!At[n]&&!A(Ht,X(e,Pt,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&Je(e,"data:")===0&&qt[t])&&!(Bt&&!A(Ie,X(e,Pt,"")))&&e)return!1}return!0},re=function(t){return t!=="annotation-xml"&&me(t,Me)},ae=function(t){L(T.beforeSanitizeAttributes,t,null);const{attributes:n}=t;if(!n||St(t))return;const e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let s=n.length;for(;s--;){const g=n[s],{name:u,namespaceURI:v,value:N}=g,w=f(u);let E=u==="value"?N:Qe(N);if(e.attrName=w,e.attrValue=E,e.keepAttr=!0,e.forceKeepAttr=void 0,L(T.uponSanitizeAttribute,t,e),E=e.attrValue,jt&&(w==="id"||w==="name")&&(at(u,t),E=Ue+E),ht&&A(/((--!?|])>)|<\/(style|title)/i,E)){at(u,t);continue}if(e.forceKeepAttr||(at(u,t),!e.keepAttr))continue;if(!Gt&&A(/\/>/i,E)){at(u,t);continue}x&&it([mt,pt,ft],Ye=>{E=X(E,Ye," ")});const ie=f(t.nodeName);if(oe(ie,w,E)){if(h&&typeof Z=="object"&&typeof Z.getAttributeType=="function"&&!v)switch(Z.getAttributeType(ie,w)){case"TrustedHTML":{E=h.createHTML(E);break}case"TrustedScriptURL":{E=h.createScriptURL(E);break}}try{v?t.setAttributeNS(v,u,E):t.setAttribute(u,E),St(t)?C(t):ue(o.removed)}catch{}}}L(T.afterSanitizeAttributes,t,null)},Ge=function t(n){let e=null;const s=te(n);for(L(T.beforeSanitizeShadowDOM,n,null);e=s.nextNode();)L(T.uponSanitizeShadowNode,e,null),ne(e),ae(e),e.content instanceof b&&t(e.content);L(T.afterSanitizeShadowDOM,n,null)};return o.sanitize=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,s=null,g=null,u=null;if(_t=!t,_t&&(t="<!-->"),typeof t!="string"&&!ee(t))if(typeof t.toString=="function"){if(t=t.toString(),typeof t!="string")throw q("dirty is not a string, aborting")}else throw q("toString is not a function");if(!o.isSupported)return t;if(Tt||Nt(n),o.removed=[],typeof t=="string"&&(G=!1),G){if(t.nodeName){const w=f(t.nodeName);if(!p[w]||B[w])throw q("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof ct)e=Qt("<!---->"),s=e.ownerDocument.importNode(t,!0),s.nodeType===K.element&&s.nodeName==="BODY"||s.nodeName==="HTML"?e=s:e.appendChild(s);else{if(!I&&!x&&!D&&t.indexOf("<")===-1)return h&&tt?h.createHTML(t):t;if(e=Qt(t),!e)return I?null:tt?W:""}e&&Et&&C(e.firstChild);const v=te(G?t:e);for(;g=v.nextNode();)ne(g),ae(g),g.content instanceof b&&Ge(g.content);if(G)return t;if(I){if(Q)for(u=ve.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(d.shadowroot||d.shadowrootmode)&&(u=Ce.call(a,u,!0)),u}let N=D?e.outerHTML:e.innerHTML;return D&&p["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&A(Te,e.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
|
|
2
|
-
`+N),x&&it([mt,pt,ft],w=>{N=X(N,w," ")}),h&&tt?h.createHTML(N):N},o.setConfig=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(t),Tt=!0},o.clearConfig=function(){H=null,Tt=!1},o.isValidAttribute=function(t,n,e){H||Nt({});const s=f(t),g=f(n);return oe(s,g,e)},o.addHook=function(t,n){typeof n=="function"&&j(T[t],n)},o.removeHook=function(t,n){if(n!==void 0){const e=Ve(T[t],n);return e===-1?void 0:Ze(T[t],e,1)[0]}return ue(T[t])},o.removeHooks=function(t){T[t]=[]},o.removeAllHooks=function(){T=ye()},o}var It=Ae();const gn=je("div",{target:"e18540fl0"})({name:"1d3w5wq",styles:"width:100%"}),Mt="data-temp-href-target";It.addHook("beforeSanitizeAttributes",function(r){r instanceof HTMLElement&&r.hasAttribute("target")&&r.getAttribute("target")==="_blank"&&r.setAttribute(Mt,"_blank")}),It.addHook("afterSanitizeAttributes",function(r){r instanceof HTMLElement&&r.hasAttribute(Mt)&&(r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer"),r.removeAttribute(Mt))});const hn=r=>{const o={USE_PROFILES:{html:!0},FORCE_BODY:!0};return It.sanitize(r,o)};function Tn({element:r}){const{body:o}=r,[l,a]=Xe(),m=Rt.useMemo(()=>hn(o),[o]);return Rt.useEffect(()=>{var b,V;((b=a.current)==null?void 0:b.clientHeight)===0&&l>=0&&((V=a.current.parentElement)==null?void 0:V.childElementCount)===1&&a.current.parentElement.classList.add("stHtml-empty")}),wt.jsx(wt.Fragment,{children:m&&wt.jsx(gn,{className:"stHtml","data-testid":"stHtml",ref:a,dangerouslySetInnerHTML:{__html:m}})})}const En=Rt.memo(Tn);export{En as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
function de(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xe}=Object.prototype,{getPrototypeOf:Y}=Object,I=(e=>t=>{const n=Xe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>I(t)===e),z=e=>t=>typeof t===e,{isArray:F}=Array,B=z("undefined");function Ge(e){return e!==null&&!B(e)&&e.constructor!==null&&!B(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pe=A("ArrayBuffer");function Qe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pe(e.buffer),t}const Ze=z("string"),T=z("function"),he=z("number"),H=e=>e!==null&&typeof e=="object",Ye=e=>e===!0||e===!1,J=e=>{if(I(e)!=="object")return!1;const t=Y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},et=A("Date"),tt=A("File"),nt=A("Blob"),rt=A("FileList"),ot=e=>H(e)&&T(e.pipe),st=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=I(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},it=A("URLSearchParams"),[at,ct,lt,ut]=["ReadableStream","Request","Response","Headers"].map(A),ft=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function k(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),F(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(r=0;r<s;r++)l=i[r],t.call(null,e[l],l,e)}}function me(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,be=e=>!B(e)&&e!==j;function ee(){const{caseless:e}=be(this)&&this||{},t={},n=(r,o)=>{const i=e&&me(t,o)||o;J(t[i])&&J(r)?t[i]=ee(t[i],r):J(r)?t[i]=ee({},r):F(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&k(arguments[r],n);return t}const dt=(e,t,n,{allOwnKeys:r}={})=>(k(t,(o,i)=>{n&&T(o)?e[i]=de(o,n):e[i]=o},{allOwnKeys:r}),e),pt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ht=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},mt=(e,t,n,r)=>{let o,i,s;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},gt=e=>{if(!e)return null;if(F(e))return e;let t=e.length;if(!he(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Y(Uint8Array)),wt=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const o=r.value;t.call(e,o[0],o[1])}},Et=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rt=A("HTMLFormElement"),Ot=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),ge=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),St=A("RegExp"),ye=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Tt=e=>{ye(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},At=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return F(e)?r(e):r(String(e).split(t)),n},xt=()=>{},Ct=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Nt(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const jt=e=>{const t=new Array(10),n=(r,o)=>{if(H(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=F(r)?[]:{};return k(r,(s,l)=>{const p=n(s,o+1);!B(p)&&(i[l]=p)}),t[o]=void 0,i}}return r};return n(e,0)},vt=A("AsyncFunction"),Pt=e=>e&&(H(e)||T(e))&&T(e.then)&&T(e.catch),we=((e,t)=>e?setImmediate:t?((n,r)=>(j.addEventListener("message",({source:o,data:i})=>{o===j&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),j.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",T(j.postMessage)),Ut=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||we,a={isArray:F,isArrayBuffer:pe,isBuffer:Ge,isFormData:st,isArrayBufferView:Qe,isString:Ze,isNumber:he,isBoolean:Ye,isObject:H,isPlainObject:J,isReadableStream:at,isRequest:ct,isResponse:lt,isHeaders:ut,isUndefined:B,isDate:et,isFile:tt,isBlob:nt,isRegExp:St,isFunction:T,isStream:ot,isURLSearchParams:it,isTypedArray:yt,isFileList:rt,forEach:k,merge:ee,extend:dt,trim:ft,stripBOM:pt,inherits:ht,toFlatObject:mt,kindOf:I,kindOfTest:A,endsWith:bt,toArray:gt,forEachEntry:wt,matchAll:Et,isHTMLForm:Rt,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:ye,freezeMethods:Tt,toObjectSet:At,toCamelCase:Ot,noop:xt,toFiniteNumber:Ct,findKey:me,global:j,isContextDefined:be,isSpecCompliantForm:Nt,toJSONObject:jt,isAsyncFn:vt,isThenable:Pt,setImmediate:we,asap:Ut};function h(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}a.inherits(h,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ee=h.prototype,Re={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Re[e]={value:e}}),Object.defineProperties(h,Re),Object.defineProperty(Ee,"isAxiosError",{value:!0}),h.from=(e,t,n,r,o,i)=>{const s=Object.create(Ee);return a.toFlatObject(e,s,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),h.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Ft=null;function te(e){return a.isPlainObject(e)||a.isArray(e)}function Oe(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Se(e,t,n){return e?e.concat(t).map(function(r,o){return r=Oe(r),!n&&o?"["+r+"]":r}).join(n?".":""):t}function _t(e){return a.isArray(e)&&!e.some(te)}const Lt=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function W(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,b){return!a.isUndefined(b[f])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function p(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(!l&&a.isBlob(f))throw new h("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function c(f,b,d){let O=f;if(f&&!d&&typeof f=="object"){if(a.endsWith(b,"{}"))b=r?b:b.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&_t(f)||(a.isFileList(f)||a.endsWith(b,"[]"))&&(O=a.toArray(f)))return b=Oe(b),O.forEach(function(E,y){!(a.isUndefined(E)||E===null)&&t.append(s===!0?Se([b],y,i):s===null?b:b+"[]",p(E))}),!1}return te(f)?!0:(t.append(Se(d,b,i),p(f)),!1)}const u=[],m=Object.assign(Lt,{defaultVisitor:c,convertValue:p,isVisitable:te});function g(f,b){if(!a.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+b.join("."));u.push(f),a.forEach(f,function(d,O){(!(a.isUndefined(d)||d===null)&&o.call(t,d,a.isString(O)?O.trim():O,b,m))===!0&&g(d,b?b.concat(O):[O])}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Te(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function ne(e,t){this._pairs=[],e&&W(e,this,t)}const Ae=ne.prototype;Ae.append=function(e,t){this._pairs.push([e,t])},Ae.toString=function(e){const t=e?function(n){return e.call(this,n,Te)}:Te;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function Bt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xe(e,t,n){if(!t)return e;const r=n&&n.encode||Bt;a.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=a.isURLSearchParams(t)?t.toString():new ne(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ce{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kt=typeof URLSearchParams<"u"?URLSearchParams:ne,Dt=typeof FormData<"u"?FormData:null,qt=typeof Blob<"u"?Blob:null,Mt={isBrowser:!0,classes:{URLSearchParams:kt,FormData:Dt,Blob:qt},protocols:["http","https","file","blob","url","data"]},re=typeof window<"u"&&typeof document<"u",oe=typeof navigator=="object"&&navigator||void 0,It=re&&(!oe||["ReactNative","NativeScript","NS"].indexOf(oe.product)<0),zt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ht=re&&window.location.href||"http://localhost",Jt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:re,hasStandardBrowserEnv:It,hasStandardBrowserWebWorkerEnv:zt,navigator:oe,origin:Ht},Symbol.toStringTag,{value:"Module"})),R={...Jt,...Mt};function Wt(e,t){return W(e,new R.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return R.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Kt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Vt(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function je(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),p=i>=n.length;return s=!s&&a.isArray(o)?o.length:s,p?(a.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!l):((!o[s]||!a.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&a.isArray(o[s])&&(o[s]=Vt(o[s])),!l)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,o)=>{t(Kt(r),o,n,0)}),n}return null}function $t(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const D={transitional:Ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=a.isObject(e);if(o&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return r?JSON.stringify(je(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Wt(e,this.formSerializer).toString();if((i=a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return W(i?{"files[]":e}:e,s&&new s,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),$t(e)):e}],transformResponse:[function(e){const t=this.transitional||D.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(n&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(i){if(o)throw i.name==="SyntaxError"?h.from(i,h.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{D.headers[e]={}});const Xt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gt=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Xt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ve=Symbol("internals");function q(e){return e&&String(e).trim().toLowerCase()}function K(e){return e===!1||e==null?e:a.isArray(e)?e.map(K):String(e)}function Qt(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Zt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function se(e,t,n,r,o){if(a.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Yt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function en(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let S=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(s,l,p){const c=q(l);if(!c)throw new Error("header name must be a non-empty string");const u=a.findKey(r,c);(!u||r[u]===void 0||p===!0||p===void 0&&r[u]!==!1)&&(r[u||l]=K(s))}const i=(s,l)=>a.forEach(s,(p,c)=>o(p,c,l));if(a.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(a.isString(e)&&(e=e.trim())&&!Zt(e))i(Gt(e),t);else if(a.isHeaders(e))for(const[s,l]of e.entries())o(l,s,n);else e!=null&&o(t,e,n);return this}get(e,t){if(e=q(e),e){const n=a.findKey(this,e);if(n){const r=this[n];if(!t)return r;if(t===!0)return Qt(r);if(a.isFunction(t))return t.call(this,r,n);if(a.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=q(e),e){const n=a.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||se(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let r=!1;function o(i){if(i=q(i),i){const s=a.findKey(n,i);s&&(!t||se(n,n[s],s,t))&&(delete n[s],r=!0)}}return a.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];(!e||se(this,this[o],o,e,!0))&&(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return a.forEach(this,(r,o)=>{const i=a.findKey(n,o);if(i){t[i]=K(r),delete t[o];return}const s=e?Yt(o):String(o).trim();s!==o&&delete t[o],t[s]=K(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return a.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(r=>n.set(r)),n}static accessor(e){const t=(this[ve]=this[ve]={accessors:{}}).accessors,n=this.prototype;function r(o){const i=q(o);t[i]||(en(n,o),t[i]=!0)}return a.isArray(e)?e.forEach(r):r(e),this}};S.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(S.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(S);function ie(e,t){const n=this||D,r=t||n,o=S.from(r.headers);let i=r.data;return a.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Pe(e){return!!(e&&e.__CANCEL__)}function _(e,t,n){h.call(this,e??"canceled",h.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(_,h,{__CANCEL__:!0});function Ue(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new h("Request failed with status code "+n.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const p=Date.now(),c=r[i];s||(s=p),n[o]=l,r[o]=p;let u=i,m=0;for(;u!==o;)m+=n[u++],u=u%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),p-s<t)return;const g=c&&p-c;return g?Math.round(m*1e3/g):void 0}}function rn(e,t){let n=0,r=1e3/t,o,i;const s=(l,p=Date.now())=>{n=p,o=null,i&&(clearTimeout(i),i=null),e.apply(null,l)};return[(...l)=>{const p=Date.now(),c=p-n;c>=r?s(l,p):(o=l,i||(i=setTimeout(()=>{i=null,s(o)},r-c)))},()=>o&&s(o)]}const V=(e,t,n=3)=>{let r=0;const o=nn(50,250);return rn(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,p=s-r,c=o(p),u=s<=l;r=s;const m={loaded:s,total:l,progress:l?s/l:void 0,bytes:p,rate:c||void 0,estimated:c&&l&&u?(l-s)/c:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Fe=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_e=e=>(...t)=>a.asap(()=>e(...t)),on=R.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,R.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0,sn=R.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),a.isString(r)&&s.push("path="+r),a.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function an(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Le(e,t,n){let r=!an(t);return e&&(r||n==!1)?cn(e,t):t}const Be=e=>e instanceof S?{...e}:e;function v(e,t){t=t||{};const n={};function r(c,u,m,g){return a.isPlainObject(c)&&a.isPlainObject(u)?a.merge.call({caseless:g},c,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function o(c,u,m,g){if(a.isUndefined(u)){if(!a.isUndefined(c))return r(void 0,c,m,g)}else return r(c,u,m,g)}function i(c,u){if(!a.isUndefined(u))return r(void 0,u)}function s(c,u){if(a.isUndefined(u)){if(!a.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function l(c,u,m){if(m in t)return r(c,u);if(m in e)return r(void 0,c)}const p={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(c,u,m)=>o(Be(c),Be(u),m,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(c){const u=p[c]||o,m=u(e[c],t[c],c);a.isUndefined(m)&&u!==l||(n[c]=m)}),n}const ke=e=>{const t=v({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=t;t.headers=s=S.from(s),t.url=xe(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let p;if(a.isFormData(n)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((p=s.getContentType())!==!1){const[c,...u]=p?p.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(R.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&on(t.url))){const c=o&&i&&sn.read(i);c&&s.set(o,c)}return t},ln=typeof XMLHttpRequest<"u",un=ln&&function(e){return new Promise(function(t,n){const r=ke(e);let o=r.data;const i=S.from(r.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:p}=r,c,u,m,g,f;function b(){g&&g(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function O(){if(!d)return;const y=S.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:y,config:e,request:d};Ue(function(L){t(L),b()},function(L){n(L),b()},C),d=null}"onloadend"in d?d.onloadend=O:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(O)},d.onabort=function(){d&&(n(new h("Request aborted",h.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new h("Network Error",h.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||Ne;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),n(new h(y,C.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,d)),d=null},o===void 0&&i.setContentType(null),"setRequestHeader"in d&&a.forEach(i.toJSON(),function(y,C){d.setRequestHeader(C,y)}),a.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),s&&s!=="json"&&(d.responseType=r.responseType),p&&([m,f]=V(p,!0),d.addEventListener("progress",m)),l&&d.upload&&([u,g]=V(l),d.upload.addEventListener("progress",u),d.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(c=y=>{d&&(n(!y||y.type?new _(null,e,d):y),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const E=tn(r.url);if(E&&R.protocols.indexOf(E)===-1){n(new h("Unsupported protocol "+E+":",h.ERR_BAD_REQUEST,e));return}d.send(o||null)})},fn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,l();const u=c instanceof Error?c:this.reason;r.abort(u instanceof h?u:new _(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,i(new h(`timeout ${t} of ms exceeded`,h.ETIMEDOUT))},t);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:p}=r;return p.unsubscribe=()=>a.asap(l),p}},dn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},pn=async function*(e,t){for await(const n of hn(e))yield*dn(n,t)},hn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},De=(e,t,n,r)=>{const o=pn(e,t);let i=0,s,l=p=>{s||(s=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:c,value:u}=await o.next();if(c){l(),p.close();return}let m=u.byteLength;if(n){let g=i+=m;n(g)}p.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(p){return l(p),o.return()}},{highWaterMark:2})},$=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",qe=$&&typeof ReadableStream=="function",mn=$&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Me=(e,...t)=>{try{return!!e(...t)}catch{return!1}},bn=qe&&Me(()=>{let e=!1;const t=new Request(R.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ie=64*1024,ae=qe&&Me(()=>a.isReadableStream(new Response("").body)),X={stream:ae&&(e=>e.body)};$&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!X[t]&&(X[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new h(`Response type '${t}' is not supported`,h.ERR_NOT_SUPPORT,r)})})})(new Response);const gn=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(R.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await mn(e)).byteLength},yn=async(e,t)=>a.toFiniteNumber(e.getContentLength())??gn(t),wn=$&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:l,onUploadProgress:p,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:g}=ke(e);c=c?(c+"").toLowerCase():"text";let f=fn([o,i&&i.toAbortSignal()],s),b;const d=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let O;try{if(p&&bn&&n!=="get"&&n!=="head"&&(O=await yn(u,r))!==0){let N=new Request(t,{method:"POST",body:r,duplex:"half"}),U;if(a.isFormData(r)&&(U=N.headers.get("content-type"))&&u.setContentType(U),N.body){const[Z,M]=Fe(O,V(_e(p)));r=De(N.body,Ie,Z,M)}}a.isString(m)||(m=m?"include":"omit");const E="credentials"in Request.prototype;b=new Request(t,{...g,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:E?m:void 0});let y=await fetch(b);const C=ae&&(c==="stream"||c==="response");if(ae&&(l||C&&d)){const N={};["status","statusText","headers"].forEach(fe=>{N[fe]=y[fe]});const U=a.toFiniteNumber(y.headers.get("content-length")),[Z,M]=l&&Fe(U,V(_e(l),!0))||[];y=new Response(De(y.body,Ie,Z,()=>{M&&M(),d&&d()}),N)}c=c||"text";let L=await X[a.findKey(X,c)||"text"](y,e);return!C&&d&&d(),await new Promise((N,U)=>{Ue(N,U,{data:L,headers:S.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:b})})}catch(E){throw d&&d(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new h("Network Error",h.ERR_NETWORK,e,b),{cause:E.cause||E}):h.from(E,E&&E.code,e,b)}}),ce={http:Ft,xhr:un,fetch:wn};a.forEach(ce,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ze=e=>`- ${e}`,En=e=>a.isFunction(e)||e===null||e===!1,He={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!En(n)&&(r=ce[(s=String(n)).toLowerCase()],r===void 0))throw new h(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([l,p])=>`adapter ${l} `+(p===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
4
|
-
`+i.map(ze).join(`
|
|
5
|
-
`):" "+ze(i[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:ce};function le(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _(null,e)}function Je(e){return le(e),e.headers=S.from(e.headers),e.data=ie.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),He.getAdapter(e.adapter||D.adapter)(e).then(function(t){return le(e),t.data=ie.call(e,e.transformResponse,t),t.headers=S.from(t.headers),t},function(t){return Pe(t)||(le(e),t&&t.response&&(t.response.data=ie.call(e,e.transformResponse,t.response),t.response.headers=S.from(t.response.headers))),Promise.reject(t)})}const We="1.8.4",G={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{G[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ke={};G.transitional=function(e,t,n){function r(o,i){return"[Axios v"+We+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,s)=>{if(e===!1)throw new h(r(i," has been removed"+(t?" in "+t:"")),h.ERR_DEPRECATED);return t&&!Ke[i]&&(Ke[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,i,s):!0}},G.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Rn(e,t,n){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const l=e[i],p=l===void 0||s(l,i,e);if(p!==!0)throw new h("option "+i+" must be "+p,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+i,h.ERR_BAD_OPTION)}}const Q={assertOptions:Rn,validators:G},x=Q.validators;let P=class{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
-
`+o):n.stack=o}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=v(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;n!==void 0&&Q.assertOptions(n,{silentJSONParsing:x.transitional(x.boolean),forcedJSONParsing:x.transitional(x.boolean),clarifyTimeoutError:x.transitional(x.boolean)},!1),r!=null&&(a.isFunction(r)?t.paramsSerializer={serialize:r}:Q.assertOptions(r,{encode:x.function,serialize:x.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Q.assertOptions(t,{baseUrl:x.spelling("baseURL"),withXsrfToken:x.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[t.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),t.headers=S.concat(i,o);const s=[];let l=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(t)===!1||(l=l&&f.synchronous,s.unshift(f.fulfilled,f.rejected))});const p=[];this.interceptors.response.forEach(function(f){p.push(f.fulfilled,f.rejected)});let c,u=0,m;if(!l){const f=[Je.bind(this),void 0];for(f.unshift.apply(f,s),f.push.apply(f,p),m=f.length,c=Promise.resolve(t);u<m;)c=c.then(f[u++],f[u++]);return c}m=s.length;let g=t;for(u=0;u<m;){const f=s[u++],b=s[u++];try{g=f(g)}catch(d){b.call(this,d);break}}try{c=Je.call(this,g)}catch(f){return Promise.reject(f)}for(u=0,m=p.length;u<m;)c=c.then(p[u++],p[u++]);return c}getUri(e){e=v(this.defaults,e);const t=Le(e.baseURL,e.url,e.allowAbsoluteUrls);return xe(t,e.params,e.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(e){P.prototype[e]=function(t,n){return this.request(v(n||{},{method:e,url:t,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(e){function t(n){return function(r,o,i){return this.request(v(i||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}P.prototype[e]=t(),P.prototype[e+"Form"]=t(!0)});let On=class $e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{r.subscribe(l),i=l}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(o,i,s){r.reason||(r.reason=new _(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $e(function(n){t=n}),cancel:t}}};function Sn(e){return function(t){return e.apply(null,t)}}function Tn(e){return a.isObject(e)&&e.isAxiosError===!0}const ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ue).forEach(([e,t])=>{ue[t]=e});function Ve(e){const t=new P(e),n=de(P.prototype.request,t);return a.extend(n,P.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Ve(v(e,r))},n}const w=Ve(D);w.Axios=P,w.CanceledError=_,w.CancelToken=On,w.isCancel=Pe,w.VERSION=We,w.toFormData=W,w.AxiosError=h,w.Cancel=w.CanceledError,w.all=function(e){return Promise.all(e)},w.spread=Sn,w.isAxiosError=Tn,w.mergeConfig=v,w.AxiosHeaders=S,w.formToJSON=e=>je(a.isHTMLForm(e)?new FormData(e):e),w.getAdapter=He.getAdapter,w.HttpStatusCode=ue,w.default=w;const{Axios:An,AxiosError:xn,CanceledError:Cn,isCancel:Nn,CancelToken:jn,VERSION:vn,all:Pn,Cancel:Un,isAxiosError:Fn,spread:_n,toFormData:Ln,AxiosHeaders:Bn,HttpStatusCode:kn,formToJSON:Dn,getAdapter:qn,mergeConfig:Mn}=w;export{w as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,bO as k,A as w,cY as x,j as s,bY as D,bZ as E,cb as U,b_ as _,bH as A}from"./index-OxGwEg3m.js";import{u as B}from"./uniqueId-Dka3DuQQ.js";import{u as L,a as M,b as P}from"./useOnInputChange-C3lvbUNp.js";import{I as O}from"./InputInstructions-DuxSO2sS.js";import{a as Y}from"./useBasicWidgetState-Bm5AJWX7.js";import{T as G}from"./textarea-Cy6EVtfz.js";import"./inputUtils-CQWz5UKz.js";import"./FormClearHelper-DxeY-rII.js";import"./base-input-NsRtpzFx.js";const W=(a,e)=>a.getStringValue(e)??e.default??null,K=a=>a.default??null,N=a=>a.value??null,Z=(a,e,i,d)=>{e.setStringValue(a,i.value,{fromUi:i.fromUi},d)},$=({disabled:a,element:e,widgetMgr:i,fragmentId:d})=>{var h;const b=r.useRef(B("text_area_")).current,[S,v]=k(),[l,m]=r.useState(!1),[I,c]=r.useState(!1),[o,n]=r.useState(()=>W(i,e)??null),C=r.useCallback(()=>{n(e.default??null),m(!0)},[e]),[T,u]=Y({getStateFromWidgetMgr:W,getDefaultStateFromProto:K,getCurrStateFromProto:N,updateWidgetMgrState:Z,element:e,widgetMgr:i,fragmentId:d,onFormCleared:C});L(T,o,n,l);const t=w(),g=r.useCallback(()=>{m(!1),u({value:o,fromUi:!0})},[o,u]),y=r.useCallback(()=>{l&&g(),c(!1)},[l,g]),F=r.useCallback(()=>{c(!0)},[]),j=M({formId:e.formId,maxChars:e.maxChars,setDirty:m,setUiValue:n,setValueWithSource:u}),z=P(e.formId,g,l,i,d,!0),{height:f,placeholder:H,formId:p}=e,R=x({formId:p})?i.allowFormEnterToSubmit(p):l,V=I&&S>t.breakpoints.hideWidgetDetails;return s.jsxs("div",{className:"stTextArea","data-testid":"stTextArea",ref:v,children:[s.jsx(D,{label:e.label,disabled:a,labelVisibility:E((h=e.labelVisibility)==null?void 0:h.value),htmlFor:b,children:e.help&&s.jsx(U,{children:s.jsx(_,{content:e.help,placement:A.TOP_RIGHT})})}),s.jsx(G,{value:o??"",placeholder:H,onBlur:y,onFocus:F,onChange:j,onKeyDown:z,"aria-label":e.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:t.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:t.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:t.spacing.md,paddingLeft:t.spacing.md,paddingBottom:t.spacing.md,paddingTop:t.spacing.md}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth}}}}),V&&s.jsx(O,{dirty:l,value:o??"",maxLength:e.maxChars,type:"multiline",inForm:x({formId:p}),allowEnterToSubmit:R})]})},q=r.memo($);export{q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bg as e,bh as f,g as m}from"./index-OxGwEg3m.js";var r,a;function v(){if(a)return r;a=1;var t=e(),n=f(),o=n(function(i,s,u,c){t(i,s,u,c)});return r=o,r}var b=v();const g=m(b);export{g as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,r as n,b6 as x,bN as y,A as b,bO as g,j as c,bs as w}from"./index-OxGwEg3m.js";const C=f("div",{target:"elp1w7k0"})(({theme:e,isExpanded:t})=>({width:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}),""),m=n.createContext(null);m.displayName="ElementFullscreenContext";const p=e=>{const t=n.useContext(e);if(t==null)throw new Error(`useRequiredContext: ${e.displayName??"context"} not found`);return t},v=()=>{const{setFullScreen:e}=n.useContext(x),[t,r]=n.useState(!1),{fullHeight:o,fullWidth:u}=p(y),l=n.useCallback(a=>{r(a),e(a)},[e]),i=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),s=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),d=n.useCallback(a=>{a.keyCode===27&&t&&s()},[s,t]);return n.useEffect(()=>(document.addEventListener("keydown",d,!1),()=>{document.removeEventListener("keydown",d,!1)}),[d]),n.useMemo(()=>({expanded:t,zoomIn:i,zoomOut:s,fullHeight:o,fullWidth:u}),[t,i,s,o,u])},k=({children:e,height:t})=>{const r=b(),{expanded:o,fullHeight:u,fullWidth:l,zoomIn:i,zoomOut:s}=v(),[d,a]=g(),h=n.useMemo(()=>({width:o?l:d,height:o?u:t,expanded:o,expand:i,collapse:s}),[o,u,l,t,d,i,s]);return c.jsx(m.Provider,{value:h,children:c.jsx(C,{ref:a,isExpanded:o,"data-testid":"stFullScreenFrame",theme:r,children:e})})};function E(e){const t=r=>c.jsx(k,{children:c.jsx(e,{...r})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,w(t,e)}export{m as E,p as u,E as w};
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
function Q(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var E,j;function Y(){if(j)return E;j=1;function o(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function l(c,e){for(var t="",i=0,s=-1,n=0,r,a=0;a<=c.length;++a){if(a<c.length)r=c.charCodeAt(a);else{if(r===47)break;r=47}if(r===47){if(!(s===a-1||n===1))if(s!==a-1&&n===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var g=t.lastIndexOf("/");if(g!==t.length-1){g===-1?(t="",i=0):(t=t.slice(0,g),i=t.length-1-t.lastIndexOf("/")),s=a,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=a,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+c.slice(s+1,a):t=c.slice(s+1,a),i=a-s-1;s=a,n=0}else r===46&&n!==-1?++n:n=-1}return t}function d(c,e){var t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+i:t+c+i:i}var m={resolve:function(){for(var e="",t=!1,i,s=arguments.length-1;s>=-1&&!t;s--){var n;s>=0?n=arguments[s]:(i===void 0&&(i=process.cwd()),n=i),o(n),n.length!==0&&(e=n+"/"+e,t=n.charCodeAt(0)===47)}return e=l(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(o(e),e.length===0)return".";var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=l(e,!t),e.length===0&&!t&&(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];o(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":m.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t||(e=m.resolve(e),t=m.resolve(t),e===t))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var s=e.length,n=s-i,r=1;r<t.length&&t.charCodeAt(r)===47;++r);for(var a=t.length,g=a-r,S=n<g?n:g,b=-1,h=0;h<=S;++h){if(h===S){if(g>S){if(t.charCodeAt(r+h)===47)return t.slice(r+h+1);if(h===0)return t.slice(r+h)}else n>S&&(e.charCodeAt(i+h)===47?b=h:h===0&&(b=0));break}var v=e.charCodeAt(i+h),f=t.charCodeAt(r+h);if(v!==f)break;v===47&&(b=h)}var p="";for(h=i+b+1;h<=s;++h)(h===s||e.charCodeAt(h)===47)&&(p.length===0?p+="..":p+="/..");return p.length>0?p+t.slice(r+b):(r+=b,t.charCodeAt(r)===47&&++r,t.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(o(e),e.length===0)return".";for(var t=e.charCodeAt(0),i=t===47,s=-1,n=!0,r=e.length-1;r>=1;--r)if(t=e.charCodeAt(r),t===47){if(!n){s=r;break}}else n=!1;return s===-1?i?"/":".":i&&s===1?"//":e.slice(0,s)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');o(e);var i=0,s=-1,n=!0,r;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,g=-1;for(r=e.length-1;r>=0;--r){var S=e.charCodeAt(r);if(S===47){if(!n){i=r+1;break}}else g===-1&&(n=!1,g=r+1),a>=0&&(S===t.charCodeAt(a)?--a===-1&&(s=r):(a=-1,s=g))}return i===s?s=g:s===-1&&(s=e.length),e.slice(i,s)}else{for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!n){i=r+1;break}}else s===-1&&(n=!1,s=r+1);return s===-1?"":e.slice(i,s)}},extname:function(e){o(e);for(var t=-1,i=0,s=-1,n=!0,r=0,a=e.length-1;a>=0;--a){var g=e.charCodeAt(a);if(g===47){if(!n){i=a+1;break}continue}s===-1&&(n=!1,s=a+1),g===46?t===-1?t=a:r!==1&&(r=1):t!==-1&&(r=-1)}return t===-1||s===-1||r===0||r===1&&t===s-1&&t===i+1?"":e.slice(t,s)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return d("/",e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var i=e.charCodeAt(0),s=i===47,n;s?(t.root="/",n=1):n=0;for(var r=-1,a=0,g=-1,S=!0,b=e.length-1,h=0;b>=n;--b){if(i=e.charCodeAt(b),i===47){if(!S){a=b+1;break}continue}g===-1&&(S=!1,g=b+1),i===46?r===-1?r=b:h!==1&&(h=1):r!==-1&&(h=-1)}return r===-1||g===-1||h===0||h===1&&r===g-1&&r===a+1?g!==-1&&(a===0&&s?t.base=t.name=e.slice(1,g):t.base=t.name=e.slice(a,g)):(a===0&&s?(t.name=e.slice(1,r),t.base=e.slice(1,g)):(t.name=e.slice(a,r),t.base=e.slice(a,g)),t.ext=e.slice(r,g)),a>0?t.dir=e.slice(0,a-1):s&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};return m.posix=m,E=m,E}var Z=Y(),R=Q(Z);const O="/home/pyodide",N=o=>`${O}/${o}`,F=(o,l)=>o==null?R.resolve(O,l):R.resolve(N(o),l);function z(o,l){const d=R.normalize(l),c=R.dirname(d).split("/"),e=[];for(const t of c){e.push(t);const i=e.join("/");if(o.FS.analyzePath(i).exists){if(o.FS.isDir(i))throw new Error(`"${i}" already exists and is not a directory.`);continue}try{o.FS.mkdir(i)}catch(s){throw console.error(`Failed to create a directory "${i}"`),s}}}function q(o,l,d,m){z(o,l),o.FS.writeFile(l,d,m)}function ee(o,l,d){z(o,d),o.FS.rename(l,d)}const te="[",re="(<=>!~",oe=";",ne="@",se=new RegExp(`[${te+re+oe+ne}]`);function ie(o){return o.split(se)[0].trim()}function U(o){return o.forEach(d=>{let m;try{m=new URL(d)}catch{return}if(m.protocol==="emfs:"||m.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${d})`)}),o.filter(d=>ie(d)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${d}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}async function ae(o){var c;const l=typeof process<"u"&&((c=process.versions)==null?void 0:c.node);let d;l?d=(await import("./__vite-browser-external-9wXp6ZBx.js")).sep:d="/";const m=o.slice(0,o.lastIndexOf(d)+1);if(o.endsWith(".mjs")){if(l){const e=await import("./__vite-browser-external-9wXp6ZBx.js"),t=await import("./__vite-browser-external-9wXp6ZBx.js");!o.includes("://")&&e.isAbsolute(o)&&(o=t.pathToFileURL(o).href)}return{scriptURL:o,pyodideIndexURL:m,isESModule:!0}}else return{scriptURL:o,pyodideIndexURL:m,isESModule:!1}}async function le(o,l){const{scriptURL:d,pyodideIndexURL:m,isESModule:c}=await ae(o);let e;return c?e=(await import(d)).loadPyodide:(importScripts(d),e=self.loadPyodide),e({...l,indexURL:m})}function ce(o){o.runPython(`
|
|
2
|
-
import micropip
|
|
3
|
-
micropip.add_mock_package(
|
|
4
|
-
"pyarrow", "0.0.1",
|
|
5
|
-
modules={
|
|
6
|
-
"pyarrow": """
|
|
7
|
-
__version__ = '0.0.1' # TODO: Update when releasing
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class Table:
|
|
11
|
-
@classmethod
|
|
12
|
-
def from_pandas(*args, **kwargs):
|
|
13
|
-
raise NotImplementedError("stlite is not supporting this method.")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class Array:
|
|
17
|
-
def __init__(self, *args, **kwargs):
|
|
18
|
-
raise NotImplementedError("stlite is not supporting PyArrow.Array")
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class ChunkedArray:
|
|
22
|
-
def __init__(self, *args, **kwargs):
|
|
23
|
-
raise NotImplementedError("stlite is not supporting PyArrow.ChunkedArray")
|
|
24
|
-
"""
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
`)}function de(o,l,d){const m=o.pyimport("pyodide"),c=r=>m.code.find_imports(r).toJs(),e=d.map(r=>c(r)),s=Array.from(new Set(e.flat())).filter(r=>!o.runPython(`__import__('importlib').util.find_spec('${r}')`)).map(r=>o._api._import_name_to_package_name.get(r)).filter(r=>r);if(s.length===0)return Promise.resolve();const n=o.loadPackage(s);return l(s,n),n.then()}function $(o,l,d){const m=de(o,l,d);o.runPython(`
|
|
28
|
-
def __set_module_auto_load_promise__(promise):
|
|
29
|
-
from streamlit.runtime.scriptrunner import script_runner
|
|
30
|
-
script_runner.moduleAutoLoadPromise = promise
|
|
31
|
-
|
|
32
|
-
__set_module_auto_load_promise__`)(m)}const ue=async o=>{await o.runPythonAsync(`import jedi
|
|
33
|
-
import re
|
|
34
|
-
import json
|
|
35
|
-
from typing import Dict
|
|
36
|
-
from lsprotocol.types import (CompletionItem, CompletionList, CompletionItemKind, Position, Range, TextEdit)
|
|
37
|
-
from lsprotocol import converters as lsp_converters
|
|
38
|
-
from jedi.api.classes import Completion
|
|
39
|
-
|
|
40
|
-
def as_completion_item_kind(kind: str):
|
|
41
|
-
match kind:
|
|
42
|
-
case 'class':
|
|
43
|
-
return CompletionItemKind.Class
|
|
44
|
-
case 'function':
|
|
45
|
-
return CompletionItemKind.Function
|
|
46
|
-
case 'instance':
|
|
47
|
-
return CompletionItemKind.Reference
|
|
48
|
-
case 'keyword':
|
|
49
|
-
return CompletionItemKind.Keyword
|
|
50
|
-
case 'module':
|
|
51
|
-
return CompletionItemKind.Module
|
|
52
|
-
case 'param':
|
|
53
|
-
return CompletionItemKind.Variable
|
|
54
|
-
case 'path':
|
|
55
|
-
return CompletionItemKind.File
|
|
56
|
-
case 'property':
|
|
57
|
-
return CompletionItemKind.Property
|
|
58
|
-
case 'statement':
|
|
59
|
-
return CompletionItemKind.Variable
|
|
60
|
-
case _:
|
|
61
|
-
return CompletionItemKind.Text
|
|
62
|
-
|
|
63
|
-
def as_completion_item_sort_text(item: Completion) -> str:
|
|
64
|
-
"""Generate sorting text to arrange items alphabetically,
|
|
65
|
-
ensuring parameters are prioritized first
|
|
66
|
-
and private magic properties come last.
|
|
67
|
-
"""
|
|
68
|
-
completion_item_name = item.name
|
|
69
|
-
if completion_item_name is None or completion_item_name.startswith('_'):
|
|
70
|
-
return f"zz{completion_item_name}"
|
|
71
|
-
elif item.type == "param" and completion_item_name.endswith("="):
|
|
72
|
-
return f"aa{completion_item_name}"
|
|
73
|
-
else:
|
|
74
|
-
return f"bb{completion_item_name}"
|
|
75
|
-
|
|
76
|
-
def as_completion_item(completion: Completion, cursor_range: Range) -> Dict:
|
|
77
|
-
label = completion.name
|
|
78
|
-
return CompletionItem(
|
|
79
|
-
label=label,
|
|
80
|
-
filter_text=label,
|
|
81
|
-
sort_text=as_completion_item_sort_text(completion),
|
|
82
|
-
kind=as_completion_item_kind(completion.type),
|
|
83
|
-
documentation=completion.docstring(raw=True),
|
|
84
|
-
text_edit=TextEdit(range=cursor_range, new_text=label),
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
def get_text_edit_cursor_range(cursor_code_line: str, current_line_number: int, cursor_offset: int):
|
|
88
|
-
# Match the substring starting from cursor_offset ex: math<cursor>co, match co
|
|
89
|
-
matched_words = re.search(r'\\b\\w+\\b', cursor_code_line[cursor_offset :])
|
|
90
|
-
|
|
91
|
-
# Determine the length of the matched word characters
|
|
92
|
-
word_after_cursor_length = len(matched_words.group()) if matched_words else 0
|
|
93
|
-
|
|
94
|
-
# This will tell to code editors which text to edit/replace
|
|
95
|
-
return Range(
|
|
96
|
-
start=Position(
|
|
97
|
-
line=current_line_number, character=cursor_offset
|
|
98
|
-
),
|
|
99
|
-
end=Position(
|
|
100
|
-
line=current_line_number,
|
|
101
|
-
character=cursor_offset + word_after_cursor_length,
|
|
102
|
-
),
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
def get_code_completions(code: str, current_line_number: int, cursor_offset: int):
|
|
106
|
-
|
|
107
|
-
jedi_language_server = jedi.Script(code)
|
|
108
|
-
|
|
109
|
-
# jedi returns a zero-based array with lines
|
|
110
|
-
jedi_line_number_index = current_line_number -1
|
|
111
|
-
|
|
112
|
-
# In case if we are not getting any results back or the offset is wrong
|
|
113
|
-
# Just return empty list
|
|
114
|
-
if jedi_line_number_index >= len(jedi_language_server._code_lines):
|
|
115
|
-
return json.dumps({ "items": []})
|
|
116
|
-
|
|
117
|
-
jedi_completions_list = jedi_language_server.complete(
|
|
118
|
-
current_line_number,
|
|
119
|
-
cursor_offset,
|
|
120
|
-
fuzzy=False,
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
code_at_cursor = jedi_language_server._code_lines[jedi_line_number_index]
|
|
124
|
-
cursor_range = get_text_edit_cursor_range(code_at_cursor, current_line_number, cursor_offset)
|
|
125
|
-
|
|
126
|
-
# Convert jedi completion items as completion items compatible in language server
|
|
127
|
-
suggestions = CompletionList(
|
|
128
|
-
is_incomplete=False,
|
|
129
|
-
items=list(as_completion_item(completion, cursor_range) for completion in jedi_completions_list))
|
|
130
|
-
|
|
131
|
-
# Convert results to JSON so that we can use it in the worker
|
|
132
|
-
converter = lsp_converters.get_converter()
|
|
133
|
-
return json.dumps(converter.unstructure(suggestions, unstructure_as=CompletionList))
|
|
134
|
-
`)},me=async(o,l)=>{let d;try{if(d=l.globals.get("get_code_completions"),!d)return console.error("Can not generate suggestions list, the get_code_completions function is not defined"),{items:[]};const m=d(o.code,o.line,o.column);return m?JSON.parse(m):{items:[]}}catch(m){return console.error(m),{items:[]}}finally{d&&d.constructor.name==="PyProxy"&&d.destroy()}},ge=async(o,l)=>{try{console.debug("Importing jedi Interpreter"),await l.install.callKwargs(["jedi","lsprotocol"],{keep_going:!0}),await ue(o)}catch(d){console.error("Error while importing jedi",d)}};let I=null;async function fe(o,l,d,m,c){const{entrypoint:e,files:t,archives:i,requirements:s,prebuiltPackageNames:n,wheels:r,pyodideUrl:a=o,streamlitConfig:g,idbfsMountpoints:S,nodefsMountpoints:b,moduleAutoLoad:h,env:v,languageServer:f}=d,p=U(s);I?(c("Pyodide is already loaded."),console.debug("Pyodide is already loaded.")):(c("Loading Pyodide."),console.debug("Loading Pyodide."),I=le(a,{stdout:console.log,stderr:console.error}),r&&(p.unshift(r.streamlit),p.unshift(r.stliteLib)),console.debug("Loaded Pyodide"));const u=await I;if(v){console.debug("Setting environment variables",v);const _=u.pyimport("os");_.environ.update(u.toPy(v)),console.debug("Set environment variables",_.environ)}let w=!1;S&&(w=!0,S.forEach(_=>{u.FS.mkdir(_),u.FS.mount(u.FS.filesystems.IDBFS,{},_)}),await new Promise((_,y)=>{u.FS.syncfs(!0,k=>{k?y(k):_()})})),b&&Object.entries(b).forEach(([_,y])=>{u.FS.mkdir(_),u.FS.mount(u.FS.filesystems.NODEFS,{root:y},_)}),c("Mounting files.");const P=[];await Promise.all(Object.keys(t).map(async _=>{const y=t[_];_=F(l,_);let k;"url"in y?(console.debug(`Fetch a file from ${y.url}`),k=await fetch(y.url).then(C=>C.arrayBuffer()).then(C=>new Uint8Array(C))):k=y.data,console.debug(`Write a file "${_}"`),q(u,_,k,t.opts),_.endsWith(".py")&&P.push(_)})),c("Unpacking archives."),await Promise.all(i.map(async _=>{let y;"url"in _?(console.debug(`Fetch an archive from ${_.url}`),y=await fetch(_.url).then(X=>X.arrayBuffer())):y=_.buffer;const{format:k,options:C}=_;console.debug("Unpack an archive",{format:k,options:C}),u.unpackArchive(y,k,C)})),await u.loadPackage("micropip");const A=u.pyimport("micropip");if(c("Mocking some packages."),console.debug("Mock pyarrow"),ce(u),console.debug("Mocked pyarrow"),c("Installing packages."),console.debug("Installing the prebuilt packages:",n),await u.loadPackage(n),console.debug("Installed the prebuilt packages"),console.debug("Installing the requirements:",p),await A.install.callKwargs(p,{keep_going:!0}),console.debug("Installed the requirements"),h){const _=P.map(y=>u.FS.readFile(y,{encoding:"utf8"}));$(u,m,_)}await u.runPythonAsync(`
|
|
135
|
-
import importlib
|
|
136
|
-
importlib.invalidate_caches()
|
|
137
|
-
`),c("Loading streamlit package."),console.debug("Loading the Streamlit package"),await u.runPythonAsync(`
|
|
138
|
-
import streamlit.runtime
|
|
139
|
-
`),console.debug("Loaded the Streamlit package"),c("Setting up the loggers."),console.debug("Setting the loggers"),await u.runPythonAsync(`
|
|
140
|
-
import logging
|
|
141
|
-
import streamlit.logger
|
|
142
|
-
|
|
143
|
-
streamlit.logger.get_logger = logging.getLogger
|
|
144
|
-
streamlit.logger.setup_formatter = None
|
|
145
|
-
streamlit.logger.update_formatter = lambda *a, **k: None
|
|
146
|
-
streamlit.logger.set_log_level = lambda *a, **k: None
|
|
147
|
-
|
|
148
|
-
for name in streamlit.logger._loggers.keys():
|
|
149
|
-
if name == "root":
|
|
150
|
-
name = "streamlit"
|
|
151
|
-
logger = logging.getLogger(name)
|
|
152
|
-
logger.propagate = True
|
|
153
|
-
logger.handlers.clear()
|
|
154
|
-
logger.setLevel(logging.NOTSET)
|
|
155
|
-
|
|
156
|
-
streamlit.logger._loggers = {}
|
|
157
|
-
`);const L=(_,y)=>{_>=40?console.error(y):_>=30?console.warn(y):_>=20?console.info(y):console.debug(y)},H=u.runPython(`
|
|
158
|
-
def __setup_loggers__(streamlit_level, streamlit_message_format, callback):
|
|
159
|
-
class JsHandler(logging.Handler):
|
|
160
|
-
def emit(self, record):
|
|
161
|
-
msg = self.format(record)
|
|
162
|
-
callback(record.levelno, msg)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
root_message_format = "%(levelname)s:%(name)s:%(message)s"
|
|
166
|
-
|
|
167
|
-
root_logger = logging.getLogger()
|
|
168
|
-
root_logger.handlers.clear()
|
|
169
|
-
root_formatter = logging.Formatter(root_message_format)
|
|
170
|
-
root_handler = JsHandler()
|
|
171
|
-
root_handler.setFormatter(root_formatter)
|
|
172
|
-
root_logger.addHandler(root_handler)
|
|
173
|
-
root_logger.setLevel(logging.DEBUG)
|
|
174
|
-
|
|
175
|
-
streamlit_logger = logging.getLogger("streamlit")
|
|
176
|
-
streamlit_logger.propagate = False
|
|
177
|
-
streamlit_logger.handlers.clear()
|
|
178
|
-
streamlit_formatter = logging.Formatter(streamlit_message_format)
|
|
179
|
-
streamlit_handler = JsHandler()
|
|
180
|
-
streamlit_handler.setFormatter(streamlit_formatter)
|
|
181
|
-
streamlit_logger.addHandler(streamlit_handler)
|
|
182
|
-
streamlit_logger.setLevel(streamlit_level.upper())
|
|
183
|
-
|
|
184
|
-
__setup_loggers__`),K=((g==null?void 0:g["logger.level"])??"INFO").toString(),W=(g==null?void 0:g["logger.messageFormat"])??"%(asctime)s %(message)s";if(H(K,W,L),console.debug("Set the loggers"),c("Mocking some Streamlit functions for the browser environment."),console.debug("Mocking some Streamlit functions"),await u.runPythonAsync(`
|
|
185
|
-
import streamlit
|
|
186
|
-
|
|
187
|
-
def is_cacheable_msg(msg):
|
|
188
|
-
return False
|
|
189
|
-
|
|
190
|
-
streamlit.runtime.runtime.is_cacheable_msg = is_cacheable_msg
|
|
191
|
-
`),console.debug("Mocked some Streamlit functions"),w){c("Setting up the IndexedDB filesystem synchronizer."),console.debug("Setting up the IndexedDB filesystem synchronizer");let _=!1;const y=()=>{console.debug("The script has finished. Syncing the filesystem."),_||(_=!0,u.FS.syncfs(!1,C=>{_=!1,C&&console.error(C)}))};(await u.runPython(`
|
|
192
|
-
def __setup_script_finished_callback__(callback):
|
|
193
|
-
from streamlit.runtime.app_session import AppSession
|
|
194
|
-
from streamlit.runtime.scriptrunner import ScriptRunnerEvent
|
|
195
|
-
|
|
196
|
-
def wrap_app_session_on_scriptrunner_event(original_method):
|
|
197
|
-
def wrapped(self, *args, **kwargs):
|
|
198
|
-
if "event" in kwargs:
|
|
199
|
-
event = kwargs["event"]
|
|
200
|
-
if event == ScriptRunnerEvent.SCRIPT_STOPPED_WITH_SUCCESS or event == ScriptRunnerEvent.SCRIPT_STOPPED_FOR_RERUN or event == ScriptRunnerEvent.SHUTDOWN:
|
|
201
|
-
callback()
|
|
202
|
-
return original_method(self, *args, **kwargs)
|
|
203
|
-
return wrapped
|
|
204
|
-
|
|
205
|
-
AppSession._on_scriptrunner_event = wrap_app_session_on_scriptrunner_event(AppSession._on_scriptrunner_event)
|
|
206
|
-
|
|
207
|
-
__setup_script_finished_callback__`))(y),console.debug("Set up the IndexedDB filesystem synchronizer")}f&&(c("Importing Language Server"),await ge(u,A)),c("Booting up the Streamlit server."),console.debug("Setting up the Streamlit configuration");const J=await u.runPython(`
|
|
208
|
-
def __bootstrap__(main_script_path, flag_options, shared_worker_mode):
|
|
209
|
-
from stlite_lib.bootstrap import load_config_options, prepare
|
|
210
|
-
|
|
211
|
-
load_config_options(flag_options, shared_worker_mode)
|
|
212
|
-
|
|
213
|
-
prepare(main_script_path, [])
|
|
214
|
-
|
|
215
|
-
__bootstrap__`),M=F(l,e),G={"browser.gatherUsageStats":!1,...g,"runner.fastReruns":!1},V=l!=null;J(M,u.toPy(G),V),console.debug("Set up the Streamlit configuration"),console.debug("Booting up the Streamlit server");const T=u.pyimport("stlite_lib.server.Server")(M,l?N(l):null);return await T.start(),console.debug("Booted up the Streamlit server"),{pyodide:u,httpServer:T,micropip:A,initData:d}}function D(o,l,d,m){function c(s){l({type:"event:progress",data:{message:s}})}const e=(s,n)=>{const r=new MessageChannel;l({type:"event:moduleAutoLoad",data:{packagesToLoad:s}},[r.port2]),n.then(a=>{r.port1.postMessage({type:"moduleAutoLoad:success",data:{loadedPackages:a}}),r.port1.close()}).catch(a=>{throw r.port1.postMessage({type:"moduleAutoLoad:error",error:a}),r.port1.close(),a})};let t=null;const i=async s=>{const n=s.data;if(n.type==="initData"){const f=n.data,p={...d,...f};console.debug("Initial data",p),t=fe(o,m,p,e,c),t.then(()=>{l({type:"event:loaded"})}).catch(u=>{console.error(u),l({type:"event:error",data:{error:u}})});return}if(!t)throw new Error("Pyodide initialization has not been started yet.");const r=await t,a=r.pyodide;let g=r.httpServer;const S=r.micropip,{moduleAutoLoad:b}=r.initData,h=s.ports[0];function v(f){h.postMessage(f)}try{switch(n.type){case"reboot":{console.debug("Reboot the Streamlit server",n.data);const{entrypoint:f}=n.data;g.stop(),console.debug("Booting up the Streamlit server");const p=F(m,f);g=a.pyimport("stlite_lib.server.Server")(p),g.start(),console.debug("Booted up the Streamlit server"),v({type:"reply"});break}case"websocket:connect":{console.debug("websocket:connect",n.data);const{path:f}=n.data;g.start_websocket(f,(p,u)=>{if(u){const w=p;try{const P=w.toJs(),A=P.buffer.slice(P.byteOffset,P.byteOffset+P.byteLength);l({type:"websocket:message",data:{payload:A}},[A])}finally{w.destroy()}}else l({type:"websocket:message",data:{payload:p}})}),v({type:"reply"});break}case"websocket:send":{console.debug("websocket:send",n.data);const{payload:f}=n.data;g.receive_websocket_from_js(f);break}case"http:request":{console.debug("http:request",n.data);const{request:f}=n.data,p=(u,w,P)=>{const A=new Map(w.toJs()),L=P.toJs();console.debug({statusCode:u,headers:A,body:L}),v({type:"http:response",data:{response:{statusCode:u,headers:A,body:L}}})};g.receive_http_from_js(f.method,decodeURIComponent(f.path),f.headers,f.body,p);break}case"file:write":{const{path:f,data:p,opts:u}=n.data,w=F(m,f);b&&typeof p=="string"&&w.endsWith(".py")&&(console.debug(`Auto install the requirements in ${w}`),$(a,e,[p])),console.debug(`Write a file "${w}"`),q(a,w,p,u),v({type:"reply"});break}case"file:rename":{const{oldPath:f,newPath:p}=n.data,u=F(m,f),w=F(m,p);console.debug(`Rename "${u}" to ${w}`),ee(a,u,w),v({type:"reply"});break}case"file:unlink":{const{path:f}=n.data,p=F(m,f);console.debug(`Remove "${p}`),a.FS.unlink(p),v({type:"reply"});break}case"file:read":{const{path:f,opts:p}=n.data;console.debug(`Read "${f}"`);const u=a.FS.readFile(f,p);v({type:"reply:file:read",data:{content:u}});break}case"install":{const{requirements:f}=n.data,p=U(f);console.debug("Install the requirements:",p),await S.install.callKwargs(p,{keep_going:!0}).then(()=>{console.debug("Successfully installed"),v({type:"reply"})});break}case"setEnv":{const{env:f}=n.data;a.pyimport("os").environ.update(a.toPy(f)),console.debug("Successfully set the environment variables",f),v({type:"reply"});break}case"language-server:code_completion":{const f=await me(n.data,a);v({type:"reply:language-server:code_completion",data:f});break}}}catch(f){if(console.error(f),!(f instanceof Error))throw f;const p=new Error(f.message);p.name=f.name,p.stack=f.stack,v({type:"reply",error:p})}};return l({type:"event:start"}),i}const B="abcdefghijklmnopqrstuvwxyz",pe=B.length;function _e(o){let l="";for(let d=0;d<o;d++){const m=Math.floor(Math.random()*pe);l+=B[m]}return l}const x="https://cdn.jsdelivr.net/pyodide/v0.27.6/full/pyodide.mjs";if("postMessage"in self)self.onmessage=D(x,(o,l)=>l?self.postMessage(o,l):self.postMessage(o));else{const o=[];self.onconnect=l=>{let d;do d=_e(4);while(o.includes(d));o.push(d),console.debug("SharedWorker mode.",{appId:d});const m=l.ports[0];m.onmessage=D(x,(c,e)=>e?m.postMessage(c,e):m.postMessage(c),void 0,d),m.start()}}
|
|
Binary file
|