streamlit-nightly 1.41.2.dev20250125__py2.py3-none-any.whl → 1.41.2.dev20250129__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.C1QvS8Zm.js → FileDownload.esm.BRa5vd9e.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.mT4-5rFn.js → FormClearHelper.ljFWvSck.js} +1 -1
- streamlit/static/static/js/{Hooks.CVNEuaGG.js → Hooks.De1PrUXp.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BCvAGBeC.js → InputInstructions.CEsavkWx.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CcQcYD9u.js → ProgressBar.BZTQQebk.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.DHDG9PHn.js → RenderInPortalIfExists.CuEFo7dc.js} +1 -1
- streamlit/static/static/js/{Toolbar.yTE_O6B7.js → Toolbar.CaxqEUPP.js} +1 -1
- streamlit/static/static/js/{base-input.CQPY9_oN.js → base-input.B6AaP3td.js} +1 -1
- streamlit/static/static/js/{createSuper.DE47Tkz4.js → createSuper.D7_Fl5t1.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.5JEQwfzp.js → data-grid-overlay-editor.BX12LERY.js} +1 -1
- streamlit/static/static/js/{downloader.CX7_KkfB.js → downloader.DWYjgqPp.js} +1 -1
- streamlit/static/static/js/{es6.Be2vwxoI.js → es6.DCc0GTNa.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CFHofqC-.js → iframeResizer.contentWindow.iwuMEJhu.js} +1 -1
- streamlit/static/static/js/{index.BBjf7kH1.js → index.--iJ4xZi.js} +1 -1
- streamlit/static/static/js/{index.D0lxtOCO.js → index.2zVwJ0eA.js} +1 -1
- streamlit/static/static/js/{index.5F9_LJ-9.js → index.7-DGlsNh.js} +1 -1
- streamlit/static/static/js/{index.BOeLQ18h.js → index.AohBUIz3.js} +1 -1
- streamlit/static/static/js/{index.mtSGfsND.js → index.BBRfYSxH.js} +1 -1
- streamlit/static/static/js/{index.C0ZNaKGF.js → index.BTjymjxh.js} +1 -1
- streamlit/static/static/js/{index.CvqaNor_.js → index.BUL6xLUk.js} +5 -5
- streamlit/static/static/js/{index.Cbi_d9ak.js → index.BcY2FDkH.js} +6 -6
- streamlit/static/static/js/{index.B-xzXPZE.js → index.Bd3-JERV.js} +1 -1
- streamlit/static/static/js/{index.BpeIAypN.js → index.Bg4pM6qu.js} +1 -1
- streamlit/static/static/js/{index.CjsaBedq.js → index.BxWiASCs.js} +1 -1
- streamlit/static/static/js/{index.AXOgS1NM.js → index.C7tf6_1u.js} +1 -1
- streamlit/static/static/js/{index.Hhv6gSq2.js → index.CDw02ioE.js} +1 -1
- streamlit/static/static/js/{index.CHuo89tL.js → index.CNanii7w.js} +1 -1
- streamlit/static/static/js/{index.0OeiPvr3.js → index.CTQGpXI9.js} +1 -1
- streamlit/static/static/js/{index.a6pesEXT.js → index.ChNzpoS7.js} +1 -1
- streamlit/static/static/js/{index.SLleoa9s.js → index.Chdikg1z.js} +1 -1
- streamlit/static/static/js/index.CrB3fibm.js +5 -0
- streamlit/static/static/js/{index.8tVXPrLX.js → index.CsSEGaWI.js} +1 -1
- streamlit/static/static/js/{index.CCmrDm8Z.js → index.CxFdXhSM.js} +1 -1
- streamlit/static/static/js/{index.er3Zfn3e.js → index.D9SEA40p.js} +1 -1
- streamlit/static/static/js/{index.XCwDes79.js → index.DAKqTTs8.js} +1 -1
- streamlit/static/static/js/{index.Dkr_c_9x.js → index.DELEWrxT.js} +1 -1
- streamlit/static/static/js/{index.Ci3iebpl.js → index.DdcWwbek.js} +1 -1
- streamlit/static/static/js/{index.AExANgn1.js → index.DtX9sEm-.js} +1 -1
- streamlit/static/static/js/{index.C3eR9AQ5.js → index.Dx9Rd9qT.js} +1 -1
- streamlit/static/static/js/{index.OM83ZHKg.js → index.DxweLaK5.js} +1 -1
- streamlit/static/static/js/{index.Cg7T4wJt.js → index.KY0dn4XU.js} +1 -1
- streamlit/static/static/js/{index.1GBg_Cdb.js → index.L_klDikn.js} +1 -1
- streamlit/static/static/js/{index.6v5ZgUAy.js → index.T8-3ekvQ.js} +1 -1
- streamlit/static/static/js/{index.DLjk_wlB.js → index.ahtq8S1b.js} +1 -1
- streamlit/static/static/js/{index.DNDhYAPI.js → index.gCbwCs-u.js} +1 -1
- streamlit/static/static/js/{index.D1AD4NsW.js → index.jIjP6QfT.js} +1 -1
- streamlit/static/static/js/{index.DY6666R7.js → index.k9lj8BwU.js} +1 -1
- streamlit/static/static/js/{index.BUgJRfqp.js → index.oJs4BkL9.js} +1 -1
- streamlit/static/static/js/{index.B0pfFJGU.js → index.yIm2Ga5C.js} +1 -1
- streamlit/static/static/js/{index.BGICDmL0.js → index.yhqp6zYN.js} +1 -1
- streamlit/static/static/js/{input.B07wSbwn.js → input.BA0Jwiql.js} +1 -1
- streamlit/static/static/js/{memory.CC_p93jh.js → memory.B_n18ChL.js} +1 -1
- streamlit/static/static/js/{mergeWith.ivc75cD1.js → mergeWith.DQ31UZmZ.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.Db2Be6nq.js → number-overlay-editor.CNZdoUeS.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BNprLGNF.js → possibleConstructorReturn.BYxVZJys.js} +1 -1
- streamlit/static/static/js/{sandbox.BlG3HhHL.js → sandbox.xZY-LHHi.js} +1 -1
- streamlit/static/static/js/{textarea.Bz6Z-kmO.js → textarea.4T4nZym2.js} +1 -1
- streamlit/static/static/js/{timepicker.BMSb5NlP.js → timepicker.DbhTD5md.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.uYLXBIlD.js → toConsumableArray.Ulusdt7-.js} +1 -1
- streamlit/static/static/js/uniqueId.CO20A1NT.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.BJFGEQDL.js → useBasicWidgetState.C-8MSbfp.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.BmSN_ACz.js → useOnInputChange.G-wGwNH8.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CbOOMX5j.js → withFullScreenWrapper.CI1ebDYc.js} +1 -1
- streamlit/web/server/browser_websocket_handler.py +3 -21
- {streamlit_nightly-1.41.2.dev20250125.dist-info → streamlit_nightly-1.41.2.dev20250129.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.41.2.dev20250125.dist-info → streamlit_nightly-1.41.2.dev20250129.dist-info}/RECORD +71 -71
- streamlit/static/static/js/index.4nNgvhbk.js +0 -4
- streamlit/static/static/js/uniqueId.BdisvZXg.js +0 -1
- {streamlit_nightly-1.41.2.dev20250125.data → streamlit_nightly-1.41.2.dev20250129.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250125.dist-info → streamlit_nightly-1.41.2.dev20250129.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250125.dist-info → streamlit_nightly-1.41.2.dev20250129.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250125.dist-info → streamlit_nightly-1.41.2.dev20250129.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{d as U,r as w,bx as ee,bW as pt,bH as vt,by as Q,bX as mt,bY as bt,n as be,ay as yt,y as Tt,aO as kt,z as Ue,j as ae,R as He,ci as Ot,bt as wt,bG as Rt,bu as St,bd as Mt,bv as _t,N as $t,cj as Ee}from"./index.CvqaNor_.js";import{s as We}from"./sprintf.C-r3gIuM.js";import{a as Et}from"./useBasicWidgetState.BJFGEQDL.js";import"./FormClearHelper.mT4-5rFn.js";var xe={},Ce={},De={},ce={};Object.defineProperty(ce,"__esModule",{value:!0});ce.Direction=void 0;var Ke;(function(t){t.Right="to right",t.Left="to left",t.Down="to bottom",t.Up="to top"})(Ke||(ce.Direction=Ke={}));(function(t){var r=U&&U.__spreadArray||function(o,u,l){if(l||arguments.length===2)for(var p=0,b=u.length,g;p<b;p++)(g||!(p in u))&&(g||(g=Array.prototype.slice.call(u,0,p)),g[p]=u[p]);return o.concat(g||Array.prototype.slice.call(u))};Object.defineProperty(t,"__esModule",{value:!0}),t.isIOS=t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var n=w,e=ce,a=function(o){var u=o.toString().split(".")[1];return u?u.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,u,l){var p=(u-o)/l,b=8,g=Number(p.toFixed(b));return parseInt(g.toString(),10)===g}t.isStepDivisible=s;function c(o,u,l,p,b,g,T){var k=1e11;if(o=Math.round(o*k)/k,!g){var C=T[u-1],_=T[u+1];if(C&&C>o)return C;if(_&&_<o)return _}if(o>p)return p;if(o<l)return l;var N=Math.floor(o*k-l*k)%Math.floor(b*k),j=Math.floor(o*k-Math.abs(N)),W=N===0?o:j/k,E=Math.abs(N/k)<b/2?W:W+b,I=(0,t.getStepDecimals)(b);return parseFloat(E.toFixed(I))}t.normalizeValue=c;function f(o,u,l){return(o-u)/(l-u)}t.relativeValue=f;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function d(o,u,l){if(u>=l)throw new RangeError("min (".concat(u,") is equal/bigger than max (").concat(l,")"));if(o<u)throw new RangeError("value (".concat(o,") is smaller than min (").concat(u,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=d;function h(o,u,l){return o<u?u:o>l?l:o}t.checkValuesAgainstBoundaries=h;function v(o){if(!(o.length<2)&&!o.slice(1).every(function(u,l){return o[l]<=u}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=v;function R(o){var u=window.getComputedStyle(o);return{top:parseInt(u["margin-top"],10),bottom:parseInt(u["margin-bottom"],10),left:parseInt(u["margin-left"],10),right:parseInt(u["margin-right"],10)}}t.getMargin=R;function m(o){var u=window.getComputedStyle(o);return{top:parseInt(u["padding-top"],10)+parseInt(u["border-top-width"],10),bottom:parseInt(u["padding-bottom"],10)+parseInt(u["border-bottom-width"],10),left:parseInt(u["padding-left"],10)+parseInt(u["border-left-width"],10),right:parseInt(u["padding-right"],10)+parseInt(u["border-right-width"],10)}}t.getPaddingAndBorder=m;function S(o,u,l){var p=l?-1:1;o.forEach(function(b,g){return L(b,p*u[g].x,u[g].y)})}t.translateThumbs=S;function B(o,u,l,p){for(var b=0,g=F(o[0],u,l,p),T=1;T<o.length;T++){var k=F(o[T],u,l,p);k<g&&(g=k,b=T)}return b}t.getClosestThumbIndex=B;function L(o,u,l){o.style.transform="translate(".concat(u,"px, ").concat(l,"px)")}t.translate=L;var D=function(o){var u=[],l=null,p=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];u=b,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,u)}))};return p};t.schd=D;function M(o,u,l){var p=o.slice(0);return p[u]=l,p}t.replaceAt=M;function $(o){var u=o.values,l=o.colors,p=o.min,b=o.max,g=o.direction,T=g===void 0?e.Direction.Right:g,k=o.rtl,C=k===void 0?!1:k;C&&T===e.Direction.Right?T=e.Direction.Left:C&&e.Direction.Left&&(T=e.Direction.Right);var _=u.slice(0).sort(function(j,W){return j-W}).map(function(j){return(j-p)/(b-p)*100}),N=_.reduce(function(j,W,E){return"".concat(j,", ").concat(l[E]," ").concat(W,"%, ").concat(l[E+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(N,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=$;function H(){}t.voidFn=H;function A(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=A;var x=function(o,u,l,p,b){b===void 0&&(b=function(T){return T});var g=Math.ceil(r([o],Array.from(o.children),!0).reduce(function(T,k){var C=Math.ceil(k.getBoundingClientRect().width);if(k.innerText&&k.innerText.includes(l)&&k.childElementCount===0){var _=k.cloneNode(!0);_.innerHTML=b(u.toFixed(p)),_.style.visibility="hidden",document.body.appendChild(_),C=Math.ceil(_.getBoundingClientRect().width),document.body.removeChild(_)}return C>T?C:T},o.getBoundingClientRect().width));return g},q=function(o,u,l,p,b,g,T){T===void 0&&(T=function(_){return _});var k=[],C=function(_){var N=x(l[_],p[_],b,g,T),j=u[_].x;u.forEach(function(W,E){var I=W.x,J=x(l[E],p[E],b,g,T);_!==E&&(j>=I&&j<=I+J||j+N>=I&&j+N<=I+J)&&(k.includes(E)||(k.push(_),k.push(E),k=r(r([],k,!0),[_,E],!1),C(E)))})};return C(o),Array.from(new Set(k.sort()))},Z=function(o,u,l,p,b,g){p===void 0&&(p=.1),b===void 0&&(b=" - "),g===void 0&&(g=function(E){return E});var T=(0,t.getStepDecimals)(p),k=(0,n.useState)({}),C=k[0],_=k[1],N=(0,n.useState)(g(u[l].toFixed(T))),j=N[0],W=N[1];return(0,n.useEffect)(function(){if(o){var E=o.getThumbs();if(E.length<1)return;var I={},J=o.getOffsets(),ie=q(l,J,E,u,b,T,g),le=g(u[l].toFixed(T));if(ie.length){var te=ie.reduce(function(re,ue,ge,pe){return re.length?r(r([],re,!0),[J[pe[ge]].x],!1):[J[pe[ge]].x]},[]);if(Math.min.apply(Math,te)===J[l].x){var de=[];ie.forEach(function(re){de.push(u[re].toFixed(T))}),le=Array.from(new Set(de.sort(function(re,ue){return parseFloat(re)-parseFloat(ue)}))).map(g).join(b);var fe=Math.min.apply(Math,te),he=Math.max.apply(Math,te),$e=E[ie[te.indexOf(he)]].getBoundingClientRect().width;I.left="".concat(Math.abs(fe-(he+$e))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}W(le),_(I)}},[o,u]),[j,C]};t.useThumbOverlap=Z;function F(o,u,l,p){var b=o.getBoundingClientRect(),g=b.left,T=b.top,k=b.width,C=b.height;return y(p)?Math.abs(l-(T+C/2)):Math.abs(u-(g+k/2))}var V=function(){var o,u=((o=navigator.userAgentData)===null||o===void 0?void 0:o.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(u)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};t.isIOS=V})(De);var It=U&&U.__extends||function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}}(),xt=U&&U.__createBinding||(Object.create?function(t,r,n,e){e===void 0&&(e=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(t,e,a)}:function(t,r,n,e){e===void 0&&(e=n),t[e]=r[n]}),Ct=U&&U.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r}),Dt=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&xt(r,t,n);return Ct(r,t),r},Ye=U&&U.__spreadArray||function(t,r,n){if(n||arguments.length===2)for(var e=0,a=r.length,i;e<a;e++)(i||!(e in r))&&(i||(i=Array.prototype.slice.call(r,0,e)),i[e]=r[e]);return t.concat(i||Array.prototype.slice.call(r))};Object.defineProperty(Ce,"__esModule",{value:!0});var ve=Dt(w),O=De,P=ce,Pt=["ArrowRight","ArrowUp","k","PageUp"],Bt=["ArrowLeft","ArrowDown","j","PageDown"],At=function(t){It(r,t);function r(n){var e=t.call(this,n)||this;if(e.trackRef=ve.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,c=a.min,f=a.max,y=e.trackRef.current;if(!y)return console.warn("No track element found."),[];var d=y.getBoundingClientRect(),h=(0,O.getPaddingAndBorder)(y);return e.getThumbs().map(function(v,R){var m={x:0,y:0},S=v.getBoundingClientRect(),B=(0,O.getMargin)(v);switch(i){case P.Direction.Right:return m.x=(B.left+h.left)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Left:return m.x=(B.right+h.right)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width-d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Up:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height-d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;case P.Direction.Down:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;default:return(0,O.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(!(a.button!==0||(0,O.isIOS)()))if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,O.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,O.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(c,f){return f===s?Math.max.apply(Math,e.state.thumbZIndexes):c<=e.state.thumbZIndexes[s]?c:c-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,c=i.onChange,f=i.step,y=i.rtl,d=i.direction,h=e.state.isChanged,v=e.getTargetIndex(a.nativeEvent),R=y||d===P.Direction.Left||d===P.Direction.Down?-1:1;v!==-1&&(Pt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]+R*(a.key==="PageUp"?f*10:f),v)))):Bt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]-R*(a.key==="PageDown"?f*10:f),v)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,c=s.draggedThumbIndex,f=s.draggedTrackPos,y=e.props,d=y.direction,h=y.min,v=y.max,R=y.onChange,m=y.values,S=y.step,B=y.rtl;if(c===-1&&f[0]===-1&&f[1]===-1)return null;var L=e.trackRef.current;if(!L)return null;var D=L.getBoundingClientRect(),M=(0,O.isVertical)(d)?D.height:D.width;if(f[0]!==-1&&f[1]!==-1){var $=a-f[0],H=i-f[1],A=0;switch(d){case P.Direction.Right:case P.Direction.Left:A=$/M*(v-h);break;case P.Direction.Down:case P.Direction.Up:A=H/M*(v-h);break;default:(0,O.assertUnreachable)(d)}if(B&&(A*=-1),Math.abs(A)>=S/2){for(var x=0;x<e.thumbRefs.length;x++){if(m[x]===v&&Math.sign(A)===1||m[x]===h&&Math.sign(A)===-1)return;var q=m[x]+A;q>v?A=v-m[x]:q<h&&(A=h-m[x])}for(var Z=m.slice(0),x=0;x<e.thumbRefs.length;x++)Z=(0,O.replaceAt)(Z,x,e.normalizeValue(m[x]+A,x));e.setState({draggedTrackPos:[a,i]}),R(Z)}}else{var F=0;switch(d){case P.Direction.Right:F=(a-D.left)/M*(v-h)+h;break;case P.Direction.Left:F=(M-(a-D.left))/M*(v-h)+h;break;case P.Direction.Down:F=(i-D.top)/M*(v-h)+h;break;case P.Direction.Up:F=(M-(i-D.top))/M*(v-h)+h;break;default:(0,O.assertUnreachable)(d)}B&&(F=v+h-F),Math.abs(m[c]-F)>=S/2&&R((0,O.replaceAt)(m,c,e.normalizeValue(F,c)))}},e.normalizeValue=function(a,i){var s=e.props,c=s.min,f=s.max,y=s.step,d=s.allowOverlap,h=s.values;return(0,O.normalizeValue)(a,i,c,f,y,d,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=ve.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),c=parseInt(a.paddingLeft,10),f=parseInt(a.paddingTop,10),y=[],d=0;d<e.numOfMarks+1;d++){var h=9999,v=9999;if(e.markRefs[d].current){var R=e.markRefs[d].current.getBoundingClientRect();h=R.height,v=R.width}e.props.direction===P.Direction.Left||e.props.direction===P.Direction.Right?y.push([Math.round(i/e.numOfMarks*d+c-v/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*d+f-h/2),-Math.round((v-i)/2)])}e.setState({markOffsets:y})}},n.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,O.schd)(e.onMouseMove),e.schdOnTouchMove=(0,O.schd)(e.onTouchMove),e.schdOnEnd=(0,O.schd)(e.onEnd),e.thumbRefs=n.values.map(function(){return ve.createRef()}),e.updateMarkRefs(n),e}return r.prototype.componentDidMount=function(){var n=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",n.onResize)},unobserve:function(){return window.removeEventListener("resize",n.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,O.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(c){return(0,O.checkBoundaries)(c,n.props.min,n.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(c){(0,O.isStepDivisible)(i,c,s)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},r.prototype.componentDidUpdate=function(n,e){var a=this.props,i=a.max,s=a.min,c=a.step,f=a.values,y=a.rtl;(n.max!==i||n.min!==s||n.step!==c)&&this.updateMarkRefs(this.props),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(n.max!==i||n.min!==s||n.step!==c||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),f.forEach(function(d){(0,O.isStepDivisible)(s,d,c)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},r.prototype.componentWillUnmount=function(){var n={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,n),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},r.prototype.render=function(){var n=this,e=this.props,a=e.label,i=e.labelledBy,s=e.renderTrack,c=e.renderThumb,f=e.renderMark,y=f===void 0?function(){return null}:f,d=e.values,h=e.min,v=e.max,R=e.allowOverlap,m=e.disabled,S=this.state,B=S.draggedThumbIndex,L=S.thumbZIndexes,D=S.markOffsets;return s({props:{style:{transform:"scale(1)",cursor:B>-1?"grabbing":this.props.draggableTrack?(0,O.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!m?"pointer":"inherit"},onMouseDown:m?O.voidFn:this.onMouseDownTrack,onTouchStart:m?O.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:m,children:Ye(Ye([],D.map(function(M,$,H){return y({props:{style:n.props.direction===P.Direction.Left||n.props.direction===P.Direction.Right?{position:"absolute",left:"".concat(M[0],"px"),marginTop:"".concat(M[1],"px")}:{position:"absolute",top:"".concat(M[0],"px"),marginLeft:"".concat(M[1],"px")},key:"mark".concat($),ref:n.markRefs[$]},index:$})}),!0),d.map(function(M,$){var H=n.state.draggedThumbIndex===$;return c({index:$,value:M,isDragged:H,props:{style:{position:"absolute",zIndex:L[$],cursor:m?"inherit":H?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:m?void 0:0,"aria-valuemax":R?v:d[$+1]||v,"aria-valuemin":R?h:d[$-1]||h,"aria-valuenow":M,draggable:!1,ref:n.thumbRefs[$],"aria-label":a,"aria-labelledby":i,role:"slider",onKeyDown:m?O.voidFn:n.onKeyDown,onKeyUp:m?O.voidFn:n.onKeyUp}})}),!0)})},r.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:P.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},r}(ve.Component);Ce.default=At;(function(t){var r=U&&U.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var n=r(Ce);t.Range=n.default;var e=De;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=ce;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})})(xe);function Ge(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function me(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ge(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var ye=ee("div",{position:"relative",width:"100%"});ye.displayName="Root";ye.displayName="Root";ye.displayName="StyledRoot";var Te=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$disabled,i=t.$isDragged,s=r.sizing,c="inherit";return a?c="not-allowed":i?c="grabbing":e.length===1&&(c="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:c,backgroundColor:r.colors.sliderTrackFill}});Te.displayName="Track";Te.displayName="Track";Te.displayName="StyledTrack";var ke=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$min,i=t.$max,s=t.$disabled,c=r.colors,f=r.borders,y=r.direction,d=r.borders.useRoundedCorners?f.radius100:0;return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,background:xe.getTrackBackground({values:e,colors:e.length===1?[s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque]:[s?c.backgroundSecondary:c.borderOpaque,s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});ke.displayName="InnerTrack";ke.displayName="InnerTrack";ke.displayName="StyledInnerTrack";var Oe=ee("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});Oe.displayName="Mark";Oe.displayName="Mark";Oe.displayName="StyledMark";var we=ee("div",function(t){return me(me({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick";we.displayName="Tick";we.displayName="StyledTick";var Re=ee("div",function(t){var r=t.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Re.displayName="TickBar";Re.displayName="TickBar";Re.displayName="StyledTickBar";var Se=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,c=e.length===2&&a===1;return r.direction==="rtl"&&(c||s)&&(s=!s,c=!c),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});Se.displayName="Thumb";Se.displayName="Thumb";Se.displayName="StyledThumb";var Me=ee("div",function(t){var r=t.$disabled,n=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Me.displayName="InnerThumb";Me.displayName="InnerThumb";Me.displayName="StyledInnerThumb";var _e=ee("div",function(t){var r=t.$disabled,n=t.$theme;return me(me({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function Xe(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function Lt(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(e){jt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jt(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function G(){return G=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},G.apply(this,arguments)}function Y(t,r){return Ut(t)||Nt(t,r)||Vt(t,r)||zt()}function zt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
1
|
+
import{d as U,r as w,bx as ee,bW as pt,bH as vt,by as Q,bX as mt,bY as bt,n as be,ay as yt,y as Tt,aO as kt,z as Ue,j as ae,R as He,ci as Ot,bt as wt,bG as Rt,bu as St,bd as Mt,bv as _t,N as $t,cj as Ee}from"./index.BUL6xLUk.js";import{s as We}from"./sprintf.C-r3gIuM.js";import{a as Et}from"./useBasicWidgetState.C-8MSbfp.js";import"./FormClearHelper.ljFWvSck.js";var xe={},Ce={},De={},ce={};Object.defineProperty(ce,"__esModule",{value:!0});ce.Direction=void 0;var Ke;(function(t){t.Right="to right",t.Left="to left",t.Down="to bottom",t.Up="to top"})(Ke||(ce.Direction=Ke={}));(function(t){var r=U&&U.__spreadArray||function(o,u,l){if(l||arguments.length===2)for(var p=0,b=u.length,g;p<b;p++)(g||!(p in u))&&(g||(g=Array.prototype.slice.call(u,0,p)),g[p]=u[p]);return o.concat(g||Array.prototype.slice.call(u))};Object.defineProperty(t,"__esModule",{value:!0}),t.isIOS=t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var n=w,e=ce,a=function(o){var u=o.toString().split(".")[1];return u?u.length:0};t.getStepDecimals=a;function i(o){return o.touches&&o.touches.length||o.changedTouches&&o.changedTouches.length}t.isTouchEvent=i;function s(o,u,l){var p=(u-o)/l,b=8,g=Number(p.toFixed(b));return parseInt(g.toString(),10)===g}t.isStepDivisible=s;function c(o,u,l,p,b,g,T){var k=1e11;if(o=Math.round(o*k)/k,!g){var C=T[u-1],_=T[u+1];if(C&&C>o)return C;if(_&&_<o)return _}if(o>p)return p;if(o<l)return l;var N=Math.floor(o*k-l*k)%Math.floor(b*k),j=Math.floor(o*k-Math.abs(N)),W=N===0?o:j/k,E=Math.abs(N/k)<b/2?W:W+b,I=(0,t.getStepDecimals)(b);return parseFloat(E.toFixed(I))}t.normalizeValue=c;function f(o,u,l){return(o-u)/(l-u)}t.relativeValue=f;function y(o){return o===e.Direction.Up||o===e.Direction.Down}t.isVertical=y;function d(o,u,l){if(u>=l)throw new RangeError("min (".concat(u,") is equal/bigger than max (").concat(l,")"));if(o<u)throw new RangeError("value (".concat(o,") is smaller than min (").concat(u,")"));if(o>l)throw new RangeError("value (".concat(o,") is bigger than max (").concat(l,")"))}t.checkBoundaries=d;function h(o,u,l){return o<u?u:o>l?l:o}t.checkValuesAgainstBoundaries=h;function v(o){if(!(o.length<2)&&!o.slice(1).every(function(u,l){return o[l]<=u}))throw new RangeError("values={[".concat(o,"]} needs to be sorted when allowOverlap={false}"))}t.checkInitialOverlap=v;function R(o){var u=window.getComputedStyle(o);return{top:parseInt(u["margin-top"],10),bottom:parseInt(u["margin-bottom"],10),left:parseInt(u["margin-left"],10),right:parseInt(u["margin-right"],10)}}t.getMargin=R;function m(o){var u=window.getComputedStyle(o);return{top:parseInt(u["padding-top"],10)+parseInt(u["border-top-width"],10),bottom:parseInt(u["padding-bottom"],10)+parseInt(u["border-bottom-width"],10),left:parseInt(u["padding-left"],10)+parseInt(u["border-left-width"],10),right:parseInt(u["padding-right"],10)+parseInt(u["border-right-width"],10)}}t.getPaddingAndBorder=m;function S(o,u,l){var p=l?-1:1;o.forEach(function(b,g){return L(b,p*u[g].x,u[g].y)})}t.translateThumbs=S;function B(o,u,l,p){for(var b=0,g=F(o[0],u,l,p),T=1;T<o.length;T++){var k=F(o[T],u,l,p);k<g&&(g=k,b=T)}return b}t.getClosestThumbIndex=B;function L(o,u,l){o.style.transform="translate(".concat(u,"px, ").concat(l,"px)")}t.translate=L;var D=function(o){var u=[],l=null,p=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];u=b,!l&&(l=requestAnimationFrame(function(){l=null,o.apply(void 0,u)}))};return p};t.schd=D;function M(o,u,l){var p=o.slice(0);return p[u]=l,p}t.replaceAt=M;function $(o){var u=o.values,l=o.colors,p=o.min,b=o.max,g=o.direction,T=g===void 0?e.Direction.Right:g,k=o.rtl,C=k===void 0?!1:k;C&&T===e.Direction.Right?T=e.Direction.Left:C&&e.Direction.Left&&(T=e.Direction.Right);var _=u.slice(0).sort(function(j,W){return j-W}).map(function(j){return(j-p)/(b-p)*100}),N=_.reduce(function(j,W,E){return"".concat(j,", ").concat(l[E]," ").concat(W,"%, ").concat(l[E+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(T,", ").concat(l[0]," 0%").concat(N,", ").concat(l[l.length-1]," 100%)")}t.getTrackBackground=$;function H(){}t.voidFn=H;function A(o){throw new Error("Didn't expect to get here")}t.assertUnreachable=A;var x=function(o,u,l,p,b){b===void 0&&(b=function(T){return T});var g=Math.ceil(r([o],Array.from(o.children),!0).reduce(function(T,k){var C=Math.ceil(k.getBoundingClientRect().width);if(k.innerText&&k.innerText.includes(l)&&k.childElementCount===0){var _=k.cloneNode(!0);_.innerHTML=b(u.toFixed(p)),_.style.visibility="hidden",document.body.appendChild(_),C=Math.ceil(_.getBoundingClientRect().width),document.body.removeChild(_)}return C>T?C:T},o.getBoundingClientRect().width));return g},q=function(o,u,l,p,b,g,T){T===void 0&&(T=function(_){return _});var k=[],C=function(_){var N=x(l[_],p[_],b,g,T),j=u[_].x;u.forEach(function(W,E){var I=W.x,J=x(l[E],p[E],b,g,T);_!==E&&(j>=I&&j<=I+J||j+N>=I&&j+N<=I+J)&&(k.includes(E)||(k.push(_),k.push(E),k=r(r([],k,!0),[_,E],!1),C(E)))})};return C(o),Array.from(new Set(k.sort()))},Z=function(o,u,l,p,b,g){p===void 0&&(p=.1),b===void 0&&(b=" - "),g===void 0&&(g=function(E){return E});var T=(0,t.getStepDecimals)(p),k=(0,n.useState)({}),C=k[0],_=k[1],N=(0,n.useState)(g(u[l].toFixed(T))),j=N[0],W=N[1];return(0,n.useEffect)(function(){if(o){var E=o.getThumbs();if(E.length<1)return;var I={},J=o.getOffsets(),ie=q(l,J,E,u,b,T,g),le=g(u[l].toFixed(T));if(ie.length){var te=ie.reduce(function(re,ue,ge,pe){return re.length?r(r([],re,!0),[J[pe[ge]].x],!1):[J[pe[ge]].x]},[]);if(Math.min.apply(Math,te)===J[l].x){var de=[];ie.forEach(function(re){de.push(u[re].toFixed(T))}),le=Array.from(new Set(de.sort(function(re,ue){return parseFloat(re)-parseFloat(ue)}))).map(g).join(b);var fe=Math.min.apply(Math,te),he=Math.max.apply(Math,te),$e=E[ie[te.indexOf(he)]].getBoundingClientRect().width;I.left="".concat(Math.abs(fe-(he+$e))/2,"px"),I.transform="translate(-50%, 0)"}else I.visibility="hidden"}W(le),_(I)}},[o,u]),[j,C]};t.useThumbOverlap=Z;function F(o,u,l,p){var b=o.getBoundingClientRect(),g=b.left,T=b.top,k=b.width,C=b.height;return y(p)?Math.abs(l-(T+C/2)):Math.abs(u-(g+k/2))}var V=function(){var o,u=((o=navigator.userAgentData)===null||o===void 0?void 0:o.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(u)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};t.isIOS=V})(De);var It=U&&U.__extends||function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])},t(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}}(),xt=U&&U.__createBinding||(Object.create?function(t,r,n,e){e===void 0&&(e=n);var a=Object.getOwnPropertyDescriptor(r,n);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(t,e,a)}:function(t,r,n,e){e===void 0&&(e=n),t[e]=r[n]}),Ct=U&&U.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r}),Dt=U&&U.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&xt(r,t,n);return Ct(r,t),r},Ye=U&&U.__spreadArray||function(t,r,n){if(n||arguments.length===2)for(var e=0,a=r.length,i;e<a;e++)(i||!(e in r))&&(i||(i=Array.prototype.slice.call(r,0,e)),i[e]=r[e]);return t.concat(i||Array.prototype.slice.call(r))};Object.defineProperty(Ce,"__esModule",{value:!0});var ve=Dt(w),O=De,P=ce,Pt=["ArrowRight","ArrowUp","k","PageUp"],Bt=["ArrowLeft","ArrowDown","j","PageDown"],At=function(t){It(r,t);function r(n){var e=t.call(this,n)||this;if(e.trackRef=ve.createRef(),e.thumbRefs=[],e.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(e.props.values.length).fill(0).map(function(a,i){return i}),isChanged:!1,markOffsets:[]},e.getOffsets=function(){var a=e.props,i=a.direction,s=a.values,c=a.min,f=a.max,y=e.trackRef.current;if(!y)return console.warn("No track element found."),[];var d=y.getBoundingClientRect(),h=(0,O.getPaddingAndBorder)(y);return e.getThumbs().map(function(v,R){var m={x:0,y:0},S=v.getBoundingClientRect(),B=(0,O.getMargin)(v);switch(i){case P.Direction.Right:return m.x=(B.left+h.left)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Left:return m.x=(B.right+h.right)*-1,m.y=((S.height-d.height)/2+h.top)*-1,m.x+=d.width-d.width*(0,O.relativeValue)(s[R],c,f)-S.width/2,m;case P.Direction.Up:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height-d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;case P.Direction.Down:return m.x=((S.width-d.width)/2+B.left+h.left)*-1,m.y=-h.left,m.y+=d.height*(0,O.relativeValue)(s[R],c,f)-S.height/2,m;default:return(0,O.assertUnreachable)(i)}})},e.getThumbs=function(){return e.trackRef&&e.trackRef.current?Array.from(e.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},e.getTargetIndex=function(a){return e.getThumbs().findIndex(function(i){return i===a.target||i.contains(a.target)})},e.addTouchEvents=function(a){document.addEventListener("touchmove",e.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",e.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",e.schdOnEnd,{passive:!1})},e.addMouseEvents=function(a){document.addEventListener("mousemove",e.schdOnMouseMove),document.addEventListener("mouseup",e.schdOnEnd)},e.onMouseDownTrack=function(a){var i;if(!(a.button!==0||(0,O.isIOS)()))if(a.persist(),a.preventDefault(),e.addMouseEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return e.onMove(a.clientX,a.clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.clientX,a.clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.clientX,a.clientY)})}},e.onResize=function(){(0,O.translateThumbs)(e.getThumbs(),e.getOffsets(),e.props.rtl),e.calculateMarkOffsets()},e.onTouchStartTrack=function(a){var i;if(a.persist(),e.addTouchEvents(a.nativeEvent),e.props.values.length>1&&e.props.draggableTrack){if(e.thumbRefs.some(function(c){var f;return(f=c.current)===null||f===void 0?void 0:f.contains(a.target)}))return;e.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var s=(0,O.getClosestThumbIndex)(e.thumbRefs.map(function(c){return c.current}),a.touches[0].clientX,a.touches[0].clientY,e.props.direction);(i=e.thumbRefs[s].current)===null||i===void 0||i.focus(),e.setState({draggedThumbIndex:s},function(){return e.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},e.onMouseOrTouchStart=function(a){if(!e.props.disabled){var i=(0,O.isTouchEvent)(a);if(!(!i&&a.button!==0)){var s=e.getTargetIndex(a);s!==-1&&(i?e.addTouchEvents(a):e.addMouseEvents(a),e.setState({draggedThumbIndex:s,thumbZIndexes:e.state.thumbZIndexes.map(function(c,f){return f===s?Math.max.apply(Math,e.state.thumbZIndexes):c<=e.state.thumbZIndexes[s]?c:c-1})}))}}},e.onMouseMove=function(a){a.preventDefault(),e.onMove(a.clientX,a.clientY)},e.onTouchMove=function(a){a.preventDefault(),e.onMove(a.touches[0].clientX,a.touches[0].clientY)},e.onKeyDown=function(a){var i=e.props,s=i.values,c=i.onChange,f=i.step,y=i.rtl,d=i.direction,h=e.state.isChanged,v=e.getTargetIndex(a.nativeEvent),R=y||d===P.Direction.Left||d===P.Direction.Down?-1:1;v!==-1&&(Pt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]+R*(a.key==="PageUp"?f*10:f),v)))):Bt.includes(a.key)?(a.preventDefault(),e.setState({draggedThumbIndex:v,isChanged:!0}),c((0,O.replaceAt)(s,v,e.normalizeValue(s[v]-R*(a.key==="PageDown"?f*10:f),v)))):a.key==="Tab"?e.setState({draggedThumbIndex:-1},function(){h&&e.fireOnFinalChange()}):h&&e.fireOnFinalChange())},e.onKeyUp=function(a){var i=e.state.isChanged;e.setState({draggedThumbIndex:-1},function(){i&&e.fireOnFinalChange()})},e.onMove=function(a,i){var s=e.state,c=s.draggedThumbIndex,f=s.draggedTrackPos,y=e.props,d=y.direction,h=y.min,v=y.max,R=y.onChange,m=y.values,S=y.step,B=y.rtl;if(c===-1&&f[0]===-1&&f[1]===-1)return null;var L=e.trackRef.current;if(!L)return null;var D=L.getBoundingClientRect(),M=(0,O.isVertical)(d)?D.height:D.width;if(f[0]!==-1&&f[1]!==-1){var $=a-f[0],H=i-f[1],A=0;switch(d){case P.Direction.Right:case P.Direction.Left:A=$/M*(v-h);break;case P.Direction.Down:case P.Direction.Up:A=H/M*(v-h);break;default:(0,O.assertUnreachable)(d)}if(B&&(A*=-1),Math.abs(A)>=S/2){for(var x=0;x<e.thumbRefs.length;x++){if(m[x]===v&&Math.sign(A)===1||m[x]===h&&Math.sign(A)===-1)return;var q=m[x]+A;q>v?A=v-m[x]:q<h&&(A=h-m[x])}for(var Z=m.slice(0),x=0;x<e.thumbRefs.length;x++)Z=(0,O.replaceAt)(Z,x,e.normalizeValue(m[x]+A,x));e.setState({draggedTrackPos:[a,i]}),R(Z)}}else{var F=0;switch(d){case P.Direction.Right:F=(a-D.left)/M*(v-h)+h;break;case P.Direction.Left:F=(M-(a-D.left))/M*(v-h)+h;break;case P.Direction.Down:F=(i-D.top)/M*(v-h)+h;break;case P.Direction.Up:F=(M-(i-D.top))/M*(v-h)+h;break;default:(0,O.assertUnreachable)(d)}B&&(F=v+h-F),Math.abs(m[c]-F)>=S/2&&R((0,O.replaceAt)(m,c,e.normalizeValue(F,c)))}},e.normalizeValue=function(a,i){var s=e.props,c=s.min,f=s.max,y=s.step,d=s.allowOverlap,h=s.values;return(0,O.normalizeValue)(a,i,c,f,y,d,h)},e.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",e.schdOnMouseMove),document.removeEventListener("touchmove",e.schdOnTouchMove),document.removeEventListener("mouseup",e.schdOnEnd),document.removeEventListener("touchend",e.schdOnEnd),document.removeEventListener("touchcancel",e.schdOnEnd),e.state.draggedThumbIndex===-1&&e.state.draggedTrackPos[0]===-1&&e.state.draggedTrackPos[1]===-1)return null;e.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){e.fireOnFinalChange()})},e.fireOnFinalChange=function(){e.setState({isChanged:!1});var a=e.props,i=a.onFinalChange,s=a.values;i&&i(s)},e.updateMarkRefs=function(a){if(!a.renderMark){e.numOfMarks=void 0,e.markRefs=void 0;return}e.numOfMarks=(a.max-a.min)/e.props.step,e.markRefs=[];for(var i=0;i<e.numOfMarks+1;i++)e.markRefs[i]=ve.createRef()},e.calculateMarkOffsets=function(){if(!(!e.props.renderMark||!e.trackRef||!e.numOfMarks||!e.markRefs||e.trackRef.current===null)){for(var a=window.getComputedStyle(e.trackRef.current),i=parseInt(a.width,10),s=parseInt(a.height,10),c=parseInt(a.paddingLeft,10),f=parseInt(a.paddingTop,10),y=[],d=0;d<e.numOfMarks+1;d++){var h=9999,v=9999;if(e.markRefs[d].current){var R=e.markRefs[d].current.getBoundingClientRect();h=R.height,v=R.width}e.props.direction===P.Direction.Left||e.props.direction===P.Direction.Right?y.push([Math.round(i/e.numOfMarks*d+c-v/2),-Math.round((h-s)/2)]):y.push([Math.round(s/e.numOfMarks*d+f-h/2),-Math.round((v-i)/2)])}e.setState({markOffsets:y})}},n.step===0)throw new Error('"step" property should be a positive number');return e.schdOnMouseMove=(0,O.schd)(e.onMouseMove),e.schdOnTouchMove=(0,O.schd)(e.onTouchMove),e.schdOnEnd=(0,O.schd)(e.onEnd),e.thumbRefs=n.values.map(function(){return ve.createRef()}),e.updateMarkRefs(n),e}return r.prototype.componentDidMount=function(){var n=this,e=this.props,a=e.values,i=e.min,s=e.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",n.onResize)},unobserve:function(){return window.removeEventListener("resize",n.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,O.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(c){return(0,O.checkBoundaries)(c,n.props.min,n.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(c){(0,O.isStepDivisible)(i,c,s)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},r.prototype.componentDidUpdate=function(n,e){var a=this.props,i=a.max,s=a.min,c=a.step,f=a.values,y=a.rtl;(n.max!==i||n.min!==s||n.step!==c)&&this.updateMarkRefs(this.props),(0,O.translateThumbs)(this.getThumbs(),this.getOffsets(),y),(n.max!==i||n.min!==s||n.step!==c||e.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),f.forEach(function(d){(0,O.isStepDivisible)(s,d,c)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},r.prototype.componentWillUnmount=function(){var n={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,n),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},r.prototype.render=function(){var n=this,e=this.props,a=e.label,i=e.labelledBy,s=e.renderTrack,c=e.renderThumb,f=e.renderMark,y=f===void 0?function(){return null}:f,d=e.values,h=e.min,v=e.max,R=e.allowOverlap,m=e.disabled,S=this.state,B=S.draggedThumbIndex,L=S.thumbZIndexes,D=S.markOffsets;return s({props:{style:{transform:"scale(1)",cursor:B>-1?"grabbing":this.props.draggableTrack?(0,O.isVertical)(this.props.direction)?"ns-resize":"ew-resize":d.length===1&&!m?"pointer":"inherit"},onMouseDown:m?O.voidFn:this.onMouseDownTrack,onTouchStart:m?O.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:m,children:Ye(Ye([],D.map(function(M,$,H){return y({props:{style:n.props.direction===P.Direction.Left||n.props.direction===P.Direction.Right?{position:"absolute",left:"".concat(M[0],"px"),marginTop:"".concat(M[1],"px")}:{position:"absolute",top:"".concat(M[0],"px"),marginLeft:"".concat(M[1],"px")},key:"mark".concat($),ref:n.markRefs[$]},index:$})}),!0),d.map(function(M,$){var H=n.state.draggedThumbIndex===$;return c({index:$,value:M,isDragged:H,props:{style:{position:"absolute",zIndex:L[$],cursor:m?"inherit":H?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:$,tabIndex:m?void 0:0,"aria-valuemax":R?v:d[$+1]||v,"aria-valuemin":R?h:d[$-1]||h,"aria-valuenow":M,draggable:!1,ref:n.thumbRefs[$],"aria-label":a,"aria-labelledby":i,role:"slider",onKeyDown:m?O.voidFn:n.onKeyDown,onKeyUp:m?O.voidFn:n.onKeyUp}})}),!0)})},r.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:P.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},r}(ve.Component);Ce.default=At;(function(t){var r=U&&U.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var n=r(Ce);t.Range=n.default;var e=De;Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return e.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return e.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return e.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return e.checkValuesAgainstBoundaries}});var a=ce;Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})})(xe);function Ge(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function me(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ge(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var ye=ee("div",{position:"relative",width:"100%"});ye.displayName="Root";ye.displayName="Root";ye.displayName="StyledRoot";var Te=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$disabled,i=t.$isDragged,s=r.sizing,c="inherit";return a?c="not-allowed":i?c="grabbing":e.length===1&&(c="pointer"),{paddingTop:s.scale600,paddingBottom:s.scale600,paddingRight:s.scale600,paddingLeft:s.scale600,display:"flex",cursor:c,backgroundColor:r.colors.sliderTrackFill}});Te.displayName="Track";Te.displayName="Track";Te.displayName="StyledTrack";var ke=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$min,i=t.$max,s=t.$disabled,c=r.colors,f=r.borders,y=r.direction,d=r.borders.useRoundedCorners?f.radius100:0;return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,background:xe.getTrackBackground({values:e,colors:e.length===1?[s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque]:[s?c.backgroundSecondary:c.borderOpaque,s?c.borderOpaque:c.primary,s?c.backgroundSecondary:c.borderOpaque],min:a||0,max:i||0,rtl:y==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}});ke.displayName="InnerTrack";ke.displayName="InnerTrack";ke.displayName="StyledInnerTrack";var Oe=ee("div",function(t){return{width:"4px",height:"2px",backgroundColor:t.$theme.colors.backgroundPrimary,marginLeft:"16px"}});Oe.displayName="Mark";Oe.displayName="Mark";Oe.displayName="StyledMark";var we=ee("div",function(t){return me(me({},t.$theme.typography.font200),{},{color:t.$theme.colors.contentPrimary})});we.displayName="Tick";we.displayName="Tick";we.displayName="StyledTick";var Re=ee("div",function(t){var r=t.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Re.displayName="TickBar";Re.displayName="TickBar";Re.displayName="StyledTickBar";var Se=ee("div",function(t){var r=t.$theme,n=t.$value,e=n===void 0?[]:n,a=t.$thumbIndex,i=t.$disabled,s=e.length===2&&a===0,c=e.length===2&&a===1;return r.direction==="rtl"&&(c||s)&&(s=!s,c=!c),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:i?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:t.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:i?"not-allowed":"inherit"}});Se.displayName="Thumb";Se.displayName="Thumb";Se.displayName="StyledThumb";var Me=ee("div",function(t){var r=t.$disabled,n=t.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});Me.displayName="InnerThumb";Me.displayName="InnerThumb";Me.displayName="StyledInnerThumb";var _e=ee("div",function(t){var r=t.$disabled,n=t.$theme;return me(me({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function Xe(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,e)}return n}function Lt(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(e){jt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jt(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function G(){return G=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},G.apply(this,arguments)}function Y(t,r){return Ut(t)||Nt(t,r)||Vt(t,r)||zt()}function zt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vt(t,r){if(t){if(typeof t=="string")return qe(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(t,r)}}function qe(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function Nt(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var e=[],a=!0,i=!1,s,c;try{for(n=n.call(t);!(a=(s=n.next()).done)&&(e.push(s.value),!(r&&e.length===r));a=!0);}catch(f){i=!0,c=f}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw c}}return e}}function Ut(t){if(Array.isArray(t))return t}var Ht=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function Wt(t){var r=t.overrides,n=r===void 0?{}:r,e=t.disabled,a=e===void 0?!1:e,i=t.marks,s=i===void 0?!1:i,c=t.onChange,f=c===void 0?function(){}:c,y=t.onFinalChange,d=y===void 0?function(){}:y,h=t.min,v=h===void 0?0:h,R=t.max,m=R===void 0?100:R,S=t.step,B=S===void 0?1:S,L=t.persistentThumb,D=L===void 0?!1:L,M=t.valueToLabel,$=M===void 0?function(X){return X}:M,H=t.value,A=w.useContext(pt),x=w.useState(!1),q=Y(x,2),Z=q[0],F=q[1],V=w.useState(!1),o=Y(V,2),u=o[0],l=o[1],p=w.useState(!1),b=Y(p,2),g=b[0],T=b[1],k=w.useState(-1),C=Y(k,2),_=C[0],N=C[1],j=w.useCallback(function(X){vt(X)&&T(!0);var z=X.target.parentNode.firstChild===X.target?0:1;N(z)},[]),W=w.useCallback(function(X){g!==!1&&T(!1),N(-1)},[]),E=Ht(H),I={$disabled:a,$step:B,$min:v,$max:m,$marks:s,$value:E,$isFocusVisible:g},J=Q(n.Root,ye),ie=Y(J,2),le=ie[0],te=ie[1],de=Q(n.Track,Te),fe=Y(de,2),he=fe[0],$e=fe[1],re=Q(n.InnerTrack,ke),ue=Y(re,2),ge=ue[0],pe=ue[1],Je=Q(n.Thumb,Se),Pe=Y(Je,2),Qe=Pe[0],et=Pe[1],tt=Q(n.InnerThumb,Me),Be=Y(tt,2),rt=Be[0],nt=Be[1],at=Q(n.ThumbValue,_e),Ae=Y(at,2),it=Ae[0],ot=Ae[1],st=Q(n.Tick,we),Fe=Y(st,2),Le=Fe[0],je=Fe[1],ct=Q(n.TickBar,Re),ze=Y(ct,2),ut=ze[0],lt=ze[1],dt=Q(n.Mark,Oe),Ve=Y(dt,2),ft=Ve[0],ht=Ve[1];return w.createElement(le,G({"data-baseweb":"slider"},I,te,{onFocus:mt(te,j),onBlur:bt(te,W)}),w.createElement(xe.Range,G({step:B,min:v,max:m,values:E,disabled:a,onChange:function(z){return f({value:z})},onFinalChange:function(z){return d({value:z})},rtl:A.direction==="rtl",renderTrack:function(z){var ne=z.props,K=z.children,oe=z.isDragged;return w.createElement(he,G({onMouseDown:ne.onMouseDown,onTouchStart:ne.onTouchStart,$isDragged:oe},I,$e),w.createElement(ge,G({$isDragged:oe,ref:ne.ref},I,pe),K))},renderThumb:function(z){var ne=z.props,K=z.index,oe=z.isDragged,Ne=D||(!!K&&u||!K&&Z||oe)&&!a;return w.createElement(Qe,G({},ne,{onMouseEnter:function(){K===0?F(!0):l(!0)},onMouseLeave:function(){K===0?F(!1):l(!1)},$thumbIndex:K,$isDragged:oe,style:Lt({},ne.style)},I,et,{$isFocusVisible:g&&_===K}),Ne&&w.createElement(it,G({$thumbIndex:K,$isDragged:oe},I,ot),$(E[K])),Ne&&w.createElement(rt,G({$thumbIndex:K,$isDragged:oe},I,nt)))}},s?{renderMark:function(z){var ne=z.props,K=z.index;return w.createElement(ft,G({$markIndex:K},ne,I,ht))}}:{})),w.createElement(ut,G({},I,lt),w.createElement(Le,G({},I,je),$(v)),w.createElement(Le,G({},I,je),$(m))))}const Kt=be("div",{target:"e8lt0n70"})(({disabled:t,theme:r})=>({alignItems:"center",backgroundColor:t?r.colors.gray:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${yt(r.colors.primary,.5)}`}})),Yt=be("div",{target:"e8lt0n71"})(({disabled:t,theme:r})=>({fontFamily:r.genericFonts.codeFont,fontSize:r.fontSizes.sm,color:t?r.colors.gray:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Gt=be("div",{target:"e8lt0n72"})(({theme:t})=>({fontSize:t.fontSizes.sm,paddingBottom:t.spacing.none,paddingLeft:t.spacing.none,paddingRight:t.spacing.none,paddingTop:"0.65em",justifyContent:"space-between",alignItems:"center",display:"flex"})),Ze=be("div",{target:"e8lt0n73"})(({disabled:t,theme:r})=>({lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,fontFamily:r.genericFonts.codeFont,color:t?r.colors.fadedText40:"inherit"})),Xt=200;function qt({disabled:t,element:r,widgetMgr:n,width:e,fragmentId:a}){var F;const[i,s]=Et({getStateFromWidgetMgr:Zt,getDefaultStateFromProto:Jt,getCurrStateFromProto:Qt,updateWidgetMgrState:er,element:r,widgetMgr:n,fragmentId:a}),[c,f]=w.useState(i),y=w.useRef(null),[d]=w.useState([]),[h]=w.useState([]),{colors:v,fonts:R,fontSizes:m,spacing:S}=Tt(),B={width:e},L=c.map(V=>Ie(V,r)),D=Ie(r.min,r),M=Ie(r.max,r),$=r.label;w.useEffect(()=>{f(i)},[i]);const H=w.useCallback(kt(Xt,V=>{s({value:V,fromUi:!0})}),[]),A=w.useCallback(({value:V})=>{f(V),H(V)},[H]),x=w.useCallback(()=>Ue(Gt,{"data-testid":"stSliderTickBar",children:[ae(Ze,{disabled:t,"data-testid":"stSliderTickBarMin",children:D}),ae(Ze,{disabled:t,"data-testid":"stSliderTickBarMax",children:M})]}),[D,M,t]),q=w.useCallback(He.forwardRef(function(o,u){const{$thumbIndex:l}=o,p=l||0;d[p]=u,h[p]||(h[p]=He.createRef());const b=Ot(o,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),g=L[p];return ae(Kt,{...b,disabled:o.$disabled===!0,ref:d[p],"aria-valuetext":g,"aria-label":$,children:ae(Yt,{"data-testid":"stSliderThumbValue",disabled:o.$disabled===!0,ref:h[p],children:g})})}),[]);w.useEffect(()=>{var b,g;h.map((T,k)=>{T.current&&(T.current.innerText=L[k])}),d.map((T,k)=>{T.current&&T.current.setAttribute("aria-valuetext",L[k])});const V=y.current??null,o=d[0].current,u=(b=d[1])==null?void 0:b.current,l=h[0].current,p=(g=h[1])==null?void 0:g.current;nr(V,o,u,l,p)});const Z=w.useCallback(({$disabled:V})=>({height:S.twoXS,...V?{background:v.darkenedBgMix25}:{}}),[v,S]);return Ue("div",{ref:y,className:"stSlider","data-testid":"stSlider",style:B,children:[ae(_t,{label:r.label,disabled:t,labelVisibility:wt((F=r.labelVisibility)==null?void 0:F.value),children:r.help&&ae(Rt,{children:ae(St,{content:r.help,placement:Mt.TOP_RIGHT})})}),ae(Wt,{min:r.min,max:r.max,step:r.step,value:rr(c,r),onChange:A,disabled:t,overrides:{Thumb:q,Tick:{style:{fontFamily:R.monospace}},Track:{style:{backgroundColor:"none !important",paddingBottom:S.none,paddingLeft:S.none,paddingRight:S.none,paddingTop:`calc(${m.sm} * 1.35)`}},InnerTrack:{style:Z},TickBar:x}})]})}function Zt(t,r){return t.getDoubleArrayValue(r)}function Jt(t){return t.default}function Qt(t){return t.value}function er(t,r,n,e){r.setDoubleArrayValue(t,n.value,{fromUi:n.fromUi},e)}function tr(t){const{dataType:r}=t;return r===Ee.DataType.DATETIME||r===Ee.DataType.DATE||r===Ee.DataType.TIME}function Ie(t,r){const{format:n,options:e}=r;return tr(r)?$t.utc(t/1e3).format(n):e.length>0?We.sprintf(n,e[t]):We.sprintf(n,t)}function rr(t,r){const{min:n,max:e}=r;let a=t[0],i=t.length>1?t[1]:t[0];return a>i&&(a=i),a<n&&(a=n),a>e&&(a=e),i<n&&(i=n),i>e&&(i=e),t.length>1?[a,i]:[a]}function nr(t,r,n,e,a){!t||!r||!e||(se(t,r,e),n&&a&&(se(t,n,a),ar(t,r,n,e,a)))}function se(t,r,n){const e=t.getBoundingClientRect(),a=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=a.left+a.width/2,c=s-i.width/2<e.left,f=s+i.width/2>e.right;n.style.left=c?"0":"",n.style.right=f?"0":""}function ar(t,r,n,e,a){const s=t.getBoundingClientRect(),c=r.getBoundingClientRect(),f=n.getBoundingClientRect(),y=e.getBoundingClientRect(),d=a.getBoundingClientRect(),h=s.left+s.width/2,v=c.left+c.width/2,R=f.left+f.width/2,m=v-y.width/2>=s.left,S=R+d.width/2<=s.right,B=c.left-y.width>=s.left,L=f.right+d.width<=s.right,D=m?y.width/2:y.width,M=S?d.width/2:d.width,$=v+D;if(R-M-$>24){se(t,r,e),se(t,n,a);return}if(B&&L){e.style.left="",e.style.right=`${Math.round(c.width)}px`,a.style.left=`${Math.round(f.width)}px`,a.style.right="";return}v<h?(se(t,r,e),a.style.left=`${Math.round(v+D+24-R)}px`,a.style.right=""):(se(t,n,a),e.style.left="",e.style.right=`${-Math.round(R-M-24-v)}px`)}const ur=w.memo(qt);export{ur as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{bx as w,r as g,bH as ae,bI as T,bJ as x,y as le,C as ce,j as S,bK as se,ay as ue,z as de,bt as fe,aF as ge,bC as he,bu as be,bd as me,bL as ve,bM as pe}from"./index.
|
1
|
+
import{bx as w,r as g,bH as ae,bI as T,bJ as x,y as le,C as ce,j as S,bK as se,ay as ue,z as de,bt as fe,aF as ge,bC as he,bu as be,bd as me,bL as ve,bM as pe}from"./index.BUL6xLUk.js";import{a as ye}from"./useBasicWidgetState.C-8MSbfp.js";import"./FormClearHelper.ljFWvSck.js";var C=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),$e=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function xe(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function we(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=w("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=w("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,$=encodeURIComponent(`
|
2
2
|
<svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
3
|
<path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
|
4
4
|
</svg>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aW as yu,_ as jM,j as ms,z as Ll,aX as Gy,F as aE,aY as Wy,aZ as TL,a_ as lE,a$ as EL,aG as SL,b0 as CL,b1 as PL,n as HM,C as GM,b2 as T1,b3 as cE,aD as IL,y as ML,b4 as uE}from"./index.CvqaNor_.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.uYLXBIlD.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.BNprLGNF.js";import{a as OL,T as DL}from"./Toolbar.yTE_O6B7.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.CbOOMX5j.js";import{u as LL}from"./useBasicWidgetState.BJFGEQDL.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.mT4-5rFn.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function VL(t){return ku()?qM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function XL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const qL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+qL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?XL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
|
1
|
+
var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aW as yu,_ as jM,j as ms,z as Ll,aX as Gy,F as aE,aY as Wy,aZ as TL,a_ as lE,a$ as EL,aG as SL,b0 as CL,b1 as PL,n as HM,C as GM,b2 as T1,b3 as cE,aD as IL,y as ML,b4 as uE}from"./index.BUL6xLUk.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.Ulusdt7-.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.BYxVZJys.js";import{a as OL,T as DL}from"./Toolbar.CaxqEUPP.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.CI1ebDYc.js";import{u as LL}from"./useBasicWidgetState.C-8MSbfp.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.ljFWvSck.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function VL(t){return ku()?qM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function XL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const qL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+qL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?XL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
|
2
2
|
importScripts('${t}');
|
3
3
|
} catch (error) {
|
4
4
|
console.error(error);
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bq as K}from"./index.
|
1
|
+
import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bq as K}from"./index.BUL6xLUk.js";import{I as N}from"./InputInstructions.CEsavkWx.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.4T4nZym2.js";import"./base-input.B6AaP3td.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"e1xgt8o30"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"e1xgt8o31"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"e1xgt8o32"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"e1xgt8o33"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"e1xgt8o34"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,y]=i.useState(0),a=i.useRef(null),x=i.useRef({minHeight:0,maxHeight:0}),E=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},I=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),y(0))},B=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),I())},w=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),y(E()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;x.current.minHeight=e,x.current.maxHeight=e*O}},[a]);const{disabled:C,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:S}=x.current,v=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:w,onKeyDown:B,"aria-label":m,disabled:C,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${b+R}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:I,disabled:!g||C,extended:v,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as t,be as e,z as o,j as a,aF as i}from"./index.
|
1
|
+
import{n as t,be as e,z as o,j as a,aF as i}from"./index.BUL6xLUk.js";import{P as l}from"./ProgressBar.BZTQQebk.js";const n=t("div",{target:"ejagcfm0"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal",color:e(s)}));function c({element:s,width:r}){return o("div",{className:"stProgress","data-testid":"stProgress",children:[a(n,{children:a(i,{source:s.text,allowHTML:!1,isLabel:!0})}),a(l,{value:s.value,width:r})]})}export{c as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as s,y as U,
|
1
|
+
import{r as s,y as U,cp as T,z as k,j as l,bt as A,bG as L,bu as P,bd as B,bv as D}from"./index.BUL6xLUk.js";import{u as j}from"./uniqueId.CO20A1NT.js";import{u as _,a as G,b as K}from"./useOnInputChange.G-wGwNH8.js";import{I as O}from"./InputInstructions.CEsavkWx.js";import{a as $}from"./useBasicWidgetState.C-8MSbfp.js";import{T as q}from"./textarea.4T4nZym2.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.ljFWvSck.js";import"./base-input.B6AaP3td.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=$({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),C=s.useCallback(()=>{g(!0)},[]),F=G({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=K(t.formId,p,r,o,u,!0),z={width:h},{height:f,placeholder:E,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:z,children:[l(D,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(L,{children:l(P,{content:t.help,placement:B.TOP_RIGHT})})}),l(q,{value:i??"",placeholder:E,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{n as i,k as m,r as c,j as e}from"./index.
|
1
|
+
import{n as i,k as m,r as c,j as e}from"./index.BUL6xLUk.js";import{P as l,R as p}from"./RenderInPortalIfExists.CuEFo7dc.js";const d=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,f=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,S=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,r=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>m(`from{transform:translateY(0)
|
2
2
|
rotateX(`,n(360),`deg)
|
3
3
|
rotateY(`,n(360),`deg)
|
4
4
|
rotateZ(`,n(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import{bx as P,bH as me,by as R,r as u,y as ve,z as oe,j as O,bC as ye,bu as $e,bd as Re,bv as Oe,aF as ie,bt as _e}from"./index.
|
1
|
+
import{bx as P,bH as me,by as R,r as u,y as ve,z as oe,j as O,bC as ye,bu as $e,bd as Re,bv as Oe,aF as ie,bt as _e}from"./index.BUL6xLUk.js";import{a as Pe}from"./useBasicWidgetState.C-8MSbfp.js";import"./FormClearHelper.ljFWvSck.js";var ae={vertical:"vertical",horizontal:"horizontal"};function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?se(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=0,L=1,T=2;function C(e){return e.$isActive?T:e.$isHovered?L:I}function we(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(C(e)){case I:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(C(e)){case I:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(C(e)){case I:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(C(e)){case I:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Me(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return _({},"padding".concat(o),s)}function ke(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var K=P("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});K.displayName="RadioGroupRoot";K.displayName="RadioGroupRoot";var J=P("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",b=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},_(t,"margin".concat(b),c?a.scale200:null),_(t,"marginBottom",r&&!c?null:a.scale200),t});J.displayName="Root";J.displayName="Root";var Q=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});Q.displayName="RadioMarkInner";Q.displayName="RadioMarkInner";var Y=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:we(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});Y.displayName="RadioMarkOuter";Y.displayName="RadioMarkOuter";var Z=P("div",function(e){var t=e.$theme.typography;return B(B({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});Z.displayName="Label";Z.displayName="Label";var ee=P("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});ee.displayName="Input";ee.displayName="Input";var te=P("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return B(B({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},_(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),_(t,"margin".concat(s),o?n.sizing.scale200:null),_(t,"maxWidth","240px"),t))});te.displayName="Description";te.displayName="Description";function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function Fe(e,t){return Te(e)||Le(e,t)||Ie(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(e,t){if(e){if(typeof e=="string")return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t)}}function le(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Te(e){if(Array.isArray(e))return e}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function je(e,t,n){return t&&xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Be(e){var t=ze();return function(){var r=z(e),o;if(t){var i=z(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){De(n,e);var t=Be(n);function n(){var r;Ae(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),D(j(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),D(j(r),"handleFocus",function(a,c){me(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),D(j(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return je(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=R(s.RadioGroupRoot,K),c=Fe(a,2),b=c[0],m=c[1];return u.createElement(b,G({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},m),u.Children.map(this.props.children,function(p,f){if(!u.isValidElement(p))return null;var l=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:l,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===f,isFocusVisible:o.state.isFocusVisible,tabIndex:f===0&&!o.props.value||l?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(h){return o.handleBlur(h,f)},onFocus:function(h){return o.handleFocus(h,f)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);D(ce,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function q(e){"@babel/helpers - typeof";return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function k(e,t){return Ue(e)||Ve(e,t)||Ne(e,t)||He()}function He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ue(e){if(Array.isArray(e))return e}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qe(e,t,n){return t&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},X(e,t)}function Ke(e){var t=Qe();return function(){var r=H(e),o;if(t){var i=H(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},H(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},pe=function(e){Xe(n,e);var t=Ke(n);function n(){var r;Ge(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),E(F(r),"state",{isActive:!1,isHovered:!1}),E(F(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),E(F(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),E(F(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),E(F(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=R(i.Root,J),a=k(s,2),c=a[0],b=a[1],m=R(i.Label,Z),p=k(m,2),f=p[0],l=p[1],d=R(i.Input,ee),h=k(d,2),N=h[0],w=h[1],A=R(i.Description,te),x=k(A,2),S=x[0],V=x[1],v=R(i.RadioMarkInner,Q),g=k(v,2),y=g[0],fe=g[1],de=R(i.RadioMarkOuter,Y),re=k(de,2),he=re[0],be=re[1],M={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},ne=u.createElement(f,$({},M,l),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ge){return ge.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,b),Ye(this.props.labelPlacement)&&ne,u.createElement(he,$({},M,be),u.createElement(y,$({},M,fe))),u.createElement(N,$({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},M,w)),Ze(this.props.labelPlacement)&&ne),!!this.props.description&&u.createElement(S,$({},M,V),this.props.description))}}]),n}(u.Component);E(pe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function tt({disabled:e,horizontal:t,width:n,value:r,onChange:o,options:i,captions:s,label:a,labelVisibility:c,help:b}){const[m,p]=u.useState(r??null);u.useEffect(()=>{r!==m&&p(r??null)},[r]);const f=u.useCallback(v=>{const g=parseInt(v.target.value,10);p(g),o(g)},[o]),l=ve(),{colors:d,radii:h}=l,N={width:n},w=s.length>0,A=i.length>0,x=A?i:["No options to select."],S=e||!A,V=v=>v==""&&t&&w?" ":v;return oe("div",{className:"stRadio","data-testid":"stRadio",style:N,children:[O(Oe,{label:a,disabled:S,labelVisibility:c,children:b&&O(ye,{children:O($e,{content:b,placement:Re.TOP_RIGHT})})}),O(ce,{onChange:f,value:m!==null?m.toString():void 0,disabled:S,align:t?ae.horizontal:ae.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:w?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:x.map((v,g)=>oe(pe,{value:g.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:w?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?d.darkenedBgMix25:"",borderTopLeftRadius:h.md,borderTopRightRadius:h.md,borderBottomLeftRadius:h.md,borderBottomRightRadius:h.md})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?d.primary:d.fadedText40})},RadioMarkInner:{style:({$checked:y})=>({height:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:S?d.fadedText40:d.bodyText,position:"relative",top:l.spacing.px}}},children:[O(ie,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),w&&O(ie,{source:V(s[g]),allowHTML:!1,isCaption:!0,isLabel:!0})]},g))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:n,width:r,fragmentId:o}){const[i,s]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:n,fragmentId:o}),a=u.useCallback(d=>{s({value:d,fromUi:!0})},[s]),{horizontal:c,options:b,captions:m,label:p,labelVisibility:f,help:l}=t;return O(rt,{label:p,onChange:a,options:b,captions:m,width:r,disabled:e,horizontal:c,labelVisibility:_e(f==null?void 0:f.value),value:i??null,help:l})}function ot(e,t){return e.getIntValue(t)}function it(e){return e.default??null}function at(e){return e.value??null}function st(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const ft=u.memo(nt);export{ft as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as U,r as s,bk as V,j as l}from"./index.
|
1
|
+
import{n as U,r as s,bk as V,j as l}from"./index.BUL6xLUk.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 +1 @@
|
|
1
|
-
import{n as s,k as r,r as i,j as n}from"./index.
|
1
|
+
import{n as s,k as r,r as i,j as n}from"./index.BUL6xLUk.js";import{P as m,R as c}from"./RenderInPortalIfExists.CuEFo7dc.js";const p=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,f=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,d=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,B=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,L=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,h=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,t=300,a=121,e=20,g=80,u=1e3,x=r("from{transform:translateY(calc(100vh + ",t,"px));}to{transform:translateY(0);}"),_=s("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:`${-t}px`,marginLeft:`${-a/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-e)+e}vw`,animationDelay:`${Math.random()*u}ms`,height:`${t}px`,width:`${a}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,l=[p,f,d,B,L,h],A=l.length,I=({particleType:o})=>n(_,{src:l[o]}),M=({scriptRunId:o})=>n(c,{children:n(m,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=i.memo(M);export{w as NUM_BALLOONS,S as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as re,j as ct,F as jt}from"./index.CvqaNor_.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+`>
|
1
|
+
import{r as re,j as ct,F as jt}from"./index.BUL6xLUk.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
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};
|