@stlite/desktop 0.84.2 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{ErrorOutline.esm-7fPCAua1.js → ErrorOutline.esm-7OKHB2M2.js} +1 -1
- package/build/assets/{FileDownload.esm-5XDRJbc8.js → FileDownload.esm-Com4r8-e.js} +1 -1
- package/build/assets/{FileHelper-BarQJiLz.js → FileHelper-Bu7MX99C.js} +1 -1
- package/build/assets/{FormClearHelper-BZaxoxQN.js → FormClearHelper-CDpP2KTI.js} +1 -1
- package/build/assets/{Hooks-BxizdPoJ.js → Hooks-tn1TzPTP.js} +1 -1
- package/build/assets/{InputInstructions-Dmr8j4xE.js → InputInstructions--Dn5zAU_.js} +1 -1
- package/build/assets/{ProgressBar-C_yUO6k-.js → ProgressBar-DcxHFtM-.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-eTRglO06.js → RenderInPortalIfExists-BIfvAZjR.js} +1 -1
- package/build/assets/{Toolbar-bneC7vhq.js → Toolbar-CWqlXe66.js} +1 -1
- package/build/assets/{base-input-DrVuxJmE.js → base-input-d2YUIz4t.js} +1 -1
- package/build/assets/{checkbox-Ce7VH5yR.js → checkbox-88xaX78x.js} +1 -1
- package/build/assets/{createSuper-Ce1x_8d5.js → createSuper-D3Ul7yIL.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-Bd6FIb0g.js → data-grid-overlay-editor-DXtYkzcr.js} +1 -1
- package/build/assets/{downloader-DTdoFA0u.js → downloader-KtkOxlpT.js} +1 -1
- package/build/assets/{es6-eSFIFIhE.js → es6-B42lHU50.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-BbhpUGmG.js → iframeResizer.contentWindow-CvYfpnrH.js} +1 -1
- package/build/assets/{index-BU9sb5h3.js → index-0kTsO8RM.js} +1 -1
- package/build/assets/{index-Bf7iW3kb.js → index-B2UxtX62.js} +1 -1
- package/build/assets/{index-BcIT8Wnk.js → index-B7059qLO.js} +1 -1
- package/build/assets/{index-_iQJZ8n8.js → index-BDbsTsc3.js} +1 -1
- package/build/assets/{index-c-NQS3qn.js → index-BDur6pq6.js} +5 -5
- package/build/assets/{index-CGpWCLFI.js → index-BK4078C4.js} +1 -1
- package/build/assets/{index-Dk8gL3aI.js → index-BOfpQN9g.js} +1 -1
- package/build/assets/{index-CQr0CfvQ.js → index-BOg3rup3.js} +1 -1
- package/build/assets/{index-DMAr4hNX.js → index-BWEKXXMb.js} +1 -1
- package/build/assets/{index-BrFIUJra.js → index-BaJKk6B3.js} +1 -1
- package/build/assets/{index-atxzdN1F.js → index-BblW1_-g.js} +1 -1
- package/build/assets/{index-DyGi5YBc.js → index-BeI4Ttzt.js} +1 -1
- package/build/assets/{index-DAb-Jtr2.js → index-BgOtN6vc.js} +1 -1
- package/build/assets/{index-_GH5VSbG.js → index-BrTpiBzn.js} +1 -1
- package/build/assets/{index-BxnhSwtv.js → index-C2jkleW1.js} +1 -1
- package/build/assets/{index-DzT-BaTB.js → index-CHgNp4xa.js} +1 -1
- package/build/assets/{index-C-8qP7Ru.js → index-CQeEtNcl.js} +1 -1
- package/build/assets/{index-2zFaDmrI.js → index-Cn1O8A4P.js} +1 -1
- package/build/assets/{index-Dwbjahn_.js → index-CqyqPh7G.js} +1 -1
- package/build/assets/{index-BwAJEr7A.js → index-Cx4fc3rc.js} +1 -1
- package/build/assets/{index-DPBNUFWE.js → index-DBR7DuB2.js} +4 -4
- package/build/assets/{index-DW2AfAPF.js → index-DENmf0gQ.js} +1 -1
- package/build/assets/{index-DcKJu6C9.js → index-DFw6l1h_.js} +1 -1
- package/build/assets/{index-B6AypoKB.js → index-DJ5p5o4e.js} +1 -1
- package/build/assets/{index-D1bJoe6r.js → index-DTQxDUGX.js} +1 -1
- package/build/assets/{index-BU5lMh9f.js → index-Dg_LWvDp.js} +1 -1
- package/build/assets/{index-CfZojTNf.js → index-DjTt1PsH.js} +1 -1
- package/build/assets/{index-rc6TuZ_x.js → index-DtYrJsyv.js} +1 -1
- package/build/assets/{index-DFxMAoHY.js → index-Dv40asJt.js} +1 -1
- package/build/assets/{index-BlaLvghR.js → index-Dz4EUU4D.js} +1 -1
- package/build/assets/{index-BWKeW-zA.js → index-HKAp3TVC.js} +1 -1
- package/build/assets/{index-BF3Fet0V.js → index-L_ze1pIa.js} +1 -1
- package/build/assets/{index-wWTCE5QI.js → index-LfiCl2KD.js} +1 -1
- package/build/assets/{index-DluRIgvs.js → index-P5i4zPgj.js} +1 -1
- package/build/assets/{index-DBHyG99F.js → index-ePEKjmpS.js} +1 -1
- package/build/assets/{index-DGjwMTQq.js → index-pIp71CwA.js} +1 -1
- package/build/assets/{index-Bj66FfmM.js → index-wUlezk82.js} +1 -1
- package/build/assets/{inherits-83mK7fR9.js → inherits-BYCriLh4.js} +1 -1
- package/build/assets/{input-CXi1-D16.js → input-B5lN60N1.js} +1 -1
- package/build/assets/{memory-BtIreI5V.js → memory-DQhPFwiC.js} +1 -1
- package/build/assets/{mergeWith-DZ-wgSc6.js → mergeWith-G_d7CTch.js} +1 -1
- package/build/assets/{number-overlay-editor-BxuviOUl.js → number-overlay-editor-CAfqemOj.js} +1 -1
- package/build/assets/{sandbox-DHLnmH8d.js → sandbox-LJvAd2N2.js} +1 -1
- package/build/assets/{slicedToArray-Bj-RN7K3.js → slicedToArray-C2cK8vn0.js} +1 -1
- package/build/assets/{textarea-BKD-emFb.js → textarea-DnJhkRaH.js} +1 -1
- package/build/assets/{timepicker-CWkzEpyz.js → timepicker-C6mPXMyQ.js} +1 -1
- package/build/assets/{uniqueId-BGMRjdMp.js → uniqueId-C1-rVRbK.js} +1 -1
- package/build/assets/{useBasicWidgetState-uJo0naOA.js → useBasicWidgetState-BC4jGsyb.js} +1 -1
- package/build/assets/{useOnInputChange-DI3AnwSZ.js → useOnInputChange-D6PxZWlI.js} +1 -1
- package/build/assets/{withFullScreenWrapper-DbD5_ijt.js → withFullScreenWrapper-q4aFX07K.js} +1 -1
- package/build/assets/{worker-DEam9hTF.js → worker-DH7pdhk6.js} +1 -1
- package/build/electron/worker.js +1 -1
- package/build/index.html +1 -1
- package/package.json +5 -5
- package/wheels/streamlit-1.45.1-cp312-none-any.whl +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as S,E as R,_ as E,c as x,I as q,j as h,c0 as Q,bI as z,bW as J,bD as Z,bX as O,c8 as _,e as K,g as Y,bf as ee,A as te,c9 as re,ca as ie,cb as se,R as oe,l as ae,b3 as ne,L as P,bT as le,bS as de,bZ as ce,b_ as ue,cc as he,b$ as pe}from"./index-DPBNUFWE.js";import{a as V}from"./index-xsH4HHeE.js";import{F as ge}from"./FormClearHelper-BZaxoxQN.js";import{U as L}from"./UploadFileInfo-C-jY39rj.js";import{P as fe,S as me}from"./ProgressBar-C_yUO6k-.js";var D=S.forwardRef(function(i,l){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return S.createElement(R,E({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),S.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});D.displayName="Video";var W=S.forwardRef(function(i,l){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return S.createElement(R,E({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),S.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});W.displayName="X";var $=S.forwardRef(function(i,l){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return S.createElement(R,E({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},i,{ref:l}),S.createElement("rect",{width:24,height:24,fill:"none"}),S.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});$.displayName="SwitchCamera";function ve(i,l){switch(i){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const H=x("div",{target:"etz5kuj9"})({name:"b6gpc",styles:"position:relative;overflow:hidden;width:100%;object-fit:contain"}),T=x("div",{target:"etz5kuj8"})(({theme:i,width:l})=>({backgroundColor:i.colors.secondaryBg,borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),""),ye=x("p",{target:"etz5kuj7"})(({theme:i})=>({marginTop:i.spacing.sm,textAlign:"center"}),""),Se=x("img",{target:"etz5kuj6"})(({theme:i,opacity:l})=>({borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,objectFit:"contain",opacity:l}),""),be=x("a",{target:"etz5kuj5"})(({theme:i})=>({color:i.colors.primary,display:"block",textDecoration:"none"}),""),we=x("span",{target:"etz5kuj4"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),Me=x("div",{target:"etz5kuj3"})(({theme:i})=>({position:"absolute",top:i.spacing.lg,right:i.spacing.lg,zIndex:i.zIndices.priority,color:i.colors.fadedText40,mixBlendMode:"difference",opacity:.6}),""),Ue=x("div",{target:"etz5kuj1"})({name:"1yoks5w",styles:"height:fit-content;width:100%;position:absolute;bottom:0"}),Ce=x("button",{target:"etz5kuj0"})(({theme:i})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:i.colors.lightenedBg05,border:`${i.sizes.borderWidth} solid ${i.colors.borderColor}`,borderRadius:`0 0 ${i.radii.default} ${i.radii.default}`,"&:hover":{borderColor:i.colors.primary,color:i.colors.primary},"&:active":{color:i.colors.white,borderColor:i.colors.primary,backgroundColor:i.colors.primary},"&:focus:not(:active)":{borderColor:i.colors.primary,color:i.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText40,borderColor:i.colors.borderColor,backgroundColor:i.colors.lightenedBg05,cursor:"not-allowed"},fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,margin:i.spacing.none,lineHeight:i.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${q(i.colors.primary,.5)}`},...ve("medium",i)}),"");function xe({disabled:i,onClick:l,children:e,progress:o}){return h.jsxs(Ce,{disabled:i||!1,onClick:l||(()=>{}),progress:o||null,"data-testid":"stCameraInputButton",children:[e,o?h.jsx(Ue,{children:h.jsx(fe,{value:o,size:me.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const A=S.memo(xe);var F=(i=>(i.USER="user",i.ENVIRONMENT="environment",i))(F||{});const Ie=({switchFacingMode:i})=>h.jsx(Me,{"data-testid":"stCameraInputSwitchButton",children:h.jsx(Q,{content:"Switch camera",placement:z.TOP_RIGHT,children:h.jsx(J,{kind:Z.MINIMAL,onClick:i,children:h.jsx(O,{content:$,size:"twoXL",color:_.white})})})}),je=S.memo(Ie);var k={exports:{}},Pe=k.exports,N;function Fe(){return N||(N=1,function(i,l){(function(e,o){i.exports=o(K())})(Pe,function(e){return function(o){var a={};function s(n){if(a[n])return a[n].exports;var p=a[n]={i:n,l:!1,exports:{}};return o[n].call(p.exports,p,p.exports,s),p.l=!0,p.exports}return s.m=o,s.c=a,s.d=function(n,p,y){s.o(n,p)||Object.defineProperty(n,p,{enumerable:!0,get:y})},s.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},s.t=function(n,p){if(p&1&&(n=s(n)),p&8||p&4&&typeof n=="object"&&n&&n.__esModule)return n;var y=Object.create(null);if(s.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:n}),p&2&&typeof n!="string")for(var C in n)s.d(y,C,(function(U){return n[U]}).bind(null,C));return y},s.n=function(n){var p=n&&n.__esModule?function(){return n.default}:function(){return n};return s.d(p,"a",p),p},s.o=function(n,p){return Object.prototype.hasOwnProperty.call(n,p)},s.p="",s(s.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(o,a,s){s.r(a);var n=s("react"),p=function(){var g=function(u,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,c){r.__proto__=c}||function(r,c){for(var d in c)c.hasOwnProperty(d)&&(r[d]=c[d])},g(u,t)};return function(u,t){g(u,t);function r(){this.constructor=u}u.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),y=function(){return y=Object.assign||function(g){for(var u,t=1,r=arguments.length;t<r;t++){u=arguments[t];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(g[c]=u[c])}return g},y.apply(this,arguments)},C=function(g,u){var t={};for(var r in g)Object.prototype.hasOwnProperty.call(g,r)&&u.indexOf(r)<0&&(t[r]=g[r]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(g);c<r.length;c++)u.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(g,r[c])&&(t[r[c]]=g[r[c]]);return t};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(g){var u=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return u?new Promise(function(t,r){u.call(navigator,g,t,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function U(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var I=function(g){p(u,g);function u(t){var r=g.call(this,t)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return u.prototype.componentDidMount=function(){var t=this,r=t.state,c=t.props;if(this.unmounted=!1,!U()){c.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),c.children&&typeof c.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(t){var r=this.props;if(!U()){r.onUserMediaError("getUserMedia not supported");return}var c=JSON.stringify(t.audioConstraints)!==JSON.stringify(r.audioConstraints),d=JSON.stringify(t.videoConstraints)!==JSON.stringify(r.videoConstraints),w=t.minScreenshotWidth!==r.minScreenshotWidth,v=t.minScreenshotHeight!==r.minScreenshotHeight;(d||w||v)&&(this.canvas=null,this.ctx=null),(c||d)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(t){t&&(t.getVideoTracks&&t.getAudioTracks?(t.getVideoTracks().map(function(r){t.removeTrack(r),r.stop()}),t.getAudioTracks().map(function(r){t.removeTrack(r),r.stop()})):t.stop())},u.prototype.stopAndCleanup=function(){var t=this.state;t.hasUserMedia&&(u.stopMediaStream(this.stream),t.src&&window.URL.revokeObjectURL(t.src))},u.prototype.getScreenshot=function(t){var r=this,c=r.state,d=r.props;if(!c.hasUserMedia)return null;var w=this.getCanvas(t);return w&&w.toDataURL(d.screenshotFormat,d.screenshotQuality)},u.prototype.getCanvas=function(t){var r=this,c=r.state,d=r.props;if(!this.video||!c.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var w=this.video.videoWidth,v=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var m=w/v;w=d.minScreenshotWidth||this.video.clientWidth,v=w/m,d.minScreenshotHeight&&v<d.minScreenshotHeight&&(v=d.minScreenshotHeight,w=v*m)}this.canvas=document.createElement("canvas"),this.canvas.width=(t==null?void 0:t.width)||w,this.canvas.height=(t==null?void 0:t.height)||v,this.ctx=this.canvas.getContext("2d")}var M=this,b=M.ctx,f=M.canvas;return b&&f&&(f.width=(t==null?void 0:t.width)||f.width,f.height=(t==null?void 0:t.height)||f.height,d.mirrored&&(b.translate(f.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=d.imageSmoothing,b.drawImage(this.video,0,0,(t==null?void 0:t.width)||f.width,(t==null?void 0:t.height)||f.height),d.mirrored&&(b.scale(-1,1),b.translate(-f.width,0))),f},u.prototype.requestUserMedia=function(){var t=this,r=this.props,c=function(v,m){var M={video:typeof m<"u"?m:!0};r.audio&&(M.audio=typeof v<"u"?v:!0),t.requestUserMediaId++;var b=t.requestUserMediaId;navigator.mediaDevices.getUserMedia(M).then(function(f){t.unmounted||b!==t.requestUserMediaId?u.stopMediaStream(f):t.handleUserMedia(null,f)}).catch(function(f){t.handleUserMedia(f)})};if("mediaDevices"in navigator)c(r.audioConstraints,r.videoConstraints);else{var d=function(v){return{optional:[{sourceId:v}]}},w=function(v){var m=v.deviceId;return typeof m=="string"?m:Array.isArray(m)&&m.length>0?m[0]:typeof m=="object"&&m.ideal?m.ideal:null};MediaStreamTrack.getSources(function(v){var m=null,M=null;v.forEach(function(j){j.kind==="audio"?m=j.id:j.kind==="video"&&(M=j.id)});var b=w(r.audioConstraints);b&&(m=b);var f=w(r.videoConstraints);f&&(M=f),c(d(m),d(M))})}},u.prototype.handleUserMedia=function(t,r){var c=this.props;if(t||!r){this.setState({hasUserMedia:!1}),c.onUserMediaError(t);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}c.onUserMedia(r)},u.prototype.render=function(){var t=this,r=this,c=r.state,d=r.props,w=d.audio;d.forceScreenshotSourceSize;var v=d.disablePictureInPicture;d.onUserMedia,d.onUserMediaError,d.screenshotFormat,d.screenshotQuality,d.minScreenshotWidth,d.minScreenshotHeight,d.audioConstraints,d.videoConstraints,d.imageSmoothing;var m=d.mirrored,M=d.style,b=M===void 0?{}:M,f=d.children,j=C(d,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),B=m?y(y({},b),{transform:(b.transform||"")+" scaleX(-1)"}):b,G={getScreenshot:this.getScreenshot.bind(this)};return n.createElement(n.Fragment,null,n.createElement("video",y({autoPlay:!0,disablePictureInPicture:v,src:c.src,muted:!w,playsInline:!0,ref:function(X){t.video=X},style:B},j)),f&&f(G))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(n.Component);a.default=I},react:function(o,a){o.exports=e}}).default})}(k)),k.exports}var Re=Fe();const Ee=Y(Re),Oe=({width:i})=>h.jsxs(T,{width:i,children:[h.jsx(O,{size:"threeXL",color:_.gray60,content:D}),h.jsxs(ye,{children:["This app would like to use your camera.",h.jsx(be,{href:ie,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),Te=({handleCapture:i,width:l,disabled:e,clearPhotoInProgress:o,setClearPhotoInProgress:a,facingMode:s,setFacingMode:n,testOverride:p})=>{const[y,C]=S.useState(p||"pending"),U=S.useRef(null),[I,g]=S.useState(l),u=S.useCallback(ee(1e3,g),[]);S.useEffect(()=>{u(l)},[l,u]);function t(){if(U.current!==null){const c=U.current.getScreenshot();i(c)}}const r=te();return h.jsxs(H,{"data-testid":"stCameraInputWebcamComponent",children:[y!=="success"&&!e&&!o?h.jsx(Oe,{width:I}):re.isMobile&&h.jsx(je,{switchFacingMode:n}),h.jsx(T,{"data-testid":"stCameraInputWebcamStyledBox",hidden:y!=="success"&&!e&&!o,width:I,children:!e&&h.jsx(Ee,{audio:!1,ref:U,screenshotFormat:"image/jpeg",screenshotQuality:1,width:I,height:I*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{C("error")},onUserMedia:()=>{C("success"),a(!1)},videoConstraints:{width:{ideal:I},facingMode:s}})}),h.jsx(A,{onClick:t,disabled:y!=="success"||e||o,children:"Take Photo"})]})},ke=S.memo(Te),ze=150,_e=ae.getLogger("CameraInput");class Ve extends oe.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new ge,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState(e=>({facingMode:e.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=e=>{if(e===null)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});const o=a=>new Promise(s=>setTimeout(s,a));return Le(e,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(s=>({file:a,fileUrls:s[0]}))).then(({file:a,fileUrls:s})=>this.uploadFile(s,a)).then(()=>o(ze)).then(()=>{this.setState((a,s)=>({imgSrc:e,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{_e.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(e=>this.deleteFile(e.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const e=this.createWidgetValue(),{element:o,widgetMgr:a,fragmentId:s}=this.props,n=a.getFileUploaderStateValue(o);ne(e,n)||a.setFileUploaderStateValue(o,e,{fromUi:!0},s)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const e=this.createWidgetValue();if(P(e))return;this.setState({imgSrc:null});const{widgetMgr:o,element:a,fragmentId:s}=this.props;o.setFileUploaderStateValue(a,e,{fromUi:!0},s)})},this.deleteFile=e=>{const o=this.getFile(e);P(o)||(o.status.type==="uploading"&&o.status.cancelToken.cancel(),o.status.type==="uploaded"&&o.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(o.status.fileUrls.deleteUrl),this.removeFile(e))},this.addFile=e=>{this.setState(o=>({files:[...o.files,e]}))},this.removeFile=e=>{this.setState(o=>({files:o.files.filter(a=>a.id!==e)}))},this.getFile=e=>this.state.files.find(o=>o.id===e),this.updateFile=(e,o)=>{this.setState(a=>({files:a.files.map(s=>s.id===e?o:s)}))},this.onUploadComplete=(e,o)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(e);P(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:o.fileId,fileUrls:o}))},this.onUploadProgress=(e,o)=>{const a=this.getFile(o);if(P(a)||a.status.type!=="uploading")return;const s=Math.round(e.loaded*100/e.total);a.status.progress!==s&&this.updateFile(o,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:s}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(e,o)=>{const a=V.CancelToken.source(),s=new L(o.name,o.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e.uploadUrl,o,n=>this.onUploadProgress(n,s.id),a.token).then(()=>this.onUploadComplete(s.id,e)).catch(n=>{V.isCancel(n)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:n?n.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:e,element:o}=this.props,a=e.getFileUploaderStateValue(o);if(P(a))return l;const{uploadedFileInfo:s}=a;return P(s)||s.length===0?l:{files:s.map(n=>{const p=n.name,y=n.size,C=n.fileId,U=n.fileUrls;return new L(p,y,this.nextLocalFileId(),{type:"uploaded",fileId:C,fileUrls:U})}),imgSrc:s.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=e=>e.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:e,widgetMgr:o,fragmentId:a}=this.props;o.getFileUploaderStateValue(e)===void 0&&o.setFileUploaderStateValue(e,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(e=>e.status.type==="uploaded").map(e=>{const{name:o,size:a,status:s}=e;return new le({fileId:s.fileId,fileUrls:s.fileUrls,name:o,size:a})});return new de({uploadedFileInfo:l})}render(){var l;const{element:e,widgetMgr:o,disabled:a,width:s}=this.props;return this.formClearHelper.manageFormClearListener(o,e.formId,this.onFormCleared),h.jsxs(H,{className:"stCameraInput","data-testid":"stCameraInput",children:[h.jsx(ce,{label:e.label,disabled:a,labelVisibility:ue((l=e.labelVisibility)==null?void 0:l.value),children:e.help&&h.jsx(he,{children:h.jsx(pe,{content:e.help,placement:z.TOP_RIGHT})})}),this.state.imgSrc?h.jsxs(h.Fragment,{children:[h.jsx(T,{width:s,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&h.jsx(Se,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:s,height:s*9/16})}),h.jsx(A,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||a,children:this.getProgress()?"Uploading...":h.jsxs(we,{children:[h.jsx(O,{content:W,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):h.jsx(ke,{handleCapture:this.handleCapture,width:s,disabled:a,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Le(i,l){return fetch(i).then(e=>e.arrayBuffer()).then(e=>new File([e],l,{type:"image/jpeg"}))}const De=se(Ve);export{De as default};
|
|
1
|
+
import{r as S,E as R,_ as E,c as x,I as q,j as h,c0 as Q,bI as z,bW as J,bD as Z,bX as O,c8 as _,e as K,g as Y,bf as ee,A as te,c9 as re,ca as ie,cb as se,R as oe,l as ae,b3 as ne,L as P,bT as le,bS as de,bZ as ce,b_ as ue,cc as he,b$ as pe}from"./index-DBR7DuB2.js";import{a as V}from"./index-xsH4HHeE.js";import{F as ge}from"./FormClearHelper-CDpP2KTI.js";import{U as L}from"./UploadFileInfo-C-jY39rj.js";import{P as fe,S as me}from"./ProgressBar-DcxHFtM-.js";var D=S.forwardRef(function(i,l){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return S.createElement(R,E({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),S.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});D.displayName="Video";var W=S.forwardRef(function(i,l){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return S.createElement(R,E({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),S.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});W.displayName="X";var $=S.forwardRef(function(i,l){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return S.createElement(R,E({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},i,{ref:l}),S.createElement("rect",{width:24,height:24,fill:"none"}),S.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});$.displayName="SwitchCamera";function ve(i,l){switch(i){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const H=x("div",{target:"etz5kuj9"})({name:"b6gpc",styles:"position:relative;overflow:hidden;width:100%;object-fit:contain"}),T=x("div",{target:"etz5kuj8"})(({theme:i,width:l})=>({backgroundColor:i.colors.secondaryBg,borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),""),ye=x("p",{target:"etz5kuj7"})(({theme:i})=>({marginTop:i.spacing.sm,textAlign:"center"}),""),Se=x("img",{target:"etz5kuj6"})(({theme:i,opacity:l})=>({borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,objectFit:"contain",opacity:l}),""),be=x("a",{target:"etz5kuj5"})(({theme:i})=>({color:i.colors.primary,display:"block",textDecoration:"none"}),""),we=x("span",{target:"etz5kuj4"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),Me=x("div",{target:"etz5kuj3"})(({theme:i})=>({position:"absolute",top:i.spacing.lg,right:i.spacing.lg,zIndex:i.zIndices.priority,color:i.colors.fadedText40,mixBlendMode:"difference",opacity:.6}),""),Ue=x("div",{target:"etz5kuj1"})({name:"1yoks5w",styles:"height:fit-content;width:100%;position:absolute;bottom:0"}),Ce=x("button",{target:"etz5kuj0"})(({theme:i})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:i.colors.lightenedBg05,border:`${i.sizes.borderWidth} solid ${i.colors.borderColor}`,borderRadius:`0 0 ${i.radii.default} ${i.radii.default}`,"&:hover":{borderColor:i.colors.primary,color:i.colors.primary},"&:active":{color:i.colors.white,borderColor:i.colors.primary,backgroundColor:i.colors.primary},"&:focus:not(:active)":{borderColor:i.colors.primary,color:i.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText40,borderColor:i.colors.borderColor,backgroundColor:i.colors.lightenedBg05,cursor:"not-allowed"},fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,margin:i.spacing.none,lineHeight:i.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${q(i.colors.primary,.5)}`},...ve("medium",i)}),"");function xe({disabled:i,onClick:l,children:e,progress:o}){return h.jsxs(Ce,{disabled:i||!1,onClick:l||(()=>{}),progress:o||null,"data-testid":"stCameraInputButton",children:[e,o?h.jsx(Ue,{children:h.jsx(fe,{value:o,size:me.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const A=S.memo(xe);var F=(i=>(i.USER="user",i.ENVIRONMENT="environment",i))(F||{});const Ie=({switchFacingMode:i})=>h.jsx(Me,{"data-testid":"stCameraInputSwitchButton",children:h.jsx(Q,{content:"Switch camera",placement:z.TOP_RIGHT,children:h.jsx(J,{kind:Z.MINIMAL,onClick:i,children:h.jsx(O,{content:$,size:"twoXL",color:_.white})})})}),je=S.memo(Ie);var k={exports:{}},Pe=k.exports,N;function Fe(){return N||(N=1,function(i,l){(function(e,o){i.exports=o(K())})(Pe,function(e){return function(o){var a={};function s(n){if(a[n])return a[n].exports;var p=a[n]={i:n,l:!1,exports:{}};return o[n].call(p.exports,p,p.exports,s),p.l=!0,p.exports}return s.m=o,s.c=a,s.d=function(n,p,y){s.o(n,p)||Object.defineProperty(n,p,{enumerable:!0,get:y})},s.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},s.t=function(n,p){if(p&1&&(n=s(n)),p&8||p&4&&typeof n=="object"&&n&&n.__esModule)return n;var y=Object.create(null);if(s.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:n}),p&2&&typeof n!="string")for(var C in n)s.d(y,C,(function(U){return n[U]}).bind(null,C));return y},s.n=function(n){var p=n&&n.__esModule?function(){return n.default}:function(){return n};return s.d(p,"a",p),p},s.o=function(n,p){return Object.prototype.hasOwnProperty.call(n,p)},s.p="",s(s.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(o,a,s){s.r(a);var n=s("react"),p=function(){var g=function(u,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,c){r.__proto__=c}||function(r,c){for(var d in c)c.hasOwnProperty(d)&&(r[d]=c[d])},g(u,t)};return function(u,t){g(u,t);function r(){this.constructor=u}u.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),y=function(){return y=Object.assign||function(g){for(var u,t=1,r=arguments.length;t<r;t++){u=arguments[t];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(g[c]=u[c])}return g},y.apply(this,arguments)},C=function(g,u){var t={};for(var r in g)Object.prototype.hasOwnProperty.call(g,r)&&u.indexOf(r)<0&&(t[r]=g[r]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(g);c<r.length;c++)u.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(g,r[c])&&(t[r[c]]=g[r[c]]);return t};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(g){var u=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return u?new Promise(function(t,r){u.call(navigator,g,t,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function U(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var I=function(g){p(u,g);function u(t){var r=g.call(this,t)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return u.prototype.componentDidMount=function(){var t=this,r=t.state,c=t.props;if(this.unmounted=!1,!U()){c.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),c.children&&typeof c.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(t){var r=this.props;if(!U()){r.onUserMediaError("getUserMedia not supported");return}var c=JSON.stringify(t.audioConstraints)!==JSON.stringify(r.audioConstraints),d=JSON.stringify(t.videoConstraints)!==JSON.stringify(r.videoConstraints),w=t.minScreenshotWidth!==r.minScreenshotWidth,v=t.minScreenshotHeight!==r.minScreenshotHeight;(d||w||v)&&(this.canvas=null,this.ctx=null),(c||d)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(t){t&&(t.getVideoTracks&&t.getAudioTracks?(t.getVideoTracks().map(function(r){t.removeTrack(r),r.stop()}),t.getAudioTracks().map(function(r){t.removeTrack(r),r.stop()})):t.stop())},u.prototype.stopAndCleanup=function(){var t=this.state;t.hasUserMedia&&(u.stopMediaStream(this.stream),t.src&&window.URL.revokeObjectURL(t.src))},u.prototype.getScreenshot=function(t){var r=this,c=r.state,d=r.props;if(!c.hasUserMedia)return null;var w=this.getCanvas(t);return w&&w.toDataURL(d.screenshotFormat,d.screenshotQuality)},u.prototype.getCanvas=function(t){var r=this,c=r.state,d=r.props;if(!this.video||!c.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var w=this.video.videoWidth,v=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var m=w/v;w=d.minScreenshotWidth||this.video.clientWidth,v=w/m,d.minScreenshotHeight&&v<d.minScreenshotHeight&&(v=d.minScreenshotHeight,w=v*m)}this.canvas=document.createElement("canvas"),this.canvas.width=(t==null?void 0:t.width)||w,this.canvas.height=(t==null?void 0:t.height)||v,this.ctx=this.canvas.getContext("2d")}var M=this,b=M.ctx,f=M.canvas;return b&&f&&(f.width=(t==null?void 0:t.width)||f.width,f.height=(t==null?void 0:t.height)||f.height,d.mirrored&&(b.translate(f.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=d.imageSmoothing,b.drawImage(this.video,0,0,(t==null?void 0:t.width)||f.width,(t==null?void 0:t.height)||f.height),d.mirrored&&(b.scale(-1,1),b.translate(-f.width,0))),f},u.prototype.requestUserMedia=function(){var t=this,r=this.props,c=function(v,m){var M={video:typeof m<"u"?m:!0};r.audio&&(M.audio=typeof v<"u"?v:!0),t.requestUserMediaId++;var b=t.requestUserMediaId;navigator.mediaDevices.getUserMedia(M).then(function(f){t.unmounted||b!==t.requestUserMediaId?u.stopMediaStream(f):t.handleUserMedia(null,f)}).catch(function(f){t.handleUserMedia(f)})};if("mediaDevices"in navigator)c(r.audioConstraints,r.videoConstraints);else{var d=function(v){return{optional:[{sourceId:v}]}},w=function(v){var m=v.deviceId;return typeof m=="string"?m:Array.isArray(m)&&m.length>0?m[0]:typeof m=="object"&&m.ideal?m.ideal:null};MediaStreamTrack.getSources(function(v){var m=null,M=null;v.forEach(function(j){j.kind==="audio"?m=j.id:j.kind==="video"&&(M=j.id)});var b=w(r.audioConstraints);b&&(m=b);var f=w(r.videoConstraints);f&&(M=f),c(d(m),d(M))})}},u.prototype.handleUserMedia=function(t,r){var c=this.props;if(t||!r){this.setState({hasUserMedia:!1}),c.onUserMediaError(t);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}c.onUserMedia(r)},u.prototype.render=function(){var t=this,r=this,c=r.state,d=r.props,w=d.audio;d.forceScreenshotSourceSize;var v=d.disablePictureInPicture;d.onUserMedia,d.onUserMediaError,d.screenshotFormat,d.screenshotQuality,d.minScreenshotWidth,d.minScreenshotHeight,d.audioConstraints,d.videoConstraints,d.imageSmoothing;var m=d.mirrored,M=d.style,b=M===void 0?{}:M,f=d.children,j=C(d,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),B=m?y(y({},b),{transform:(b.transform||"")+" scaleX(-1)"}):b,G={getScreenshot:this.getScreenshot.bind(this)};return n.createElement(n.Fragment,null,n.createElement("video",y({autoPlay:!0,disablePictureInPicture:v,src:c.src,muted:!w,playsInline:!0,ref:function(X){t.video=X},style:B},j)),f&&f(G))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(n.Component);a.default=I},react:function(o,a){o.exports=e}}).default})}(k)),k.exports}var Re=Fe();const Ee=Y(Re),Oe=({width:i})=>h.jsxs(T,{width:i,children:[h.jsx(O,{size:"threeXL",color:_.gray60,content:D}),h.jsxs(ye,{children:["This app would like to use your camera.",h.jsx(be,{href:ie,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),Te=({handleCapture:i,width:l,disabled:e,clearPhotoInProgress:o,setClearPhotoInProgress:a,facingMode:s,setFacingMode:n,testOverride:p})=>{const[y,C]=S.useState(p||"pending"),U=S.useRef(null),[I,g]=S.useState(l),u=S.useCallback(ee(1e3,g),[]);S.useEffect(()=>{u(l)},[l,u]);function t(){if(U.current!==null){const c=U.current.getScreenshot();i(c)}}const r=te();return h.jsxs(H,{"data-testid":"stCameraInputWebcamComponent",children:[y!=="success"&&!e&&!o?h.jsx(Oe,{width:I}):re.isMobile&&h.jsx(je,{switchFacingMode:n}),h.jsx(T,{"data-testid":"stCameraInputWebcamStyledBox",hidden:y!=="success"&&!e&&!o,width:I,children:!e&&h.jsx(Ee,{audio:!1,ref:U,screenshotFormat:"image/jpeg",screenshotQuality:1,width:I,height:I*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{C("error")},onUserMedia:()=>{C("success"),a(!1)},videoConstraints:{width:{ideal:I},facingMode:s}})}),h.jsx(A,{onClick:t,disabled:y!=="success"||e||o,children:"Take Photo"})]})},ke=S.memo(Te),ze=150,_e=ae.getLogger("CameraInput");class Ve extends oe.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new ge,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState(e=>({facingMode:e.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=e=>{if(e===null)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});const o=a=>new Promise(s=>setTimeout(s,a));return Le(e,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(s=>({file:a,fileUrls:s[0]}))).then(({file:a,fileUrls:s})=>this.uploadFile(s,a)).then(()=>o(ze)).then(()=>{this.setState((a,s)=>({imgSrc:e,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{_e.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(e=>this.deleteFile(e.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const e=this.createWidgetValue(),{element:o,widgetMgr:a,fragmentId:s}=this.props,n=a.getFileUploaderStateValue(o);ne(e,n)||a.setFileUploaderStateValue(o,e,{fromUi:!0},s)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const e=this.createWidgetValue();if(P(e))return;this.setState({imgSrc:null});const{widgetMgr:o,element:a,fragmentId:s}=this.props;o.setFileUploaderStateValue(a,e,{fromUi:!0},s)})},this.deleteFile=e=>{const o=this.getFile(e);P(o)||(o.status.type==="uploading"&&o.status.cancelToken.cancel(),o.status.type==="uploaded"&&o.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(o.status.fileUrls.deleteUrl),this.removeFile(e))},this.addFile=e=>{this.setState(o=>({files:[...o.files,e]}))},this.removeFile=e=>{this.setState(o=>({files:o.files.filter(a=>a.id!==e)}))},this.getFile=e=>this.state.files.find(o=>o.id===e),this.updateFile=(e,o)=>{this.setState(a=>({files:a.files.map(s=>s.id===e?o:s)}))},this.onUploadComplete=(e,o)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(e);P(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:o.fileId,fileUrls:o}))},this.onUploadProgress=(e,o)=>{const a=this.getFile(o);if(P(a)||a.status.type!=="uploading")return;const s=Math.round(e.loaded*100/e.total);a.status.progress!==s&&this.updateFile(o,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:s}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(e,o)=>{const a=V.CancelToken.source(),s=new L(o.name,o.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e.uploadUrl,o,n=>this.onUploadProgress(n,s.id),a.token).then(()=>this.onUploadComplete(s.id,e)).catch(n=>{V.isCancel(n)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:n?n.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:e,element:o}=this.props,a=e.getFileUploaderStateValue(o);if(P(a))return l;const{uploadedFileInfo:s}=a;return P(s)||s.length===0?l:{files:s.map(n=>{const p=n.name,y=n.size,C=n.fileId,U=n.fileUrls;return new L(p,y,this.nextLocalFileId(),{type:"uploaded",fileId:C,fileUrls:U})}),imgSrc:s.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=e=>e.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:e,widgetMgr:o,fragmentId:a}=this.props;o.getFileUploaderStateValue(e)===void 0&&o.setFileUploaderStateValue(e,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(e=>e.status.type==="uploaded").map(e=>{const{name:o,size:a,status:s}=e;return new le({fileId:s.fileId,fileUrls:s.fileUrls,name:o,size:a})});return new de({uploadedFileInfo:l})}render(){var l;const{element:e,widgetMgr:o,disabled:a,width:s}=this.props;return this.formClearHelper.manageFormClearListener(o,e.formId,this.onFormCleared),h.jsxs(H,{className:"stCameraInput","data-testid":"stCameraInput",children:[h.jsx(ce,{label:e.label,disabled:a,labelVisibility:ue((l=e.labelVisibility)==null?void 0:l.value),children:e.help&&h.jsx(he,{children:h.jsx(pe,{content:e.help,placement:z.TOP_RIGHT})})}),this.state.imgSrc?h.jsxs(h.Fragment,{children:[h.jsx(T,{width:s,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&h.jsx(Se,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:s,height:s*9/16})}),h.jsx(A,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||a,children:this.getProgress()?"Uploading...":h.jsxs(we,{children:[h.jsx(O,{content:W,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):h.jsx(ke,{handleCapture:this.handleCapture,width:s,disabled:a,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Le(i,l){return fetch(i).then(e=>e.arrayBuffer()).then(e=>new File([e],l,{type:"image/jpeg"}))}const De=se(Ve);export{De as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,A as T,D as y,j as s,cg as L,ch as $,b_ as w,b5 as C,c5 as S,b$ as R,bI as W,I as v,ci as B}from"./index-
|
|
1
|
+
import{r as f,A as T,D as y,j as s,cg as L,ch as $,b_ as w,b5 as C,c5 as S,b$ as R,bI as W,I as v,ci as B}from"./index-DBR7DuB2.js";import{a as j}from"./useBasicWidgetState-BC4jGsyb.js";import{S as X,L as H,a as p}from"./checkbox-88xaX78x.js";import"./FormClearHelper-CDpP2KTI.js";function I({element:e,disabled:a,widgetMgr:c,fragmentId:n}){var g;const[x,h]=j({getStateFromWidgetMgr:M,getDefaultStateFromProto:V,getCurrStateFromProto:F,updateWidgetMgrState:P,element:e,widgetMgr:c,fragmentId:n}),k=f.useCallback(i=>{h({value:i.target.checked,fromUi:!0})},[h]),t=T(),{colors:o,spacing:b,sizes:r}=t,m=y(t),u=a?o.fadedText40:o.bodyText;return s.jsx(L,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:s.jsx(X,{checked:x,disabled:a,onChange:k,"aria-label":e.label,checkmarkType:e.type===B.StyleType.TOGGLE?p.toggle:p.default,labelPlacement:H.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:b.none,marginTop:b.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let d=m?o.bgColor:o.bodyText;return a&&(d=m?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:d,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:d})=>{let l=o.fadedText40;return d&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:d})=>{const l=d&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&d?`0 0 0 0.2rem ${v(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:u}}},children:s.jsxs($,{visibility:w((g=e.labelVisibility)==null?void 0:g.value),"data-testid":"stWidgetLabel",children:[s.jsx(C,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&s.jsx(S,{color:u,children:s.jsx(R,{content:e.help,placement:W.TOP_RIGHT})})]})})})}function M(e,a){return e.getBoolValue(a)}function V(e){return e.default??null}function F(e){return e.value??null}function P(e,a,c,n){a.setBoolValue(e,c.value,{fromUi:c.fromUi},n)}const U=f.memo(I);export{U as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as i,k as r,r as l,j as t}from"./index-
|
|
1
|
+
import{c as i,k as r,r as l,j as t}from"./index-DBR7DuB2.js";import{R as m,P as p}from"./RenderInPortalIfExists-BIfvAZjR.js";const c="/assets/balloon-0.Czj7AKwE.png",g="/assets/balloon-1.CNvFFrND.png",d="/assets/balloon-2.DTvC6B1t.png",x="/assets/balloon-3.CgSk4tbL.png",f="/assets/balloon-4.mbtFrzxf.png",b="/assets/balloon-5.CSwkUfRA.png",n=300,h=121,s=20,u=80,C=1e3,N=r`
|
|
2
2
|
from {
|
|
3
3
|
transform: translateY(calc(100vh + ${n}px));
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,r as b,R as p,b7 as h,bH as x,A as f,j as t,bF as k,bI as m,F as C,b5 as v}from"./index-
|
|
1
|
+
import{c as s,r as b,R as p,b7 as h,bH as x,A as f,j as t,bF as k,bI as m,F as C,b5 as v}from"./index-DBR7DuB2.js";const j=s("div",{target:"e11k5jya2"})(({containerWidth:r})=>({display:"flex",flexDirection:"column",width:r?"100%":"fit-content"}),""),L=s("a",{target:"e11k5jya1"})(({disabled:r,isCurrentPage:o,containerWidth:i,theme:e})=>({textDecoration:"none",width:i?"100%":"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:o?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:o?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...r?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}}),""),w=s("span",{target:"e11k5jya0"})(({disabled:r,theme:o})=>({color:o.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function T(r,o){return r===null&&o?!0:r===null&&!o?!1:r===!0}function y(r){const{onPageChange:o,currentPageScriptHash:i}=p.useContext(h),e=p.useContext(x),{colors:d}=f(),{disabled:n,element:a}=r,l=T(a.useContainerWidth,e),c=i===a.pageScriptHash,u=g=>{a.external?n&&g.preventDefault():(g.preventDefault(),n||o(a.pageScriptHash))};return t.jsx("div",{className:"stPageLink","data-testid":"stPageLink",children:t.jsx(k,{help:a.help,placement:m.TOP_RIGHT,containerWidth:l,children:t.jsx(j,{containerWidth:l,children:t.jsxs(L,{"data-testid":"stPageLink-NavLink",disabled:n,isCurrentPage:c,containerWidth:l,href:a.page,target:a.external?"_blank":"",rel:"noreferrer",onClick:u,children:[a.icon&&t.jsx(C,{size:"lg",color:n?d.fadedText40:d.bodyText,iconValue:a.icon}),t.jsx(w,{disabled:n,children:t.jsx(v,{source:a.label,allowHTML:!1,isLabel:!0,boldLabel:c,largerLabel:!0,disableLinks:!0})})]})})})})}const H=b.memo(y);export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,r as a,u as U,bA as w,bQ as j,j as f,l as x}from"./index-
|
|
1
|
+
import{c as P,r as a,u as U,bA as w,bQ as j,j as f,l as x}from"./index-DBR7DuB2.js";const A=P("iframe",{target:"evvcert0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"}),""),O=x.getLogger("Video"),$={width:"100%"};function k({element:r,endpoints:s,elementMgr:m}){const i=a.useRef(null),{type:h,url:v,startTime:o,subtitles:y,endTime:c,loop:l,autoplay:T,muted:S}=r,p=U(v),u=w(y),b=a.useMemo(()=>{if(!r.id)return!0;const e=m.getElementState(r.id,"preventAutoplay");return e||m.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,m]),g=a.useMemo(()=>JSON.stringify(u?u.map(e=>s.buildMediaURL(`${e.url}`)):[]),[u,s]);a.useEffect(()=>{const e=JSON.parse(g);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[g,s]),a.useEffect(()=>{i.current&&(i.current.currentTime=o)},[o]),a.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),a.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const d=()=>{c>0&&e.currentTime>=c&&(l?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return c>0&&e.addEventListener("timeupdate",d),()=>{e&&c>0&&e.removeEventListener("timeupdate",d)}},[c,l,o]),a.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{l&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[l,o]);const L=e=>{const{startTime:t,endTime:d,loop:N,autoplay:R,muted:M}=r,n=new URL(e);if(t&&!isNaN(t)&&n.searchParams.append("start",t.toString()),d&&!isNaN(d)&&n.searchParams.append("end",d.toString()),N){n.searchParams.append("loop","1");const E=n.pathname.split("/").pop();E&&n.searchParams.append("playlist",E)}return R&&n.searchParams.append("autoplay","1"),M&&n.searchParams.append("mute","1"),n.toString()};if(h===j.Type.YOUTUBE_IFRAME)return f.jsx(A,{className:"stVideo","data-testid":"stVideo",title:p,src:L(p),allow:"autoplay; encrypted-media",allowFullScreen:!0});const V=e=>{const t=e.currentTarget.src;O.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return f.jsx("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:S,autoPlay:T&&!b,src:s.buildMediaURL(p),style:$,crossOrigin:void 0,onError:V,children:u&&u.map((e,t)=>f.jsx("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const J=a.memo(k);export{J as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,cn as vn,co as wn,cp as Dn,cq as Sn,e as Hr,cr as xr,g as Er,c1 as Q,ck as Fe,cl as We,cs as Ar,cj as On,c2 as z,B as kn,ct as Ir,cu as Mn,cv as Cn,cw as Lr,c3 as Ne,cx as Tr,cy as Rr,cz as $r,C as Pn,H as Br,A as jn,b7 as Fr,Q as Je,L as Hn,j as Ce,bZ as Wr,b_ as Nr,cc as Yr,b$ as zr,bI as xn,D as En,c0 as Vr,bX as qr,b5 as _r}from"./index-
|
|
1
|
+
import{r as m,cn as vn,co as wn,cp as Dn,cq as Sn,e as Hr,cr as xr,g as Er,c1 as Q,ck as Fe,cl as We,cs as Ar,cj as On,c2 as z,B as kn,ct as Ir,cu as Mn,cv as Cn,cw as Lr,c3 as Ne,cx as Tr,cy as Rr,cz as $r,C as Pn,H as Br,A as jn,b7 as Fr,Q as Je,L as Hn,j as Ce,bZ as Wr,b_ as Nr,cc as Yr,b$ as zr,bI as xn,D as En,c0 as Vr,bX as qr,b5 as _r}from"./index-DBR7DuB2.js";import{a as Ur}from"./useBasicWidgetState-BC4jGsyb.js";import{D as Ae,a as Ie,T as Xr}from"./timepicker-C6mPXMyQ.js";import{I as Qr}from"./input-B5lN60N1.js";import{I as Gr}from"./base-input-d2YUIz4t.js";import{E as Kr}from"./ErrorOutline.esm-7OKHB2M2.js";import"./FormClearHelper-CDpP2KTI.js";import"./inherits-BYCriLh4.js";import"./createSuper-D3Ul7yIL.js";var Jr=["title","size","color","overrides"];function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},gt.apply(this,arguments)}function Zr(e,t){if(e==null)return{};var r=eo(e,t),o,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function eo(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,a;for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function to(e,t){return ao(e)||oo(e,t)||ro(e,t)||no()}function no(){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 ro(e,t){if(e){if(typeof e=="string")return An(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return An(e,t)}}function An(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function oo(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o=[],n=!0,a=!1,i,s;try{for(r=r.call(e);!(n=(i=r.next()).done)&&(o.push(i.value),!(t&&o.length===t));n=!0);}catch(c){a=!0,s=c}finally{try{!n&&r.return!=null&&r.return()}finally{if(a)throw s}}return o}}function ao(e){if(Array.isArray(e))return e}function io(e,t){var r=vn(),o=to(r,2),n=o[1],a=e.title,i=a===void 0?"Left":a,s=e.size,c=e.color,u=e.overrides,w=u===void 0?{}:u,d=Zr(e,Jr),f=wn({component:n.icons&&n.icons.ChevronLeft?n.icons.ChevronLeft:null},w&&w.Svg?Dn(w.Svg):{});return m.createElement(Sn,gt({viewBox:"0 0 24 24",ref:t,title:i,size:s,color:c,overrides:{Svg:f}},d),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const In=m.forwardRef(io);var so=["title","size","color","overrides"];function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},yt.apply(this,arguments)}function lo(e,t){if(e==null)return{};var r=uo(e,t),o,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function uo(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,a;for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function co(e,t){return mo(e)||ho(e,t)||fo(e,t)||po()}function po(){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 fo(e,t){if(e){if(typeof e=="string")return Ln(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ln(e,t)}}function Ln(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function ho(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o=[],n=!0,a=!1,i,s;try{for(r=r.call(e);!(n=(i=r.next()).done)&&(o.push(i.value),!(t&&o.length===t));n=!0);}catch(c){a=!0,s=c}finally{try{!n&&r.return!=null&&r.return()}finally{if(a)throw s}}return o}}function mo(e){if(Array.isArray(e))return e}function go(e,t){var r=vn(),o=co(r,2),n=o[1],a=e.title,i=a===void 0?"Right":a,s=e.size,c=e.color,u=e.overrides,w=u===void 0?{}:u,d=lo(e,so),f=wn({component:n.icons&&n.icons.ChevronRight?n.icons.ChevronRight:null},w&&w.Svg?Dn(w.Svg):{});return m.createElement(Sn,yt({viewBox:"0 0 24 24",ref:t,title:i,size:s,color:c,overrides:{Svg:f}},d),m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 7.29289C8.90237 7.68342 8.90237 8.31658 9.29289 8.70711L12.5858 12L9.29289 15.2929C8.90237 15.6834 8.90237 16.3166 9.29289 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L14.7071 12.7071C14.8946 12.5196 15 12.2652 15 12C15 11.7348 14.8946 11.4804 14.7071 11.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289Z"}))}const Tn=m.forwardRef(go);var Rn={exports:{}},bt,$n;function yo(){if($n)return bt;$n=1;function e(p){return p&&typeof p=="object"&&"default"in p?p.default:p}var t=e(Hr()),r=xr();function o(p,v){for(var k=Object.getOwnPropertyNames(v),y=0;y<k.length;y++){var l=k[y],H=Object.getOwnPropertyDescriptor(v,l);H&&H.configurable&&p[l]===void 0&&Object.defineProperty(p,l,H)}return p}function n(){return(n=Object.assign||function(p){for(var v=1;v<arguments.length;v++){var k=arguments[v];for(var y in k)Object.prototype.hasOwnProperty.call(k,y)&&(p[y]=k[y])}return p}).apply(this,arguments)}function a(p,v){p.prototype=Object.create(v.prototype),o(p.prototype.constructor=p,v)}function i(p,v){if(p==null)return{};var k,y,l={},H=Object.keys(p);for(y=0;y<H.length;y++)k=H[y],0<=v.indexOf(k)||(l[k]=p[k]);return l}function s(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}var c=function(p,v,k,y,l,H,_,te){if(!p){var R;if(v===void 0)R=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var B=[k,y,l,H,_,te],Y=0;(R=new Error(v.replace(/%s/g,function(){return B[Y++]}))).name="Invariant Violation"}throw R.framesToPop=1,R}},u=c;function w(p,v,k){if("selectionStart"in p&&"selectionEnd"in p)p.selectionStart=v,p.selectionEnd=k;else{var y=p.createTextRange();y.collapse(!0),y.moveStart("character",v),y.moveEnd("character",k-v),y.select()}}function d(p){var v=0,k=0;if("selectionStart"in p&&"selectionEnd"in p)v=p.selectionStart,k=p.selectionEnd;else{var y=document.selection.createRange();y.parentElement()===p&&(v=-y.moveStart("character",-p.value.length),k=-y.moveEnd("character",-p.value.length))}return{start:v,end:k,length:k-v}}var f={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},b="_";function g(p,v,k){var y="",l="",H=null,_=[];if(v===void 0&&(v=b),k==null&&(k=f),!p||typeof p!="string")return{maskChar:v,formatChars:k,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var te=!1;return p.split("").forEach(function(R){te=!te&&R==="\\"||(te||!k[R]?(_.push(y.length),y.length===_.length-1&&(l+=R)):H=y.length+1,y+=R,!1)}),{maskChar:v,formatChars:k,prefix:l,mask:y,lastEditablePosition:H,permanents:_}}function h(p,v){return p.permanents.indexOf(v)!==-1}function S(p,v,k){var y=p.mask,l=p.formatChars;if(!k)return!1;if(h(p,v))return y[v]===k;var H=l[y[v]];return new RegExp(H).test(k)}function M(p,v){return v.split("").every(function(k,y){return h(p,y)||!S(p,y,k)})}function D(p,v){var k=p.maskChar,y=p.prefix;if(!k){for(;v.length>y.length&&h(p,v.length-1);)v=v.slice(0,v.length-1);return v.length}for(var l=y.length,H=v.length;H>=y.length;H--){var _=v[H];if(!h(p,H)&&S(p,H,_)){l=H+1;break}}return l}function O(p,v){return D(p,v)===p.mask.length}function C(p,v){var k=p.maskChar,y=p.mask,l=p.prefix;if(!k){for((v=L(p,"",v,0)).length<l.length&&(v=l);v.length<y.length&&h(p,v.length);)v+=y[v.length];return v}if(v)return L(p,C(p,""),v,0);for(var H=0;H<y.length;H++)h(p,H)?v+=y[H]:v+=k;return v}function N(p,v,k,y){var l=k+y,H=p.maskChar,_=p.mask,te=p.prefix,R=v.split("");if(H)return R.map(function(Y,ne){return ne<k||l<=ne?Y:h(p,ne)?_[ne]:H}).join("");for(var B=l;B<R.length;B++)h(p,B)&&(R[B]="");return k=Math.max(te.length,k),R.splice(k,l-k),v=R.join(""),C(p,v)}function L(p,v,k,y){var l=p.mask,H=p.maskChar,_=p.prefix,te=k.split(""),R=O(p,v);return!H&&y>v.length&&(v+=l.slice(v.length,y)),te.every(function(B){for(;se=B,h(p,U=y)&&se!==l[U];){if(y>=v.length&&(v+=l[y]),Y=B,ne=y,H&&h(p,ne)&&Y===H)return!0;if(++y>=l.length)return!1}var Y,ne,U,se;return!S(p,y,B)&&B!==H||(y<v.length?v=H||R||y<_.length?v.slice(0,y)+B+v.slice(y+1):(v=v.slice(0,y)+B+v.slice(y),C(p,v)):H||(v+=B),++y<l.length)}),v}function T(p,v,k,y){var l=p.mask,H=p.maskChar,_=k.split(""),te=y;return _.every(function(R){for(;Y=R,h(p,B=y)&&Y!==l[B];)if(++y>=l.length)return!1;var B,Y;return(S(p,y,R)||R===H)&&y++,y<l.length}),y-te}function $(p,v){for(var k=v;0<=k;--k)if(!h(p,k))return k;return null}function E(p,v){for(var k=p.mask,y=v;y<k.length;++y)if(!h(p,y))return y;return null}function A(p){return p||p===0?p+"":""}function I(p,v,k,y,l){var H=p.mask,_=p.prefix,te=p.lastEditablePosition,R=v,B="",Y=0,ne=0,U=Math.min(l.start,k.start);return k.end>l.start?ne=(Y=T(p,y,B=R.slice(l.start,k.end),U))?l.length:0:R.length<y.length&&(ne=y.length-R.length),R=y,ne&&(ne===1&&!l.length&&(U=l.start===k.start?E(p,k.start):$(p,k.start)),R=N(p,R,U,ne)),R=L(p,R,B,U),(U+=Y)>=H.length?U=H.length:U<_.length&&!Y?U=_.length:U>=_.length&&U<te&&Y&&(U=E(p,U)),B||(B=null),{value:R=C(p,R),enteredString:B,selection:{start:U,end:U}}}function x(){var p=new RegExp("windows","i"),v=new RegExp("phone","i"),k=navigator.userAgent;return p.test(k)&&v.test(k)}function j(p){return typeof p=="function"}function oe(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function K(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function Oe(p){return(K()?oe():function(){return setTimeout(p,1e3/60)})(p)}function W(p){(K()||clearTimeout)(p)}var $e=function(p){function v(y){var l=p.call(this,y)||this;l.focused=!1,l.mounted=!1,l.previousSelection=null,l.selectionDeferId=null,l.saveSelectionLoopDeferId=null,l.saveSelectionLoop=function(){l.previousSelection=l.getSelection(),l.saveSelectionLoopDeferId=Oe(l.saveSelectionLoop)},l.runSaveSelectionLoop=function(){l.saveSelectionLoopDeferId===null&&l.saveSelectionLoop()},l.stopSaveSelectionLoop=function(){l.saveSelectionLoopDeferId!==null&&(W(l.saveSelectionLoopDeferId),l.saveSelectionLoopDeferId=null,l.previousSelection=null)},l.getInputDOMNode=function(){if(!l.mounted)return null;var P=r.findDOMNode(s(s(l))),F=typeof window<"u"&&P instanceof window.Element;if(P&&!F)return null;if(P.nodeName!=="INPUT"&&(P=P.querySelector("input")),!P)throw new Error("react-input-mask: inputComponent doesn't contain input node");return P},l.getInputValue=function(){var P=l.getInputDOMNode();return P?P.value:null},l.setInputValue=function(P){var F=l.getInputDOMNode();F&&(l.value=P,F.value=P)},l.setCursorToEnd=function(){var P=D(l.maskOptions,l.value),F=E(l.maskOptions,P);F!==null&&l.setCursorPosition(F)},l.setSelection=function(P,F,X){X===void 0&&(X={});var V=l.getInputDOMNode(),J=l.isFocused();V&&J&&(X.deferred||w(V,P,F),l.selectionDeferId!==null&&W(l.selectionDeferId),l.selectionDeferId=Oe(function(){l.selectionDeferId=null,w(V,P,F)}),l.previousSelection={start:P,end:F,length:Math.abs(F-P)})},l.getSelection=function(){return d(l.getInputDOMNode())},l.getCursorPosition=function(){return l.getSelection().start},l.setCursorPosition=function(P){l.setSelection(P,P)},l.isFocused=function(){return l.focused},l.getBeforeMaskedValueChangeConfig=function(){var P=l.maskOptions,F=P.mask,X=P.maskChar,V=P.permanents,J=P.formatChars;return{mask:F,maskChar:X,permanents:V,alwaysShowMask:!!l.props.alwaysShowMask,formatChars:J}},l.isInputAutofilled=function(P,F,X,V){var J=l.getInputDOMNode();try{if(J.matches(":-webkit-autofill"))return!0}catch{}return!l.focused||V.end<X.length&&F.end===P.length},l.onChange=function(P){var F=s(s(l)).beforePasteState,X=s(s(l)).previousSelection,V=l.props.beforeMaskedValueChange,J=l.getInputValue(),me=l.value,fe=l.getSelection();l.isInputAutofilled(J,fe,me,X)&&(me=C(l.maskOptions,""),X={start:0,end:0,length:0}),F&&(X=F.selection,me=F.value,fe={start:X.start+J.length,end:X.start+J.length,length:0},J=me.slice(0,X.start)+J+me.slice(X.end),l.beforePasteState=null);var Me=I(l.maskOptions,J,fe,me,X),Ke=Me.enteredString,ye=Me.selection,Ee=Me.value;if(j(V)){var Be=V({value:Ee,selection:ye},{value:me,selection:X},Ke,l.getBeforeMaskedValueChangeConfig());Ee=Be.value,ye=Be.selection}l.setInputValue(Ee),j(l.props.onChange)&&l.props.onChange(P),l.isWindowsPhoneBrowser?l.setSelection(ye.start,ye.end,{deferred:!0}):l.setSelection(ye.start,ye.end)},l.onFocus=function(P){var F=l.props.beforeMaskedValueChange,X=l.maskOptions,V=X.mask,J=X.prefix;if(l.focused=!0,l.mounted=!0,V){if(l.value)D(l.maskOptions,l.value)<l.maskOptions.mask.length&&l.setCursorToEnd();else{var me=C(l.maskOptions,J),fe=C(l.maskOptions,me),Me=D(l.maskOptions,fe),Ke=E(l.maskOptions,Me),ye={start:Ke,end:Ke};if(j(F)){var Ee=F({value:fe,selection:ye},{value:l.value,selection:null},null,l.getBeforeMaskedValueChangeConfig());fe=Ee.value,ye=Ee.selection}var Be=fe!==l.getInputValue();Be&&l.setInputValue(fe),Be&&j(l.props.onChange)&&l.props.onChange(P),l.setSelection(ye.start,ye.end)}l.runSaveSelectionLoop()}j(l.props.onFocus)&&l.props.onFocus(P)},l.onBlur=function(P){var F=l.props.beforeMaskedValueChange,X=l.maskOptions.mask;if(l.stopSaveSelectionLoop(),l.focused=!1,X&&!l.props.alwaysShowMask&&M(l.maskOptions,l.value)){var V="";j(F)&&(V=F({value:V,selection:null},{value:l.value,selection:l.previousSelection},null,l.getBeforeMaskedValueChangeConfig()).value);var J=V!==l.getInputValue();J&&l.setInputValue(V),J&&j(l.props.onChange)&&l.props.onChange(P)}j(l.props.onBlur)&&l.props.onBlur(P)},l.onMouseDown=function(P){if(!l.focused&&document.addEventListener){l.mouseDownX=P.clientX,l.mouseDownY=P.clientY,l.mouseDownTime=new Date().getTime();var F=function X(V){if(document.removeEventListener("mouseup",X),l.focused){var J=Math.abs(V.clientX-l.mouseDownX),me=Math.abs(V.clientY-l.mouseDownY),fe=Math.max(J,me),Me=new Date().getTime()-l.mouseDownTime;(fe<=10&&Me<=200||fe<=5&&Me<=300)&&l.setCursorToEnd()}};document.addEventListener("mouseup",F)}j(l.props.onMouseDown)&&l.props.onMouseDown(P)},l.onPaste=function(P){j(l.props.onPaste)&&l.props.onPaste(P),P.defaultPrevented||(l.beforePasteState={value:l.getInputValue(),selection:l.getSelection()},l.setInputValue(""))},l.handleRef=function(P){l.props.children==null&&j(l.props.inputRef)&&l.props.inputRef(P)};var H=y.mask,_=y.maskChar,te=y.formatChars,R=y.alwaysShowMask,B=y.beforeMaskedValueChange,Y=y.defaultValue,ne=y.value;l.maskOptions=g(H,_,te),Y==null&&(Y=""),ne==null&&(ne=Y);var U=A(ne);if(l.maskOptions.mask&&(R||U)&&(U=C(l.maskOptions,U),j(B))){var se=y.value;y.value==null&&(se=Y),U=B({value:U,selection:null},{value:se=A(se),selection:null},null,l.getBeforeMaskedValueChangeConfig()).value}return l.value=U,l}a(v,p);var k=v.prototype;return k.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=x(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},k.componentDidUpdate=function(){var y=this.previousSelection,l=this.props,H=l.beforeMaskedValueChange,_=l.alwaysShowMask,te=l.mask,R=l.maskChar,B=l.formatChars,Y=this.maskOptions,ne=_||this.isFocused(),U=this.props.value!=null,se=U?A(this.props.value):this.value,P=y?y.start:null;if(this.maskOptions=g(te,R,B),this.maskOptions.mask){!Y.mask&&this.isFocused()&&this.runSaveSelectionLoop();var F=this.maskOptions.mask&&this.maskOptions.mask!==Y.mask;if(Y.mask||U||(se=this.getInputValue()),(F||this.maskOptions.mask&&(se||ne))&&(se=C(this.maskOptions,se)),F){var X=D(this.maskOptions,se);(P===null||X<P)&&(P=O(this.maskOptions,se)?X:E(this.maskOptions,X))}!this.maskOptions.mask||!M(this.maskOptions,se)||ne||U&&this.props.value||(se="");var V={start:P,end:P};if(j(H)){var J=H({value:se,selection:V},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());se=J.value,V=J.selection}this.value=se;var me=this.getInputValue()!==this.value;me?(this.setInputValue(this.value),this.forceUpdate()):F&&this.forceUpdate();var fe=!1;V.start!=null&&V.end!=null&&(fe=!y||y.start!==V.start||y.end!==V.end),(fe||me)&&this.setSelection(V.start,V.end)}else Y.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},k.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&W(this.selectionDeferId),this.stopSaveSelectionLoop()},k.render=function(){var y,l=this.props,H=(l.mask,l.alwaysShowMask,l.maskChar,l.formatChars,l.inputRef,l.beforeMaskedValueChange,l.children),_=i(l,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(H){j(H)||u(!1);var te=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],R=n({},_);te.forEach(function(Y){return delete R[Y]}),y=H(R),te.filter(function(Y){return y.props[Y]!=null&&y.props[Y]!==_[Y]}).length&&u(!1)}else y=t.createElement("input",n({ref:this.handleRef},_));var B={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(_.disabled||_.readOnly||(B.onChange=this.onChange,B.onPaste=this.onPaste,B.onMouseDown=this.onMouseDown),_.value!=null&&(B.value=this.value)),y=t.cloneElement(y,B)},v}(t.Component);return bt=$e,bt}var Bn;function bo(){return Bn||(Bn=1,Rn.exports=yo()),Rn.exports}var vo=bo();const wo=Er(vo);var Do=["startEnhancer","endEnhancer","error","positive","onChange","onFocus","onBlur","value","disabled","readOnly"],So=["Input"],Oo=["mask","maskChar","overrides"];function Fn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fn(Object(r),!0).forEach(function(o){ko(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fn(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function ko(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ze(e){"@babel/helpers - typeof";return Ze=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},Ze(e)}function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ye.apply(this,arguments)}function wt(e,t){if(e==null)return{};var r=Mo(e,t),o,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function Mo(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,a;for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var Wn=m.forwardRef(function(e,t){e.startEnhancer,e.endEnhancer,e.error,e.positive;var r=e.onChange,o=e.onFocus,n=e.onBlur,a=e.value,i=e.disabled,s=e.readOnly,c=wt(e,Do);return m.createElement(wo,Ye({onChange:r,onFocus:o,onBlur:n,value:a,disabled:i,readOnly:s},c),function(u){return m.createElement(Gr,Ye({ref:t,onChange:r,onFocus:o,onBlur:n,value:a,disabled:i,readOnly:s},u))})});Wn.displayName="MaskOverride";function Nn(e){var t=e.mask,r=e.maskChar,o=e.overrides;o=o===void 0?{}:o;var n=o.Input,a=n===void 0?{}:n,i=wt(o,So),s=wt(e,Oo),c=Wn,u={},w={};typeof a=="function"?c=a:Ze(a)==="object"&&(c=a.component||c,u=a.props||{},w=a.style||{}),Ze(u)==="object"&&(u=vt(vt({},u),{},{mask:u.mask||t,maskChar:u.maskChar||r}));var d=vt({Input:{component:c,props:u,style:w}},i);return m.createElement(Qr,Ye({},s,{overrides:d}))}Nn.defaultProps={maskChar:" "};const Yn=6048e5,Co=864e5,zn=Symbol.for("constructDateFrom");function Pe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&zn in e?e[zn](t):e instanceof Date?new e.constructor(t):new Date(t)}function be(e,t){return Pe(t||e,e)}let Po={};function et(){return Po}function ze(e,t){var r,o,n,a;const i=et(),s=(t==null?void 0:t.weekStartsOn)??((o=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:o.weekStartsOn)??i.weekStartsOn??((a=(n=i.locale)==null?void 0:n.options)==null?void 0:a.weekStartsOn)??0,c=be(e,t==null?void 0:t.in),u=c.getDay(),w=(u<s?7:0)+u-s;return c.setDate(c.getDate()-w),c.setHours(0,0,0,0),c}function tt(e,t){return ze(e,{...t,weekStartsOn:1})}function Vn(e,t){const r=be(e,t==null?void 0:t.in),o=r.getFullYear(),n=Pe(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);const a=tt(n),i=Pe(r,0);i.setFullYear(o,0,4),i.setHours(0,0,0,0);const s=tt(i);return r.getTime()>=a.getTime()?o+1:r.getTime()>=s.getTime()?o:o-1}function qn(e){const t=be(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function jo(e,...t){const r=Pe.bind(null,t.find(o=>typeof o=="object"));return t.map(r)}function _n(e,t){const r=be(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function Ho(e,t,r){const[o,n]=jo(r==null?void 0:r.in,e,t),a=_n(o),i=_n(n),s=+a-qn(a),c=+i-qn(i);return Math.round((s-c)/Co)}function xo(e,t){const r=Vn(e,t),o=Pe(e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),tt(o)}function Eo(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ao(e){return!(!Eo(e)&&typeof e!="number"||isNaN(+be(e)))}function Io(e,t){const r=be(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Lo={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},To=(e,t,r)=>{let o;const n=Lo[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function Dt(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Ro={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$o={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Bo={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fo={date:Dt({formats:Ro,defaultWidth:"full"}),time:Dt({formats:$o,defaultWidth:"full"}),dateTime:Dt({formats:Bo,defaultWidth:"full"})},Wo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},No=(e,t,r,o)=>Wo[e];function Ve(e){return(t,r)=>{const o=r!=null&&r.context?String(r.context):"standalone";let n;if(o==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}const Yo={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zo={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Vo={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qo={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},_o={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Uo={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xo=(e,t)=>{const r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Qo={ordinalNumber:Xo,era:Ve({values:Yo,defaultWidth:"wide"}),quarter:Ve({values:zo,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ve({values:Vo,defaultWidth:"wide"}),day:Ve({values:qo,defaultWidth:"wide"}),dayPeriod:Ve({values:_o,defaultWidth:"wide",formattingValues:Uo,defaultFormattingWidth:"wide"})};function qe(e){return(t,r={})=>{const o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;const i=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Ko(s,d=>d.test(i)):Go(s,d=>d.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const w=t.slice(i.length);return{value:u,rest:w}}}function Go(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Ko(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Jo(e){return(t,r={})=>{const o=t.match(e.matchPattern);if(!o)return null;const n=o[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=r.valueCallback?r.valueCallback(i):i;const s=t.slice(n.length);return{value:i,rest:s}}}const Zo=/^(\d+)(th|st|nd|rd)?/i,ea=/\d+/i,ta={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},na={any:[/^b/i,/^(a|c)/i]},ra={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oa={any:[/1/i,/2/i,/3/i,/4/i]},aa={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ia={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sa={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},la={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ua={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ca={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},da={ordinalNumber:Jo({matchPattern:Zo,parsePattern:ea,valueCallback:e=>parseInt(e,10)}),era:qe({matchPatterns:ta,defaultMatchWidth:"wide",parsePatterns:na,defaultParseWidth:"any"}),quarter:qe({matchPatterns:ra,defaultMatchWidth:"wide",parsePatterns:oa,defaultParseWidth:"any",valueCallback:e=>e+1}),month:qe({matchPatterns:aa,defaultMatchWidth:"wide",parsePatterns:ia,defaultParseWidth:"any"}),day:qe({matchPatterns:sa,defaultMatchWidth:"wide",parsePatterns:la,defaultParseWidth:"any"}),dayPeriod:qe({matchPatterns:ua,defaultMatchWidth:"any",parsePatterns:ca,defaultParseWidth:"any"})},nt={code:"en-US",formatDistance:To,formatLong:Fo,formatRelative:No,localize:Qo,match:da,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pa(e,t){const r=be(e,t==null?void 0:t.in);return Ho(r,Io(r))+1}function fa(e,t){const r=be(e,t==null?void 0:t.in),o=+tt(r)-+xo(r);return Math.round(o/Yn)+1}function Un(e,t){var r,o,n,a;const i=be(e,t==null?void 0:t.in),s=i.getFullYear(),c=et(),u=(t==null?void 0:t.firstWeekContainsDate)??((o=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:o.firstWeekContainsDate)??c.firstWeekContainsDate??((a=(n=c.locale)==null?void 0:n.options)==null?void 0:a.firstWeekContainsDate)??1,w=Pe((t==null?void 0:t.in)||e,0);w.setFullYear(s+1,0,u),w.setHours(0,0,0,0);const d=ze(w,t),f=Pe((t==null?void 0:t.in)||e,0);f.setFullYear(s,0,u),f.setHours(0,0,0,0);const b=ze(f,t);return+i>=+d?s+1:+i>=+b?s:s-1}function ha(e,t){var r,o,n,a;const i=et(),s=(t==null?void 0:t.firstWeekContainsDate)??((o=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:o.firstWeekContainsDate)??i.firstWeekContainsDate??((a=(n=i.locale)==null?void 0:n.options)==null?void 0:a.firstWeekContainsDate)??1,c=Un(e,t),u=Pe((t==null?void 0:t.in)||e,0);return u.setFullYear(c,0,s),u.setHours(0,0,0,0),ze(u,t)}function ma(e,t){const r=be(e,t==null?void 0:t.in),o=+ze(r,t)-+ha(r,t);return Math.round(o/Yn)+1}function q(e,t){const r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}const je={y(e,t){const r=e.getFullYear(),o=r>0?r:1-r;return q(t==="yy"?o%100:o,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):q(r+1,2)},d(e,t){return q(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return q(e.getHours()%12||12,t.length)},H(e,t){return q(e.getHours(),t.length)},m(e,t){return q(e.getMinutes(),t.length)},s(e,t){return q(e.getSeconds(),t.length)},S(e,t){const r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return q(n,t.length)}},Le={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xn={G:function(e,t,r){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return je.y(e,t)},Y:function(e,t,r,o){const n=Un(e,o),a=n>0?n:1-n;if(t==="YY"){const i=a%100;return q(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):q(a,t.length)},R:function(e,t){const r=Vn(e);return q(r,t.length)},u:function(e,t){const r=e.getFullYear();return q(r,t.length)},Q:function(e,t,r){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return q(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return q(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){const o=e.getMonth();switch(t){case"M":case"MM":return je.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return q(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){const n=ma(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):q(n,t.length)},I:function(e,t,r){const o=fa(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):q(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):je.d(e,t)},D:function(e,t,r){const o=pa(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):q(o,t.length)},E:function(e,t,r){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){const n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return q(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});case"eeee":default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){const n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return q(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});case"cccc":default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){const o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return q(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const o=e.getHours();let n;switch(o===12?n=Le.noon:o===0?n=Le.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){const o=e.getHours();let n;switch(o>=17?n=Le.evening:o>=12?n=Le.afternoon:o>=4?n=Le.morning:n=Le.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return je.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):je.H(e,t)},K:function(e,t,r){const o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):q(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):q(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):je.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):je.s(e,t)},S:function(e,t){return je.S(e,t)},X:function(e,t,r){const o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Gn(o);case"XXXX":case"XX":return He(o);case"XXXXX":case"XXX":default:return He(o,":")}},x:function(e,t,r){const o=e.getTimezoneOffset();switch(t){case"x":return Gn(o);case"xxxx":case"xx":return He(o);case"xxxxx":case"xxx":default:return He(o,":")}},O:function(e,t,r){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qn(o,":");case"OOOO":default:return"GMT"+He(o,":")}},z:function(e,t,r){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qn(o,":");case"zzzz":default:return"GMT"+He(o,":")}},t:function(e,t,r){const o=Math.trunc(+e/1e3);return q(o,t.length)},T:function(e,t,r){return q(+e,t.length)}};function Qn(e,t=""){const r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),a=o%60;return a===0?r+String(n):r+String(n)+t+q(a,2)}function Gn(e,t){return e%60===0?(e>0?"-":"+")+q(Math.abs(e)/60,2):He(e,t)}function He(e,t=""){const r=e>0?"-":"+",o=Math.abs(e),n=q(Math.trunc(o/60),2),a=q(o%60,2);return r+n+t+a}const Kn=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Jn=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ga=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return Kn(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Kn(o,t)).replace("{{time}}",Jn(n,t))},ya={p:Jn,P:ga},ba=/^D+$/,va=/^Y+$/,wa=["D","DD","YY","YYYY"];function Da(e){return ba.test(e)}function Sa(e){return va.test(e)}function Oa(e,t,r){const o=ka(e,t,r);if(console.warn(o),wa.includes(e))throw new RangeError(o)}function ka(e,t,r){const o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ma=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ca=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pa=/^'([^]*?)'?$/,ja=/''/g,Ha=/[a-zA-Z]/;function Zn(e,t,r){var o,n,a,i,s,c,u,w;const d=et(),f=(r==null?void 0:r.locale)??d.locale??nt,b=(r==null?void 0:r.firstWeekContainsDate)??((n=(o=r==null?void 0:r.locale)==null?void 0:o.options)==null?void 0:n.firstWeekContainsDate)??d.firstWeekContainsDate??((i=(a=d.locale)==null?void 0:a.options)==null?void 0:i.firstWeekContainsDate)??1,g=(r==null?void 0:r.weekStartsOn)??((c=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??d.weekStartsOn??((w=(u=d.locale)==null?void 0:u.options)==null?void 0:w.weekStartsOn)??0,h=be(e,r==null?void 0:r.in);if(!Ao(h))throw new RangeError("Invalid time value");let S=t.match(Ca).map(D=>{const O=D[0];if(O==="p"||O==="P"){const C=ya[O];return C(D,f.formatLong)}return D}).join("").match(Ma).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const O=D[0];if(O==="'")return{isToken:!1,value:xa(D)};if(Xn[O])return{isToken:!0,value:D};if(O.match(Ha))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:D}});f.localize.preprocessor&&(S=f.localize.preprocessor(h,S));const M={firstWeekContainsDate:b,weekStartsOn:g,locale:f};return S.map(D=>{if(!D.isToken)return D.value;const O=D.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&Sa(O)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&Da(O))&&Oa(O,t,String(e));const C=Xn[O[0]];return C(h,O,f.localize,M)}).join("")}function xa(e){const t=e.match(Pa);return t?t[1].replace(ja,"'"):e}var St=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),er=[0,1,2,3,4,5,6],Ea=[0,1,2,3,4,5,6,7,8,9,10,11],ae={high:"high",default:"default"},ke={startDate:"startDate",endDate:"endDate"},Aa={locked:"locked"};function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tr(Object(r),!0).forEach(function(o){Ia(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tr(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Ia(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ot=Q("label",function(e){var t=e.$disabled,r=e.$theme,o=r.colors,n=r.typography;return Te(Te({},n.font250),{},{width:"100%",color:t?o.contentSecondary:o.contentPrimary,display:"block",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})});Ot.displayName="Label",Ot.displayName="Label";var kt=Q("span",function(e){var t=e.$theme.sizing;return{display:"flex",width:"100%",marginTop:t.scale300,marginRight:0,marginBottom:t.scale300,marginLeft:0}});kt.displayName="LabelContainer",kt.displayName="LabelContainer";var Mt=Q("span",function(e){var t=e.$disabled,r=e.$counterError,o=e.$theme,n=o.colors,a=o.typography;return Te(Te({},a.font100),{},{flex:0,width:"100%",color:r?n.negative400:t?n.contentSecondary:n.contentPrimary})});Mt.displayName="LabelEndEnhancer",Mt.displayName="LabelEndEnhancer";var Ct=Q("div",function(e){var t=e.$error,r=e.$positive,o=e.$theme,n=o.colors,a=o.sizing,i=o.typography,s=n.contentSecondary;return t?s=n.negative400:r&&(s=n.positive400),Te(Te({},i.font100),{},{color:s,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:a.scale300,marginRight:0,marginBottom:a.scale300,marginLeft:0})});Ct.displayName="Caption",Ct.displayName="Caption";var Pt=Q("div",function(e){var t=e.$theme.sizing;return{width:"100%",marginBottom:t.scale600}});Pt.displayName="ControlContainer",Pt.displayName="ControlContainer";function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},xe.apply(this,arguments)}function rt(e){"@babel/helpers - typeof";return rt=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},rt(e)}function La(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ta(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ra(e,t,r){return t&&Ta(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $a(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&&jt(e,t)}function jt(e,t){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},jt(e,t)}function Ba(e){var t=Na();return function(){var r=ot(e),o;if(t){var n=ot(this).constructor;o=Reflect.construct(r,arguments,n)}else o=r.apply(this,arguments);return Fa(this,o)}}function Fa(e,t){if(t&&(rt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wa(e)}function Wa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Na(){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 ot(e){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ot(e)}function Ya(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function za(e,t,r,o){return t&&typeof t!="boolean"?typeof t=="function"?t(o):t:r&&typeof r!="boolean"?typeof r=="function"?r(o):r:e?typeof e=="function"?e(o):e:null}var Ht=function(e){$a(r,e);var t=Ba(r);function r(){return La(this,r),t.apply(this,arguments)}return Ra(r,[{key:"render",value:function(){var o=this.props,n=o.overrides,a=n.Label,i=n.LabelEndEnhancer,s=n.LabelContainer,c=n.Caption,u=n.ControlContainer,w=o.label,d=o.caption,f=o.disabled,b=o.error,g=o.positive,h=o.htmlFor,S=o.children,M=o.counter,D=m.Children.only(S).props,O={$disabled:!!f,$error:!!b,$positive:!!g},C=Fe(a)||Ot,N=Fe(i)||Mt,L=Fe(s)||kt,T=Fe(c)||Ct,$=Fe(u)||Pt,E=za(d,b,g,O),A=this.props.labelEndEnhancer;if(M){var I=null,x=null,j=null;rt(M)==="object"&&(x=M.length,I=M.maxLength,j=M.error),I=I||D.maxLength,x==null&&typeof D.value=="string"&&(x=D.value.length),x==null&&(x=0),O.$length=x,I==null?A||(A="".concat(x)):(O.$maxLength=x,A||(A="".concat(x,"/").concat(I)),x>I&&j==null&&(j=!0)),j&&(O.$error=!0,O.$counterError=!0)}return m.createElement(m.Fragment,null,w&&m.createElement(L,xe({},O,We(s)),m.createElement(C,xe({"data-baseweb":"form-control-label",htmlFor:h||D.id},O,We(a)),typeof w=="function"?w(O):w),!!A&&m.createElement(N,xe({},O,We(i)),typeof A=="function"?A(O):A)),m.createElement(Ar,null,function(oe){return m.createElement($,xe({"data-baseweb":"form-control-container"},O,We(u)),m.Children.map(S,function(K,Oe){if(K){var W=K.key||String(Oe);return m.cloneElement(K,{key:W,"aria-errormessage":b?oe:null,"aria-describedby":d||g?oe:null,disabled:D.disabled||f,error:typeof D.error<"u"?D.error:O.$error,positive:typeof D.positive<"u"?D.positive:O.$positive})}}),(!!d||!!b||g)&&m.createElement(T,xe({"data-baseweb":"form-control-caption",id:oe},O,We(c)),E))}))}}]),r}(m.Component);Ya(Ht,"defaultProps",{overrides:{},label:null,caption:null,disabled:!1,counter:!1});function nr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nr(Object(r),!0).forEach(function(o){Va(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nr(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Va(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qa=function(e){return Ea.map(function(t){return{id:t.toString(),label:e(t)}})},_a=function(e,t){return e.map(function(r){return t.includes(Number(r.id))?r:rr(rr({},r),{},{disabled:!0})})},Ua=function(e){var t=e.filterMonthsList,r=e.formatMonthLabel,o=qa(r);return t&&(o=_a(o,t)),o};function Xa(e){var t=e.$range,r=t===void 0?!1:t,o=e.$disabled,n=o===void 0?!1:o,a=e.$isHighlighted,i=a===void 0?!1:a,s=e.$isHovered,c=s===void 0?!1:s,u=e.$selected,w=u===void 0?!1:u,d=e.$hasRangeSelected,f=d===void 0?!1:d,b=e.$startDate,g=b===void 0?!1:b,h=e.$endDate,S=h===void 0?!1:h,M=e.$pseudoSelected,D=M===void 0?!1:M,O=e.$hasRangeHighlighted,C=O===void 0?!1:O,N=e.$pseudoHighlighted,L=N===void 0?!1:N,T=e.$hasRangeOnRight,$=T===void 0?!1:T,E=e.$startOfMonth,A=E===void 0?!1:E,I=e.$endOfMonth,x=I===void 0?!1:I,j=e.$outsideMonth,oe=j===void 0?!1:j;return"".concat(+r).concat(+n).concat(+(i||c)).concat(+w).concat(+f).concat(+g).concat(+S).concat(+D).concat(+C).concat(+L).concat(+(C&&!L&&$)).concat(+(C&&!L&&!$)).concat(+A).concat(+x).concat(+oe)}function Qa(e,t){return Za(e)||Ja(e,t)||Ka(e,t)||Ga()}function Ga(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ka(e,t){if(e){if(typeof e=="string")return or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return or(e,t)}}function or(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function Ja(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o=[],n=!0,a=!1,i,s;try{for(r=r.call(e);!(n=(i=r.next()).done)&&(o.push(i.value),!(t&&o.length===t));n=!0);}catch(c){a=!0,s=c}finally{try{!n&&r.return!=null&&r.return()}finally{if(a)throw s}}return o}}function Za(e){if(Array.isArray(e))return e}function ar(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ar(Object(r),!0).forEach(function(o){_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ar(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function _e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xt=Q("div",function(e){var t=e.$separateRangeInputs;return re({width:"100%"},t?{display:"flex",justifyContent:"center"}:{})});xt.displayName="StyledInputWrapper",xt.displayName="StyledInputWrapper";var Et=Q("div",function(e){var t=e.$theme;return re(re({},t.typography.LabelMedium),{},{marginBottom:t.sizing.scale300})});Et.displayName="StyledInputLabel",Et.displayName="StyledInputLabel";var At=Q("div",function(e){var t=e.$theme;return{width:"100%",marginRight:t.sizing.scale300}});At.displayName="StyledStartDate",At.displayName="StyledStartDate";var It=Q("div",function(e){return e.$theme,{width:"100%"}});It.displayName="StyledEndDate",It.displayName="StyledEndDate";var Lt=Q("div",function(e){var t=e.$theme,r=t.typography,o=t.colors,n=t.borders;return re(re({},r.font200),{},{color:o.calendarForeground,backgroundColor:o.calendarBackground,textAlign:"center",borderTopLeftRadius:n.surfaceBorderRadius,borderTopRightRadius:n.surfaceBorderRadius,borderBottomRightRadius:n.surfaceBorderRadius,borderBottomLeftRadius:n.surfaceBorderRadius,display:"inline-block"})});Lt.displayName="StyledRoot",Lt.displayName="StyledRoot";var Tt=Q("div",function(e){var t=e.$orientation;return{display:"flex",flexDirection:t===St.vertical?"column":"row"}});Tt.displayName="StyledMonthContainer",Tt.displayName="StyledMonthContainer";var Rt=Q("div",function(e){var t=e.$theme.sizing,r=e.$density;return{paddingTop:t.scale300,paddingBottom:r===ae.high?t.scale400:t.scale300,paddingLeft:t.scale500,paddingRight:t.scale500}});Rt.displayName="StyledCalendarContainer",Rt.displayName="StyledCalendarContainer";var at=Q("div",function(e){var t=e.$theme,r=t.direction==="rtl"?"right":"left";return{marginBottom:t.sizing.scale600,paddingLeft:t.sizing.scale600,paddingRight:t.sizing.scale600,textAlign:r}});at.displayName="StyledSelectorContainer",at.displayName="StyledSelectorContainer";var $t=Q("div",function(e){var t=e.$theme,r=t.typography,o=t.borders,n=t.colors,a=t.sizing,i=e.$density;return re(re({},i===ae.high?r.LabelMedium:r.LabelLarge),{},{color:n.calendarHeaderForeground,display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:a.scale600,paddingBottom:a.scale300,paddingLeft:a.scale600,paddingRight:a.scale600,backgroundColor:n.calendarHeaderBackground,borderTopLeftRadius:o.surfaceBorderRadius,borderTopRightRadius:o.surfaceBorderRadius,borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:i===ae.high?"calc(".concat(a.scale800," + ").concat(a.scale0,")"):a.scale950})});$t.displayName="StyledCalendarHeader",$t.displayName="StyledCalendarHeader";var Bt=Q("div",function(e){return{color:e.$theme.colors.calendarHeaderForeground,backgroundColor:e.$theme.colors.calendarHeaderBackground,whiteSpace:"nowrap"}});Bt.displayName="StyledMonthHeader",Bt.displayName="StyledMonthHeader";var Ft=Q("button",function(e){var t=e.$theme,r=t.typography,o=t.colors,n=e.$isFocusVisible,a=e.$density;return re(re({},a===ae.high?r.LabelMedium:r.LabelLarge),{},{alignItems:"center",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,color:o.calendarHeaderForeground,cursor:"pointer",display:"flex",outline:"none",":focus":{boxShadow:n?"0 0 0 3px ".concat(o.accent):"none"}})});Ft.displayName="StyledMonthYearSelectButton",Ft.displayName="StyledMonthYearSelectButton";var Wt=Q("span",function(e){var t=e.$theme.direction==="rtl"?"marginRight":"marginLeft";return _e({alignItems:"center",display:"flex"},t,e.$theme.sizing.scale500)});Wt.displayName="StyledMonthYearSelectIconContainer",Wt.displayName="StyledMonthYearSelectIconContainer";function ir(e){var t=e.$theme,r=e.$disabled,o=e.$isFocusVisible;return{boxSizing:"border-box",display:"flex",color:r?t.colors.calendarHeaderForegroundDisabled:t.colors.calendarHeaderForeground,cursor:r?"default":"pointer",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",marginBottom:0,marginTop:0,outline:"none",":focus":r?{}:{boxShadow:o?"0 0 0 3px ".concat(t.colors.accent):"none"}}}var Nt=Q("button",ir);Nt.displayName="StyledPrevButton",Nt.displayName="StyledPrevButton";var Yt=Q("button",ir);Yt.displayName="StyledNextButton",Yt.displayName="StyledNextButton";var zt=Q("div",function(e){return{display:"inline-block"}});zt.displayName="StyledMonth",zt.displayName="StyledMonth";var Vt=Q("div",function(e){var t=e.$theme.sizing;return{whiteSpace:"nowrap",display:"flex",marginBottom:t.scale0}});Vt.displayName="StyledWeek",Vt.displayName="StyledWeek";function G(e,t){var r,o=e.substr(0,12)+"1"+e.substr(13),n=e.substr(0,13)+"1"+e.substr(14);return r={},_e(r,e,t),_e(r,o,t),_e(r,n,t),r}function qt(e,t){var r=t.colors,o={":before":{content:null},":after":{content:null}},n=o,a={color:r.calendarForegroundDisabled,":before":{content:null},":after":{content:null}},i={color:r.calendarForegroundDisabled,":before":{borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",backgroundColor:"transparent"},":after":{borderTopLeftRadius:"0%",borderTopRightRadius:"0%",borderBottomLeftRadius:"0%",borderBottomRightRadius:"0%",borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}},s={":before":{content:null}},c=1;e&&e[c]==="1"&&(n=a);var u=Object.assign({},G("001000000000000",{color:r.calendarDayForegroundPseudoSelected}),G("000100000000000",{color:r.calendarDayForegroundSelected}),G("001100000000000",{color:r.calendarDayForegroundSelectedHighlighted}),{"010000000000000":{color:r.calendarForegroundDisabled,":after":{content:null}}},{"011000000000000":{color:r.calendarForegroundDisabled,":after":{content:null}}},G("000000000000001",i),G("101000000000000",s),G("101010000000000",s),G("100100000000000",{color:r.calendarDayForegroundSelected}),G("101100000000000",{color:r.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),G("100111100000000",{color:r.calendarDayForegroundSelected,":before":{content:null}}),G("101111100000000",{color:r.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),G("100111000000000",{color:r.calendarDayForegroundSelected}),G("100110100000000",{color:r.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),G("100100001010000",{color:r.calendarDayForegroundSelected}),G("100100001001000",{color:r.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),G("101000001010000",{":before":{left:null,right:"50%"}}),{"101000001001000":{}},{"101000001001100":{}},{"101000001001010":{}},G("100010010000000",{color:r.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),{"101000001100000":{color:r.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}},G("100000001100000",{color:r.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),G("101111000000000",{color:r.calendarDayForegroundSelectedHighlighted}),G("101110100000000",{color:r.calendarDayForegroundSelectedHighlighted,":before":{left:null,right:"50%"}}),G("101010010000000",{color:r.calendarDayForegroundPseudoSelectedHighlighted,":before":{left:"0",width:"100%"}}),G("100000000000001",i),G("100000001010001",i),G("100000001001001",i),G("100010000000001",i));return u[e]||n}var _t=Q("div",function(e){var t=e.$disabled,r=e.$isFocusVisible,o=e.$isHighlighted,n=e.$peekNextMonth,a=e.$pseudoSelected,i=e.$range,s=e.$selected,c=e.$outsideMonth,u=e.$outsideMonthWithinRange,w=e.$hasDateLabel,d=e.$density,f=e.$hasLockedBehavior,b=e.$selectedInput,g=e.$value,h=e.$theme,S=h.colors,M=h.typography,D=h.sizing,O=Xa(e),C;w?d===ae.high?C="60px":C="70px":d===ae.high?C="40px":C="48px";var N=Array.isArray(g)?g:[g,null],L=Qa(N,2),T=L[0],$=L[1],E=b===ke.startDate?$!==null&&typeof $<"u":T!==null&&typeof T<"u",A=i&&!(f&&!E);return re(re(re({},d===ae.high?M.ParagraphSmall:M.ParagraphMedium),{},{boxSizing:"border-box",position:"relative",cursor:t||!n&&c?"default":"pointer",color:S.calendarForeground,display:"inline-block",width:d===ae.high?"42px":"50px",height:C,lineHeight:d===ae.high?D.scale700:D.scale900,textAlign:"center",paddingTop:D.scale300,paddingBottom:D.scale300,paddingLeft:D.scale300,paddingRight:D.scale300,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,outline:"none",backgroundColor:"transparent",transform:"scale(1)"},qt(O,e.$theme)),{},{":after":re(re({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",boxShadow:r&&(!c||n)?"0 0 0 3px ".concat(S.accent):"none",backgroundColor:s?S.calendarDayBackgroundSelectedHighlighted:a&&o?S.calendarDayBackgroundPseudoSelectedHighlighted:S.calendarBackground,height:w?"100%":d===ae.high?"42px":"50px",width:"100%",position:"absolute",top:w?0:"-1px",left:0,paddingTop:D.scale200,paddingBottom:D.scale200,borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderTopColor:S.borderSelected,borderBottomColor:S.borderSelected,borderRightColor:S.borderSelected,borderLeftColor:S.borderSelected,borderTopLeftRadius:w?D.scale800:"100%",borderTopRightRadius:w?D.scale800:"100%",borderBottomLeftRadius:w?D.scale800:"100%",borderBottomRightRadius:w?D.scale800:"100%"},qt(O,e.$theme)[":after"]||{}),u?{content:null}:{})},A?{":before":re(re({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",backgroundColor:S.mono300,position:"absolute",height:"100%",width:"50%",top:0,left:"50%",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftWidth:"0",borderRightWidth:"0",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},qt(O,e.$theme)[":before"]||{}),u?{backgroundColor:S.mono300,left:"0",width:"100%",content:'""'}:{})}:{})});_t.displayName="StyledDay",_t.displayName="StyledDay";var Ut=Q("div",function(e){var t=e.$theme,r=t.typography,o=t.colors,n=e.$selected;return re(re({},r.ParagraphXSmall),{},{color:n?o.contentInverseTertiary:o.contentTertiary})});Ut.displayName="StyledDayLabel",Ut.displayName="StyledDayLabel";var Xt=Q("div",function(e){var t=e.$theme,r=t.typography,o=t.colors,n=t.sizing,a=e.$density;return re(re({},r.LabelMedium),{},{color:o.contentTertiary,boxSizing:"border-box",position:"relative",cursor:"default",display:"inline-block",width:a===ae.high?"42px":"50px",height:a===ae.high?"40px":"48px",textAlign:"center",lineHeight:n.scale900,paddingTop:n.scale300,paddingBottom:n.scale300,paddingLeft:n.scale200,paddingRight:n.scale200,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,backgroundColor:"transparent"})});Xt.displayName="StyledWeekdayHeader",Xt.displayName="StyledWeekdayHeader";function Qt(e){"@babel/helpers - typeof";return Qt=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},Qt(e)}function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},he.apply(this,arguments)}function ve(e,t){return ri(e)||ni(e,t)||ti(e,t)||ei()}function ei(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cI as c,a$ as i,bn as f,cJ as u}from"./index-
|
|
1
|
+
import{cI as c,a$ as i,bn as f,cJ as u}from"./index-DBR7DuB2.js";function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function b(e,t,o){return t&&a(e.prototype,t),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(t&&(i(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 n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}function l(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&&u(e,t)}export{l as _,b as a,p as b,n as c,s as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c2 as m,r as f,cQ as U,cV as S,cS as p}from"./index-
|
|
1
|
+
import{c2 as m,r as f,cQ as U,cV as S,cS as p}from"./index-DBR7DuB2.js";import{R as V,c as P,d as G,B as H}from"./base-input-d2YUIz4t.js";function v(t){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},v(t)}var J=["Root","StartEnhancer","EndEnhancer"],K=["startEnhancer","endEnhancer","overrides"];function i(){return i=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},i.apply(this,arguments)}function O(t,r){return X(t)||W(t,r)||N(t,r)||L()}function L(){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 N(t,r){if(t){if(typeof t=="string")return F(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 F(t,r)}}function F(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 W(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var e=[],o=!0,u=!1,a,c;try{for(n=n.call(t);!(o=(a=n.next()).done)&&(e.push(a.value),!(r&&e.length===r));o=!0);}catch(d){u=!0,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(u)throw c}}return e}}function X(t){if(Array.isArray(t))return t}function R(t,r){if(t==null)return{};var n=Y(t,r),e,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)e=u[o],!(r.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(n[e]=t[e])}return n}function Y(t,r){if(t==null)return{};var n={},e=Object.keys(t),o,u;for(u=0;u<e.length;u++)o=e[u],!(r.indexOf(o)>=0)&&(n[o]=t[o]);return n}function Z(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tt(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function rt(t,r,n){return r&&tt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function et(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&g(t,r)}function g(t,r){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},g(t,r)}function nt(t){var r=ut();return function(){var n=b(t),e;if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ot(this,e)}}function ot(t,r){if(r&&(v(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function y(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ut(){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 b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b(t)}function h(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var B=function(t){et(n,t);var r=nt(n);function n(){var e;Z(this,n);for(var o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];return e=r.call.apply(r,[this].concat(u)),h(y(e),"state",{isFocused:e.props.autoFocus||!1}),h(y(e),"onFocus",function(c){e.setState({isFocused:!0}),e.props.onFocus(c)}),h(y(e),"onBlur",function(c){e.setState({isFocused:!1}),e.props.onBlur(c)}),e}return rt(n,[{key:"render",value:function(){var e=this.props,o=e.startEnhancer,u=e.endEnhancer,a=e.overrides,c=a.Root,d=a.StartEnhancer,x=a.EndEnhancer,A=R(a,J),I=R(e,K),T=m(c,V),j=O(T,2),$=j[0],C=j[1],k=m(d,P),w=O(k,2),q=w[0],z=w[1],D=m(x,P),E=O(D,2),M=E[0],Q=E[1],s=G(this.props,this.state);return f.createElement($,i({"data-baseweb":"input"},s,C,{$adjoined:_(o,u),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),l(o)&&f.createElement(q,i({},s,z,{$position:S.start}),typeof o=="function"?o(s):o),f.createElement(H,i({},I,{overrides:A,adjoined:_(o,u),onFocus:this.onFocus,onBlur:this.onBlur})),l(u)&&f.createElement(M,i({},s,Q,{$position:S.end}),typeof u=="function"?u(s):u))}}]),n}(f.Component);h(B,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:U.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function _(t,r){return l(t)&&l(r)?p.both:l(t)?p.left:l(r)?p.right:p.none}function l(t){return!!(t||t===0)}export{B as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,e as y}from"./es6-
|
|
1
|
+
import{c as p,e as y}from"./es6-B42lHU50.js";import"./index-DBR7DuB2.js";const{File:r,Blob:_,DOMException:s}=p,{INVALID:z,GONE:n,MISMATCH:f,MOD_ERR:m,SYNTAX:w,SECURITY:A,DISALLOWED:b}=y;class c{constructor(i,e){this.fileHandle=i,this.file=e,this.size=e.size,this.position=0}write(i){let e=this.file;if(typeof i=="object"){if(i.type==="write"){if(Number.isInteger(i.position)&&i.position>=0&&(this.position=i.position,this.size<i.position&&(this.file=new r([this.file,new ArrayBuffer(i.position-this.size)],this.file.name,this.file))),!("data"in i))throw new s(...w("write requires a data argument"));i=i.data}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(this.size<i.position)throw new s(...z);this.position=i.position;return}else throw new s(...w("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0){e=i.size<this.size?new r([e.slice(0,i.size)],e.name,e):new r([e,new Uint8Array(i.size-this.size)],e.name),this.size=e.size,this.position>e.size&&(this.position=e.size),this.file=e;return}else throw new s(...w("truncate requires a size argument"))}i=new _([i]);let t=this.file;const o=t.slice(0,this.position),u=t.slice(this.position+i.size);let a=this.position-o.size;a<0&&(a=0),t=new r([o,new Uint8Array(a),i,u],t.name),this.size=t.size,this.position+=i.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...n);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class h{constructor(i="",e=new r([],i),t=!0){this._file=e,this.name=i,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...n);return this._file}async createWritable(i){if(!this.writable)throw new s(...b);if(this._deleted)throw new s(...n);const e=i.keepExistingData?await this.getFile():new r([],this.name);return new c(this,e)}async isSameEntry(i){return this===i}async _destroy(){this._deleted=!0,this._file=null}}class l{constructor(i,e=!0){this.name=i,this.kind="directory",this._deleted=!1,this._entries={},this.writable=e,this.readable=!0}async*entries(){if(this._deleted)throw new s(...n);yield*Object.entries(this._entries)}async isSameEntry(i){return this===i}async getDirectoryHandle(i,e){if(this._deleted)throw new s(...n);const t=this._entries[i];if(t){if(t instanceof h)throw new s(...f);return t}else{if(e.create)return this._entries[i]=new l(i);throw new s(...n)}}async getFileHandle(i,e){const t=this._entries[i],o=t instanceof h;if(t&&o)return t;if(t&&!o)throw new s(...f);if(!t&&!e.create)throw new s(...n);if(!t&&e.create)return this._entries[i]=new h(i)}async removeEntry(i,e){const t=this._entries[i];if(!t)throw new s(...n);await t._destroy(e.recursive),delete this._entries[i]}async _destroy(i){for(let e of Object.values(this._entries)){if(!i)throw new s(...m);await e._destroy(i)}this._entries={},this._deleted=!0}}const g=new l(""),H=()=>g;export{h as FileHandle,l as FolderHandle,c as Sink,H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bh as e,bi as f,g as m}from"./index-
|
|
1
|
+
import{bh as e,bi as f,g as m}from"./index-DBR7DuB2.js";var r,a;function v(){if(a)return r;a=1;var t=e(),n=f(),i=n(function(o,s,u,c){t(o,s,u,c)});return r=i,r}var b=v();const h=m(b);export{h as m};
|
package/build/assets/{number-overlay-editor-BxuviOUl.js → number-overlay-editor-CAfqemOj.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as Q,r as T}from"./index-DPBNUFWE.js";import{s as Ie}from"./index-c-NQS3qn.js";import"./FormClearHelper-BZaxoxQN.js";import"./withFullScreenWrapper-DbD5_ijt.js";import"./Toolbar-bneC7vhq.js";import"./checkbox-Ce7VH5yR.js";import"./mergeWith-DZ-wgSc6.js";import"./sprintf-D7DtBTRn.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-Bj-RN7K3.js";import"./inherits-83mK7fR9.js";import"./createSuper-Ce1x_8d5.js";import"./FileDownload.esm-5XDRJbc8.js";const Re=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var X;(function(e){e.event="event",e.props="prop"})(X||(X={}));function G(){}function Ae(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(u,l){return u===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ee(e){return!!(e||"").match(/\d/)}function Z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function ce(e){return Z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function fe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Te(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Fe(e,t,r){var n=Te(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Be(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function oe(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),u=a[0],l=a[1]||"";return{beforeDecimal:u,afterDecimal:l,hasNegation:r,addNegation:n}}function Me(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ve(e,t,r){for(var n="",a=r?"0":"",u=0;u<=t-1;u++)n+=e[u]||a;return n}function de(e,t){return Array(t+1).join(e)}function me(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],u=n[1];if(u=Number(u),!u)return r+a;a=a.replace(".","");var l=1+u,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=oe(e),u=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,S=parseFloat("0."+(l||"0")),y=l.length<=t?"0."+l:S.toFixed(t),p=y.split("."),d=u.split("").reverse().reduce(function(w,O,m){return w.length>m?(Number(w[0])+Number(O)).toString()+w.substring(1,w.length):O+w},p[0]),h=ve(p[1]||"",t,r),b=g?"-":"",v=n?".":"";return""+b+d+v+h}function z(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var pe=Ae(function(e,t){for(var r=0,n=0,a=e.length,u=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[u-1-n]&&u-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:u-n}}});function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ie(e){return Math.max(e.selectionStart,e.selectionEnd)}function ke(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Le(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function We(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ke(e,t,r,n,a,u,l){l===void 0&&(l=We);var g=a.findIndex(function(W){return W}),S=e.slice(0,g);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var y=r.length,p=e.length,d={},h=new Array(y),b=0;b<y;b++){h[b]=-1;for(var v=0,w=p;v<w;v++){var O=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:v});if(O&&d[v]!==!0){h[b]=v,d[v]=!0;break}}}for(var m=n;m<y&&(h[m]===-1||!u(r[m]));)m++;var F=m===y||h[m]===-1?p:h[m];for(m=n-1;m>0&&h[m]===-1;)m--;var M=m===-1||h[m]===-1?0:h[m]+1;return M>F?F:n-M<F-n?M:F}function he(e,t,r,n){var a=e.length;if(t=Pe(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ue(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ee(e[r])||ee(e[r-1]));return t}function Se(e,t,r,n,a,u){u===void 0&&(u=G);var l=Be(function(v,w){var O,m;return ce(v)?(m="",O=""):typeof v=="number"||w?(m=typeof v=="number"?me(v):v,O=n(m)):(m=a(v,void 0),O=n(m)),{formattedValue:O,numAsString:m}}),g=T.useState(function(){return l(Z(e)?t:e,r)}),S=g[0],y=g[1],p=function(v,w){v.formattedValue!==S.formattedValue&&y({formattedValue:v.formattedValue,numAsString:v.value}),u(v,w)},d=e,h=r;Z(e)&&(d=S.numAsString,h=!0);var b=l(d,h);return T.useMemo(function(){y(b)},[b.formattedValue]),[S,p]}function Ge(e){return e.replace(/[^0-9]/g,"")}function _e(e){return e}function $e(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,u=e.getInputRef,l=e.format;l===void 0&&(l=_e);var g=e.removeFormatting;g===void 0&&(g=Ge);var S=e.defaultValue,y=e.valueIsNumericString,p=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=G);var b=e.onKeyDown;b===void 0&&(b=G);var v=e.onMouseUp;v===void 0&&(v=G);var w=e.onFocus;w===void 0&&(w=G);var O=e.onBlur;O===void 0&&(O=G);var m=e.value,F=e.getCaretBoundary;F===void 0&&(F=Ue);var M=e.isValidInputCharacter;M===void 0&&(M=ee);var W=e.isCharacterSame,P=se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),_=Se(m,S,!!y,l,g,p),K=_[0],V=K.formattedValue,k=K.numAsString,$=_[1],L=T.useRef({formattedValue:V,numAsString:k}),J=function(o,i){L.current={formattedValue:o.formattedValue,numAsString:o.value},$(o,i)},U=T.useState(!1),q=U[0],H=U[1],s=T.useRef(null),c=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return H(!0),function(){clearTimeout(c.current.setCaretTimeout),clearTimeout(c.current.focusTimeout)}},[]);var R=l,N=function(o,i){var f=parseFloat(i);return{formattedValue:o,value:i,floatValue:isNaN(f)?void 0:f}},D=function(o,i,f){o.selectionStart===0&&o.selectionEnd===o.value.length||(z(o,i),c.current.setCaretTimeout=setTimeout(function(){o.value===f&&o.selectionStart!==o.selectionEnd&&z(o,i)},0))},E=function(o,i,f){return he(o,i,F(o),f)},B=function(o,i,f){var A=F(i),C=Ke(i,V,o,f,A,M,W);return C=he(i,C,A),C},te=function(o){var i=o.formattedValue;i===void 0&&(i="");var f=o.input,A=o.setCaretPosition,C=o.source,x=o.event,I=o.numAsString,j=o.caretPos;if(f){if(j===void 0&&A){var Y=o.inputValue||f.value,ue=ie(f);f.value=i,j=B(Y,i,ue)}f.value=i,j!==void 0&&D(f,j,i)}i!==V&&J(N(i,I),{event:x,source:C})};T.useEffect(function(){var o=L.current,i=o.formattedValue,f=o.numAsString;V!==i&&(V!==k||i!==f)&&J(N(V,k),{event:void 0,source:X.props})},[V,k]);var ne=s.current?ie(s.current):void 0,re=typeof window<"u"?T.useLayoutEffect:T.useEffect;re(function(){var o=s.current;if(V!==L.current.formattedValue&&o){var i=B(L.current.formattedValue,V,ne);o.value=V,D(o,i,V)}},[V]);var Ve=function(o,i,f){var A=pe(V,o),C=Object.assign(Object.assign({},A),{lastValue:V}),x=g(o,C),I=R(x);if(x=g(I,void 0),d&&!d(N(I,x))){var j=i.target,Y=ie(j),ue=B(o,V,Y);return j.value=V,D(j,ue,V),!1}return te({formattedValue:I,numAsString:x,inputValue:o,event:i,source:f,setCaretPosition:!0,input:i.target}),!0},xe=function(o){var i=o.target,f=i.value,A=Ve(f,o,X.event);A&&h(o)},we=function(o){var i=o.target,f=o.key,A=i.selectionStart,C=i.selectionEnd,x=i.value;x===void 0&&(x="");var I;if(f==="ArrowLeft"||f==="Backspace"?I=Math.max(A-1,0):f==="ArrowRight"?I=Math.min(A+1,x.length):f==="Delete"&&(I=A),I===void 0||A!==C){b(o);return}var j=I;if(f==="ArrowLeft"||f==="ArrowRight"){var Y=f==="ArrowLeft"?"left":"right";j=E(x,I,Y),j!==I&&o.preventDefault()}else f==="Delete"&&!M(x[I])?j=E(x,I,"right"):f==="Backspace"&&!M(x[I])&&(j=E(x,I,"left"));j!==I&&D(i,j,x),o.isUnitTestRun&&D(i,j,x),b(o)},Oe=function(o){var i=o.target,f=i.selectionStart,A=i.selectionEnd,C=i.value;if(C===void 0&&(C=""),f===A){var x=E(C,f);x!==f&&D(i,x,C)}v(o)},Ne=function(o){o.persist&&o.persist();var i=o.target;s.current=i,c.current.focusTimeout=setTimeout(function(){var f=i.selectionStart,A=i.selectionEnd,C=i.value;C===void 0&&(C="");var x=E(C,f);x!==f&&!(f===0&&A===C.length)&&D(i,x,C),w(o)},0)},De=function(o){s.current=null,clearTimeout(c.current.focusTimeout),clearTimeout(c.current.setCaretTimeout),O(o)},Ce=q&&ke()?"numeric":void 0,le=Object.assign({inputMode:Ce},P,{type:t,value:V,onChange:xe,onKeyDown:we,onMouseUp:Oe,onFocus:Ne,onBlur:De});if(r==="text")return a?Q.createElement(Q.Fragment,null,a(V,P)||null):Q.createElement("span",Object.assign({},P,{ref:u}),V);if(n){var Ee=n;return Q.createElement(Ee,Object.assign({},le,{ref:u}))}return Q.createElement("input",Object.assign({},le,{ref:u}))}function be(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var u=t.suffix;u===void 0&&(u="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var S=ae(t),y=S.thousandSeparator,p=S.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,h=oe(e,l),b=h.beforeDecimal,v=h.afterDecimal,w=h.addNegation;return r!==void 0&&(v=ve(v,r,!!n)),y&&(b=Fe(b,y,g)),a&&(b=a+b),u&&(v=v+u),w&&(b="-"+b),e=b+(d&&p||"")+v,e}function ae(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),u=n.test(e);return e=e.replace(/-/g,""),a&&!u&&t&&(e="-"+e),e}function Je(e,t){return new RegExp("(^-)|[0-9]|"+fe(e),"g")}function Qe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ze(e,t,r){var n;t===void 0&&(t=Le(e));var a=r.allowNegative,u=r.prefix;u===void 0&&(u="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,S=t.from,y=t.to,p=y.start,d=y.end,h=ae(r),b=h.allowedDecimalSeparators,v=h.decimalSeparator,w=e[d]===v;if(ee(e)&&(e===u||e===l)&&t.lastValue==="")return e;if(d-p===1&&b.indexOf(e[p])!==-1){var O=g===0?"":v;e=e.substring(0,p)+O+e.substring(p+1,e.length)}var m=function(c,R,N){var D=!1,E=!1;u.startsWith("-")?D=!1:c.startsWith("--")?(D=!1,E=!0):l.startsWith("-")&&c.length===l.length?D=!1:c[0]==="-"&&(D=!0);var B=D?1:0;return E&&(B=2),B&&(c=c.substring(B),R-=B,N-=B),{value:c,start:R,end:N,hasNegation:D}},F=m(e,p,d),M=F.hasNegation;n=F,e=n.value,p=n.start,d=n.end;var W=m(t.lastValue,S.start,S.end),P=W.start,_=W.end,K=W.value,V=e.substring(p,d);e.length&&K.length&&(P>K.length-l.length||_<u.length)&&!(V&&l.startsWith(V))&&(e=K);var k=0;e.startsWith(u)?k+=u.length:p<u.length&&(k=p),e=e.substring(k),d-=k;var $=e.length,L=e.length-l.length;e.endsWith(l)?$=L:(d>L||d>e.length-l.length)&&($=d),e=e.substring(0,$),e=ze(M?"-"+e:e,a),e=(e.match(Je(v))||[]).join("");var J=e.indexOf(v);e=e.replace(new RegExp(fe(v),"g"),function(c,R){return R===J?".":""});var U=oe(e,a),q=U.beforeDecimal,H=U.afterDecimal,s=U.addNegation;return y.end-y.start<S.end-S.start&&q===""&&w&&!parseFloat(H)&&(e=s?"-":""),e}function qe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),u=e[0]==="-";a.fill(!1,0,r.length+(u?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function He(e){var t=ae(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var u=e.allowNegative;if(u===void 0&&(u=!0),r===n)throw new Error(`
|
|
1
|
+
import{R as Q,r as T}from"./index-DBR7DuB2.js";import{s as Ie}from"./index-BDur6pq6.js";import"./FormClearHelper-CDpP2KTI.js";import"./withFullScreenWrapper-q4aFX07K.js";import"./Toolbar-CWqlXe66.js";import"./checkbox-88xaX78x.js";import"./mergeWith-G_d7CTch.js";import"./sprintf-D7DtBTRn.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-C2cK8vn0.js";import"./inherits-BYCriLh4.js";import"./createSuper-D3Ul7yIL.js";import"./FileDownload.esm-Com4r8-e.js";const Re=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var X;(function(e){e.event="event",e.props="prop"})(X||(X={}));function G(){}function Ae(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(u,l){return u===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ee(e){return!!(e||"").match(/\d/)}function Z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function ce(e){return Z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function fe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Te(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Fe(e,t,r){var n=Te(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Be(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function oe(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),u=a[0],l=a[1]||"";return{beforeDecimal:u,afterDecimal:l,hasNegation:r,addNegation:n}}function Me(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ve(e,t,r){for(var n="",a=r?"0":"",u=0;u<=t-1;u++)n+=e[u]||a;return n}function de(e,t){return Array(t+1).join(e)}function me(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],u=n[1];if(u=Number(u),!u)return r+a;a=a.replace(".","");var l=1+u,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=oe(e),u=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,S=parseFloat("0."+(l||"0")),y=l.length<=t?"0."+l:S.toFixed(t),p=y.split("."),d=u.split("").reverse().reduce(function(w,O,m){return w.length>m?(Number(w[0])+Number(O)).toString()+w.substring(1,w.length):O+w},p[0]),h=ve(p[1]||"",t,r),b=g?"-":"",v=n?".":"";return""+b+d+v+h}function z(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var pe=Ae(function(e,t){for(var r=0,n=0,a=e.length,u=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[u-1-n]&&u-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:u-n}}});function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ie(e){return Math.max(e.selectionStart,e.selectionEnd)}function ke(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Le(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function We(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ke(e,t,r,n,a,u,l){l===void 0&&(l=We);var g=a.findIndex(function(W){return W}),S=e.slice(0,g);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var y=r.length,p=e.length,d={},h=new Array(y),b=0;b<y;b++){h[b]=-1;for(var v=0,w=p;v<w;v++){var O=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:v});if(O&&d[v]!==!0){h[b]=v,d[v]=!0;break}}}for(var m=n;m<y&&(h[m]===-1||!u(r[m]));)m++;var F=m===y||h[m]===-1?p:h[m];for(m=n-1;m>0&&h[m]===-1;)m--;var M=m===-1||h[m]===-1?0:h[m]+1;return M>F?F:n-M<F-n?M:F}function he(e,t,r,n){var a=e.length;if(t=Pe(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ue(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ee(e[r])||ee(e[r-1]));return t}function Se(e,t,r,n,a,u){u===void 0&&(u=G);var l=Be(function(v,w){var O,m;return ce(v)?(m="",O=""):typeof v=="number"||w?(m=typeof v=="number"?me(v):v,O=n(m)):(m=a(v,void 0),O=n(m)),{formattedValue:O,numAsString:m}}),g=T.useState(function(){return l(Z(e)?t:e,r)}),S=g[0],y=g[1],p=function(v,w){v.formattedValue!==S.formattedValue&&y({formattedValue:v.formattedValue,numAsString:v.value}),u(v,w)},d=e,h=r;Z(e)&&(d=S.numAsString,h=!0);var b=l(d,h);return T.useMemo(function(){y(b)},[b.formattedValue]),[S,p]}function Ge(e){return e.replace(/[^0-9]/g,"")}function _e(e){return e}function $e(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,u=e.getInputRef,l=e.format;l===void 0&&(l=_e);var g=e.removeFormatting;g===void 0&&(g=Ge);var S=e.defaultValue,y=e.valueIsNumericString,p=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=G);var b=e.onKeyDown;b===void 0&&(b=G);var v=e.onMouseUp;v===void 0&&(v=G);var w=e.onFocus;w===void 0&&(w=G);var O=e.onBlur;O===void 0&&(O=G);var m=e.value,F=e.getCaretBoundary;F===void 0&&(F=Ue);var M=e.isValidInputCharacter;M===void 0&&(M=ee);var W=e.isCharacterSame,P=se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),_=Se(m,S,!!y,l,g,p),K=_[0],V=K.formattedValue,k=K.numAsString,$=_[1],L=T.useRef({formattedValue:V,numAsString:k}),J=function(o,i){L.current={formattedValue:o.formattedValue,numAsString:o.value},$(o,i)},U=T.useState(!1),q=U[0],H=U[1],s=T.useRef(null),c=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return H(!0),function(){clearTimeout(c.current.setCaretTimeout),clearTimeout(c.current.focusTimeout)}},[]);var R=l,N=function(o,i){var f=parseFloat(i);return{formattedValue:o,value:i,floatValue:isNaN(f)?void 0:f}},D=function(o,i,f){o.selectionStart===0&&o.selectionEnd===o.value.length||(z(o,i),c.current.setCaretTimeout=setTimeout(function(){o.value===f&&o.selectionStart!==o.selectionEnd&&z(o,i)},0))},E=function(o,i,f){return he(o,i,F(o),f)},B=function(o,i,f){var A=F(i),C=Ke(i,V,o,f,A,M,W);return C=he(i,C,A),C},te=function(o){var i=o.formattedValue;i===void 0&&(i="");var f=o.input,A=o.setCaretPosition,C=o.source,x=o.event,I=o.numAsString,j=o.caretPos;if(f){if(j===void 0&&A){var Y=o.inputValue||f.value,ue=ie(f);f.value=i,j=B(Y,i,ue)}f.value=i,j!==void 0&&D(f,j,i)}i!==V&&J(N(i,I),{event:x,source:C})};T.useEffect(function(){var o=L.current,i=o.formattedValue,f=o.numAsString;V!==i&&(V!==k||i!==f)&&J(N(V,k),{event:void 0,source:X.props})},[V,k]);var ne=s.current?ie(s.current):void 0,re=typeof window<"u"?T.useLayoutEffect:T.useEffect;re(function(){var o=s.current;if(V!==L.current.formattedValue&&o){var i=B(L.current.formattedValue,V,ne);o.value=V,D(o,i,V)}},[V]);var Ve=function(o,i,f){var A=pe(V,o),C=Object.assign(Object.assign({},A),{lastValue:V}),x=g(o,C),I=R(x);if(x=g(I,void 0),d&&!d(N(I,x))){var j=i.target,Y=ie(j),ue=B(o,V,Y);return j.value=V,D(j,ue,V),!1}return te({formattedValue:I,numAsString:x,inputValue:o,event:i,source:f,setCaretPosition:!0,input:i.target}),!0},xe=function(o){var i=o.target,f=i.value,A=Ve(f,o,X.event);A&&h(o)},we=function(o){var i=o.target,f=o.key,A=i.selectionStart,C=i.selectionEnd,x=i.value;x===void 0&&(x="");var I;if(f==="ArrowLeft"||f==="Backspace"?I=Math.max(A-1,0):f==="ArrowRight"?I=Math.min(A+1,x.length):f==="Delete"&&(I=A),I===void 0||A!==C){b(o);return}var j=I;if(f==="ArrowLeft"||f==="ArrowRight"){var Y=f==="ArrowLeft"?"left":"right";j=E(x,I,Y),j!==I&&o.preventDefault()}else f==="Delete"&&!M(x[I])?j=E(x,I,"right"):f==="Backspace"&&!M(x[I])&&(j=E(x,I,"left"));j!==I&&D(i,j,x),o.isUnitTestRun&&D(i,j,x),b(o)},Oe=function(o){var i=o.target,f=i.selectionStart,A=i.selectionEnd,C=i.value;if(C===void 0&&(C=""),f===A){var x=E(C,f);x!==f&&D(i,x,C)}v(o)},Ne=function(o){o.persist&&o.persist();var i=o.target;s.current=i,c.current.focusTimeout=setTimeout(function(){var f=i.selectionStart,A=i.selectionEnd,C=i.value;C===void 0&&(C="");var x=E(C,f);x!==f&&!(f===0&&A===C.length)&&D(i,x,C),w(o)},0)},De=function(o){s.current=null,clearTimeout(c.current.focusTimeout),clearTimeout(c.current.setCaretTimeout),O(o)},Ce=q&&ke()?"numeric":void 0,le=Object.assign({inputMode:Ce},P,{type:t,value:V,onChange:xe,onKeyDown:we,onMouseUp:Oe,onFocus:Ne,onBlur:De});if(r==="text")return a?Q.createElement(Q.Fragment,null,a(V,P)||null):Q.createElement("span",Object.assign({},P,{ref:u}),V);if(n){var Ee=n;return Q.createElement(Ee,Object.assign({},le,{ref:u}))}return Q.createElement("input",Object.assign({},le,{ref:u}))}function be(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var u=t.suffix;u===void 0&&(u="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var S=ae(t),y=S.thousandSeparator,p=S.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,h=oe(e,l),b=h.beforeDecimal,v=h.afterDecimal,w=h.addNegation;return r!==void 0&&(v=ve(v,r,!!n)),y&&(b=Fe(b,y,g)),a&&(b=a+b),u&&(v=v+u),w&&(b="-"+b),e=b+(d&&p||"")+v,e}function ae(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),u=n.test(e);return e=e.replace(/-/g,""),a&&!u&&t&&(e="-"+e),e}function Je(e,t){return new RegExp("(^-)|[0-9]|"+fe(e),"g")}function Qe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ze(e,t,r){var n;t===void 0&&(t=Le(e));var a=r.allowNegative,u=r.prefix;u===void 0&&(u="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,S=t.from,y=t.to,p=y.start,d=y.end,h=ae(r),b=h.allowedDecimalSeparators,v=h.decimalSeparator,w=e[d]===v;if(ee(e)&&(e===u||e===l)&&t.lastValue==="")return e;if(d-p===1&&b.indexOf(e[p])!==-1){var O=g===0?"":v;e=e.substring(0,p)+O+e.substring(p+1,e.length)}var m=function(c,R,N){var D=!1,E=!1;u.startsWith("-")?D=!1:c.startsWith("--")?(D=!1,E=!0):l.startsWith("-")&&c.length===l.length?D=!1:c[0]==="-"&&(D=!0);var B=D?1:0;return E&&(B=2),B&&(c=c.substring(B),R-=B,N-=B),{value:c,start:R,end:N,hasNegation:D}},F=m(e,p,d),M=F.hasNegation;n=F,e=n.value,p=n.start,d=n.end;var W=m(t.lastValue,S.start,S.end),P=W.start,_=W.end,K=W.value,V=e.substring(p,d);e.length&&K.length&&(P>K.length-l.length||_<u.length)&&!(V&&l.startsWith(V))&&(e=K);var k=0;e.startsWith(u)?k+=u.length:p<u.length&&(k=p),e=e.substring(k),d-=k;var $=e.length,L=e.length-l.length;e.endsWith(l)?$=L:(d>L||d>e.length-l.length)&&($=d),e=e.substring(0,$),e=ze(M?"-"+e:e,a),e=(e.match(Je(v))||[]).join("");var J=e.indexOf(v);e=e.replace(new RegExp(fe(v),"g"),function(c,R){return R===J?".":""});var U=oe(e,a),q=U.beforeDecimal,H=U.afterDecimal,s=U.addNegation;return y.end-y.start<S.end-S.start&&q===""&&w&&!parseFloat(H)&&(e=s?"-":""),e}function qe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),u=e[0]==="-";a.fill(!1,0,r.length+(u?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function He(e){var t=ae(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var u=e.allowNegative;if(u===void 0&&(u=!0),r===n)throw new Error(`
|
|
2
2
|
Decimal separator can't be same as thousand separator.
|
|
3
3
|
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
4
|
decimalSeparator: `+n+` (default value for decimalSeparator is .)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l}from"./es6-
|
|
1
|
+
import{e as l}from"./es6-B42lHU50.js";import"./index-DBR7DuB2.js";const{DISALLOWED:h}=l;class w{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class a{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...h);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=n=>t(new w(r,this.file)),r.truncate(0)):t(new w(r,this.file))},i))}}class s{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new a(i,this.writable):new s(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,n=>{i(new s(n))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,n=>i(new a(n)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,n)=>{i instanceof s?t.recursive?i.dir.removeRecursively(()=>r(),n):i.dir.remove(()=>r(),n):i.file&&i.file.remove(()=>r(),n)})}}const d=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new s(i.root)),t));export{a as FileHandle,s as FolderHandle,d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as a,E as y,_ as d,bx as h}from"./index-
|
|
1
|
+
import{r as a,E as y,_ as d,bx as h}from"./index-DBR7DuB2.js";var s=a.forwardRef(function(r,e){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});s.displayName="Close";function b(r){if(Array.isArray(r))return r}function p(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,u,f,l,o=[],n=!0,c=!1;try{if(f=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;n=!1}else for(;!(n=(i=f.call(t)).done)&&(o.push(i.value),o.length!==e);n=!0);}catch(m){c=!0,u=m}finally{try{if(!n&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw u}}return o}}function v(){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 w(r,e){return b(r)||p(r,e)||h(r,e)||v()}export{s as C,w as _};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c1 as b,c2 as x,cu as $,r as d,cQ as F,cR as T}from"./index-
|
|
1
|
+
import{c1 as b,c2 as x,cu as $,r as d,cQ as F,cR as T}from"./index-DBR7DuB2.js";import{g as R,a as A,b as E,B as z}from"./base-input-d2YUIz4t.js";function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(n){B(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=b("div",function(e){return c(c({},R(c(c({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});m.displayName="StyledTextAreaRoot",m.displayName="StyledTextAreaRoot";var h=b("div",function(e){return A(c({$positive:!1},e))});h.displayName="StyledTextareaContainer",h.displayName="StyledTextareaContainer";var v=b("textarea",function(e){return c(c({},E(e)),{},{resize:e.$resize||"none"})});v.displayName="StyledTextarea",v.displayName="StyledTextarea";function O(e){"@babel/helpers - typeof";return O=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},O(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function _(e,t){return N(e)||I(e,t)||D(e,t)||C()}function C(){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 D(e,t){if(e){if(typeof e=="string")return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(e,t)}}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function I(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,u=!1,i,a;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(y){u=!0,a=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(u)throw a}}return n}}function N(e){if(Array.isArray(e))return e}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,r){return t&&K(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(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&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},g(e,t)}function M(e){var t=H();return function(){var r=f(e),n;if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Q(this,n)}}function Q(e,t){if(t&&(O(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H(){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 f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(e)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P=function(e){U(r,e);var t=M(r);function r(){var n;q(this,r);for(var o=arguments.length,u=new Array(o),i=0;i<o;i++)u[i]=arguments[i];return n=t.call.apply(t,[this].concat(u)),p(l(n),"state",{isFocused:n.props.autoFocus||!1}),p(l(n),"onFocus",function(a){n.setState({isFocused:!0}),n.props.onFocus(a)}),p(l(n),"onBlur",function(a){n.setState({isFocused:!1}),n.props.onBlur(a)}),n}return k(r,[{key:"render",value:function(){var n=this.props.overrides,o=n===void 0?{}:n,u=x(o.Root,m),i=_(u,2),a=i[0],y=i[1],S=$({Input:{component:v},InputContainer:{component:h}},o);return d.createElement(a,s({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},y),d.createElement(z,s({},this.props,{type:T.textarea,overrides:S,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);p(P,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:F.default});export{P as T};
|