streamlit-nightly 1.45.2.dev20250527__py3-none-any.whl → 1.45.2.dev20250530__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/auth_util.py +3 -3
- streamlit/commands/echo.py +1 -1
- streamlit/config.py +32 -12
- streamlit/config_option.py +3 -5
- streamlit/config_util.py +4 -5
- streamlit/connections/snowflake_connection.py +4 -3
- streamlit/delta_generator.py +10 -14
- streamlit/elements/arrow.py +1 -0
- streamlit/elements/deck_gl_json_chart.py +1 -0
- streamlit/elements/doc_string.py +7 -15
- streamlit/elements/exception.py +4 -12
- streamlit/elements/form.py +14 -0
- streamlit/elements/graphviz_chart.py +1 -1
- streamlit/elements/heading.py +3 -4
- streamlit/elements/json.py +7 -6
- streamlit/elements/layouts.py +21 -3
- streamlit/elements/lib/image_utils.py +2 -3
- streamlit/elements/lib/layout_utils.py +24 -0
- streamlit/elements/lib/mutable_status_container.py +9 -0
- streamlit/elements/lib/streamlit_plotly_theme.py +54 -53
- streamlit/elements/lib/utils.py +15 -0
- streamlit/elements/markdown.py +34 -4
- streamlit/elements/media.py +1 -1
- streamlit/elements/plotly_chart.py +1 -0
- streamlit/elements/progress.py +6 -15
- streamlit/elements/spinner.py +5 -4
- streamlit/elements/vega_charts.py +1 -0
- streamlit/elements/widgets/audio_input.py +4 -10
- streamlit/elements/widgets/button.py +3 -1
- streamlit/elements/widgets/button_group.py +1 -0
- streamlit/elements/widgets/camera_input.py +6 -9
- streamlit/elements/widgets/chat.py +11 -13
- streamlit/elements/widgets/checkbox.py +1 -0
- streamlit/elements/widgets/color_picker.py +9 -14
- streamlit/elements/widgets/data_editor.py +9 -5
- streamlit/elements/widgets/file_uploader.py +10 -9
- streamlit/elements/widgets/multiselect.py +1 -0
- streamlit/elements/widgets/number_input.py +12 -12
- streamlit/elements/widgets/radio.py +2 -1
- streamlit/elements/widgets/select_slider.py +4 -10
- streamlit/elements/widgets/selectbox.py +11 -13
- streamlit/elements/widgets/slider.py +28 -41
- streamlit/elements/widgets/text_widgets.py +16 -24
- streamlit/elements/widgets/time_widgets.py +15 -22
- streamlit/hello/animation_demo.py +9 -9
- streamlit/hello/dataframe_demo.py +2 -2
- streamlit/hello/hello.py +1 -0
- streamlit/hello/mapping_demo.py +5 -6
- streamlit/hello/streamlit_app.py +27 -25
- streamlit/logger.py +1 -1
- streamlit/proto/AudioInput_pb2.py +3 -4
- streamlit/proto/AudioInput_pb2.pyi +2 -7
- streamlit/proto/Block_pb2.py +27 -27
- streamlit/proto/Block_pb2.pyi +3 -17
- streamlit/proto/CameraInput_pb2.py +3 -4
- streamlit/proto/CameraInput_pb2.pyi +2 -8
- streamlit/proto/ChatInput_pb2.py +7 -8
- streamlit/proto/ChatInput_pb2.pyi +1 -10
- streamlit/proto/Code_pb2.py +3 -4
- streamlit/proto/DateInput_pb2.py +3 -4
- streamlit/proto/DateInput_pb2.pyi +2 -8
- streamlit/proto/DocString_pb2.py +5 -6
- streamlit/proto/DocString_pb2.pyi +1 -9
- streamlit/proto/FileUploader_pb2.py +3 -4
- streamlit/proto/FileUploader_pb2.pyi +2 -8
- streamlit/proto/Json_pb2.py +3 -4
- streamlit/proto/Json_pb2.pyi +2 -9
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +7 -2
- streamlit/proto/NumberInput_pb2.py +5 -6
- streamlit/proto/NumberInput_pb2.pyi +2 -9
- streamlit/proto/Progress_pb2.py +3 -4
- streamlit/proto/Progress_pb2.pyi +1 -7
- streamlit/proto/Selectbox_pb2.py +3 -4
- streamlit/proto/Selectbox_pb2.pyi +2 -9
- streamlit/proto/Slider_pb2.py +7 -8
- streamlit/proto/Slider_pb2.pyi +2 -8
- streamlit/proto/TextArea_pb2.py +3 -4
- streamlit/proto/TextArea_pb2.pyi +2 -9
- streamlit/proto/TextInput_pb2.py +5 -6
- streamlit/proto/TextInput_pb2.pyi +2 -9
- streamlit/proto/TimeInput_pb2.py +3 -4
- streamlit/proto/TimeInput_pb2.pyi +2 -9
- streamlit/runtime/app_session.py +11 -8
- streamlit/runtime/caching/hashing.py +8 -9
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +3 -3
- streamlit/runtime/connection_factory.py +12 -12
- streamlit/runtime/credentials.py +13 -26
- streamlit/runtime/runtime_util.py +2 -2
- streamlit/runtime/scriptrunner/script_runner.py +8 -7
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +1240 -0
- streamlit/static/static/js/{ErrorOutline.esm.qteVcUUN.js → ErrorOutline.esm.D5NgCh5m.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.ncu7N-Hr.js → FileDownload.esm.NuObx1Tl.js} +1 -1
- streamlit/static/static/js/{FileHelper.zsMZ7RXt.js → FileHelper.BH7o4_P9.js} +5 -5
- streamlit/static/static/js/{FormClearHelper.W8yVYXZp.js → FormClearHelper.BAxB8JFY.js} +1 -1
- streamlit/static/static/js/{Hooks.DBj6srQ1.js → Hooks.Bjt8oBOT.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BobLsJJb.js → InputInstructions.BZZLp6t9.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CtvJrIzN.js → ProgressBar.BwRgGfI0.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.DnT_UdzV.js → RenderInPortalIfExists.C_c286r8.js} +1 -1
- streamlit/static/static/js/{Toolbar.BVF7NtOB.js → Toolbar.5tXjF_eX.js} +1 -1
- streamlit/static/static/js/{base-input.B4sdS3vw.js → base-input.wfBDFTlB.js} +1 -1
- streamlit/static/static/js/{checkbox.DKDitzF8.js → checkbox.D1GhNngU.js} +1 -1
- streamlit/static/static/js/{createSuper.mhx956J9.js → createSuper.CudEEVs2.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.CmXS0PAX.js → data-grid-overlay-editor.DUTI_Rbg.js} +1 -1
- streamlit/static/static/js/{downloader.Cnd9SuxG.js → downloader.BwLpAoXN.js} +1 -1
- streamlit/static/static/js/{es6.DM-pf09u.js → es6.B_HLnUb9.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.Gc5GAjZM.js → iframeResizer.contentWindow.BNcjOcan.js} +1 -1
- streamlit/static/static/js/{index.D4XRYl23.js → index.3WJoJFGb.js} +1 -1
- streamlit/static/static/js/{index.C_2m4F7k.js → index.B0h616Th.js} +1 -1
- streamlit/static/static/js/{index.p2Wl4zMi.js → index.B0paBg5x.js} +1 -1
- streamlit/static/static/js/index.B3vWaIrN.js +1 -0
- streamlit/static/static/js/{index.B45ExNhw.js → index.B4PbMsBe.js} +1 -1
- streamlit/static/static/js/{index.BWTBe3a1.js → index.BGKVW2u9.js} +1 -1
- streamlit/static/static/js/index.BJQPxOFd.js +12 -0
- streamlit/static/static/js/{index.DdyZtGcg.js → index.BOHEcsVb.js} +1 -1
- streamlit/static/static/js/{index.BR-S54Iv.js → index.BPGAPI9w.js} +1 -1
- streamlit/static/static/js/{index.gBOr8z2K.js → index.Bj6uLiaA.js} +1 -1
- streamlit/static/static/js/{index.I3iNnzJx.js → index.BkvVxUIW.js} +1 -1
- streamlit/static/static/js/{index._BaeK1t7.js → index.Bs0m0eUy.js} +1 -1
- streamlit/static/static/js/{index.DwUISpCs.js → index.BtpsTdHN.js} +177 -174
- streamlit/static/static/js/index.C1GNiWbH.js +1 -0
- streamlit/static/static/js/{index.B6xTo8b8.js → index.CL0UH4WF.js} +1 -1
- streamlit/static/static/js/{index.BJQNG4O1.js → index.CXP5ffxh.js} +1 -1
- streamlit/static/static/js/{index.DAvhwYMG.js → index.Ca-9xoC2.js} +1 -1
- streamlit/static/static/js/{index.COBionvf.js → index.Cdd7Ri21.js} +1 -1
- streamlit/static/static/js/index.Cf8KcH2X.js +1 -0
- streamlit/static/static/js/{index.BkLkRTpZ.js → index.CfzaRR6P.js} +1 -1
- streamlit/static/static/js/{index.CkKptP1T.js → index.CjRwuAdg.js} +1 -1
- streamlit/static/static/js/{index.CjBaoWYr.js → index.CkOUlPYT.js} +1 -1
- streamlit/static/static/js/{index.DQGSbu2C.js → index.CxtkoiKl.js} +1 -1
- streamlit/static/static/js/index.D3wYqvI6.js +1 -0
- streamlit/static/static/js/index.D8i27llu.js +3 -0
- streamlit/static/static/js/{index.BfusYuD8.js → index.DA7wmIe4.js} +1 -1
- streamlit/static/static/js/index.DIG9Mo9J.js +1 -0
- streamlit/static/static/js/index.DNR4wKJg.js +1 -0
- streamlit/static/static/js/{index.B29JQLHa.js → index.DNS8a-dx.js} +20 -20
- streamlit/static/static/js/{index.BNNR5Jmd.js → index.NveskZ7j.js} +1 -1
- streamlit/static/static/js/{index.CWgnk1N4.js → index.PR2mcvVR.js} +1 -1
- streamlit/static/static/js/{index.CJ-XXd1r.js → index.df4uuSoD.js} +1 -1
- streamlit/static/static/js/{index.WWYmGCrM.js → index.flyQEkeT.js} +1 -1
- streamlit/static/static/js/{index.vOqxh1m2.js → index.iF9jUtwl.js} +1 -1
- streamlit/static/static/js/{index.C5KKmyWy.js → index.jyqBAhvH.js} +1 -1
- streamlit/static/static/js/{index.AWkO-7e-.js → index.sYLAHlH0.js} +1 -1
- streamlit/static/static/js/{index.CZ5fZcT5.js → index.zq3LdRhj.js} +1 -1
- streamlit/static/static/js/{input.BvD9DHLa.js → input.CtZjQ6Pv.js} +1 -1
- streamlit/static/static/js/{memory.DCVB1HOm.js → memory.Ddl3R0up.js} +1 -1
- streamlit/static/static/js/{mergeWith.BqTORFAq.js → mergeWith.D-TqDY0-.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.VB_OvuPv.js → number-overlay-editor.Dndf05Hx.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DhYxBDlj.js → possibleConstructorReturn.DNEY6J9G.js} +1 -1
- streamlit/static/static/js/{sandbox.CoN7LRFk.js → sandbox.B_XDPkfx.js} +1 -1
- streamlit/static/static/js/{textarea.DkHpIjdT.js → textarea.BZ9lTMhV.js} +1 -1
- streamlit/static/static/js/{timepicker.C8UIzYhf.js → timepicker.D9UUwpRT.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DXfr1fvT.js → toConsumableArray.DNJjbOUS.js} +1 -1
- streamlit/static/static/js/{uniqueId.CgrMSBTb.js → uniqueId.psBJ_tSg.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.C-e-WEFS.js → useBasicWidgetState.CTpx4w-3.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.CtRJhZD6.js → useOnInputChange.WKTDSC4O.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.od0SAvAK.js → withFullScreenWrapper.oyWCn2-3.js} +1 -1
- streamlit/watcher/local_sources_watcher.py +1 -1
- streamlit/watcher/path_watcher.py +2 -3
- streamlit/web/bootstrap.py +1 -1
- streamlit/web/cli.py +5 -5
- streamlit/web/server/authlib_tornado_integration.py +3 -3
- streamlit/web/server/oauth_authlib_routes.py +4 -2
- streamlit/web/server/oidc_mixin.py +6 -5
- streamlit/web/server/server.py +1 -1
- {streamlit_nightly-1.45.2.dev20250527.dist-info → streamlit_nightly-1.45.2.dev20250530.dist-info}/METADATA +2 -2
- {streamlit_nightly-1.45.2.dev20250527.dist-info → streamlit_nightly-1.45.2.dev20250530.dist-info}/RECORD +172 -171
- streamlit/static/static/js/index.B0E6Rv1F.js +0 -1
- streamlit/static/static/js/index.BONHiJUZ.js +0 -1
- streamlit/static/static/js/index.BV38yp5k.js +0 -1
- streamlit/static/static/js/index.CgOynO1t.js +0 -1
- streamlit/static/static/js/index.DIyx-z1Q.js +0 -1
- streamlit/static/static/js/index.DOYomqqU.js +0 -1
- streamlit/static/static/js/index.DOl-SOKu.js +0 -3
- streamlit/static/static/js/index.DTU7qmDP.js +0 -12
- {streamlit_nightly-1.45.2.dev20250527.data → streamlit_nightly-1.45.2.dev20250530.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.2.dev20250527.dist-info → streamlit_nightly-1.45.2.dev20250530.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.45.2.dev20250527.dist-info → streamlit_nightly-1.45.2.dev20250530.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.2.dev20250527.dist-info → streamlit_nightly-1.45.2.dev20250530.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as g,bN as oe,bO as ie,bP as ae,bQ as le,cf as s,ch as w,bs as F,ci as de,bJ as J,cg as z,bt as C,bX as Y,bY as Q}from"./index.
|
1
|
+
import{r as g,bN as oe,bO as ie,bP as ae,bQ as le,cf as s,ch as w,bs as F,ci as de,bJ as J,cg as z,bt as C,bX as Y,bY as Q}from"./index.BtpsTdHN.js";var pe=["title","size","color","overrides"];function D(){return D=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},D.apply(this,arguments)}function fe(e,t){if(e==null)return{};var r=ge(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ge(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function ye(e,t){return me(e)||ve(e,t)||he(e,t)||be()}function be(){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 he(e,t){if(e){if(typeof e=="string")return X(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 X(e,t)}}function X(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 ve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function me(e){if(Array.isArray(e))return e}function $e(e,t){var r=oe(),n=ye(r,2),o=n[1],i=e.title,a=i===void 0?"Hide":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,y=fe(e,pe),b=ie({component:o.icons&&o.icons.Hide?o.icons.Hide:null},d&&d.Svg?ae(d.Svg):{});return g.createElement(le,D({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},y),g.createElement("path",{d:"M12.81 4.36l-1.77 1.78a4 4 0 00-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0112.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 01-12.62 5.64l1.77-1.78a4 4 0 004.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42L16.36 2.22z"}))}const Oe=g.forwardRef($e);var Ce=["title","size","color","overrides"];function N(){return N=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},N.apply(this,arguments)}function Se(e,t){if(e==null)return{};var r=_e(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _e(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ie(e,t){return Te(e)||Fe(e,t)||we(e,t)||Pe()}function Pe(){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 we(e,t){if(e){if(typeof e=="string")return G(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 G(e,t)}}function G(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 Fe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Te(e){if(Array.isArray(e))return e}function ke(e,t){var r=oe(),n=Ie(r,2),o=n[1],i=e.title,a=i===void 0?"Show":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,y=Se(e,Ce),b=ie({component:o.icons&&o.icons.Show?o.icons.Show:null},d&&d.Svg?ae(d.Svg):{});return g.createElement(le,N({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},y),g.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const Ee=g.forwardRef(ke);function ee(e,t){var r=e.disabled,n=e.error,o=e.positive,i=e.adjoined,a=e.size,l=e.required,u=e.resize,c=e.readOnly,d=t.isFocused;return{$isFocused:d,$disabled:r,$error:n,$positive:o,$adjoined:i,$size:a,$required:l,$resize:u,$isReadOnly:c}}function te(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 h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?te(Object(r),!0).forEach(function(n){p(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return 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 K=F("button",function(e){var t,r=e.$theme,n=e.$size,o=e.$isFocusVisible,i=(t={},p(t,s.mini,r.sizing.scale400),p(t,s.compact,r.sizing.scale400),p(t,s.default,r.sizing.scale300),p(t,s.large,r.sizing.scale200),t)[n];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:o?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}});K.displayName="StyledMaskToggleButton";K.displayName="StyledMaskToggleButton";var Z=F("div",function(e){var t,r=e.$alignTop,n=r===void 0?!1:r,o=e.$size,i=e.$theme,a=(t={},p(t,s.mini,i.sizing.scale200),p(t,s.compact,i.sizing.scale200),p(t,s.default,i.sizing.scale100),p(t,s.large,i.sizing.scale0),t)[o];return{display:"flex",alignItems:n?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:n?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});Z.displayName="StyledClearIconContainer";Z.displayName="StyledClearIconContainer";var H=F(de,function(e){var t=e.$theme,r=e.$isFocusVisible;return{cursor:"pointer",outline:r?"solid 3px ".concat(t.colors.accent):"none"}});H.displayName="StyledClearIcon";H.displayName="StyledClearIcon";function Re(e,t){var r;return(r={},p(r,s.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}function xe(e,t,r,n,o){var i=e===w.both||e===w.left&&n!=="rtl"||e===w.right&&n==="rtl"||o&&n==="rtl",a=e===w.both||e===w.right&&n!=="rtl"||e===w.left&&n==="rtl"||o&&n!=="rtl";return{paddingLeft:i?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}function A(e,t){var r;return(r={},p(r,s.mini,t.font100),p(r,s.compact,t.font200),p(r,s.default,t.font300),p(r,s.large,t.font400),r)[e]}function Be(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:o.inputFillDisabled,borderRightColor:o.inputFillDisabled,borderTopColor:o.inputFillDisabled,borderBottomColor:o.inputFillDisabled,backgroundColor:o.inputFillDisabled}:t?{borderLeftColor:o.borderSelected,borderRightColor:o.borderSelected,borderTopColor:o.borderSelected,borderBottomColor:o.borderSelected,backgroundColor:o.inputFillActive}:r?{borderLeftColor:o.inputBorderError,borderRightColor:o.inputBorderError,borderTopColor:o.inputBorderError,borderBottomColor:o.inputBorderError,backgroundColor:o.inputFillError}:n?{borderLeftColor:o.inputBorderPositive,borderRightColor:o.inputBorderPositive,borderTopColor:o.inputBorderPositive,borderBottomColor:o.inputBorderPositive,backgroundColor:o.inputFillPositive}:{borderLeftColor:o.inputBorder,borderRightColor:o.inputBorder,borderTopColor:o.inputBorder,borderBottomColor:o.inputBorder,backgroundColor:o.inputFill}}function je(e,t){var r=t.inputBorderRadius;return e===s.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}var Ae=function(t){var r=t.$isFocused,n=t.$adjoined,o=t.$error,i=t.$disabled,a=t.$positive,l=t.$size,u=t.$theme,c=t.$theme,d=c.borders,y=c.colors,b=c.sizing,I=c.typography,$=c.animation,_=t.$hasIconTrailing;return h(h(h(h({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:$.timing200,transitionTimingFunction:$.easeOutCurve},je(l,d)),A(l,I)),Be(i,r,o,a,y)),xe(n,l,b,u.direction,_))},se=F("div",Ae);se.displayName="Root";se.displayName="Root";function Me(e,t){var r;return(r={},p(r,s.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),p(r,s.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),p(r,s.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),p(r,s.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}function Le(e,t,r,n,o){return e?{color:o.inputEnhancerTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var ue=F("div",function(e){var t=e.$size,r=e.$disabled,n=e.$isFocused,o=e.$error,i=e.$positive,a=e.$theme,l=a.colors,u=a.sizing,c=a.typography,d=a.animation;return h(h(h({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},A(t,c)),Me(t,u)),Le(r,n,o,i,l))});ue.displayName="InputEnhancer";ue.displayName="InputEnhancer";function ze(e,t,r,n,o){return e?{color:o.inputTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var De=function(t){var r=t.$isFocused,n=t.$error,o=t.$disabled,i=t.$positive,a=t.$size,l=t.$theme,u=l.colors,c=l.typography,d=l.animation;return h(h({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},A(a,c)),ze(o,r,n,i,u))},U=F("div",De);U.displayName="InputContainer";U.displayName="InputContainer";function Ne(e,t,r,n){return e?{color:n.inputTextDisabled,"-webkit-text-fill-color":n.inputTextDisabled,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholderDisabled}}:{color:n.contentPrimary,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholder}}}var Ve=function(t){var r=t.$disabled,n=t.$isFocused,o=t.$error,i=t.$size,a=t.$theme,l=a.colors,u=a.sizing,c=a.typography;return h(h(h({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},A(i,c)),Re(i,u)),Ne(r,n,o,l))},q=F("input",Ve);q.displayName="Input";q.displayName="Input";function We(e){var t;return typeof window.Event=="function"?t=new window.Event(e,{bubbles:!0,cancelable:!0}):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}function V(e){"@babel/helpers - typeof";return V=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},V(e)}function m(){return m=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},m.apply(this,arguments)}function S(e,t){return Ue(e)||He(e,t)||Ze(e,t)||Ke()}function Ke(){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 Ze(e,t){if(e){if(typeof e=="string")return re(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 re(e,t)}}function re(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 He(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Ue(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Je(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 Ye(e,t,r){return t&&Je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},W(e,t)}function Xe(e){var t=et();return function(){var n=j(e),o;if(t){var i=j(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ge(this,o)}}function Ge(e,t){if(t&&(V(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function et(){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 j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},j(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ne=function(){return null},tt=function(e){Qe(r,e);var t=Xe(r);function r(){var n;qe(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),f(v(n),"inputRef",n.props.inputRef||g.createRef()),f(v(n),"state",{isFocused:n.props.autoFocus||!1,isMasked:n.props.type==="password",initialType:n.props.type,isFocusVisibleForClear:!1,isFocusVisibleForMaskToggle:!1}),f(v(n),"onInputKeyDown",function(l){n.props.clearOnEscape&&l.key==="Escape"&&n.inputRef.current&&!n.props.readOnly&&(n.clearValue(),l.stopPropagation())}),f(v(n),"onClearIconClick",function(){n.inputRef.current&&n.clearValue(),n.inputRef.current&&n.inputRef.current.focus()}),f(v(n),"onFocus",function(l){n.setState({isFocused:!0}),n.props.onFocus(l)}),f(v(n),"onBlur",function(l){n.setState({isFocused:!1}),n.props.onBlur(l)}),f(v(n),"handleFocusForMaskToggle",function(l){J(l)&&n.setState({isFocusVisibleForMaskToggle:!0})}),f(v(n),"handleBlurForMaskToggle",function(l){n.state.isFocusVisibleForMaskToggle!==!1&&n.setState({isFocusVisibleForMaskToggle:!1})}),f(v(n),"handleFocusForClear",function(l){J(l)&&n.setState({isFocusVisibleForClear:!0})}),f(v(n),"handleBlurForClear",function(l){n.state.isFocusVisibleForClear!==!1&&n.setState({isFocusVisibleForClear:!1})}),n}return Ye(r,[{key:"componentDidMount",value:function(){var o=this.props,i=o.autoFocus,a=o.clearable;this.inputRef.current&&(i&&this.inputRef.current.focus(),a&&this.inputRef.current.addEventListener("keydown",this.onInputKeyDown))}},{key:"componentWillUnmount",value:function(){var o=this.props.clearable;o&&this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.onInputKeyDown)}},{key:"clearValue",value:function(){var o=this.inputRef.current;if(o){var i=Object.getOwnPropertyDescriptor(this.props.type===z.textarea?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value");if(i){var a=i.set;if(a){a.call(o,"");var l=We("input");o.dispatchEvent(l)}}}}},{key:"getInputType",value:function(){return this.props.type==="password"?this.state.isMasked?"password":"text":this.props.type}},{key:"renderMaskToggle",value:function(){var o,i=this;if(this.props.type!=="password")return null;var a=C(this.props.overrides.MaskToggleButton,K),l=S(a,2),u=l[0],c=l[1],d=C(this.props.overrides.MaskToggleShowIcon,Ee),y=S(d,2),b=y[0],I=y[1],$=C(this.props.overrides.MaskToggleHideIcon,Oe),_=S($,2),T=_[0],x=_[1],O=this.state.isMasked?"Show password text":"Hide password text",k=(o={},f(o,s.mini,"12px"),f(o,s.compact,"16px"),f(o,s.default,"20px"),f(o,s.large,"24px"),o)[this.props.size];return g.createElement(u,m({$size:this.props.size,$isFocusVisible:this.state.isFocusVisibleForMaskToggle,"aria-label":O,onClick:function(){return i.setState(function(E){return{isMasked:!E.isMasked}})},title:O,type:"button"},c,{onFocus:Q(c,this.handleFocusForMaskToggle),onBlur:Y(c,this.handleBlurForMaskToggle)}),this.state.isMasked?g.createElement(b,m({size:k,title:O},I)):g.createElement(T,m({size:k,title:O},x)))}},{key:"renderClear",value:function(){var o,i=this,a=this.props,l=a.clearable,u=a.value,c=a.disabled,d=a.readOnly,y=a.overrides,b=y===void 0?{}:y;if(c||d||!l||u==null||typeof u=="string"&&u.length===0)return null;var I=C(b.ClearIconContainer,Z),$=S(I,2),_=$[0],T=$[1],x=C(b.ClearIcon,H),O=S(x,2),k=O[0],P=O[1],E="Clear value",B=ee(this.props,this.state),M=(o={},f(o,s.mini,"14px"),f(o,s.compact,"14px"),f(o,s.default,"16px"),f(o,s.large,"22px"),o)[this.props.size];return g.createElement(_,m({$alignTop:this.props.type===z.textarea},B,T),g.createElement(k,m({size:M,tabIndex:0,title:E,"aria-label":E,onClick:this.onClearIconClick,onKeyDown:function(R){R.key&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),i.onClearIconClick())},role:"button",$isFocusVisible:this.state.isFocusVisibleForClear},B,P,{onFocus:Q(P,this.handleFocusForClear),onBlur:Y(P,this.handleBlurForClear)})))}},{key:"render",value:function(){var o=this.props.overrides,i=o.InputContainer,a=o.Input,l=o.Before,u=o.After,c=this.state.initialType==="password"&&this.props.autoComplete===r.defaultProps.autoComplete?"new-password":this.props.autoComplete,d=ee(this.props,this.state),y=C(i,U),b=S(y,2),I=b[0],$=b[1],_=C(a,q),T=S(_,2),x=T[0],O=T[1],k=C(l,ne),P=S(k,2),E=P[0],B=P[1],M=C(u,ne),L=S(M,2),R=L[0],ce=L[1];return g.createElement(I,m({"data-baseweb":this.props["data-baseweb"]||"base-input"},d,$),g.createElement(E,m({},d,B)),g.createElement(x,m({ref:this.inputRef,"aria-activedescendant":this.props["aria-activedescendant"],"aria-autocomplete":this.props["aria-autocomplete"],"aria-controls":this.props["aria-controls"],"aria-errormessage":this.props["aria-errormessage"],"aria-haspopup":this.props["aria-haspopup"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props.error,"aria-required":this.props.required,autoComplete:c,disabled:this.props.disabled,readOnly:this.props.readOnly,id:this.props.id,inputMode:this.props.inputMode,maxLength:this.props.maxLength,name:this.props.name,onBlur:this.onBlur,onChange:this.props.onChange,onFocus:this.onFocus,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,pattern:this.props.pattern,placeholder:this.props.placeholder,type:this.getInputType(),required:this.props.required,role:this.props.role,value:this.props.value,min:this.props.min,max:this.props.max,step:this.props.step,rows:this.props.type===z.textarea?this.props.rows:null},d,O)),this.renderClear(),this.renderMaskToggle(),g.createElement(R,m({},d,ce)))}}]),r}(g.Component);f(tt,"defaultProps",{"aria-activedescendant":null,"aria-autocomplete":null,"aria-controls":null,"aria-errormessage":null,"aria-haspopup":null,"aria-label":null,"aria-labelledby":null,"aria-describedby":null,adjoined:w.none,autoComplete:"on",autoFocus:!1,disabled:!1,error:!1,positive:!1,name:"",inputMode:"text",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},onClear:function(){},clearable:!1,clearOnEscape:!0,overrides:{},pattern:null,placeholder:"",required:!1,role:null,size:s.default,type:"text",readOnly:!1});export{tt as B,q as I,se as R,De as a,Ve as b,ue as c,ee as d,Ae as g};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{bs as $,bJ as ie,bK as v,r as u,bL as p}from"./index.
|
1
|
+
import{bs as $,bJ as ie,bK as v,r as u,bL as p}from"./index.BtpsTdHN.js";var T=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ye=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function U(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?U(Object(o),!0).forEach(function(r){q(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function q(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ne(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,a=e.$theme,n=e.$isFocusVisible,l=a.colors;return t?l.tickFillDisabled:o||i?"transparent":r?l.borderNegative:n?l.borderSelected:l.tickBorder}function ae(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,a=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),q({},"padding".concat(n),a)}function le(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,a=e.$isHovered,n=e.$isActive,l=e.$theme,c=l.colors;return t?o||r?c.tickFillDisabled:c.tickFill:i&&(r||o)?n?c.tickFillErrorSelectedHoverActive:a?c.tickFillErrorSelectedHover:c.tickFillErrorSelected:i?n?c.tickFillErrorHoverActive:a?c.tickFillErrorHover:c.tickFillError:r||o?n?c.tickFillSelectedHoverActive:a?c.tickFillSelectedHover:c.tickFillSelected:n?c.tickFillActive:a?c.tickFillHover:c.tickFill}function ce(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var x=$("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});x.displayName="Root";x.displayName="Root";var E=$("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,a=e.$theme,n=e.$isFocusVisible,l=a.sizing,c=a.animation,s=o?a.colors.tickMarkFillDisabled:r?a.colors.tickMarkFillError:a.colors.tickMarkFill,w=encodeURIComponent(`
|
2
2
|
<svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
3
|
<path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
|
4
4
|
</svg>
|
@@ -1 +1 @@
|
|
1
|
-
import{c as n,d as s}from"./possibleConstructorReturn.
|
1
|
+
import{c as n,d as s}from"./possibleConstructorReturn.DNEY6J9G.js";function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c=function(){return!!t})()}function i(t){var r=c();return function(){var e,o=n(t);if(r){var u=n(this).constructor;e=Reflect.construct(o,arguments,u)}else e=o.apply(this,arguments);return s(this,e)}}export{i as _};
|
@@ -1 +1 @@
|
|
1
|
-
import{r,b as z}from"./index.
|
1
|
+
import{r,b as z}from"./index.BtpsTdHN.js";import{s as J,i as w,a as Q,b as U,T as Z,C as ee,m as te}from"./index.DNS8a-dx.js";import"./FormClearHelper.BAxB8JFY.js";import"./withFullScreenWrapper.oyWCn2-3.js";import"./Toolbar.5tXjF_eX.js";import"./checkbox.D1GhNngU.js";import"./mergeWith.D-TqDY0-.js";import"./sprintf.D7DtBTRn.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./toConsumableArray.DNJjbOUS.js";import"./possibleConstructorReturn.DNEY6J9G.js";import"./createSuper.CudEEVs2.js";import"./FileDownload.esm.NuObx1Tl.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,ne=()=>t=>t.targetWidth,se=()=>t=>t.targetHeight,ae=()=>t=>t.targetY+10,oe=()=>t=>Math.max(0,(t.targetHeight-28)/2),de=J("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ie(),"px"],"d19meir1-1":[re(),"px"],"d19meir1-2":[ne(),"px"],"d19meir1-3":[se(),"px"],"d19meir1-4":[ae(),"px"],"d19meir1-5":[oe(),"px"]}});function le(){const[t,s]=r.useState();return[t??void 0,s]}function ue(){const[t,s]=le(),[n,y]=r.useState(0),[g,x]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&x(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(g||t===void 0)return;let a;const o=()=>{const{right:v}=t.getBoundingClientRect();y(p=>Math.min(p+window.innerWidth-v-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,g]);const O=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:O}}const Se=t=>{const{target:s,content:n,onFinishEditing:y,forceEditMode:g,initialValue:x,imageEditorOverride:O,markdownDivCreateNode:a,highlight:o,className:v,theme:p,id:H,cell:S,bloom:c,validateCell:d,getCellRenderer:F,provideEditor:h,isOutsideClick:X,customEventTarget:A}=t,[l,K]=r.useState(g?n:void 0),k=r.useRef(l??n);k.current=l??n;const[E,R]=r.useState(()=>d===void 0?!0:!(w(n)&&(d==null?void 0:d(S,n,k.current))===!1)),f=r.useCallback((e,i)=>{y(E?e:void 0,i)},[E,y]),W=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&w(e)){const i=d(S,e,k.current);i===!1?R(!1):(typeof i=="object"&&(e=i),R(!0))}K(e)},[S,d]),C=r.useRef(!1),m=r.useRef(void 0),Y=r.useCallback(()=>{f(l,[0,0]),C.current=!0},[l,f]),j=r.useCallback((e,i)=>{f(e,i??m.current??[0,0]),C.current=!0},[f]),q=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!C.current&&m.current!==void 0&&(f(i?l:void 0,m.current),C.current=!0)},0)},[f,l]),D=l??n,[u,B]=r.useMemo(()=>{var i,G;if(Q(n))return[];const e=h==null?void 0:h(n);return e!==void 0?[e,!1]:[(G=(i=F(n))==null?void 0:i.provideEditor)==null?void 0:G.call(i,n),!1]},[n,F,h]),{ref:L,style:$}=ue();let P=!0,T,M=!0,b;if(u!==void 0){P=u.disablePadding!==!0,M=u.disableStyling!==!0;const e=U(u);e&&(b=u.styleOverride);const i=e?u.editor:u;T=r.createElement(i,{isHighlighted:o,onChange:W,value:D,initialValue:x,onFinishedEditing:j,validatedSelection:w(D)?D.selectionRange:void 0,forceEditMode:g,target:s,imageEditorOverride:O,markdownDivCreateNode:a,isValid:E,theme:p})}b={...b,...$};const _=document.getElementById("portal");if(_===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let I=M?"gdg-style":"gdg-unstyle";E||(I+=" gdg-invalid"),P&&(I+=" gdg-pad");const N=(c==null?void 0:c[0])??1,V=(c==null?void 0:c[1])??1;return z.createPortal(r.createElement(Z.Provider,{value:p},r.createElement(ee,{style:te(p),className:v,onClickOutside:Y,isOutsideClick:X,customEventTarget:A},r.createElement(de,{ref:L,id:H,className:I,style:b,as:B===!0?"label":void 0,targetX:s.x-N,targetY:s.y-V,targetWidth:s.width+N*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:q},T)))),_)};export{Se as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{c as b,e as P}from"./es6.
|
1
|
+
import{c as b,e as P}from"./es6.B_HLnUb9.js";import"./index.BtpsTdHN.js";const{WritableStream:y,TransformStream:_,DOMException:v,Blob:u}=b,{GONE:E}=P,M=/constructor/i.test(window.HTMLElement);class F{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...E)}async isSameEntry(e){return this===e}async createWritable(e={}){var d;const t=await((d=navigator.serviceWorker)==null?void 0:d.getRegistration()),o=document.createElement("a"),n=new _,R=n.writable;if(o.download=this.name,M||!t){let r=[];n.readable.pipeTo(new y({write(s){r.push(new u([s]))},close(){const s=new u(r,{type:"application/octet-stream; charset=utf-8"});r=[],o.href=URL.createObjectURL(s),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:r,readablePort:s}=new j(y),a=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+a,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>t.active.postMessage(0),1e4);n.readable.pipeThrough(new _({transform(c,h){if(c instanceof Uint8Array)return h.enqueue(c);const w=new Response(c).body.getReader(),p=W=>w.read().then(m=>m.done?0:p(h.enqueue(m.value)));return p()}})).pipeTo(r).finally(()=>{clearInterval(g)}),t.active.postMessage({url:t.scope+a,headers:f,readablePort:s},[s]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+a,document.body.appendChild(i)}return R.getWriter()}}const T=0,L=0,O=1,U=1,k=2;class S{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:T,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:k}),this._port.close()}abort(e){this._port.postMessage({type:U,reason:e}),this._port.close()}_onMessage(e){e.type===L&&this._resolveReady(),e.type===O&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class j{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new S(t.port2))}}export{F as FileHandle};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./downloader.
|
2
|
-
var G=Object.defineProperty;var R=a=>{throw TypeError(a)};var Y=(a,t,e)=>t in a?G(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var g=(a,t,e)=>Y(a,typeof t!="symbol"?t+"":t,e),X=(a,t,e)=>t.has(a)||R("Cannot "+e);var j=(a,t,e)=>t.has(a)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),M=(a,t,e,r)=>(X(a,t,"write to private field"),r?r.call(a,e):t.set(a,e),e);import{y as d}from"./index.DwUISpCs.js";const N=globalThis.showDirectoryPicker;async function k(a={}){if(N&&!a._preferPolyfill)return N(a);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const e=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(r=>{t.addEventListener("change",r),t.click()}),e.then(r=>r.getDirHandlesFromInput(t))}const J={accepts:[]},V=globalThis.showOpenFilePicker;async function K(a={}){const t={...J,...a};if(V&&!a._preferPolyfill)return V(t);const e=document.createElement("input");e.type="file",e.multiple=t.multiple,e.accept=(t.accepts||[]).map(n=>[...(n.extensions||[]).map(o=>"."+o),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const r=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),r.then(n=>n.getFileHandlesFromInput(e))}const W=globalThis.showSaveFilePicker;async function Q(a={}){if(W&&!a._preferPolyfill)return W(a);a._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),a.suggestedName=a._name);const{FileSystemFileHandle:t}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url),{FileHandle:e}=await d(async()=>{const{FileHandle:r}=await import("./downloader.Cnd9SuxG.js");return{FileHandle:r}},__vite__mapDeps([0,1,2]),import.meta.url);return new t(new e(a.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const a=this.webkitGetAsEntry(),[{FileHandle:t,FolderHandle:e},{FileSystemDirectoryHandle:r},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox.CoN7LRFk.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url),d(()=>Promise.resolve().then(()=>_),void 0,import.meta.url)]);return a.isFile?new n(new t(a,!1)):new r(new e(a,!1))});async function Z(a,t={}){var o,s;if(!a)return((s=(o=globalThis.navigator)==null?void 0:o.storage)==null?void 0:s.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),r=await a,n=await(r.default?r.default(t):r(t));return new e(n)}const ee={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:te}=ee;var H;const L=class L extends te{constructor(e){super(e);j(this,H);M(this,H,e),Object.setPrototypeOf(this,L.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),r=e.close();return e.releaseLock(),r}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const r=this.getWriter(),n=r.write(e);return r.releaseLock(),n}};H=new WeakMap;let p=L;Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(p.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=p);const m=Symbol("adapter");var q;q=m;class P{constructor(t){g(this,q);g(this,"name");g(this,"kind");this.kind=t.kind,this.name=t.name,this[m]=t}async queryPermission(t={}){const{mode:e="read"}=t,r=this[m];if(r.queryPermission)return r.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return r.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:t="read"}={}){const e=this[m];if(e.requestPermission)return e.requestPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async remove(t={}){await this[m].remove(t)}async isSameEntry(t){return this===t?!0:!t||typeof t!="object"||this.kind!==t.kind||!t[m]?!1:this[m].isSameEntry(t[m])}}Object.defineProperty(P.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});var $;globalThis.FileSystemHandle&&(($=globalThis.FileSystemHandle.prototype).queryPermission??($.queryPermission=function(a){return"granted"}));const x={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:a=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${a}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},re={writable:globalThis.WritableStream};async function ae(a){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[t,e,r]=await Promise.all([d(()=>import("./memory.DCVB1HOm.js"),__vite__mapDeps([4,1,2]),import.meta.url),d(()=>import("./sandbox.CoN7LRFk.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url)]),n=new t.FolderHandle("",!1);return n._entries=a.map(o=>o.isFile?new e.FileHandle(o,!1):new e.FolderHandle(o,!1)),new r.FileSystemDirectoryHandle(n)}async function ie(a){const{FolderHandle:t,FileHandle:e}=await d(async()=>{const{FolderHandle:y,FileHandle:l}=await import("./memory.DCVB1HOm.js");return{FolderHandle:y,FileHandle:l}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemDirectoryHandle:r}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),n=Array.from(a.files),o=n[0].webkitRelativePath.split("/",1)[0],s=new t(o,!1);return n.forEach(y=>{const l=y.webkitRelativePath.split("/");l.shift();const c=l.pop(),f=l.reduce((w,b)=>(w._entries[b]||(w._entries[b]=new t(b,!1)),w._entries[b]),s);f._entries[c]=new e(y.name,y,!1)}),new r(s)}async function ne(a){const{FileHandle:t}=await d(async()=>{const{FileHandle:r}=await import("./memory.DCVB1HOm.js");return{FileHandle:r}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);return Array.from(a.files).map(r=>new e(new t(r.name,r,!1)))}const B=Object.freeze(Object.defineProperty({__proto__:null,config:re,errors:x,fromDataTransfer:ae,getDirHandlesFromInput:ie,getFileHandlesFromInput:ne},Symbol.toStringTag,{value:"Module"})),{GONE:oe,MOD_ERR:se}=x,u=Symbol("adapter");var z;let F=class T extends P{constructor(e){super(e);g(this,z);this[u]=e}async getDirectoryHandle(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const n=await this[u].getDirectoryHandle(e,r);return new T(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);for await(const[r,n]of this[u].entries())yield[n.name,n.kind==="file"?new e(n):new T(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);console.warn("deprecated, use .entries() instead");for await(let r of this[u].entries())yield r.kind==="file"?new e(r):new T(r)}async getFileHandle(e,r={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:s}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:s}},void 0,import.meta.url);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const o=await this[u].getFileHandle(e,r);return new n(o)}async removeEntry(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return r.recursive=!!r.recursive,this[u].removeEntry(e,r)}async resolve(e){if(await e.isSameEntry(this))return[];const r=[{handle:this,path:[]}];for(;r.length;){let{handle:n,path:o}=r.pop();for await(const s of n.values()){if(await s.isSameEntry(e))return[...o,s.name];s.kind==="directory"&&r.push({handle:s,path:[...o,s.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,r]of this)yield r}[(z=u,Symbol.asyncIterator)](){return this.entries()}};Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(F.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const a=globalThis.FileSystemDirectoryHandle.prototype;a.resolve=async function(o){if(await o.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:y,path:l}=s.pop();for await(const c of y.values()){if(await c.isSameEntry(o))return[...l,c.name];c.kind==="directory"&&s.push({handle:c,path:[...l,c.name]})}}return null};async function t(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...oe)}const e=a.entries;a.entries=async function*(){await t(this),yield*e.call(this)},a[Symbol.asyncIterator]=async function*(){yield*this.entries()};const r=a.removeEntry;a.removeEntry=async function(n,o={}){return r.call(this,n,o).catch(async s=>{throw s instanceof DOMException&&s.name==="UnknownError"&&!o.recursive&&!(await e.call(this).next()).done?new DOMException(...se):s})}}const D=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),{INVALID:le,SYNTAX:I,GONE:ce}=x,v=Symbol("adapter");var U,C;class E extends(C=P,U=v,C){constructor(e){super(e);g(this,U);this[v]=e}async createWritable(e={}){return new p(await this[v].createWritable(e))}async getFile(){return this[v].getFile()}}Object.defineProperty(E.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(E.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const a=new WeakMap;let t;const e=()=>{let n,o;onmessage=async s=>{const y=s.ports[0],l=s.data;switch(l.type){case"open":const c=l.name;let f=await navigator.storage.getDirectory();for(const w of l.path)f=await f.getDirectoryHandle(w);n=await f.getFileHandle(c),o=await n.createSyncAccessHandle();break;case"write":o.write(l.data,{at:l.position}),o.flush();break;case"truncate":o.truncate(l.size);break;case"abort":case"close":o.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!t){const i=`(${e.toString()})()`,S=new Blob([i],{type:"text/javascript"});t=URL.createObjectURL(S)}const o=new Worker(t,{type:"module"});let s=0;const y=new TextEncoder;let l=await this.getFile().then(i=>i.size);const c=i=>new Promise((S,O)=>{const h=new MessageChannel;h.port1.onmessage=A=>{A.data instanceof Error?O(A.data):S(A.data),h.port1.close(),h.port2.close(),h.port1.onmessage=null},o.postMessage(i,[h.port2])}),f=await navigator.storage.getDirectory(),w=await a.get(this),b=await f.resolve(w);if(b===null)throw new DOMException(...ce);return await c({type:"open",path:b,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await c({type:"truncate",size:0}),l=0),new p({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:s},i.type==="write"){if(!("data"in i))throw await c({type:"close"}),new DOMException(...I("write requires a data argument"));if(i.position??(i.position=s),typeof i.data=="string")i.data=y.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const O=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(O)}Number.isInteger(i.position)&&i.position>=0&&(s=i.position),s+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...le);console.log("seeking",i),s=i.position;return}else throw await c({type:"close"}),new DOMException(...I("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,s>l&&(s=l);else throw await c({type:"close"}),new DOMException(...I("truncate requires a size argument"));await c(i)},async close(){await c({type:"close"}),o.terminate()},async abort(i){await c({type:"abort",reason:i}),o.terminate()}})};const r=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const o=await r.call(this,...n);return a.set(o,this),o}}const _=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:E,default:E},Symbol.toStringTag,{value:"Module"})),ue=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,FileSystemFileHandle:E,FileSystemHandle:P,FileSystemWritableFileStream:p,getOriginPrivateDirectory:Z,showDirectoryPicker:k,showOpenFilePicker:K,showSaveFilePicker:Q},Symbol.toStringTag,{value:"Module"}));export{ue as a,ee as c,x as e};
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./downloader.BwLpAoXN.js","./index.BtpsTdHN.js","../css/index.C6rq3aMZ.css","./sandbox.B_XDPkfx.js","./memory.Ddl3R0up.js"])))=>i.map(i=>d[i]);
|
2
|
+
var G=Object.defineProperty;var R=a=>{throw TypeError(a)};var Y=(a,t,e)=>t in a?G(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var g=(a,t,e)=>Y(a,typeof t!="symbol"?t+"":t,e),X=(a,t,e)=>t.has(a)||R("Cannot "+e);var j=(a,t,e)=>t.has(a)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),M=(a,t,e,r)=>(X(a,t,"write to private field"),r?r.call(a,e):t.set(a,e),e);import{y as d}from"./index.BtpsTdHN.js";const N=globalThis.showDirectoryPicker;async function k(a={}){if(N&&!a._preferPolyfill)return N(a);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const e=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(r=>{t.addEventListener("change",r),t.click()}),e.then(r=>r.getDirHandlesFromInput(t))}const J={accepts:[]},V=globalThis.showOpenFilePicker;async function K(a={}){const t={...J,...a};if(V&&!a._preferPolyfill)return V(t);const e=document.createElement("input");e.type="file",e.multiple=t.multiple,e.accept=(t.accepts||[]).map(n=>[...(n.extensions||[]).map(o=>"."+o),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const r=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),r.then(n=>n.getFileHandlesFromInput(e))}const W=globalThis.showSaveFilePicker;async function Q(a={}){if(W&&!a._preferPolyfill)return W(a);a._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),a.suggestedName=a._name);const{FileSystemFileHandle:t}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url),{FileHandle:e}=await d(async()=>{const{FileHandle:r}=await import("./downloader.BwLpAoXN.js");return{FileHandle:r}},__vite__mapDeps([0,1,2]),import.meta.url);return new t(new e(a.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const a=this.webkitGetAsEntry(),[{FileHandle:t,FolderHandle:e},{FileSystemDirectoryHandle:r},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox.B_XDPkfx.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url),d(()=>Promise.resolve().then(()=>_),void 0,import.meta.url)]);return a.isFile?new n(new t(a,!1)):new r(new e(a,!1))});async function Z(a,t={}){var o,s;if(!a)return((s=(o=globalThis.navigator)==null?void 0:o.storage)==null?void 0:s.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),r=await a,n=await(r.default?r.default(t):r(t));return new e(n)}const ee={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:te}=ee;var H;const L=class L extends te{constructor(e){super(e);j(this,H);M(this,H,e),Object.setPrototypeOf(this,L.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),r=e.close();return e.releaseLock(),r}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const r=this.getWriter(),n=r.write(e);return r.releaseLock(),n}};H=new WeakMap;let p=L;Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(p.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=p);const m=Symbol("adapter");var q;q=m;class P{constructor(t){g(this,q);g(this,"name");g(this,"kind");this.kind=t.kind,this.name=t.name,this[m]=t}async queryPermission(t={}){const{mode:e="read"}=t,r=this[m];if(r.queryPermission)return r.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return r.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:t="read"}={}){const e=this[m];if(e.requestPermission)return e.requestPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async remove(t={}){await this[m].remove(t)}async isSameEntry(t){return this===t?!0:!t||typeof t!="object"||this.kind!==t.kind||!t[m]?!1:this[m].isSameEntry(t[m])}}Object.defineProperty(P.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});var $;globalThis.FileSystemHandle&&(($=globalThis.FileSystemHandle.prototype).queryPermission??($.queryPermission=function(a){return"granted"}));const x={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:a=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${a}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},re={writable:globalThis.WritableStream};async function ae(a){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[t,e,r]=await Promise.all([d(()=>import("./memory.Ddl3R0up.js"),__vite__mapDeps([4,1,2]),import.meta.url),d(()=>import("./sandbox.B_XDPkfx.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url)]),n=new t.FolderHandle("",!1);return n._entries=a.map(o=>o.isFile?new e.FileHandle(o,!1):new e.FolderHandle(o,!1)),new r.FileSystemDirectoryHandle(n)}async function ie(a){const{FolderHandle:t,FileHandle:e}=await d(async()=>{const{FolderHandle:y,FileHandle:l}=await import("./memory.Ddl3R0up.js");return{FolderHandle:y,FileHandle:l}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemDirectoryHandle:r}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),n=Array.from(a.files),o=n[0].webkitRelativePath.split("/",1)[0],s=new t(o,!1);return n.forEach(y=>{const l=y.webkitRelativePath.split("/");l.shift();const c=l.pop(),f=l.reduce((w,b)=>(w._entries[b]||(w._entries[b]=new t(b,!1)),w._entries[b]),s);f._entries[c]=new e(y.name,y,!1)}),new r(s)}async function ne(a){const{FileHandle:t}=await d(async()=>{const{FileHandle:r}=await import("./memory.Ddl3R0up.js");return{FileHandle:r}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);return Array.from(a.files).map(r=>new e(new t(r.name,r,!1)))}const B=Object.freeze(Object.defineProperty({__proto__:null,config:re,errors:x,fromDataTransfer:ae,getDirHandlesFromInput:ie,getFileHandlesFromInput:ne},Symbol.toStringTag,{value:"Module"})),{GONE:oe,MOD_ERR:se}=x,u=Symbol("adapter");var z;let F=class T extends P{constructor(e){super(e);g(this,z);this[u]=e}async getDirectoryHandle(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const n=await this[u].getDirectoryHandle(e,r);return new T(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);for await(const[r,n]of this[u].entries())yield[n.name,n.kind==="file"?new e(n):new T(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);console.warn("deprecated, use .entries() instead");for await(let r of this[u].entries())yield r.kind==="file"?new e(r):new T(r)}async getFileHandle(e,r={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:s}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:s}},void 0,import.meta.url);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const o=await this[u].getFileHandle(e,r);return new n(o)}async removeEntry(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return r.recursive=!!r.recursive,this[u].removeEntry(e,r)}async resolve(e){if(await e.isSameEntry(this))return[];const r=[{handle:this,path:[]}];for(;r.length;){let{handle:n,path:o}=r.pop();for await(const s of n.values()){if(await s.isSameEntry(e))return[...o,s.name];s.kind==="directory"&&r.push({handle:s,path:[...o,s.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,r]of this)yield r}[(z=u,Symbol.asyncIterator)](){return this.entries()}};Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(F.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const a=globalThis.FileSystemDirectoryHandle.prototype;a.resolve=async function(o){if(await o.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:y,path:l}=s.pop();for await(const c of y.values()){if(await c.isSameEntry(o))return[...l,c.name];c.kind==="directory"&&s.push({handle:c,path:[...l,c.name]})}}return null};async function t(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...oe)}const e=a.entries;a.entries=async function*(){await t(this),yield*e.call(this)},a[Symbol.asyncIterator]=async function*(){yield*this.entries()};const r=a.removeEntry;a.removeEntry=async function(n,o={}){return r.call(this,n,o).catch(async s=>{throw s instanceof DOMException&&s.name==="UnknownError"&&!o.recursive&&!(await e.call(this).next()).done?new DOMException(...se):s})}}const D=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),{INVALID:le,SYNTAX:I,GONE:ce}=x,v=Symbol("adapter");var U,C;class E extends(C=P,U=v,C){constructor(e){super(e);g(this,U);this[v]=e}async createWritable(e={}){return new p(await this[v].createWritable(e))}async getFile(){return this[v].getFile()}}Object.defineProperty(E.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(E.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const a=new WeakMap;let t;const e=()=>{let n,o;onmessage=async s=>{const y=s.ports[0],l=s.data;switch(l.type){case"open":const c=l.name;let f=await navigator.storage.getDirectory();for(const w of l.path)f=await f.getDirectoryHandle(w);n=await f.getFileHandle(c),o=await n.createSyncAccessHandle();break;case"write":o.write(l.data,{at:l.position}),o.flush();break;case"truncate":o.truncate(l.size);break;case"abort":case"close":o.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!t){const i=`(${e.toString()})()`,S=new Blob([i],{type:"text/javascript"});t=URL.createObjectURL(S)}const o=new Worker(t,{type:"module"});let s=0;const y=new TextEncoder;let l=await this.getFile().then(i=>i.size);const c=i=>new Promise((S,O)=>{const h=new MessageChannel;h.port1.onmessage=A=>{A.data instanceof Error?O(A.data):S(A.data),h.port1.close(),h.port2.close(),h.port1.onmessage=null},o.postMessage(i,[h.port2])}),f=await navigator.storage.getDirectory(),w=await a.get(this),b=await f.resolve(w);if(b===null)throw new DOMException(...ce);return await c({type:"open",path:b,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await c({type:"truncate",size:0}),l=0),new p({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:s},i.type==="write"){if(!("data"in i))throw await c({type:"close"}),new DOMException(...I("write requires a data argument"));if(i.position??(i.position=s),typeof i.data=="string")i.data=y.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const O=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(O)}Number.isInteger(i.position)&&i.position>=0&&(s=i.position),s+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...le);console.log("seeking",i),s=i.position;return}else throw await c({type:"close"}),new DOMException(...I("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,s>l&&(s=l);else throw await c({type:"close"}),new DOMException(...I("truncate requires a size argument"));await c(i)},async close(){await c({type:"close"}),o.terminate()},async abort(i){await c({type:"abort",reason:i}),o.terminate()}})};const r=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const o=await r.call(this,...n);return a.set(o,this),o}}const _=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:E,default:E},Symbol.toStringTag,{value:"Module"})),ue=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,FileSystemFileHandle:E,FileSystemHandle:P,FileSystemWritableFileStream:p,getOriginPrivateDirectory:Z,showDirectoryPicker:k,showOpenFilePicker:K,showSaveFilePicker:Q},Symbol.toStringTag,{value:"Module"}));export{ue as a,ee as c,x as e};
|
@@ -1 +1 @@
|
|
1
|
-
import{g as ot}from"./index.DwUISpCs.js";function rt(k,u){for(var p=0;p<u.length;p++){const I=u[p];if(typeof I!="string"&&!Array.isArray(I)){for(const E in I)if(E!=="default"&&!(E in k)){const O=Object.getOwnPropertyDescriptor(I,E);O&&Object.defineProperty(k,E,O.get?O:{enumerable:!0,get:()=>I[E]})}}}return Object.freeze(Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}))}var oe={exports:{}},xe;function at(){return xe||(xe=1,function(k){(function(u){if(typeof window>"u")return;var p=!0,I=10,E="",O=0,D="",_=null,re="",W=!1,Ne={resize:1,click:1},V=128,ae=!0,P=1,U="bodyOffset",h=U,se=!0,ce="",R={},S=32,ue=null,J=!1,X=!1,H="[iFrameSizer]",le=H.length,B="",fe={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",de=window.parent,x="*",K=0,j=!1,me=null,A=16,N=1,ge="scroll",v=ge,De=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},he=!1;function pe(){}try{var ve=Object.create({},{passive:{get:function(){he=!0}}});window.addEventListener("test",pe,ve),window.removeEventListener("test",pe,ve)}catch{}function z(e,t,n,i){e.addEventListener(t,n,he?i||{}:!1)}function We(e,t,n){e.removeEventListener(t,n,!1)}function ye(e){return e.charAt(0).toUpperCase()+e.slice(1)}function He(e){var t,n,i,a=null,f=0,m=function(){f=Date.now(),a=null,i=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();f||(f=d);var s=A-(d-f);return t=this,n=arguments,s<=0||s>A?(a&&(clearTimeout(a),a=null),f=d,i=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,s)),i}}function we(e){return H+"["+B+"] "+e}function o(e){J&&typeof window.console=="object"&&console.log(we(e))}function T(e){typeof window.console=="object"&&console.warn(we(e))}function Be(){je(),o("Initialising iFrame ("+window.location.href+")"),_e(),Ue(),te("background",E),te("padding",re),Ke(),Me(),Ee(),Je(),Ze(),Ge(),Ie(),R=Qe(),L("init","Init message from host page"),G()}function je(){function e(n){return n==="true"}var t=ce.slice(le).split(":");B=t[0],O=u===t[1]?O:Number(t[1]),W=u===t[2]?W:e(t[2]),J=u===t[3]?J:e(t[3]),S=u===t[4]?S:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],E=t[9],re=t[10],K=u===t[11]?K:Number(t[11]),R.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function qe(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function _e(){function e(){var n=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(qe,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,x="targetOrigin"in n?n.targetOrigin:x,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,i){return typeof n=="function"&&(o("Setup custom "+i+"CalcMethod"),$[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),o("TargetOrigin for parent set to: "+x)}function Ve(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,o("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=O+"px"),te("margin",Ve("margin",D))}function Je(){document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function i(){L(e.eventName,e.eventType)}ee[n]=i,z(window,n,i,{passive:!0})},remove:function(n){var i=ee[n];delete ee[n],We(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(ye(e.method)+" event listener: "+e.eventType)}function be(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function Te(e,t,n,i){return t!==e&&(e in n||(T(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Me(){h=Te(h,U,M,"height")}function Ee(){v=Te(v,ge,F,"width")}function Ie(){p===!0?(be("add"),et()):o("Auto Resize disabled")}function Xe(){_!==null&&_.disconnect()}function Ye(){be("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(s){var l=s.getBoundingClientRect(),c=e();return{x:parseInt(l.left,10)+parseInt(c.x,10),y:parseInt(l.top,10)+parseInt(c.y,10)}}function n(s){function l(b){var C=t(b);o("Moving to in page link (#"+c+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var c=s.split("#")[1]||s,r=decodeURIComponent(c),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(o("In page link (#"+c+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+c)):l(w)}function i(){var s=window.location.hash,l=window.location.href;s!==""&&s!=="#"&&n(l)}function a(){function s(l){function c(r){r.preventDefault(),n(this.getAttribute("href"))}l.getAttribute("href")!=="#"&&z(l,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),s)}function f(){z(window,"hashchange",i)}function m(){setTimeout(i,V)}function d(){Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),a(),f(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return R.enable?d():o("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,i){o("Add event listener: "+i),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){o("Enable public methods"),De.parentIFrame={autoResize:function(t){return t===!0&&p===!1?(p=!0,Ie()):t===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return B},getPageInfo:function(t){typeof t=="function"?(Z=t,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(t){R.findTarget(t)},reset:function(){ke("parentIFrame.reset")},scrollTo:function(t,n){y(n,t,"scrollTo")},scrollToOffset:function(t,n){y(n,t,"scrollToOffset")},sendMessage:function(t,n){y(0,0,"message",JSON.stringify(t),n)},setHeightCalculationMethod:function(t){h=t,Me()},setWidthCalculationMethod:function(t){v=t,Ee()},setTargetOrigin:function(t){o("Set targetOrigin: "+t),x=t},size:function(t,n){var i=""+(t||"")+(n?","+n:"");L("size","parentIFrame.size("+i+")",t,n)}}}function Oe(){S!==0&&(o("setInterval: "+S+"ms"),ue=setInterval(function(){L("interval","setInterval: "+S)},Math.abs(S)))}function $e(){function e(r){function w(b){b.complete===!1&&(o("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",f,!1),s.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){s.splice(s.indexOf(r),1)}function n(r){o("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",f,!1),t(r)}function i(r,w,b){n(r.target),L(w,b+": "+r.target.src)}function a(r){i(r,"imageLoad","Image loaded")}function f(r){i(r,"imageLoadFailed","Image load failed")}function m(r){L("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return c=new l(m),o("Create body MutationObserver"),c.observe(r,w),c}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,c=d();return{disconnect:function(){"disconnect"in c&&(o("Disconnect body MutationObserver"),c.disconnect(),s.forEach(n))}}}function et(){var e=0>S;window.MutationObserver||window.WebKitMutationObserver?e?Oe():_=$e():(o("MutationObserver not supported in this browser!"),Oe())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,I)}function tt(e){e>A/2&&(A=2*e,o("Event throttle increased to "+A+"ms"))}function ie(e,t){for(var n=t.length,i=0,a=0,f=ye(e),m=Date.now(),d=0;d<n;d++)i=t[d].getBoundingClientRect()[e]+ne("margin"+f,t[d]),i>a&&(a=i);return m=Date.now()-m,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+m+"ms"),tt(m),a}function q(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Se(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return i.length===0&&n(),ie(e,i)}function Fe(){return document.querySelectorAll("body *")}var M={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return M.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,q(M))},min:function(){return Math.min.apply(null,q(M))},grow:function(){return M.max()},lowestElement:function(){return Math.max(M.bodyOffset()||M.documentElementOffset(),ie("bottom",Fe()))},taggedElement:function(){return Se("bottom","data-iframe-height")}},F={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(F.bodyScroll(),F.documentElementScroll())},max:function(){return Math.max.apply(null,q(F))},min:function(){return Math.min.apply(null,q(F))},rightMostElement:function(){return ie("right",Fe())},taggedElement:function(){return Se("right","data-iframe-width")}};function Le(e,t,n,i){function a(){P=c,N=r,y(P,N,e)}function f(){function w(b,C){var it=Math.abs(b-C)<=K;return!it}return c=u===n?M[h]():n,r=u===i?F[v]():i,w(P,c)||W&&w(N,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in fe||W&&v in fe}function s(){o("No change in size detected")}function l(){m()&&d()?ke(t):e in{interval:1}||s()}var c,r;f()||e==="init"?(ze(),a()):l()}var nt=He(Le);function L(e,t,n,i){function a(){e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t)}function f(){return j&&e in Ne}f()?o("Trigger event cancelled: "+e):(a(),e==="init"?Le(e,t,n,i):nt(e,t,n,i))}function ze(){j||(j=!0,o("Trigger event lock on")),clearTimeout(me),me=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},V)}function Ce(e){P=M[h](),N=F[v](),y(P,N,e)}function ke(e){var t=h;h=U,o("Reset trigger event: "+e),ze(),Ce("reset"),h=t}function y(e,t,n,i,a){function f(){u===a?a=x:o("Message targetOrigin: "+a)}function m(){var d=e+":"+t,s=B+":"+d+":"+n+(u===i?"":":"+i);o("Sending message to host page ("+s+")"),de.postMessage(H+s,a)}f(),m()}function Pe(e){var t={init:function(){ce=e.data,de=e.source,Be(),ae=!1,setTimeout(function(){se=!1},V)},reset:function(){se?o("Page reset ignored by init"):(o("Page size reset by host page"),Ce("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){R.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var c=a();o("PageInfoFromParent called from parent: "+c),Z(JSON.parse(c)),o(" --")},message:function(){var c=a();o("onMessage called from parent: "+c),Q(JSON.parse(c)),o(" --")}};function n(){return H===(""+e.data).slice(0,le)}function i(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function f(){return!k.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function d(){var l=i();l in t?t[l]():!f()&&!m()&&T("Unexpected message ("+e.data+")")}function s(){ae===!1?d():m()?t.init():o('Ignored message of type "'+i()+'". Received before initialization.')}n()&&s()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){Pe({data:e})},z(window,"message",Pe),z(window,"readystatechange",Re),Re())})()}(oe)),oe.exports}var Ae=at();const st=ot(Ae),ut=rt({__proto__:null,default:st},[Ae]);export{ut as i};
|
1
|
+
import{g as ot}from"./index.BtpsTdHN.js";function rt(k,u){for(var p=0;p<u.length;p++){const I=u[p];if(typeof I!="string"&&!Array.isArray(I)){for(const E in I)if(E!=="default"&&!(E in k)){const O=Object.getOwnPropertyDescriptor(I,E);O&&Object.defineProperty(k,E,O.get?O:{enumerable:!0,get:()=>I[E]})}}}return Object.freeze(Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}))}var oe={exports:{}},xe;function at(){return xe||(xe=1,function(k){(function(u){if(typeof window>"u")return;var p=!0,I=10,E="",O=0,D="",_=null,re="",W=!1,Ne={resize:1,click:1},V=128,ae=!0,P=1,U="bodyOffset",h=U,se=!0,ce="",R={},S=32,ue=null,J=!1,X=!1,H="[iFrameSizer]",le=H.length,B="",fe={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",de=window.parent,x="*",K=0,j=!1,me=null,A=16,N=1,ge="scroll",v=ge,De=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},he=!1;function pe(){}try{var ve=Object.create({},{passive:{get:function(){he=!0}}});window.addEventListener("test",pe,ve),window.removeEventListener("test",pe,ve)}catch{}function z(e,t,n,i){e.addEventListener(t,n,he?i||{}:!1)}function We(e,t,n){e.removeEventListener(t,n,!1)}function ye(e){return e.charAt(0).toUpperCase()+e.slice(1)}function He(e){var t,n,i,a=null,f=0,m=function(){f=Date.now(),a=null,i=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();f||(f=d);var s=A-(d-f);return t=this,n=arguments,s<=0||s>A?(a&&(clearTimeout(a),a=null),f=d,i=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,s)),i}}function we(e){return H+"["+B+"] "+e}function o(e){J&&typeof window.console=="object"&&console.log(we(e))}function T(e){typeof window.console=="object"&&console.warn(we(e))}function Be(){je(),o("Initialising iFrame ("+window.location.href+")"),_e(),Ue(),te("background",E),te("padding",re),Ke(),Me(),Ee(),Je(),Ze(),Ge(),Ie(),R=Qe(),L("init","Init message from host page"),G()}function je(){function e(n){return n==="true"}var t=ce.slice(le).split(":");B=t[0],O=u===t[1]?O:Number(t[1]),W=u===t[2]?W:e(t[2]),J=u===t[3]?J:e(t[3]),S=u===t[4]?S:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],E=t[9],re=t[10],K=u===t[11]?K:Number(t[11]),R.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function qe(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function _e(){function e(){var n=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(qe,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,x="targetOrigin"in n?n.targetOrigin:x,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,i){return typeof n=="function"&&(o("Setup custom "+i+"CalcMethod"),$[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),o("TargetOrigin for parent set to: "+x)}function Ve(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,o("Body "+e+' set to "'+t+'"'))}function Ue(){u===D&&(D=O+"px"),te("margin",Ve("margin",D))}function Je(){document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function i(){L(e.eventName,e.eventType)}ee[n]=i,z(window,n,i,{passive:!0})},remove:function(n){var i=ee[n];delete ee[n],We(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(ye(e.method)+" event listener: "+e.eventType)}function be(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function Te(e,t,n,i){return t!==e&&(e in n||(T(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Me(){h=Te(h,U,M,"height")}function Ee(){v=Te(v,ge,F,"width")}function Ie(){p===!0?(be("add"),et()):o("Auto Resize disabled")}function Xe(){_!==null&&_.disconnect()}function Ye(){be("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(s){var l=s.getBoundingClientRect(),c=e();return{x:parseInt(l.left,10)+parseInt(c.x,10),y:parseInt(l.top,10)+parseInt(c.y,10)}}function n(s){function l(b){var C=t(b);o("Moving to in page link (#"+c+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var c=s.split("#")[1]||s,r=decodeURIComponent(c),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(o("In page link (#"+c+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+c)):l(w)}function i(){var s=window.location.hash,l=window.location.href;s!==""&&s!=="#"&&n(l)}function a(){function s(l){function c(r){r.preventDefault(),n(this.getAttribute("href"))}l.getAttribute("href")!=="#"&&z(l,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),s)}function f(){z(window,"hashchange",i)}function m(){setTimeout(i,V)}function d(){Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),a(),f(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return R.enable?d():o("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,i){o("Add event listener: "+i),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){o("Enable public methods"),De.parentIFrame={autoResize:function(t){return t===!0&&p===!1?(p=!0,Ie()):t===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return B},getPageInfo:function(t){typeof t=="function"?(Z=t,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(t){R.findTarget(t)},reset:function(){ke("parentIFrame.reset")},scrollTo:function(t,n){y(n,t,"scrollTo")},scrollToOffset:function(t,n){y(n,t,"scrollToOffset")},sendMessage:function(t,n){y(0,0,"message",JSON.stringify(t),n)},setHeightCalculationMethod:function(t){h=t,Me()},setWidthCalculationMethod:function(t){v=t,Ee()},setTargetOrigin:function(t){o("Set targetOrigin: "+t),x=t},size:function(t,n){var i=""+(t||"")+(n?","+n:"");L("size","parentIFrame.size("+i+")",t,n)}}}function Oe(){S!==0&&(o("setInterval: "+S+"ms"),ue=setInterval(function(){L("interval","setInterval: "+S)},Math.abs(S)))}function $e(){function e(r){function w(b){b.complete===!1&&(o("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",f,!1),s.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){s.splice(s.indexOf(r),1)}function n(r){o("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",f,!1),t(r)}function i(r,w,b){n(r.target),L(w,b+": "+r.target.src)}function a(r){i(r,"imageLoad","Image loaded")}function f(r){i(r,"imageLoadFailed","Image load failed")}function m(r){L("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return c=new l(m),o("Create body MutationObserver"),c.observe(r,w),c}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,c=d();return{disconnect:function(){"disconnect"in c&&(o("Disconnect body MutationObserver"),c.disconnect(),s.forEach(n))}}}function et(){var e=0>S;window.MutationObserver||window.WebKitMutationObserver?e?Oe():_=$e():(o("MutationObserver not supported in this browser!"),Oe())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,I)}function tt(e){e>A/2&&(A=2*e,o("Event throttle increased to "+A+"ms"))}function ie(e,t){for(var n=t.length,i=0,a=0,f=ye(e),m=Date.now(),d=0;d<n;d++)i=t[d].getBoundingClientRect()[e]+ne("margin"+f,t[d]),i>a&&(a=i);return m=Date.now()-m,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+m+"ms"),tt(m),a}function q(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Se(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return i.length===0&&n(),ie(e,i)}function Fe(){return document.querySelectorAll("body *")}var M={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return M.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,q(M))},min:function(){return Math.min.apply(null,q(M))},grow:function(){return M.max()},lowestElement:function(){return Math.max(M.bodyOffset()||M.documentElementOffset(),ie("bottom",Fe()))},taggedElement:function(){return Se("bottom","data-iframe-height")}},F={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(F.bodyScroll(),F.documentElementScroll())},max:function(){return Math.max.apply(null,q(F))},min:function(){return Math.min.apply(null,q(F))},rightMostElement:function(){return ie("right",Fe())},taggedElement:function(){return Se("right","data-iframe-width")}};function Le(e,t,n,i){function a(){P=c,N=r,y(P,N,e)}function f(){function w(b,C){var it=Math.abs(b-C)<=K;return!it}return c=u===n?M[h]():n,r=u===i?F[v]():i,w(P,c)||W&&w(N,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in fe||W&&v in fe}function s(){o("No change in size detected")}function l(){m()&&d()?ke(t):e in{interval:1}||s()}var c,r;f()||e==="init"?(ze(),a()):l()}var nt=He(Le);function L(e,t,n,i){function a(){e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t)}function f(){return j&&e in Ne}f()?o("Trigger event cancelled: "+e):(a(),e==="init"?Le(e,t,n,i):nt(e,t,n,i))}function ze(){j||(j=!0,o("Trigger event lock on")),clearTimeout(me),me=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},V)}function Ce(e){P=M[h](),N=F[v](),y(P,N,e)}function ke(e){var t=h;h=U,o("Reset trigger event: "+e),ze(),Ce("reset"),h=t}function y(e,t,n,i,a){function f(){u===a?a=x:o("Message targetOrigin: "+a)}function m(){var d=e+":"+t,s=B+":"+d+":"+n+(u===i?"":":"+i);o("Sending message to host page ("+s+")"),de.postMessage(H+s,a)}f(),m()}function Pe(e){var t={init:function(){ce=e.data,de=e.source,Be(),ae=!1,setTimeout(function(){se=!1},V)},reset:function(){se?o("Page reset ignored by init"):(o("Page size reset by host page"),Ce("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){R.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var c=a();o("PageInfoFromParent called from parent: "+c),Z(JSON.parse(c)),o(" --")},message:function(){var c=a();o("onMessage called from parent: "+c),Q(JSON.parse(c)),o(" --")}};function n(){return H===(""+e.data).slice(0,le)}function i(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function f(){return!k.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function d(){var l=i();l in t?t[l]():!f()&&!m()&&T("Unexpected message ("+e.data+")")}function s(){ae===!1?d():m()?t.init():o('Ignored message of type "'+i()+'". Received before initialization.')}n()&&s()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){Pe({data:e})},z(window,"message",Pe),z(window,"readystatechange",Re),Re())})()}(oe)),oe.exports}var Ae=at();const st=ot(Ae),ut=rt({__proto__:null,default:st},[Ae]);export{ut as i};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.
|
1
|
+
var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.BtpsTdHN.js";import{_ as ls,a as qU,C as ZU}from"./toConsumableArray.DNJjbOUS.js";import{a as Wu,b as Ju,_ as qx,c as dA,d as Zx}from"./possibleConstructorReturn.DNEY6J9G.js";import{a as QU,T as e5}from"./Toolbar.5tXjF_eX.js";import{E as GO,w as t5}from"./withFullScreenWrapper.oyWCn2-3.js";import{u as r5}from"./useBasicWidgetState.CTpx4w-3.js";import{u as n5,s as i5}from"./threshold.DjX0wlsa.js";import"./FormClearHelper.BAxB8JFY.js";import"./value.CgPGBV_l.js";function s5(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function Hm(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const Qx=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hB&&parseFloat(hB[1]);const Pu=globalThis,Ea=globalThis.process||{},o5=globalThis.navigator||{};function VO(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function rl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||VO()}function a5(r){return rl()?VO()?"Electron":(o5.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const iy="4.1.0";function c5(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let l5=class{constructor(e,t,n="sessionStorage"){this.storage=c5(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function u5(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function f5(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var jm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(jm||(jm={}));const h5=10;function dB(r){return typeof r!="string"?r:(r=r.toUpperCase(),jm[r]||jm.WHITE)}function d5(r,e,t){return!rl&&typeof r=="string"&&(e&&(r=`\x1B[${dB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${dB(t)+h5}m${r}\x1B[49m`)),r}function A5(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function ew(r,e){if(!r)throw new Error("Assertion failed")}function id(){var e,t,n;let r;if(rl()&&Pu.performance)r=(t=(e=Pu==null?void 0:Pu.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Ea){const i=(n=Ea==null?void 0:Ea.hrtime)==null?void 0:n.call(Ea);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const sd={debug:rl()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p5={enabled:!0,level:0};function od(){}const AB={},pB={once:!0};let HO=class{constructor({id:e}={id:""}){this.VERSION=iy,this._startTs=id(),this._deltaTs=id(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new l5(`__probe-${this.id}__`,p5),this.timeStamp(`${this.id} started`),A5(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((id()-this._startTs).toPrecision(10))}getDelta(){return Number((id()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,sd.warn,arguments,pB)}error(e){return this._getLogFunction(0,e,sd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,sd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,sd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,sd.debug||sd.info,arguments,pB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||od,n&&[n],{tag:m5(t)}):od}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||od)}group(e,t,n={collapsed:!1}){const i=gB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||od)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jO(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=gB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,ew(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=id();const s=o.tag||o.message;if(o.once&&s)if(!AB[s])AB[s]=id();else return od;return t=g5(this.id,o.message,o),n.bind(console,t,...o.args)}return od}};HO.VERSION=iy;function jO(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return ew(Number.isFinite(e)&&e>=0),e}function gB(r){const{logLevel:e,message:t}=r;r.logLevel=jO(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return ew(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function g5(r,e,t){if(typeof e=="string"){const n=t.time?f5(u5(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=d5(e,t.color,t.background)}return e}function m5(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}function _5(r,e){return $O(r||{},e)}function $O(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?n[i]=$O(n[i]||{},e[i],t+1):n[i]=e[i];return n}const y5="latest";function v5(){var r;return(r=globalThis._loadersgl_)!=null&&r.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const b5=v5();function ku(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const $f=typeof process!="object"||String(process)!=="[object process]"||process.browser,x5=typeof window<"u"&&typeof window.orientation<"u",mB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);mB&&parseFloat(mB[1]);let w5=class{constructor(e,t){V(this,"name");V(this,"workerThread");V(this,"isRunning",!0);V(this,"result");V(this,"_resolve",()=>{});V(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){ku(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){ku(this.isRunning),this.isRunning=!1,this._reject(e)}},Lv=class{terminate(){}};const Nv=new Map;function C5(r){ku(r.source&&!r.url||!r.source&&r.url);let e=Nv.get(r.source||r.url);return e||(r.url&&(e=E5(r.url),Nv.set(r.url,e)),r.source&&(e=WO(r.source),Nv.set(r.source,e))),ku(e),e}function E5(r){if(!r.startsWith("http"))return r;const e=T5(r);return WO(e)}function WO(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function T5(r){return`try {
|
2
2
|
importScripts('${r}');
|
3
3
|
} catch (error) {
|
4
4
|
console.error(error);
|
@@ -1 +1 @@
|
|
1
|
-
import{r,aE as f,b0 as l,j as t,b1 as m,bm as B,a$ as b,b2 as p}from"./index.
|
1
|
+
import{r,aE as f,b0 as l,j as t,b1 as m,bm as B,a$ as b,b2 as p}from"./index.BtpsTdHN.js";import{c as h}from"./createDownloadLinkElement.DZMwyjvU.js";function w(n,o,e){return h({enforceDownloadInNewTab:e,url:n.buildMediaURL(o),filename:""})}function D(n){const{disabled:o,element:e,widgetMgr:s,endpoints:a,fragmentId:d}=n,{libConfig:{enforceDownloadInNewTab:c=!1}}=r.useContext(f);let i=l.SECONDARY;e.type==="primary"?i=l.PRIMARY:e.type==="tertiary"&&(i=l.TERTIARY),r.useEffect(()=>{a.checkSourceUrlResponse(e.url,"Download Button")},[e.url,a]);const u=()=>{e.ignoreRerun||s.setTriggerValue(e,{fromUi:!0},d),w(a,e.url,c).click()};return t("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:t(m,{help:e.help,containerWidth:e.useContainerWidth,children:t(B,{kind:i,size:b.SMALL,disabled:o,onClick:u,containerWidth:e.useContainerWidth,children:t(p,{icon:e.icon,label:e.label})})})})}const g=r.memo(D);export{g as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as o,bj as S,i as f,r as l,j as r,C as g,c2 as u,aC as $}from"./index.
|
1
|
+
import{n as o,bj as S,i as f,r as l,j as r,C as g,c2 as u,aC as $}from"./index.BtpsTdHN.js";const m=o(S,{shouldForwardProp:f,target:"e12gfcky0"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0})),x=o("div",{target:"e12gfcky1"})(({theme:e,cache:s})=>({...s?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),y=o("div",{target:"e12gfcky2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),T=o("div",{target:"e12gfcky3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),h=e=>{const s=Math.floor(e/3600),n=Math.floor(e%3600/60),t=e%60;if(s===0&&n===0)return`(${t.toFixed(1)} seconds)`;if(s===0){const d=`${n} minute${n===1?"":"s"}`,p=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${d}${p})`}const i=`${s} hour${s===1?"":"s"}`,a=n===0?"":`, ${n} minute${n===1?"":"s"}`,c=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${i}${a}${c})`};function C({element:e}){const{cache:s,showTime:n}=e,[t,i]=l.useState(0);return l.useEffect(()=>{if(!n)return;const a=setInterval(()=>{i(c=>c+.1)},100);return()=>clearInterval(a)},[n]),r(x,{className:u({stSpinner:!0,stCacheSpinner:s}),"data-testid":"stSpinner",cache:s,children:g(T,{children:[r(m,{}),r($,{source:e.text,allowHTML:!1}),n&&r(y,{children:h(t)})]})})}const z=l.memo(C);export{z as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{n as c,r as C,aD as S,C as p,j as i,aC as E,l as y}from"./index.BtpsTdHN.js";import{w as L,E as W}from"./withFullScreenWrapper.oyWCn2-3.js";import{S as h,T as v}from"./Toolbar.5tXjF_eX.js";const b=c("div",{target:"evl31sl0"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"})),T=c("div",{target:"evl31sl1"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:e.radii.default}})),F=c("div",{target:"evl31sl2"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),j=y.getLogger("ImageList");function D({element:e,endpoints:g,disableFullscreenMode:u}){const{expanded:s,width:w,height:l,expand:x,collapse:f}=S(W),m=w||0;let o;const r=e.width;if([-1,-3,-4].includes(r))o=void 0;else if([-2,-5].includes(r))o=m;else if(r>0)o=r;else throw Error(`Invalid image width: ${r}`);const t={};l&&s?(t.maxHeight=l,t.objectFit="contain",t.width="100%"):(t.width=o??"100%",t.maxWidth="100%");const I=n=>{const a=n.currentTarget.src;j.error(`Client Error: Image source error - ${a}`),g.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",a)};return p(h,{width:m,height:l,useContainerWidth:s,topCentered:!0,children:[i(v,{target:h,isFullScreen:s,onExpand:x,onCollapse:f,disableFullscreenMode:u}),i(b,{className:"stImage","data-testid":"stImage",children:e.imgs.map((n,a)=>{const d=n;return p(T,{"data-testid":"stImageContainer",children:[i("img",{style:t,src:g.buildMediaURL(d.url),alt:a.toString(),onError:I}),d.caption&&i(F,{"data-testid":"stImageCaption",style:t,children:i(E,{source:d.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},a)})})]})}const G=L(D),$=C.memo(G);export{$ as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n,r as t,O as i,j as c,aY as d,aZ as e,M as g}from"./index.
|
1
|
+
import{n,r as t,O as i,j as c,aY as d,aZ as e,M as g}from"./index.BtpsTdHN.js";const l=n("iframe",{target:"e3tg43n0"})(({theme:o,disableScrolling:a})=>({width:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:a?"hidden":void 0}));function r(o){return g(o)||o===""?void 0:o}function m({element:o}){const a=r(o.src),s=i(a)?void 0:r(o.srcdoc);return c(l,{className:"stIFrame","data-testid":"stIFrame",allow:e,disableScrolling:!o.scrolling,src:a,srcDoc:s,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:d,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const F=t.memo(m);export{F as default};
|