streamlit-nightly 1.42.1.dev20250209__py2.py3-none-any.whl → 1.42.1.dev20250210__py2.py3-none-any.whl
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.
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.D9415avj.js → FileDownload.esm.CJC5yID5.js} +1 -1
- streamlit/static/static/js/{FileDropzone.Cd515bsy.js → FileDropzone.BxEWox87.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.BBpErIGP.js → FormClearHelper.D3S2tctS.js} +1 -1
- streamlit/static/static/js/{Hooks.CeSTXIj2.js → Hooks.BwOODKo2.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BU5Td5cJ.js → InputInstructions.Cm2uD0mH.js} +1 -1
- streamlit/static/static/js/{ProgressBar.J2QhvKtD.js → ProgressBar.BqFWIdp2.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.BbbrvJaa.js → RenderInPortalIfExists.ax0m2H0_.js} +1 -1
- streamlit/static/static/js/{Toolbar.D-hUr0RX.js → Toolbar.CRowl_WL.js} +1 -1
- streamlit/static/static/js/{base-input.CNkkCv4B.js → base-input.krLFbHyn.js} +4 -4
- streamlit/static/static/js/{createSuper.DHhKMTIx.js → createSuper.k6SaTk0j.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.CRylpesE.js → data-grid-overlay-editor.BUaZRQkO.js} +1 -1
- streamlit/static/static/js/{downloader.D_08g5mI.js → downloader.CFLXdJg2.js} +1 -1
- streamlit/static/static/js/{es6.B-Rq6ajt.js → es6.gxLg_8ha.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CFL3MAVr.js → iframeResizer.contentWindow.DkwEeyR9.js} +1 -1
- streamlit/static/static/js/{index.JSS70wsq.js → index.B7i1hjL6.js} +2 -2
- streamlit/static/static/js/{index.CEj-S3PF.js → index.BAHug0jz.js} +1 -1
- streamlit/static/static/js/index.BOCJ0fVC.js +1 -0
- streamlit/static/static/js/{index.D9M0iUu5.js → index.BOR0ctru.js} +1 -1
- streamlit/static/static/js/{index.-SmXSkUY.js → index.BOVOcQJK.js} +1 -1
- streamlit/static/static/js/{index.BlcNB-sY.js → index.BSsjknPR.js} +1 -1
- streamlit/static/static/js/index.BaBZULmv.js +1 -0
- streamlit/static/static/js/{index.D94jjl7_.js → index.BbOp1EEY.js} +5 -5
- streamlit/static/static/js/{index.zzxJWhBg.js → index.BdR17uHT.js} +1 -1
- streamlit/static/static/js/{index.CMcCB4vg.js → index.Be3Ud760.js} +1 -1
- streamlit/static/static/js/index.BiQ_POiE.js +1 -0
- streamlit/static/static/js/{index.9wBA4A4f.js → index.Blgy4CCd.js} +18 -18
- streamlit/static/static/js/{index.B2evntzQ.js → index.C-4bC9wo.js} +1 -1
- streamlit/static/static/js/{index.C-_AHUSz.js → index.C1ewZGYv.js} +2 -2
- streamlit/static/static/js/index.C8CCX_u3.js +1 -0
- streamlit/static/static/js/index.CUPb182F.js +1 -0
- streamlit/static/static/js/{index.Bw9RDCaH.js → index.CVtSssNQ.js} +1 -1
- streamlit/static/static/js/index.C_Vm41WK.js +1 -0
- streamlit/static/static/js/index.C_eNMQ0G.js +1 -0
- streamlit/static/static/js/index.Cesoqj5i.js +1 -0
- streamlit/static/static/js/{index.CuNiy4LB.js → index.Cj8uDDnI.js} +1 -1
- streamlit/static/static/js/index.Cksh9dIb.js +1 -0
- streamlit/static/static/js/index.CoIye-dC.js +1 -0
- streamlit/static/static/js/index.D69WEQtH.js +1 -0
- streamlit/static/static/js/{index.BqePTNWb.js → index.D8KPGiS9.js} +2 -2
- streamlit/static/static/js/{index.BCYuLMdi.js → index.DEpXqZe9.js} +3 -3
- streamlit/static/static/js/index.DJY4JXFf.js +1 -0
- streamlit/static/static/js/{index.CEWcZMdD.js → index.DXBI5Jkr.js} +2 -2
- streamlit/static/static/js/index.DooQ24w4.js +1 -0
- streamlit/static/static/js/{index.DYHaq5Cw.js → index.DrwNQ7G8.js} +6 -6
- streamlit/static/static/js/{index.BVbWPXFU.js → index.DxK0b7hW.js} +1 -1
- streamlit/static/static/js/{index.B9q8XlSH.js → index.FyfJgAtw.js} +2 -2
- streamlit/static/static/js/{index.BevO9CYu.js → index.PzwaVSFN.js} +2 -2
- streamlit/static/static/js/index.UW7UEFVt.js +1 -0
- streamlit/static/static/js/{index.DwWMkgFE.js → index.cRZuEjlj.js} +1 -1
- streamlit/static/static/js/{index.B0xfT3p4.js → index.waVftNUu.js} +2 -2
- streamlit/static/static/js/index.xMCeK5i-.js +2 -0
- streamlit/static/static/js/{input.Dbc83Str.js → input.RldPkbfl.js} +2 -2
- streamlit/static/static/js/{memory.BzHgTb9i.js → memory.CJUkEDwO.js} +1 -1
- streamlit/static/static/js/{mergeWith.BCa1_PWb.js → mergeWith.mP6-fMJS.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CtUWknLp.js → number-overlay-editor.Cexyv1f1.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DGVrr2j8.js → possibleConstructorReturn.Bfw_ecB7.js} +1 -1
- streamlit/static/static/js/{sandbox.C20zasAf.js → sandbox.B9QCFfso.js} +1 -1
- streamlit/static/static/js/{textarea.BeRVLTOp.js → textarea.BphfZ_P9.js} +2 -2
- streamlit/static/static/js/{timepicker.DyU-jgSC.js → timepicker.BGFe-2JD.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.D4FxxWIg.js → toConsumableArray.BtjgDmTZ.js} +1 -1
- streamlit/static/static/js/{uniqueId.CAAlIP1-.js → uniqueId.BG3aVKeE.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.C207Y3_O.js → useBasicWidgetState.GQaAM6uH.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.CsqRc0X0.js → useOnInputChange.B6mIpebi.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DwHjQb3H.js → withFullScreenWrapper.XgZUnj3Y.js} +1 -1
- {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/RECORD +71 -71
- streamlit/static/static/js/index.B-4MHYvl.js +0 -1
- streamlit/static/static/js/index.BA5ubsQA.js +0 -1
- streamlit/static/static/js/index.BNrZwkh1.js +0 -1
- streamlit/static/static/js/index.BpmrfDoR.js +0 -2
- streamlit/static/static/js/index.CFtAnwvU.js +0 -1
- streamlit/static/static/js/index.CQ_wmqnz.js +0 -1
- streamlit/static/static/js/index.CvADzqCD.js +0 -1
- streamlit/static/static/js/index.DPs04g4h.js +0 -1
- streamlit/static/static/js/index.DWIf4xZP.js +0 -1
- streamlit/static/static/js/index.DfCewjMv.js +0 -1
- streamlit/static/static/js/index.DgwklVRJ.js +0 -1
- streamlit/static/static/js/index.Yr32ts47.js +0 -1
- streamlit/static/static/js/index.i2uLxrqv.js +0 -1
- streamlit/static/static/js/index.joQNIDux.js +0 -1
- streamlit/static/static/js/index.pzjWTi64.js +0 -1
- {streamlit_nightly-1.42.1.dev20250209.data → streamlit_nightly-1.42.1.dev20250210.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
import{n as o,z as m,j as i,aE as S}from"./index.9wBA4A4f.js";import{S as g,T as y}from"./Toolbar.D-hUr0RX.js";import{w as W,u as b,E as M}from"./withFullScreenWrapper.DwHjQb3H.js";const E=o("div",{target:"evl31sl0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),L=o("div",{target:"evl31sl1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),O=o("div",{target:"evl31sl2"})(({theme:t})=>({textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function T({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:n,width:w,height:r,expand:C,collapse:h}=b(M),d=n?w:u;let l;const a=t.width;if([-1,-3,-4].includes(a))l=void 0;else if([-2,-5].includes(a))l=d;else if(a>0)l=a;else throw Error(`Invalid image width: ${a}`);const e={};return r&&n?(e.maxHeight=r,e.objectFit="contain"):(e.width=l,e.maxWidth="100%"),m(g,{width:d,height:r,useContainerWidth:n,topCentered:!0,children:[i(y,{target:g,isFullScreen:n,onExpand:C,onCollapse:h,disableFullscreenMode:x}),i(E,{className:"stImage","data-testid":"stImage",children:t.imgs.map((I,c)=>{const s=I;return m(L,{"data-testid":"stImageContainer",children:[i("img",{style:e,src:f.buildMediaURL(s.url),alt:c.toString()}),s.caption&&i(O,{"data-testid":"stImageCaption",style:e,children:i(S,{source:s.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},c)})})]})}const R=W(T);export{R as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as r,bn as S,i as x,R as d,j as o,c4 as u,z as f,aE as g}from"./index.9wBA4A4f.js";const $=r(S,{shouldForwardProp:x,target:"e1xotax90"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0})),m=r("div",{target:"e1xotax91"})(({theme:e,width:t,cache:n})=>({width:t,...n?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),T=r("div",{target:"e1xotax92"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),h=r("div",{target:"e1xotax93"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),y=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),s=e%60;if(t===0&&n===0)return`(${s.toFixed(1)} seconds)`;if(t===0){const l=`${n} minute${n===1?"":"s"}`,p=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${l}${p})`}const i=`${t} hour${t===1?"":"s"}`,a=n===0?"":`, ${n} minute${n===1?"":"s"}`,c=s===0?"":`, ${s.toFixed(1)} seconds`;return`(${i}${a}${c})`};function b({width:e,element:t}){const{cache:n,showTime:s}=t,[i,a]=d.useState(0);return d.useEffect(()=>{if(!s)return;const c=setInterval(()=>{a(l=>l+.1)},100);return()=>clearInterval(c)},[s]),o(m,{className:u({stSpinner:!0,stCacheSpinner:n}),"data-testid":"stSpinner",width:e,cache:n,children:f(h,{children:[o($,{}),o(g,{source:t.text,allowHTML:!1}),s&&o(T,{children:y(i)})]})})}export{b as default};
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as re,j as ct,F as jt}from"./index.9wBA4A4f.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:gt,setPrototypeOf:ft,isFrozen:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:A,seal:O,create:ht}=Object,{apply:Ce,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(n){return n});O||(O=function(n){return n});Ce||(Ce=function(n,s,r){return n.apply(s,r)});Me||(Me=function(n,s){return new n(...s)});const se=L(Array.prototype.forEach),ut=L(Array.prototype.pop),$=L(Array.prototype.push),ce=L(String.prototype.toLowerCase),Oe=L(String.prototype.toString),mt=L(String.prototype.match),q=L(String.prototype.replace),Kt=L(String.prototype.indexOf),Zt=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),h=L(RegExp.prototype.test),K=Jt(TypeError);function L(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return Ce(a,n,r)}}function Jt(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Me(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ft&&ft(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const S=s(u);S!==u&&(Vt(n)||(n[r]=S),u=S)}a[u]=!0}return a}function Qt(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[s,r]of gt(a))y(a,s)&&(Array.isArray(r)?n[s]=Qt(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=x(r):n[s]=r);return n}function Z(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return L(r.get);if(typeof r.value=="function")return L(r.value)}a=$t(a)}function s(){return null}return s}const pt=A(["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"]),ye=A(["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"]),be=A(["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"]),en=A(["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"]),De=A(["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"]),tn=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=A(["#text"]),Tt=A(["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"]),Ne=A(["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"]),Et=A(["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"]),le=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=O(/\{\{[\w\W]*|[\w\W]*\}\}/gm),on=O(/<%[\w\W]*|[\w\W]*%>/gm),an=O(/\${[\w\W]*}/gm),rn=O(/^data-[\-\w.\u00B7-\uFFFF]/),sn=O(/^aria-[\-\w]+$/),At=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=O(/^(?:\w+script|data):/i),cn=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=O(/^html$/i),fn=O(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,MUSTACHE_EXPR:nn,ERB_EXPR:on,TMPLIT_EXPR:an,DATA_ATTR:rn,ARIA_ATTR:sn,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:cn,DOCTYPE_NAME:St,CUSTOM_ELEMENT:fn});const J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},un=function(){return typeof window>"u"?null:window},mn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const S="dompurify"+(r?"#"+r:"");try{return n.createPolicy(S,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un();const n=i=>Rt(i);if(n.version="3.1.7",n.removed=[],!a||!a.document||a.document.nodeType!==J.document)return n.isSupported=!1,n;let{document:s}=a;const r=s,u=r.currentScript,{DocumentFragment:S,HTMLTemplateElement:I,Node:P,Element:Pe,NodeFilter:W,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Ot,DOMParser:yt,trustedTypes:Q}=a,G=Pe.prototype,bt=Z(G,"cloneNode"),Dt=Z(G,"remove"),Nt=Z(G,"nextSibling"),It=Z(G,"childNodes"),ee=Z(G,"parentNode");if(typeof I=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,B="";const{implementation:fe,createNodeIterator:Ct,createDocumentFragment:Mt,getElementsByTagName:wt}=s,{importNode:xt}=r;let b={};n.isSupported=typeof gt=="function"&&typeof ee=="function"&&fe&&fe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Ut}=_t;let{IS_ALLOWED_URI:ve}=_t,m=null;const Ue=l({},[...pt,...ye,...be,...De,...dt]);let p=null;const Fe=l({},[...Tt,...Ne,...Et,...le]);let f=Object.seal(ht(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}})),Y=null,de=null,He=!0,Te=!0,ze=!1,We=!0,k=!1,Ee=!0,w=!1,_e=!1,ge=!1,v=!1,te=!1,ne=!1,Ge=!0,Be=!1;const Ft="user-content-";let he=!0,X=!1,U={},F=null;const Ye=l({},["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 Xe=null;const je=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ve=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let H=C,Se=!1,Re=null;const Ht=l({},[oe,ie,C],Oe);let j=null;const zt=["application/xhtml+xml","text/html"],Wt="text/html";let d=null,z=null;const Gt=s.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(z&&z===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),j=zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,d=j==="application/xhtml+xml"?Oe:ce,m=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Ue,p=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Fe,Re=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Oe):Ht,Ae=y(e,"ADD_URI_SAFE_ATTR")?l(x(Ve),e.ADD_URI_SAFE_ATTR,d):Ve,Xe=y(e,"ADD_DATA_URI_TAGS")?l(x(je),e.ADD_DATA_URI_TAGS,d):je,F=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ye,Y=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):{},de=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):{},U=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,We=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,Ge=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||At,H=e.NAMESPACE||C,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),k&&(Te=!1),te&&(v=!0),U&&(m=l({},dt),p=[],U.html===!0&&(l(m,pt),l(p,Tt)),U.svg===!0&&(l(m,ye),l(p,Ne),l(p,le)),U.svgFilters===!0&&(l(m,be),l(p,Ne),l(p,le)),U.mathMl===!0&&(l(m,De),l(p,Et),l(p,le))),e.ADD_TAGS&&(m===Ue&&(m=x(m)),l(m,e.ADD_TAGS,d)),e.ADD_ATTR&&(p===Fe&&(p=x(p)),l(p,e.ADD_ATTR,d)),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(F===Ye&&(F=x(F)),l(F,e.FORBID_CONTENTS,d)),he&&(m["#text"]=!0),w&&l(m,["html","head","body"]),m.table&&(l(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,B=_.createHTML("")}else _===void 0&&(_=mn(Q,u)),_!==null&&typeof B=="string"&&(B=_.createHTML(""));A&&A(e),z=e}},qe=l({},["mi","mo","mn","ms","mtext"]),Ke=l({},["annotation-xml"]),Bt=l({},["title","style","font","a","script"]),Ze=l({},[...ye,...be,...en]),Je=l({},[...De,...tn]),Yt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:H,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===C?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||qe[c]):!!Ze[o]:e.namespaceURI===oe?t.namespaceURI===C?o==="math":t.namespaceURI===ie?o==="math"&&Ke[c]:!!Je[o]:e.namespaceURI===C?t.namespaceURI===ie&&!Ke[c]||t.namespaceURI===oe&&!qe[c]?!1:!Je[o]&&(Bt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Re[e.namespaceURI]):!1},D=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},ae=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!p[e])if(v||te)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(ge)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}j==="application/xhtml+xml"&&H===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(H===C)try{t=new yt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=fe.createDocument(H,"template",null);try{t.documentElement.innerHTML=Se?B:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),H===C?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Ct.call(e.ownerDocument||e,e,W.SHOW_ELEMENT|W.SHOW_COMMENT|W.SHOW_TEXT|W.SHOW_PROCESSING_INSTRUCTION|W.SHOW_CDATA_SECTION,null)},tt=function(e){return e instanceof Ot&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof P=="function"&&e instanceof P},M=function(e,t,o){b[e]&&se(b[e],c=>{c.call(n,t,o,z)})},ot=function(e){let t=null;if(M("beforeSanitizeElements",e,null),tt(e))return D(e),!0;const o=d(e.nodeName);if(M("uponSanitizeElement",e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===J.progressingInstruction||Ee&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&at(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!F[o]){const c=ee(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let R=T-1;R>=0;--R){const N=bt(E[R],!0);N.__removalCount=(e.__removalCount||0)+1,c.insertBefore(N,Nt(e))}}}return D(e),!0}return e instanceof Pe&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(k&&e.nodeType===J.text&&(t=e.textContent,se([ue,me,pe],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),M("afterSanitizeElements",e,null),!1)},it=function(e,t,o){if(Ge&&(t==="id"||t==="name")&&(o in s||o in Gt))return!1;if(!(Te&&!de[t]&&h(Pt,t))){if(!(He&&h(kt,t))){if(!p[t]||de[t]){if(!(at(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Ae[t]){if(!h(ve,q(o,ke,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Kt(o,"data:")===0&&Xe[e])){if(!(ze&&!h(vt,q(o,ke,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ut)},rt=function(e){M("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:R,value:N}=E,V=d(T);let g=T==="value"?N:Zt(N);if(o.attrName=V,o.attrValue=g,o.keepAttr=!0,o.forceKeepAttr=void 0,M("uponSanitizeAttribute",e,o),g=o.attrValue,o.forceKeepAttr||(ae(T,e),!o.keepAttr))continue;if(!We&&h(/\/>/i,g)){ae(T,e);continue}k&&se([ue,me,pe],lt=>{g=q(g,lt," ")});const st=d(e.nodeName);if(it(st,V,g)){if(Be&&(V==="id"||V==="name")&&(ae(T,e),g=Ft+g),Ee&&h(/((--!?|])>)|<\/(style|title)/i,g)){ae(T,e);continue}if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!R)switch(Q.getAttributeType(st,V)){case"TrustedHTML":{g=_.createHTML(g);break}case"TrustedScriptURL":{g=_.createScriptURL(g);break}}try{R?e.setAttributeNS(R,T,g):e.setAttribute(T,g),tt(e)?D(e):ut(n.removed)}catch{}}}M("afterSanitizeAttributes",e,null)},Xt=function i(e){let t=null;const o=et(e);for(M("beforeSanitizeShadowDOM",e,null);t=o.nextNode();)M("uponSanitizeShadowNode",t,null),!ot(t)&&(t.content instanceof S&&i(t.content),rt(t));M("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Se=!i,Se&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(_e||Le(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const N=d(i.nodeName);if(!m[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof P)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!v&&!k&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=Qe(i),!t)return v?null:ne?B:""}t&&ge&&D(t.firstChild);const T=et(X?i:t);for(;c=T.nextNode();)ot(c)||(c.content instanceof S&&Xt(c.content),rt(c));if(X)return i;if(v){if(te)for(E=Mt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(p.shadowroot||p.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let R=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(R="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
2
|
-
`+R),k&&se([ue,me,pe],N=>{R=q(R,N," ")}),_&&ne?_.createHTML(R):R},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(i),_e=!0},n.clearConfig=function(){z=null,_e=!1},n.isValidAttribute=function(i,e,t){z||Le({});const o=d(i),c=d(e);return it(o,c,t)},n.addHook=function(i,e){typeof e=="function"&&(b[i]=b[i]||[],$(b[i],e))},n.removeHook=function(i){if(b[i])return ut(b[i])},n.removeHooks=function(i){b[i]&&(b[i]=[])},n.removeAllHooks=function(){b={}},n}var xe=Rt();const we="data-temp-href-target";xe.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(we,"_blank")});xe.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(we)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(we))});const Ie=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return xe.sanitize(a,n)};function dn({element:a,width:n}){const{body:s}=a,[r,u]=re.useState(Ie(s)),S=re.useRef(null);return re.useEffect(()=>{Ie(s)!==r&&u(Ie(s))},[s]),re.useEffect(()=>{var I,P;((I=S.current)==null?void 0:I.clientHeight)===0&&((P=S.current.parentElement)==null?void 0:P.childElementCount)===1&&S.current.parentElement.classList.add("stHtml-empty")}),ct(jt,{children:r&&ct("div",{className:"stHtml","data-testid":"stHtml",ref:S,style:{width:n},dangerouslySetInnerHTML:{__html:r}})})}export{dn as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as f,r as a,j as c}from"./index.9wBA4A4f.js";const E=f("div",{target:"ea9qfvi0"})(()=>({lineHeight:0})),y=f("audio",{target:"ea9qfvi1"})(({theme:t})=>({width:"100%",height:t.sizes.minElementHeight,margin:0,padding:0}));function A({element:t,endpoints:l,elementMgr:o}){const i=a.useRef(null),{startTime:n,endTime:d,loop:u,autoplay:p}=t,m=a.useMemo(()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,o]);a.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),a.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),a.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const s=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):r||(r=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",s),()=>{e&&d>0&&e.removeEventListener("timeupdate",s)}},[d,u,n]),a.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[u,n]);const v=l.buildMediaURL(t.url);return c(E,{children:c(y,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!m,src:v})})}export{A as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as c,b6 as v,az as y,b7 as l,b8 as t,j as s,b9 as C,ba as S}from"./index.9wBA4A4f.js";function k(o,i){switch(o){case l.XSMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case l.SMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case l.LARGE:return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const g=c("a",{target:"efj1jhq0"})(({fluidWidth:o,size:i,theme:r})=>{const a=typeof o=="number"?`${o}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?a:"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${y(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(i,r)}}),B=c(g,{target:"efj1jhq1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),x=c(g,{target:"efj1jhq2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=c(g,{target:"efj1jhq3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${y(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function L({kind:o,size:i,disabled:r,fluidWidth:a,children:d,autoFocus:n,href:e,rel:u,target:b,onClick:f}){let p=B;return o===t.SECONDARY?p=x:o===t.TERTIARY&&(p=$),s(p,{kind:o,size:i||l.MEDIUM,fluidWidth:a||!1,disabled:r||!1,autoFocus:n||!1,href:e,target:b,rel:u,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}function T(o){const{disabled:i,element:r,width:a}=o,d={width:a};let n=t.SECONDARY;r.type==="primary"?n=t.PRIMARY:r.type==="tertiary"&&(n=t.TERTIARY);const e=r.help?a:!0,u=b=>{o.disabled&&b.preventDefault()};return s("div",{className:"stLinkButton","data-testid":"stLinkButton",style:d,children:s(C,{help:r.help,children:s(L,{kind:n,size:l.SMALL,disabled:i,onClick:u,fluidWidth:r.useContainerWidth?e:!1,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":i,children:s(S,{icon:r.icon,label:r.label})})})})}export{T as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as o,E as M,_ as X,n as x,aR as lt,am as ut,cq as ct,N as J,cB as I,K as f,z,j as c,bs as dt,bF as pt,bt as ft,bc as bt,bu as mt,bp as K}from"./index.9wBA4A4f.js";import{s as gt}from"./sprintf.C-r3gIuM.js";import{u as yt}from"./uniqueId.CAAlIP1-.js";import{u as It}from"./FormClearHelper.BBpErIGP.js";import{I as ht}from"./InputInstructions.BU5Td5cJ.js";import{I as Tt}from"./input.Dbc83Str.js";import"./base-input.CNkkCv4B.js";var Q=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(M,X({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Y=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(M,X({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Ct=x("div",{target:"e5tuigk0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),wt=x("div",{target:"e5tuigk1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),q=x("button",{target:"e5tuigk2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),St=x("div",{target:"e5tuigk3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Vt=ut.getLogger("NumberInput");function vt(t){return f(t)||t===""?void 0:t}const kt=t=>(t.element.dataType===I.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,G=({step:t,dataType:e})=>t||(e===I.DataType.INT?1:.01),B=({value:t,format:e,step:r,dataType:h})=>{if(f(t))return null;let n=vt(e);if(f(n)&&J(r)){const l=r.toString();h===I.DataType.FLOAT&&r!==0&&l.includes(".")&&(n=`%0.${l.split(".")[1].length}f`)}if(f(n))return t.toString();try{return gt.sprintf(n,t)}catch(l){return Vt.warn(`Error in sprintf(${n}, ${t}): ${l}`),String(t)}},xt=(t,e,r)=>f(t)?!1:t-e>=r,Rt=(t,e,r)=>f(t)?!1:t+e<=r,Dt=({disabled:t,element:e,widgetMgr:r,width:h,theme:n,fragmentId:l})=>{var O;const{dataType:w,id:R,formId:p,default:W,format:A}=e,b=e.hasMin?e.min:-1/0,m=e.hasMax?e.max:1/0,[s,Z]=o.useState(G(e)),H=kt({element:e,widgetMgr:r}),[g,T]=o.useState(!1),[i,C]=o.useState(H),[P,S]=o.useState(B({value:H,...e,step:s})),[L,U]=o.useState(!1),D=o.useRef(null),$=o.useRef(yt("number_input_")),V=xt(i,s,b),v=Rt(i,s,m),_=ct({formId:p}),tt=_?r.allowFormEnterToSubmit(p):g,et=L&&h>n.breakpoints.hideWidgetDetails;o.useEffect(()=>{Z(G({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=o.useCallback(({value:a,source:d})=>{var y;if(J(a)&&(b>a||a>m))(y=D.current)==null||y.reportValidity();else{const k=a??W??null;switch(w){case I.DataType.INT:r.setIntValue({id:R,formId:p},k,d,l);break;case I.DataType.FLOAT:r.setDoubleValue({id:R,formId:p},k,d,l);break;default:throw new Error("Invalid data type")}T(!1),C(k),S(B({value:k,dataType:w,format:A,step:s}))}},[b,m,D,r,l,s,w,R,p,W,A]),ot=o.useCallback(()=>{g&&u({value:i,source:{fromUi:!0}}),U(!1)},[g,i,u]),rt=o.useCallback(()=>{U(!0)},[]),j=o.useCallback(()=>{const{value:a}=e;e.setValue=!1,C(a??null),S(B({value:a??null,...e,step:s})),u({value:a??null,source:{fromUi:!1}})},[e,s,u]);o.useEffect(()=>{e.setValue?j():u({value:i,source:{fromUi:!1}})},[]),e.setValue&&j();const F=f(e.default)&&!t,nt=o.useCallback(()=>{const a=e.default??null;C(a),u({value:a,source:{fromUi:!0}})},[e]);It({element:e,widgetMgr:r,onFormCleared:nt});const at=a=>{const{value:d}=a.target;if(d==="")T(!0),C(null),S(null);else{let y;e.dataType===I.DataType.INT?y=parseInt(d,10):y=parseFloat(d),T(!0),C(y),S(d)}},N=o.useCallback(()=>{v&&(T(!0),u({value:(i??b)+s,source:{fromUi:!0}}))},[i,b,s,v]),E=o.useCallback(()=>{V&&(T(!0),u({value:(i??m)-s,source:{fromUi:!0}}))},[i,m,s,V]),st=o.useCallback(a=>{const{key:d}=a;switch(d){case"ArrowUp":a.preventDefault(),N();break;case"ArrowDown":a.preventDefault(),E();break}},[N,E]),it=o.useCallback(a=>{a.key==="Enter"&&(g&&u({value:i,source:{fromUi:!0}}),r.allowFormEnterToSubmit(p)&&r.submitForm(p,l))},[g,i,u,r,p,l]);return z("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:h},children:[c(mt,{label:e.label,disabled:t,labelVisibility:dt((O=e.labelVisibility)==null?void 0:O.value),htmlFor:$.current,children:e.help&&c(pt,{children:c(ft,{content:e.help,placement:bt.TOP_RIGHT})})}),z(Ct,{className:L?"focused":"","data-testid":"stNumberInputContainer",children:[c(Tt,{type:"number",inputRef:D,value:P??"",placeholder:e.placeholder,onBlur:ot,onFocus:rt,onChange:at,onKeyPress:it,onKeyDown:st,clearable:F,clearOnEscape:F,disabled:t,"aria-label":e.label,id:$.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:n.colors.darkGray,padding:n.spacing.threeXS,height:n.sizes.clearIconSize,width:n.sizes.clearIconSize,":hover":{fill:n.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:b,max:m,type:"number",inputMode:""},style:{lineHeight:n.lineHeights.inputWidget,paddingRight:n.spacing.sm,paddingLeft:n.spacing.sm,paddingBottom:n.spacing.sm,paddingTop:n.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),h>n.breakpoints.hideNumberInputControls&&z(wt,{children:[c(q,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!V||t,tabIndex:-1,children:c(K,{content:Q,size:"xs",color:V?"inherit":n.colors.disabled})}),c(q,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!v||t,tabIndex:-1,children:c(K,{content:Y,size:"xs",color:v?"inherit":n.colors.disabled})})]})]}),et&&c(St,{clearable:F,children:c(ht,{dirty:g,value:P??"",inForm:_,allowEnterToSubmit:tt})})]})},Ht=lt(Dt);export{Ht as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as s,R as u,aF as b,bb as k,y as C,j as n,b9 as v,bc as L,z as y,D as T,aE as w}from"./index.9wBA4A4f.js";const S=s("div",{target:"e1xmaixs0"})({display:"flex",flexDirection:"column"}),h=s("a",{target:"e1xmaixs1"})(({disabled:a,isCurrentPage:o,fluidWidth:l,theme:e})=>({textDecoration:"none",width:typeof l=="number"?`${l}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:o?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:o?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...a?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}})),D=s("span",{target:"e1xmaixs2"})(({disabled:a,theme:o})=>({color:o.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...a?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}:{}}));function P(a,o){return a===null&&o?!0:a===null&&!o?!1:a===!0}function H(a){const{onPageChange:o,currentPageScriptHash:l}=u.useContext(b),e=u.useContext(k),{colors:i}=C(),{disabled:t,element:r,width:c}=a,p={width:c},f=P(r.useContainerWidth,e),d=l===r.pageScriptHash,x=g=>{r.external?t&&g.preventDefault():(g.preventDefault(),t||o(r.pageScriptHash))};return n("div",{className:"stPageLink","data-testid":"stPageLink",style:p,children:n(v,{help:r.help,placement:L.TOP_RIGHT,children:n(S,{children:y(h,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:d,fluidWidth:f?c:!1,href:r.page,target:r.external?"_blank":"",rel:"noreferrer",onClick:x,children:[r.icon&&n(T,{size:"lg",color:t?i.fadedText40:i.bodyText,iconValue:r.icon}),n(D,{disabled:t,children:n(w,{source:r.label,allowHTML:!1,isLabel:!0,boldLabel:d,largerLabel:!0,disableLinks:!0})})]})})})})}export{H as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as U,r as s,bj as V,j as l}from"./index.9wBA4A4f.js";const P=U("iframe",{target:"eymnmwl0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),R=528;function w({element:a,width:f,endpoints:m,elementMgr:c}){const i=s.useRef(null),{type:E,url:p,startTime:n,subtitles:y,endTime:d,loop:u,autoplay:T,muted:h}=a,S=s.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);s.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),s.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),s.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const o=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",o),()=>{e&&d>0&&e.removeEventListener("timeupdate",o)}},[d,u,n]),s.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const g=e=>{const{startTime:t,endTime:o,loop:L,autoplay:N,muted:b}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),o&&!isNaN(o)&&r.searchParams.append("end",o.toString()),L){r.searchParams.append("loop","1");const v=r.pathname.split("/").pop();v&&r.searchParams.append("playlist",v)}return N&&r.searchParams.append("autoplay","1"),b&&r.searchParams.append("mute","1"),r.toString()};return E===V.Type.YOUTUBE_IFRAME?l(P,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?R:void 0},crossOrigin:void 0,children:y&&y.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}export{w as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,j as g,bs as b,bP as m}from"./index.9wBA4A4f.js";import{a as f}from"./useBasicWidgetState.C207Y3_O.js";import"./FormClearHelper.BBpErIGP.js";const p=(t,e)=>t.getStringValue(e),C=t=>t.default??null,d=t=>t.value??null,P=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},S=({element:t,disabled:e,widgetMgr:r,width:o,fragmentId:s})=>{var l;const[u,a]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:C,getCurrStateFromProto:d,updateWidgetMgrState:P,element:t,widgetMgr:r,fragmentId:s}),n=i.useCallback(c=>{a({value:c,fromUi:!0})},[a]);return g(m,{label:t.label,labelVisibility:b((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:n,disabled:e,width:o,value:u})},v=i.memo(S);export{v as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{b8 as a,j as e,b9 as c,bq as B,b7 as f,ba as h}from"./index.9wBA4A4f.js";function p(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let i=a.SECONDARY;t.type==="primary"?i=a.PRIMARY:t.type==="tertiary"&&(i=a.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:i,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{p as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as t,N as c,j as d,b4 as g,b5 as l,K as h}from"./index.9wBA4A4f.js";const e=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:s})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:s?"hidden":void 0}));function F({element:o,width:s}){const i=o.hasWidth?o.width:s,r=a(o.src),n=c(r)?void 0:a(o.srcdoc);return d(e,{className:"stIFrame","data-testid":"stIFrame",allow:g,disableScrolling:!o.scrolling,src:r,srcDoc:n,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:l,title:"st.iframe"})}function a(o){return h(o)||o===""?void 0:o}export{F as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as p,aR as w,r as a,z as x,j as r,D as v,aE as h,aS as e,aT as k,aU as z,F as R,G as L}from"./index.9wBA4A4f.js";const B=p("button",{target:"e1rpgzpk0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"e1rpgzpk1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),E=p("div",{target:"e1rpgzpk3"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function m(o){const t=L(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:t?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:t?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function D(o){if(o.length>104){let s=o.replace(/^(.{104}[^\s]*).*/,"$1");return s.length>104&&(s=s.substring(0,104).split(" ").slice(0,-1).join(" ")),s.trim()}return o}function H({theme:o,body:t,icon:s,width:y}){const n=D(t),d=t!==n,[i,b]=a.useState(!d),[u,S]=a.useState(0),f=a.useCallback(()=>{b(!i)},[i]),c=a.useMemo(()=>m(o),[o]),l=a.useMemo(()=>x(C,{expanded:i,children:[s&&r(v,{iconValue:s,size:"xl",testid:"stToastDynamicIcon"}),x(E,{children:[r(h,{source:i?t:n,allowHTML:!1,isToast:!0}),d&&r(B,{"data-testid":"stToastViewButton",onClick:f,children:i?"view less":"view more"})]})]}),[d,i,t,s,n,f]);a.useEffect(()=>{if(o.inSidebar)return;const g=e.info(l,{overrides:{...c}});return S(g),()=>{e.update(g,{overrides:{Body:{style:{transitionDuration:0}}}}),e.clear(g)}},[]),a.useEffect(()=>{e.update(u,{children:l,overrides:{...c}})},[u,l,c]);const T=r(z,{kind:k.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:y});return r(R,{children:o.inSidebar&&T})}const M=w(H);export{M as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{R as m,aF as B,b8 as i,j as e,b9 as h,bq as p,b7 as w,ba as D}from"./index.9wBA4A4f.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:o,size:w.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{n as z,r as s,y as R,cq as I,z as U,j as u,bs as k,bF as H,bt as L,bc as B,bu as D,cs as j}from"./index.9wBA4A4f.js";import{u as O}from"./uniqueId.CAAlIP1-.js";import{u as _,a as q,b as K}from"./useOnInputChange.CsqRc0X0.js";import{a as A}from"./useBasicWidgetState.C207Y3_O.js";import{I as G}from"./InputInstructions.BU5Td5cJ.js";import{I as N}from"./input.Dbc83Str.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.BBpErIGP.js";import"./base-input.CNkkCv4B.js";const $=z("div",{target:"e1sommdr0"})(({width:e})=>({position:"relative",width:e}));function rt({disabled:e,element:t,widgetMgr:a,width:n,fragmentId:m}){var g;const[r,l]=s.useState(S(a,t)??null),[i,d]=s.useState(!1),W=s.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,c]=A({getStateFromWidgetMgr:S,getDefaultStateFromProto:w,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:a,fragmentId:m,onFormCleared:W});_(y,r,l,i);const[T,h]=s.useState(!1),o=R(),[b]=s.useState(()=>O("text_input_")),{placeholder:x,formId:f}=t,p=s.useCallback(()=>{d(!1),c({value:r,fromUi:!0})},[r,c]),C=I({formId:f})?a.allowFormEnterToSubmit(f):i,F=T&&n>o.breakpoints.hideWidgetDetails,V=s.useCallback(()=>{i&&p(),h(!1)},[i,p]),v=s.useCallback(()=>{h(!0)},[]),E=q({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:c}),P=K(t.formId,p,i,a,m);return U($,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(D,{label:t.label,disabled:e,labelVisibility:k((g=t.labelVisibility)==null?void 0:g.value),htmlFor:b,children:t.help&&u(H,{children:u(L,{content:t.help,placement:B.TOP_RIGHT})})}),u(N,{value:r??"",placeholder:x,onBlur:V,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:b,type:X(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth}}}}),F&&u(G,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function w(e){return e.default??null}function J(e){return e.value??null}function Q(e,t,a,n){t.setStringValue(e,a.value,{fromUi:a.fromUi},n)}function X(e){return e.type===j.Type.PASSWORD?"password":"text"}export{rt as default};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|