@stlite/desktop 0.43.1 → 0.45.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/bin/dump_artifacts.js +1 -1
- package/build/asset-manifest.json +41 -39
- package/build/index.html +1 -1
- package/build/pyodide/pyodide-lock.json +3768 -0
- package/build/pyodide/pyodide.asm.js +3 -3
- package/build/pyodide/pyodide.asm.wasm +0 -0
- package/build/pyodide/pyodide.js +12 -1
- package/build/pyodide/python_stdlib.zip +0 -0
- package/build/static/js/1122.422f58fc.chunk.js +1 -0
- package/build/static/js/{144.2477d27a.chunk.js → 144.046792d9.chunk.js} +1 -1
- package/build/static/js/{1729.528431ca.chunk.js → 1729.d59ed152.chunk.js} +1 -1
- package/build/static/js/{1740.32a0c10e.chunk.js → 1740.2c71a97a.chunk.js} +1 -1
- package/build/static/js/{1839.a1fce0e6.chunk.js → 1839.0d0dcac8.chunk.js} +1 -1
- package/build/static/js/2372.844b5190.chunk.js +2 -0
- package/build/static/js/2372.844b5190.chunk.js.LICENSE.txt +10 -0
- package/build/static/js/2753.c27b6faa.chunk.js +1 -0
- package/build/static/js/2873.f5c04f3b.chunk.js +1 -0
- package/build/static/js/3208.55e0b2fa.chunk.js +1 -0
- package/build/static/js/{4021.16f5498a.chunk.js → 4021.ec2e87b0.chunk.js} +1 -1
- package/build/static/js/4482.a9238ad0.chunk.js +1 -0
- package/build/static/js/4494.6bb6fb20.chunk.js +1 -0
- package/build/static/js/4694.aa16aaee.chunk.js +1 -0
- package/build/static/js/4721.2185bda3.chunk.js +1 -0
- package/build/static/js/{4724.366489f9.chunk.js → 4724.374578aa.chunk.js} +1 -1
- package/build/static/js/4785.76a05d79.chunk.js +1 -0
- package/build/static/js/4831.391fe620.chunk.js +1 -0
- package/build/static/js/5299.beb80829.chunk.js +1 -0
- package/build/static/js/6093.209cd165.chunk.js +1 -0
- package/build/static/js/6134.b9e5b2db.chunk.js +1 -0
- package/build/static/js/6802.df955c77.chunk.js +1 -0
- package/build/static/js/698.116a166b.chunk.js +1 -0
- package/build/static/js/7125.afecc159.chunk.js +1 -0
- package/build/static/js/{7332.cb5400eb.chunk.js → 7332.a13f15a5.chunk.js} +1 -1
- package/build/static/js/7579.ea965a43.chunk.js +1 -0
- package/build/static/js/7696.c9589682.chunk.js +1 -0
- package/build/static/js/8050.029f3dc8.chunk.js +1 -0
- package/build/static/js/8097.4837946f.chunk.js +2 -0
- package/build/static/js/8186.2f2e42e5.chunk.js +2 -0
- package/build/static/js/8186.2f2e42e5.chunk.js.LICENSE.txt +135 -0
- package/build/static/js/8850.6abc7336.chunk.js +1 -0
- package/build/static/js/{9166.d35e76c1.chunk.js → 9166.f234f6b4.chunk.js} +2 -2
- package/build/static/js/9311.7c7348b0.chunk.js +1 -0
- package/build/static/js/{5703.a68ecfdc.chunk.js → 9449.a2c361bb.chunk.js} +2 -2
- package/build/static/js/9699.df050cd6.chunk.js +1 -0
- package/build/static/js/9813.1821ef79.chunk.js +1 -0
- package/build/static/js/main.c3db14b2.js +28 -0
- package/build/static/js/{main.94addb49.js.LICENSE.txt → main.c3db14b2.js.LICENSE.txt} +0 -20
- package/package.json +7 -7
- package/build/pyodide/repodata.json +0 -1
- package/build/static/css/7895.c24b25fa.chunk.css +0 -1
- package/build/static/js/1619.c039c65c.chunk.js +0 -1
- package/build/static/js/1687.a144d952.chunk.js +0 -1
- package/build/static/js/2873.cf145dcb.chunk.js +0 -1
- package/build/static/js/3185.d317b162.chunk.js +0 -1
- package/build/static/js/4232.b0bbe2e6.chunk.js +0 -2
- package/build/static/js/4232.b0bbe2e6.chunk.js.LICENSE.txt +0 -52
- package/build/static/js/4482.2f210b65.chunk.js +0 -1
- package/build/static/js/4494.c6ab91c6.chunk.js +0 -1
- package/build/static/js/4694.7e63f0ef.chunk.js +0 -1
- package/build/static/js/4785.3ac653c2.chunk.js +0 -1
- package/build/static/js/4831.3170175f.chunk.js +0 -1
- package/build/static/js/5037.03a99abb.chunk.js +0 -1
- package/build/static/js/5299.ad735cb8.chunk.js +0 -1
- package/build/static/js/5361.bc476229.chunk.js +0 -2
- package/build/static/js/6134.5e3e3f58.chunk.js +0 -1
- package/build/static/js/6802.ffb6887c.chunk.js +0 -1
- package/build/static/js/698.7dce549b.chunk.js +0 -1
- package/build/static/js/7125.21833215.chunk.js +0 -1
- package/build/static/js/7579.7b9cc9ee.chunk.js +0 -1
- package/build/static/js/7652.f436cbbf.chunk.js +0 -1
- package/build/static/js/7696.406d4ef7.chunk.js +0 -1
- package/build/static/js/7895.198c568c.chunk.js +0 -1
- package/build/static/js/9311.f444417e.chunk.js +0 -1
- package/build/static/js/9813.c894655a.chunk.js +0 -1
- package/build/static/js/main.94addb49.js +0 -28
- /package/build/static/css/{7652.c24b25fa.chunk.css → 8050.c24b25fa.chunk.css} +0 -0
- /package/build/static/css/{5703.1edfa457.chunk.css → 9449.1edfa457.chunk.css} +0 -0
- /package/build/static/css/{1619.7ce51b75.chunk.css → 9699.7ce51b75.chunk.css} +0 -0
- /package/build/static/js/{5361.bc476229.chunk.js.LICENSE.txt → 8097.4837946f.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{9166.d35e76c1.chunk.js.LICENSE.txt → 9166.f234f6b4.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5703.a68ecfdc.chunk.js.LICENSE.txt → 9449.a2c361bb.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* jQuery Mousewheel 3.1.13
|
|
3
|
-
*
|
|
4
|
-
* Copyright jQuery Foundation and other contributors
|
|
5
|
-
* Released under the MIT license
|
|
6
|
-
* http://jquery.org/license
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*!
|
|
10
|
-
* numbro.js
|
|
11
|
-
* version : 1.6.2
|
|
12
|
-
* author : Företagsplatsen AB
|
|
13
|
-
* license : MIT
|
|
14
|
-
* http://www.foretagsplatsen.se
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/*!
|
|
18
|
-
* Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
|
|
19
|
-
* All rights reserved.
|
|
20
|
-
*
|
|
21
|
-
* Redistribution and use in source and binary forms, with or without modification,
|
|
22
|
-
* are permitted provided that the following conditions are met:
|
|
23
|
-
*
|
|
24
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
25
|
-
* this list of conditions and the following disclaimer.
|
|
26
|
-
*
|
|
27
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
28
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
29
|
-
* and/or other materials provided with the distribution.
|
|
30
|
-
*
|
|
31
|
-
* Neither the name of Anaconda nor the names of any contributors
|
|
32
|
-
* may be used to endorse or promote products derived from this software
|
|
33
|
-
* without specific prior written permission.
|
|
34
|
-
*
|
|
35
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
36
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
37
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
38
|
-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
39
|
-
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
40
|
-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
41
|
-
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
42
|
-
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
43
|
-
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
44
|
-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
45
|
-
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
49
|
-
* http://hammerjs.github.io/
|
|
50
|
-
*
|
|
51
|
-
* Copyright (c) 2016 Jorik Tangelder;
|
|
52
|
-
* Licensed under the MIT license */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4482],{25094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(5057),a=n(66904),o=n.n(a),i=n(7742),c=n.n(i),s=n(96266);const u=t=>{let{className:e,scriptRunId:n,numParticles:r,numParticleTypes:a,ParticleComponent:i}=t;return(0,s.jsx)("div",{className:c()(e,"stHidden"),"data-testid":"".concat(e),children:o()(r).map((t=>{const e=Math.floor(Math.random()*a);return(0,s.jsx)(i,{particleType:e},n+t)}))})},l=(0,r.memo)(u)},48833:(t,e,n)=>{"use strict";n.r(e),n.d(e,{NUM_FLAKES:()=>v,default:()=>y});var r=n(5057);const a=n.p+"static/media/flake-0.beded754e8024c73d9d2.png",o=n.p+"static/media/flake-1.8077dc154e0bf900aa73.png",i=n.p+"static/media/flake-2.e3f07d06933dd0e84c24.png";var c,s=n(25094),u=n(82160),l=n(21371);const p=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.random()*(t-e)+e},d=()=>{return(0,l.F4)(c||(t=["\n from {\n transform:\n translateY(0)\n rotateX(","deg)\n rotateY(","deg)\n rotateZ(","deg);\n }\n\n to {\n transform:\n translateY(calc(100vh + ","px))\n rotateX(0)\n rotateY(0)\n rotateZ(0);\n }\n"],e||(e=t.slice(0)),c=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))),p(360),p(360),p(360),150);var t,e},f=(0,u.Z)("img",{target:"ekdfb790"})((t=>{let{theme:e}=t;return{position:"fixed",top:"".concat(-150,"px"),marginLeft:"".concat(-75,"px"),zIndex:e.zIndices.balloons,left:"".concat(p(90,10),"vw"),animationDelay:"".concat(p(4e3),"ms"),height:"".concat(150,"px"),width:"".concat(150,"px"),pointerEvents:"none",animationDuration:"3000ms",animationName:d(),animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var m=n(96266);const v=100,h=[a,o,i],x=h.length,g=t=>{let{particleType:e}=t;return(0,m.jsx)(f,{src:h[e]})},b=function(t){let{scriptRunId:e}=t;return(0,m.jsx)(s.Z,{className:"snow",scriptRunId:e,numParticleTypes:x,numParticles:v,ParticleComponent:g})},y=(0,r.memo)(b)},99980:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,a,o){for(var i=-1,c=n(e((r-t)/(a||1)),0),s=Array(c);c--;)s[o?c:++i]=t,t+=a;return s}},39594:(t,e,n)=>{var r=n(36418),a=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(a,""):t}},9186:(t,e,n)=>{var r=n(99980),a=n(27396),o=n(17046);t.exports=function(t){return function(e,n,i){return i&&"number"!=typeof i&&a(e,n,i)&&(n=i=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),i=void 0===i?e<n?1:-1:o(i),r(e,n,i,t)}}},36418:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},66904:(t,e,n)=>{var r=n(9186)();t.exports=r},17046:(t,e,n)=>{var r=n(81692),a=1/0;t.exports=function(t){return t?(t=r(t))===a||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},81692:(t,e,n)=>{var r=n(39594),a=n(26271),o=n(71490),i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(a(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=a(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=c.test(t);return n||s.test(t)?u(t.slice(2),n?2:8):i.test(t)?NaN:+t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4494],{44494:(t,e,s)=>{s.r(e),s.d(e,{default:()=>C});var i=s(5057),a=s(88084),r=s.n(a),o=s(47206),n=s(80865),l=s(9191),d=s(73830),p=s(52955),m=s(38944),h=s(93905),c=s(21034),u=s(98790),g=s(50120),f=s(96266);const v="YYYY/MM/DD";function b(t){return t.map((t=>new Date(t)))}class y extends i.PureComponent{constructor(){super(...arguments),this.formClearHelper=new p.K,this.state={values:this.initialValue,isRange:this.props.element.isRange,isEmpty:!1},this.commitWidgetValue=t=>{var e;this.props.widgetMgr.setStringArrayValue(this.props.element,(e=this.state.values)?e.map((t=>r()(t).format(v))):[],t)},this.onFormCleared=()=>{const t=b(this.props.element.default);this.setState({values:t,isEmpty:!t},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=t=>{let{date:e}=t;if(null===e||void 0===e)return void this.setState({values:[],isEmpty:!0});const s=[];Array.isArray(e)?e.forEach((t=>{t&&s.push(t)})):s.push(e),this.setState({values:s,isEmpty:!s},(()=>{this.state.isEmpty||this.commitWidgetValue({fromUi:!0})}))},this.handleClose=()=>{const{isEmpty:t}=this.state;t&&this.setState(((t,e)=>({values:b(e.element.default),isEmpty:!b(e.element.default)})),(()=>{this.commitWidgetValue({fromUi:!0})}))},this.getMaxDate=()=>{const{element:t}=this.props,e=t.max;return e&&e.length>0?r()(e,v).toDate():void 0}}get initialValue(){const t=this.props.widgetMgr.getStringArrayValue(this.props.element);return b(void 0!==t?t:this.props.element.default||[])}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1;const e=t.map((t=>new Date(t)));this.setState({values:e,isEmpty:!e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var t;const{width:e,element:s,disabled:i,theme:a,widgetMgr:o}=this.props,{values:p,isRange:b}=this.state,{colors:y,fontSizes:C,lineHeights:x}=a,D={width:e},k=r()(s.min,v).toDate(),W=this.getMaxDate(),F=0===s.default.length&&!i,V=s.format.replaceAll(/[a-zA-Z]/g,"9"),I=s.format.replaceAll("Y","y").replaceAll("D","d");return this.formClearHelper.manageFormClearListener(o,s.formId,this.onFormCleared),(0,f.jsxs)("div",{className:"stDateInput",style:D,"data-testid":"stDateInput",children:[(0,f.jsx)(m.O,{label:s.label,disabled:i,labelVisibility:(0,g.iF)(null===(t=s.labelVisibility)||void 0===t?void 0:t.value),children:s.help&&(0,f.jsx)(h.dT,{children:(0,f.jsx)(c.Z,{content:s.help,placement:u.u.TOP_RIGHT})})}),(0,f.jsx)(n.Z,{"data-testid":"stDateInputPicker",density:l.pw.high,formatString:I,mask:b?"".concat(V," \u2013 ").concat(V):V,placeholder:b?"".concat(s.format," \u2013 ").concat(s.format):s.format,disabled:i,onChange:this.handleChange,onClose:this.handleClose,overrides:{Popover:{props:{placement:d.r4.bottomLeft,overrides:{Body:{style:{border:"1px solid ".concat(y.fadedText10)}}}}},CalendarContainer:{style:{fontSize:C.sm,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Week:{style:{fontSize:C.sm}},Day:{style:t=>{let{$pseudoHighlighted:e,$pseudoSelected:s,$selected:i,$isHovered:a}=t;return{fontSize:C.sm,lineHeight:x.base,"::before":{backgroundColor:i||s||e||a?"".concat(y.secondaryBg," !important"):y.transparent},"::after":{borderColor:y.transparent}}}},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}}},Input:{props:{maskChar:null,overrides:{Root:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}},ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,transform:"scale(1.41)",width:a.spacing.twoXL,marginRight:"-8px",":hover":{fill:a.colors.bodyText}}}}}},Input:{style:{paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}}}}}},value:p,minDate:k,maxDate:W,range:b,clearable:F})]})}}const C=(0,o.b)(y)},52955:(t,e,s)=>{s.d(e,{K:()=>a});var i=s(50120);class a{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,s){null!=this.formClearListener&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,i.bM)(e)&&(this.formClearListener=t.addFormClearedListener(e,s),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4694],{4694:(t,o,e)=>{e.r(o),e.d(o,{default:()=>c});e(5057);var s=e(69212),i=e(82160),n=e(17966);const r=(0,i.Z)("div",{target:"e18r7x300"})((t=>{let{theme:o}=t;return{paddingBottom:o.spacing.smPx,lineHeight:o.lineHeights.normal,color:(0,n.yq)(o)}}),"");var a=e(46403),g=e(96266);const c=function(t){let{element:o,width:e}=t;return(0,g.jsxs)("div",{className:"stProgress",children:[(0,g.jsx)(r,{children:(0,g.jsx)(a.ZP,{source:o.text,allowHTML:!1,isLabel:!0})}),(0,g.jsx)(s.Z,{value:o.value,width:e})]})}},69212:(t,o,e)=>{e.d(o,{$:()=>l,Z:()=>d});var s=e(5057),i=e(47206),n=e(31808),r=e(17966),a=e(16449),g=e(80099),c=e(96266);let l=function(t){return t.EXTRASMALL="xs",t.SMALL="sm",t.MEDIUM="md",t.LARGE="lg",t.EXTRALARGE="xl",t}({});const d=function(t){let{value:o,width:e,size:d=l.SMALL,overrides:p}=t;const u=(0,i.u)(),m={xs:u.spacing.twoXS,sm:u.spacing.sm,md:u.spacing.lg,lg:u.spacing.xl,xl:u.spacing.twoXL},{activeTheme:h}=s.useContext(n.E),R=!(0,r.MJ)(h),b={BarContainer:{style:{marginTop:u.spacing.none,marginBottom:u.spacing.none,marginRight:u.spacing.none,marginLeft:u.spacing.none}},Bar:{style:t=>{let{$theme:o}=t;return{width:e?e.toString():void 0,marginTop:u.spacing.none,marginBottom:u.spacing.none,marginRight:u.spacing.none,marginLeft:u.spacing.none,height:m[d],backgroundColor:o.colors.progressbarTrackFill,borderTopLeftRadius:u.spacing.twoXS,borderTopRightRadius:u.spacing.twoXS,borderBottomLeftRadius:u.spacing.twoXS,borderBottomRightRadius:u.spacing.twoXS}}},BarProgress:{style:()=>({backgroundColor:R?u.colors.primary:u.colors.blue70,borderTopLeftRadius:u.spacing.twoXS,borderTopRightRadius:u.spacing.twoXS,borderBottomLeftRadius:u.spacing.twoXS,borderBottomRightRadius:u.spacing.twoXS})}};return(0,c.jsx)(a.Z,{value:o,overrides:(0,g.aO)(b,p)})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4785],{94785:(t,e,s)=>{s.r(e),s.d(e,{default:()=>l});var i=s(5057),u=s(19954),r=s(96266);function l(t){let{element:e,width:s,endpoints:l}=t;const n=(0,i.useRef)(null);(0,i.useEffect)((()=>{n.current&&(n.current.currentTime=e.startTime)}),[e.startTime]);const a=(0,u.O0)(e.url),c=l.buildMediaURL(a);return(0,r.jsx)("audio",{id:"audio",ref:n,controls:!0,src:c,className:"stAudio",style:{width:s}})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[4831],{94778:(e,t,i)=>{i.d(t,{Z:()=>u});i(5057);var s,r=i(50120),o=i(93905),n=i(82160);const a=(0,i(21371).F4)(s||(l=["\n 50% {\n color: rgba(0, 0, 0, 0);\n }\n"],d||(d=l.slice(0)),s=Object.freeze(Object.defineProperties(l,{raw:{value:Object.freeze(d)}}))));var l,d;const c=(0,n.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:i,theme:s}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:s.colors.gray,margin:"0 5px"}}:{},...i?{color:s.colors.red,animationName:"".concat(a),animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var h=i(96266);const u=e=>{let{dirty:t,value:i,maxLength:s,className:n,type:a="single",inForm:l}=e;const d=[],u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,h.jsx)(c,{includeDot:d.length>0,shouldBlink:t,children:e},d.length))};if(t){const e=l?"submit form":"apply";if("multiline"===a){const t=(0,r.Ge)()?"\u2318":"Ctrl";u("Press ".concat(t,"+Enter to ").concat(e))}else"single"===a&&u("Press Enter to ".concat(e))}return s&&("chat"!==a||t)&&u("".concat(i.length,"/").concat(s),t&&i.length>=s),(0,h.jsx)(o.X7,{"data-testid":"InputInstructions",className:n,children:d})}},52955:(e,t,i)=>{i.d(t,{K:()=>r});var s=i(50120);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,i){null!=this.formClearListener&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,s.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,i),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},44831:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var s=i(5057),r=i(52707),o=i(84332),n=i(47206),a=i(59500),l=i(52955),d=i(70714),c=i(60913),h=i(96216),u=i(21034),m=i(98790),p=i(73401),g=i(30124),f=i(94778),b=i(38944),v=i(93905),y=i(50120),x=i(82160);const V=(0,x.Z)("div",{target:"e116k4er3"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",borderWidth:"1px",borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.lg,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}}}),""),w=(0,x.Z)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),C=(0,x.Z)("button",{target:"e116k4er1"})((e=>{let{theme:t}=e;return{margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"".concat(32,"px"),justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.lg,borderBottomRightRadius:t.radii.lg},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}}}),""),I=(0,x.Z)("div",{target:"e116k4er0"})((e=>{let{theme:t,clearable:i}=e;return{position:"absolute",marginRight:t.spacing.twoXS,left:0,right:"".concat(64+(i?12:0),"px")}}),"");var k=i(96266);class F extends s.PureComponent{constructor(e){super(e),this.formClearHelper=new l.K,this.inputRef=s.createRef(),this.formatValue=e=>{if((0,y.le)(e))return null;const t=function(e){return null==e||""===e?void 0:e}(this.props.element.format);if(null==t)return e.toString();try{return(0,a.sprintf)(t,e)}catch(i){return(0,d.KE)("Error in sprintf(".concat(t,", ").concat(e,"): ").concat(i)),String(e)}},this.isIntData=()=>this.props.element.dataType===c.Y2.DataType.INT,this.getMin=()=>this.props.element.hasMin?this.props.element.min:-1/0,this.getMax=()=>this.props.element.hasMax?this.props.element.max:1/0,this.getStep=()=>{const{step:e}=this.props.element;return e||(this.isIntData()?1:.01)},this.commitWidgetValue=e=>{const{value:t}=this.state,{element:i,widgetMgr:s}=this.props,r=this.props.element,o=this.getMin(),n=this.getMax();if((0,y.bb)(t)&&(o>t||t>n)){const e=this.inputRef.current;e&&e.reportValidity()}else{var a;const o=null!==(a=null!==t&&void 0!==t?t:r.default)&&void 0!==a?a:null;this.isIntData()?s.setIntValue(i,o,e):s.setDoubleValue(i,o,e),this.setState({dirty:!1,value:o,formattedValue:this.formatValue(o)})}},this.onFormCleared=()=>{this.setState(((e,t)=>{var i;return{value:null!==(i=t.element.default)&&void 0!==i?i:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0}),this.setState({isFocused:!1})},this.onFocus=()=>{this.setState({isFocused:!0})},this.onChange=e=>{const{value:t}=e.target;if(""===t)this.setState({dirty:!0,value:null,formattedValue:null});else{let e;e=this.isIntData()?parseInt(t,10):parseFloat(t),this.setState({dirty:!0,value:e,formattedValue:t})}},this.onKeyDown=e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),this.modifyValueUsingStep("increment")();break;case"ArrowDown":e.preventDefault(),this.modifyValueUsingStep("decrement")()}},this.onKeyPress=e=>{"Enter"===e.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),(0,y.$b)(this.props.element)&&this.props.widgetMgr.submitForm(this.props.element.formId))},this.modifyValueUsingStep=e=>()=>{const{value:t}=this.state,i=this.getStep();switch(e){case"increment":this.canIncrement&&this.setState({dirty:!0,value:(null!==t&&void 0!==t?t:this.getMin())+i},(()=>{this.commitWidgetValue({fromUi:!0})}));break;case"decrement":this.canDecrement&&this.setState({dirty:!0,value:(null!==t&&void 0!==t?t:this.getMax())-i},(()=>{this.commitWidgetValue({fromUi:!0})}))}},this.state={dirty:!1,value:this.initialValue,formattedValue:this.formatValue(this.initialValue),isFocused:!1}}get initialValue(){var e;const t=this.isIntData()?this.props.widgetMgr.getIntValue(this.props.element):this.props.widgetMgr.getDoubleValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null,formattedValue:this.formatValue(null!==e&&void 0!==e?e:null)},(()=>{this.commitWidgetValue({fromUi:!1})}))}get canDecrement(){return!(0,y.le)(this.state.value)&&this.state.value-this.getStep()>=this.getMin()}get canIncrement(){return!(0,y.le)(this.state.value)&&this.state.value+this.getStep()<=this.getMax()}render(){var e;const{element:t,width:i,disabled:s,widgetMgr:n,theme:a}=this.props,{formattedValue:l,dirty:d,isFocused:c}=this.state,x={width:i},F=!this.canDecrement||s,D=!this.canIncrement||s,M=(0,y.le)(t.default)&&!s;return this.formClearHelper.manageFormClearListener(n,t.formId,this.onFormCleared),(0,k.jsxs)("div",{className:"stNumberInput",style:x,"data-testid":"stNumberInput",children:[(0,k.jsx)(b.O,{label:t.label,disabled:s,labelVisibility:(0,y.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,k.jsx)(v.dT,{children:(0,k.jsx)(u.Z,{content:t.help,placement:m.u.TOP_RIGHT})})}),(0,k.jsxs)(V,{className:c?"focused":"",children:[(0,k.jsx)(g.Z,{type:"number",inputRef:this.inputRef,value:null!==l&&void 0!==l?l:"",placeholder:t.placeholder,onBlur:this.onBlur,onFocus:this.onFocus,onChange:this.onChange,onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,clearable:M,clearOnEscape:M,disabled:s,"aria-label":t.label,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:a.colors.darkGray,transform:"scale(1.4)",width:a.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:a.colors.bodyText}}}}}},Input:{props:{step:this.getStep(),min:this.getMin(),max:this.getMax()},style:{lineHeight:"1.4",paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),i>h.A.hideWidgetDetails&&(0,k.jsxs)(w,{children:[(0,k.jsx)(C,{className:"step-down",onClick:this.modifyValueUsingStep("decrement"),disabled:F,tabIndex:-1,children:(0,k.jsx)(p.Z,{content:r.W,size:"xs",color:this.canDecrement?"inherit":"disabled"})}),(0,k.jsx)(C,{className:"step-up",onClick:this.modifyValueUsingStep("increment"),disabled:D,tabIndex:-1,children:(0,k.jsx)(p.Z,{content:o.v,size:"xs",color:this.canIncrement?"inherit":"disabled"})})]})]}),i>h.A.hideWidgetDetails&&(0,k.jsx)(I,{clearable:M,children:(0,k.jsx)(f.Z,{dirty:d,value:null!==l&&void 0!==l?l:"",className:"input-instructions",inForm:(0,y.$b)({formId:t.formId})})})]})}}const D=(0,n.b)(F)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[5037],{45037:(t,e,i)=>{i.r(e),i.d(e,{default:()=>_});var o=i(5057),s=i(59663),n=i(41656),a=i(50482),r=i.n(a),c=i(87333),h=i(47206),l=i(17966),d=i(72212),p=i(80552),m=i(13012),g=i(65815),u=i(50256),w=i(98899),x=i(31324),k=i(719),b=i(70800),S=i(85367),y=i(92421),v=i(10458),j=i.n(v),f=i(64327);class T extends Error{}class V extends Error{}class C{static async get(t){const{commandLine:e,userMapboxToken:i}=t.current;return C.token&&C.commandLine===e.toLowerCase()||(C.token=""!==i?i:await this.fetchToken("https://data.streamlit.io/tokens.json","mapbox"),C.commandLine=e.toLowerCase()),C.token}static async fetchToken(t,e){try{const i=await j().get(t),{[e]:o}=i.data;if(null==o||""===o)throw new Error('Missing token "'.concat(e,'"'));return o}catch(i){const e=(0,f.b)(i);throw new V("".concat(e.message," (").concat(t,")"))}}}C.token=void 0,C.commandLine=void 0;var F=i(56129),J=i.n(F),Z=i(87672),z=i(96266);const E=t=>{let{error:e,width:i,deltaType:o}=t;return e instanceof T?(0,z.jsx)(Z.Z,{width:i,name:"No Mapbox token provided",message:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("p",{children:["To use ",(0,z.jsxs)("code",{children:["st.",o]})," or ",(0,z.jsx)("code",{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,z.jsxs)("p",{children:["To get a token, create an account at"," ",(0,z.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,z.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,z.jsx)("code",{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),(0,z.jsxs)("p",{children:["See"," ",(0,z.jsx)("a",{href:"https://docs.streamlit.io/library/advanced-features/configuration#view-all-configuration-options",children:"our documentation"})," ","for more info on how to set config options."]})]})}):e instanceof V?(0,z.jsx)(Z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("p",{children:"This app requires an internet connection."}),(0,z.jsx)("p",{children:"Please check your connection and try again."}),(0,z.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,z.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,z.jsx)(Z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:e.message})},I=t=>e=>{class i extends o.PureComponent{constructor(i){super(i),this.initMapboxToken=async()=>{try{const t=await C.get(this.props.sessionInfo);this.setState({mapboxToken:t,isFetching:!1})}catch(t){const e=(0,f.b)(t);this.setState({mapboxTokenError:e,isFetching:!1})}},this.render=()=>{const{mapboxToken:i,mapboxTokenError:o,isFetching:s}=this.state,{width:n}=this.props;return o?(0,z.jsx)(E,{width:n,error:o,deltaType:t}):s?(0,z.jsx)(S.Z,{body:"Loading...",kind:y.h.INFO,width:n}):(0,z.jsx)(e,{...this.props,mapboxToken:i,width:n})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0},this.initMapboxToken()}}return i.displayName="withMapboxToken(".concat(e.displayName||e.name,")"),J()(i,e)};var L=i(82160);const M=(0,L.Z)("div",{target:"e1az0zs51"})((t=>{let{width:e,height:i,theme:o}=t;return{marginTop:o.spacing.sm,position:"relative",height:i,width:e}}),""),O=(0,L.Z)("div",{target:"e1az0zs50"})((t=>{let{theme:e}=t;return{position:"absolute",right:"2.625rem",top:e.spacing.md,zIndex:1,"button:not(:disabled)":{background:e.colors.bgColor,"& + button":{borderTopColor:e.colors.secondaryBg},"& span":{filter:(0,l.Iy)(e)?"":"invert(100%)"}}}}),"");i(20512);const P={classes:{...d,...g,...m,...u}};(0,k.fh)([w.w,x.E]);const D=new p.Z({configuration:P});class N extends o.PureComponent{constructor(){super(...arguments),this.state={viewState:{bearing:0,pitch:0,zoom:11},initialized:!1,initialViewState:{},id:void 0,pydeckJson:void 0,isFullScreen:!1,isLightTheme:(0,l.Iy)(this.props.theme)},this.componentDidMount=()=>{this.setState({initialized:!0})},this.createTooltip=t=>{const{element:e}=this.props;if(!t||!t.object||!e.tooltip)return!1;const i=n.Z.parse(e.tooltip);return i.html?i.html=this.interpolate(t,i.html):i.text=this.interpolate(t,i.text),i},this.interpolate=(t,e)=>{const i=e.match(/{(.*?)}/g);return i&&i.forEach((i=>{const o=i.substring(1,i.length-1);t.object.hasOwnProperty(o)&&(e=e.replace(i,t.object[o]))})),e},this.onViewStateChange=t=>{let{viewState:e}=t;this.setState({viewState:e})}}static getDerivedStateFromProps(t,e){const i=N.getDeckObject(t,e);if(!r()(i.initialViewState,e.initialViewState)){const t=Object.keys(i.initialViewState).reduce(((t,o)=>i.initialViewState[o]===e.initialViewState[o]?t:{...t,[o]:i.initialViewState[o]}),{});return{viewState:{...e.viewState,...t},initialViewState:i.initialViewState}}return null}render(){const t=N.getDeckObject(this.props,this.state),{viewState:e}=this.state;return(0,z.jsx)(M,{className:"stDeckGlJsonChart",width:t.initialViewState.width,height:t.initialViewState.height,"data-testid":"stDeckGlJsonChart",children:(0,z.jsxs)(s.Z,{viewState:e,onViewStateChange:this.onViewStateChange,height:t.initialViewState.height,width:t.initialViewState.width,layers:this.state.initialized?t.layers:[],getTooltip:this.createTooltip,ContextProvider:c.X$.Provider,controller:!0,children:[(0,z.jsx)(c.Z3,{height:t.initialViewState.height,width:t.initialViewState.width,mapStyle:t.mapStyle&&("string"===typeof t.mapStyle?t.mapStyle:t.mapStyle[0]),mapboxApiAccessToken:this.props.mapboxToken}),(0,z.jsx)(O,{children:(0,z.jsx)(c.Pv,{className:"zoomButton",showCompass:!1})})]})})}}N.getDeckObject=(t,e)=>{var i,o;const{element:s,width:a,height:r,theme:c,isFullScreen:h}=t,d=null!==h&&void 0!==h&&h;var p,m;(s.id===e.id&&e.isFullScreen===d&&e.isLightTheme===(0,l.Iy)(c)||(e.pydeckJson=n.Z.parse(s.json),e.id=s.id),null!==(i=e.pydeckJson)&&void 0!==i&&i.mapStyle||(e.pydeckJson.mapStyle="mapbox://styles/mapbox/".concat((0,l.Iy)(c)?"light":"dark","-v9")),h)?Object.assign(null===(p=e.pydeckJson)||void 0===p?void 0:p.initialViewState,{width:a,height:r}):(null!==(m=e.pydeckJson)&&void 0!==m&&null!==(m=m.initialViewState)&&void 0!==m&&m.height||(e.pydeckJson.initialViewState.height=500),s.useContainerWidth&&(e.pydeckJson.initialViewState.width=a));return e.isFullScreen=h,e.isLightTheme=(0,l.Iy)(c),null===(o=e.pydeckJson)||void 0===o||delete o.views,D.convert(e.pydeckJson)};const _=(0,h.b)(I("st.pydeck_chart")((0,b.Z)(N)))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[5299],{62817:(t,e,n)=>{"use strict";n.r(e),n.d(e,{NUM_BALLOONS:()=>g,default:()=>I});var a=n(5057);const r=n.p+"static/media/balloon-0.0e6e96ece0ea0719d6b6.png",o=n.p+"static/media/balloon-1.a503c271109e9a0fdd2d.png",i=n.p+"static/media/balloon-2.872250f3bf3a8965d655.png",c=n.p+"static/media/balloon-3.e772fafd3bfc55fb439b.png",s=n.p+"static/media/balloon-4.1a74162473d81c9cb9ee.png",l=n.p+"static/media/balloon-5.edb75c74c54165b29856.png";var p,u=n(25094),m=n(82160),d=n(21371);const f=(0,d.F4)(p||(b=["\n from {\n transform: translateY(calc(100vh + ","px));\n }\n\n to {\n transform: translateY(0);\n }\n"],v||(v=b.slice(0)),p=Object.freeze(Object.defineProperties(b,{raw:{value:Object.freeze(v)}}))),300);var b,v;const h=(0,m.Z)("img",{target:"earwcwy0"})((t=>{let{theme:e}=t;return{position:"fixed",top:"".concat(-300,"px"),marginLeft:"".concat(-60.5,"px"),zIndex:e.zIndices.balloons,left:"".concat(60*Math.random()+20,"vw"),animationDelay:"".concat(1e3*Math.random(),"ms"),height:"".concat(300,"px"),width:"".concat(121,"px"),pointerEvents:"none",animationDuration:"750ms",animationName:f,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1}}),"");var x=n(96266);const g=30,y=[r,o,i,c,s,l],N=y.length,j=t=>{let{particleType:e}=t;return(0,x.jsx)(h,{src:y[e]})},w=t=>{let{scriptRunId:e}=t;return(0,x.jsx)(u.Z,{className:"balloons",scriptRunId:e,numParticleTypes:N,numParticles:g,ParticleComponent:j})},I=(0,a.memo)(w)},25094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var a=n(5057),r=n(66904),o=n.n(r),i=n(7742),c=n.n(i),s=n(96266);const l=t=>{let{className:e,scriptRunId:n,numParticles:a,numParticleTypes:r,ParticleComponent:i}=t;return(0,s.jsx)("div",{className:c()(e,"stHidden"),"data-testid":"".concat(e),children:o()(a).map((t=>{const e=Math.floor(Math.random()*r);return(0,s.jsx)(i,{particleType:e},n+t)}))})},p=(0,a.memo)(l)},99980:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,a,r,o){for(var i=-1,c=n(e((a-t)/(r||1)),0),s=Array(c);c--;)s[o?c:++i]=t,t+=r;return s}},39594:(t,e,n)=>{var a=n(36418),r=/^\s+/;t.exports=function(t){return t?t.slice(0,a(t)+1).replace(r,""):t}},9186:(t,e,n)=>{var a=n(99980),r=n(27396),o=n(17046);t.exports=function(t){return function(e,n,i){return i&&"number"!=typeof i&&r(e,n,i)&&(n=i=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),i=void 0===i?e<n?1:-1:o(i),a(e,n,i,t)}}},36418:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},66904:(t,e,n)=>{var a=n(9186)();t.exports=a},17046:(t,e,n)=>{var a=n(81692),r=1/0;t.exports=function(t){return t?(t=a(t))===r||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},81692:(t,e,n)=>{var a=n(39594),r=n(26271),o=n(71490),i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=a(t);var n=c.test(t);return n||s.test(t)?l(t.slice(2),n?2:8):i.test(t)?NaN:+t}}}]);
|