streamlit 1.49.1__py3-none-any.whl → 1.51.0__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/__init__.py +4 -1
- streamlit/column_config.py +2 -0
- streamlit/commands/navigation.py +7 -7
- streamlit/commands/page_config.py +4 -6
- streamlit/components/v1/custom_component.py +17 -42
- streamlit/components/v2/__init__.py +458 -0
- streamlit/components/v2/bidi_component/__init__.py +20 -0
- streamlit/components/v2/bidi_component/constants.py +29 -0
- streamlit/components/v2/bidi_component/main.py +386 -0
- streamlit/components/v2/bidi_component/serialization.py +265 -0
- streamlit/components/v2/bidi_component/state.py +92 -0
- streamlit/components/v2/component_definition_resolver.py +143 -0
- streamlit/components/v2/component_file_watcher.py +403 -0
- streamlit/components/v2/component_manager.py +431 -0
- streamlit/components/v2/component_manifest_handler.py +122 -0
- streamlit/components/v2/component_path_utils.py +245 -0
- streamlit/components/v2/component_registry.py +409 -0
- streamlit/components/v2/get_bidi_component_manager.py +51 -0
- streamlit/components/v2/manifest_scanner.py +615 -0
- streamlit/components/v2/presentation.py +198 -0
- streamlit/components/v2/types.py +324 -0
- streamlit/config.py +741 -32
- streamlit/config_option.py +4 -1
- streamlit/config_util.py +650 -1
- streamlit/connections/base_connection.py +4 -2
- streamlit/dataframe_util.py +18 -10
- streamlit/delta_generator.py +8 -7
- streamlit/delta_generator_singletons.py +3 -1
- streamlit/deprecation_util.py +17 -6
- streamlit/elements/arrow.py +90 -42
- streamlit/elements/deck_gl_json_chart.py +98 -39
- streamlit/elements/dialog_decorator.py +2 -1
- streamlit/elements/exception.py +3 -1
- streamlit/elements/form.py +6 -6
- streamlit/elements/graphviz_chart.py +24 -9
- streamlit/elements/heading.py +3 -5
- streamlit/elements/iframe.py +0 -2
- streamlit/elements/image.py +12 -13
- streamlit/elements/layouts.py +89 -22
- streamlit/elements/lib/built_in_chart_utils.py +95 -31
- streamlit/elements/lib/color_util.py +8 -18
- streamlit/elements/lib/column_config_utils.py +9 -8
- streamlit/elements/lib/column_types.py +595 -148
- streamlit/elements/lib/dialog.py +3 -2
- streamlit/elements/lib/image_utils.py +3 -5
- streamlit/elements/lib/layout_utils.py +50 -13
- streamlit/elements/lib/mutable_status_container.py +2 -2
- streamlit/elements/lib/options_selector_utils.py +2 -2
- streamlit/elements/lib/pandas_styler_utils.py +30 -14
- streamlit/elements/lib/utils.py +21 -9
- streamlit/elements/map.py +81 -40
- streamlit/elements/media.py +7 -7
- streamlit/elements/metric.py +11 -35
- streamlit/elements/pdf.py +2 -4
- streamlit/elements/plotly_chart.py +142 -26
- streamlit/elements/progress.py +2 -4
- streamlit/elements/pyplot.py +6 -6
- streamlit/elements/space.py +113 -0
- streamlit/elements/vega_charts.py +400 -143
- streamlit/elements/widgets/audio_input.py +52 -4
- streamlit/elements/widgets/button.py +29 -29
- streamlit/elements/widgets/button_group.py +33 -6
- streamlit/elements/widgets/camera_input.py +3 -4
- streamlit/elements/widgets/chat.py +7 -0
- streamlit/elements/widgets/checkbox.py +1 -0
- streamlit/elements/widgets/color_picker.py +1 -0
- streamlit/elements/widgets/data_editor.py +34 -29
- streamlit/elements/widgets/file_uploader.py +6 -10
- streamlit/elements/widgets/multiselect.py +14 -3
- streamlit/elements/widgets/number_input.py +5 -4
- streamlit/elements/widgets/radio.py +10 -2
- streamlit/elements/widgets/select_slider.py +8 -4
- streamlit/elements/widgets/selectbox.py +9 -2
- streamlit/elements/widgets/slider.py +38 -41
- streamlit/elements/widgets/text_widgets.py +6 -0
- streamlit/elements/widgets/time_widgets.py +15 -12
- streamlit/elements/write.py +28 -23
- streamlit/emojis.py +1 -1
- streamlit/errors.py +115 -0
- streamlit/git_util.py +65 -43
- streamlit/hello/hello.py +8 -0
- streamlit/hello/utils.py +2 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/navigation/page.py +4 -1
- streamlit/proto/ArrowData_pb2.py +27 -0
- streamlit/proto/ArrowData_pb2.pyi +46 -0
- streamlit/proto/Arrow_pb2.py +10 -8
- streamlit/proto/Arrow_pb2.pyi +31 -2
- streamlit/proto/AudioInput_pb2.py +2 -2
- streamlit/proto/AudioInput_pb2.pyi +6 -2
- streamlit/proto/BidiComponent_pb2.py +34 -0
- streamlit/proto/BidiComponent_pb2.pyi +153 -0
- streamlit/proto/Block_pb2.py +11 -11
- streamlit/proto/Block_pb2.pyi +9 -1
- streamlit/proto/DeckGlJsonChart_pb2.py +10 -4
- streamlit/proto/DeckGlJsonChart_pb2.pyi +9 -3
- streamlit/proto/Element_pb2.py +5 -3
- streamlit/proto/Element_pb2.pyi +14 -4
- streamlit/proto/HeightConfig_pb2.py +2 -2
- streamlit/proto/HeightConfig_pb2.pyi +6 -3
- streamlit/proto/NewSession_pb2.py +18 -16
- streamlit/proto/NewSession_pb2.pyi +158 -6
- streamlit/proto/PlotlyChart_pb2.py +8 -6
- streamlit/proto/PlotlyChart_pb2.pyi +3 -1
- streamlit/proto/Space_pb2.py +27 -0
- streamlit/proto/Space_pb2.pyi +42 -0
- streamlit/proto/WidgetStates_pb2.py +2 -2
- streamlit/proto/WidgetStates_pb2.pyi +13 -3
- streamlit/proto/WidthConfig_pb2.py +2 -2
- streamlit/proto/WidthConfig_pb2.pyi +6 -3
- streamlit/runtime/app_session.py +45 -6
- streamlit/runtime/caching/cache_data_api.py +4 -4
- streamlit/runtime/caching/cache_errors.py +4 -1
- streamlit/runtime/caching/cache_resource_api.py +3 -2
- streamlit/runtime/caching/cache_utils.py +2 -1
- streamlit/runtime/caching/cached_message_replay.py +3 -3
- streamlit/runtime/caching/hashing.py +3 -4
- streamlit/runtime/caching/legacy_cache_api.py +2 -1
- streamlit/runtime/connection_factory.py +1 -3
- streamlit/runtime/forward_msg_queue.py +4 -1
- streamlit/runtime/fragment.py +2 -1
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/metrics_util.py +6 -2
- streamlit/runtime/runtime.py +14 -0
- streamlit/runtime/scriptrunner/exec_code.py +2 -1
- streamlit/runtime/scriptrunner/script_runner.py +2 -2
- streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -6
- streamlit/runtime/secrets.py +2 -4
- streamlit/runtime/session_manager.py +3 -1
- streamlit/runtime/state/common.py +30 -5
- streamlit/runtime/state/presentation.py +85 -0
- streamlit/runtime/state/safe_session_state.py +2 -2
- streamlit/runtime/state/session_state.py +220 -16
- streamlit/runtime/state/widgets.py +19 -3
- streamlit/runtime/theme_util.py +148 -0
- streamlit/runtime/websocket_session_manager.py +3 -1
- streamlit/source_util.py +2 -2
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +244 -227
- streamlit/static/static/css/{index.C8X8rNzw.css → index.BpABIXK9.css} +1 -1
- streamlit/static/static/css/index.DgR7E2CV.css +1 -0
- streamlit/static/static/js/{ErrorOutline.esm.DcGrhbBP.js → ErrorOutline.esm.YoJdlW1p.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DgBvV6Pq.js → FileDownload.esm.Ddx8VEYy.js} +1 -1
- streamlit/static/static/js/{FileHelper.M6AAaeuA.js → FileHelper.90EtOmj9.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DHh1GFzm.js → FormClearHelper.BB1Km6eP.js} +1 -1
- streamlit/static/static/js/InputInstructions.jhH15PqV.js +1 -0
- streamlit/static/static/js/{Particles.DDVT-6Qc.js → Particles.DUsputn1.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BEY0cXXV.js → ProgressBar.DLY8H6nE.js} +2 -2
- streamlit/static/static/js/Toolbar.D8nHCkuz.js +1 -0
- streamlit/static/static/js/{base-input.CK3UVGp1.js → base-input.CJGiNqed.js} +3 -3
- streamlit/static/static/js/{checkbox.D8W881TL.js → checkbox.Cpdd482O.js} +1 -1
- streamlit/static/static/js/{createSuper.B6W-Dh9S.js → createSuper.CuQIogbW.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.2Ufgxc6y.js +1 -0
- streamlit/static/static/js/{downloader.DiKpuU_S.js → downloader.CN0K7xlu.js} +1 -1
- streamlit/static/static/js/{es6.B8zRNPZ-.js → es6.BJcsVXQ0.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DIewJmmh.js → iframeResizer.contentWindow.XzUvQqcZ.js} +1 -1
- streamlit/static/static/js/index.B1ZQh4P1.js +1 -0
- streamlit/static/static/js/index.BKstZk0M.js +27 -0
- streamlit/static/static/js/{index.Bte_9Lyq.js → index.BMcFsUee.js} +1 -1
- streamlit/static/static/js/{index.qhs54UAB.js → index.BR-IdcTb.js} +1 -1
- streamlit/static/static/js/{index.CejBxbg1.js → index.B_dWA3vd.js} +1 -1
- streamlit/static/static/js/{index.D5naqx-J.js → index.BgnZEMVh.js} +1 -1
- streamlit/static/static/js/{index.C7fRKRs4.js → index.BohqXifI.js} +1 -1
- streamlit/static/static/js/{index.cnnXF7xQ.js → index.Br5nxKNj.js} +1 -1
- streamlit/static/static/js/index.BrIKVbNc.js +3 -0
- streamlit/static/static/js/index.BtWUPzle.js +1 -0
- streamlit/static/static/js/index.C0RLraek.js +1 -0
- streamlit/static/static/js/{index.CP5TD2z1.js → index.CAIjskgG.js} +1 -1
- streamlit/static/static/js/{index.CD8HuT3N.js → index.CAj-7vWz.js} +135 -162
- streamlit/static/static/js/{index.DtYN2x4k.js → index.CMtEit2O.js} +1 -1
- streamlit/static/static/js/index.CkRlykEE.js +12 -0
- streamlit/static/static/js/{index.Ts_0SdB9.js → index.CmN3FXfI.js} +2 -2
- streamlit/static/static/js/{index.BnEpvLEz.js → index.CwbFI1_-.js} +1 -1
- streamlit/static/static/js/{index.CcJf6BCU.js → index.CxIUUfab.js} +27 -27
- streamlit/static/static/js/index.D2KPNy7e.js +1 -0
- streamlit/static/static/js/{index.Ch7MBCx0.js → index.D3GPA5k4.js} +47 -47
- streamlit/static/static/js/{index.ho6NIXGl.js → index.DGAh7DMq.js} +1 -1
- streamlit/static/static/js/index.DKb_NvmG.js +197 -0
- streamlit/static/static/js/{index.CvYYtxD_.js → index.DMqgUYKq.js} +1 -1
- streamlit/static/static/js/{index.zecpGxtj.js → index.DOFlg3dS.js} +1 -1
- streamlit/static/static/js/{index.B9mjBcgE.js → index.DPUXkcQL.js} +1 -1
- streamlit/static/static/js/index.DX1xY89g.js +1 -0
- streamlit/static/static/js/index.DYATBCsq.js +2 -0
- streamlit/static/static/js/{index.D2-atlaQ.js → index.DaSmGJ76.js} +3 -3
- streamlit/static/static/js/index.Dd7bMeLP.js +1 -0
- streamlit/static/static/js/{index.4eF4NxG2.js → index.DjmmgI5U.js} +1 -1
- streamlit/static/static/js/index.Dq56CyM2.js +1 -0
- streamlit/static/static/js/index.DuiXaS5_.js +7 -0
- streamlit/static/static/js/index.DvFidMLe.js +2 -0
- streamlit/static/static/js/{index.452cqrrL.js → index.DwkhC5Pc.js} +1 -1
- streamlit/static/static/js/{index.Dk4C7X3i.js → index.Q-3sFn1v.js} +1 -1
- streamlit/static/static/js/{index.CjXWwH-y.js → index.QJ5QO9sJ.js} +1 -1
- streamlit/static/static/js/{index.B6U8LQo3.js → index.VwTaeety.js} +1 -1
- streamlit/static/static/js/index.YOqQbeX8.js +1 -0
- streamlit/static/static/js/{input.nzVJphXi.js → input.D4MN_FzN.js} +1 -1
- streamlit/static/static/js/{memory.CjCgTQz3.js → memory.DrZjtdGT.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DaRFzZEO.js → number-overlay-editor.DRwAw1In.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DgiPnZ9N.js → possibleConstructorReturn.exeeJQEP.js} +1 -1
- streamlit/static/static/js/record.B-tDciZb.js +1 -0
- streamlit/static/static/js/{sandbox.mithfq7Z.js → sandbox.ClO3IuUr.js} +1 -1
- streamlit/static/static/js/{timepicker.Dbl5KFh6.js → timepicker.DAhu-vcF.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.D-Dx88BQ.js → toConsumableArray.DNbljYEC.js} +1 -1
- streamlit/static/static/js/{uniqueId.Bh26R_3S.js → uniqueId.oG4Gvj1v.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.DeK-QJpD.js → useBasicWidgetState.D6sOH6oI.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.4iAdLWD-.js → useTextInputAutoExpand.4u3_GcuN.js} +2 -2
- streamlit/static/static/js/{useUpdateUiValue.CmT7_nJN.js → useUpdateUiValue.F2R3eTeR.js} +1 -1
- streamlit/static/static/js/wavesurfer.esm.vI8Eid4k.js +73 -0
- streamlit/static/static/js/withFullScreenWrapper.zothJIsI.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
- streamlit/string_util.py +56 -1
- streamlit/testing/v1/app_test.py +2 -2
- streamlit/testing/v1/element_tree.py +23 -9
- streamlit/testing/v1/util.py +2 -2
- streamlit/type_util.py +3 -4
- streamlit/url_util.py +1 -3
- streamlit/user_info.py +1 -2
- streamlit/util.py +3 -1
- streamlit/watcher/event_based_path_watcher.py +23 -12
- streamlit/watcher/local_sources_watcher.py +11 -1
- streamlit/watcher/path_watcher.py +9 -6
- streamlit/watcher/polling_path_watcher.py +4 -1
- streamlit/watcher/util.py +2 -2
- streamlit/web/bootstrap.py +0 -31
- streamlit/web/cli.py +51 -22
- streamlit/web/server/bidi_component_request_handler.py +193 -0
- streamlit/web/server/component_file_utils.py +97 -0
- streamlit/web/server/component_request_handler.py +8 -21
- streamlit/web/server/oidc_mixin.py +3 -1
- streamlit/web/server/routes.py +18 -5
- streamlit/web/server/server.py +10 -0
- streamlit/web/server/server_util.py +3 -1
- streamlit/web/server/upload_file_request_handler.py +3 -1
- {streamlit-1.49.1.dist-info → streamlit-1.51.0.dist-info}/METADATA +4 -5
- {streamlit-1.49.1.dist-info → streamlit-1.51.0.dist-info}/RECORD +238 -209
- streamlit/static/static/css/index.COe1010n.css +0 -1
- streamlit/static/static/js/Hooks.DGu1od_L.js +0 -1
- streamlit/static/static/js/InputInstructions.z6sVgyYt.js +0 -1
- streamlit/static/static/js/Toolbar.DSnK1fUh.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.DRTHOydk.js +0 -1
- streamlit/static/static/js/index.BXYmrqnf.js +0 -1
- streamlit/static/static/js/index.B_8AnktO.js +0 -1
- streamlit/static/static/js/index.Bl7zGQSh.js +0 -7
- streamlit/static/static/js/index.BnJIOYn9.js +0 -73
- streamlit/static/static/js/index.C1HcTl5K.js +0 -1
- streamlit/static/static/js/index.C7lSmSOP.js +0 -1
- streamlit/static/static/js/index.C_tmcx4B.js +0 -1
- streamlit/static/static/js/index.D3K5nOu9.js +0 -197
- streamlit/static/static/js/index.DkKT3LUI.js +0 -1
- streamlit/static/static/js/index.MTPPBDHk.js +0 -2
- streamlit/static/static/js/index.pqW9AMJD.js +0 -3
- streamlit/static/static/js/index.urHgTgMQ.js +0 -12
- streamlit/static/static/js/index.wzkv_11M.js +0 -1
- streamlit/static/static/js/index.yF5AncHY.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.DLp1ENGm.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.CBxVaFdk.woff2 +0 -0
- {streamlit-1.49.1.data → streamlit-1.51.0.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.49.1.dist-info → streamlit-1.51.0.dist-info}/WHEEL +0 -0
- {streamlit-1.49.1.dist-info → streamlit-1.51.0.dist-info}/entry_points.txt +0 -0
- {streamlit-1.49.1.dist-info → streamlit-1.51.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{c2 as Pn,c3 as Jr,c4 as Tn,c5 as Mn,c6 as kn,c7 as Fn,c8 as $n,c9 as Bn,ca as Hn,cb as Dn,a_ as Ze,a2 as wt,aj as c,r as A,bj as v,s as De,u as Nn,e as Zt,j as I,f as Ln,T as jn,P as In,W as zn,cc as Gn,l as Un}from"./index.CAj-7vWz.js";import{u as Wn}from"./useBasicWidgetState.D6sOH6oI.js";import"./FormClearHelper.BB1Km6eP.js";var T={},re={},at,Jt;function qn(){if(Jt)return at;Jt=1;var t=Pn(),e=Jr(),r=Tn(),n="[object String]";function a(i){return typeof i=="string"||!e(i)&&r(i)&&t(i)==n}return at=a,at}var it,Qt;function Vn(){if(Qt)return it;Qt=1;var t=Mn();function e(r){return typeof r=="function"?r:t}return it=e,it}var ot,er;function Et(){if(er)return ot;er=1;var t=kn(),e=Vn();function r(n,a){return n&&t(n,e(a))}return ot=r,ot}var lt,tr;function Xn(){if(tr)return lt;tr=1;var t=Fn(),e=$n(),r=Bn(),n=Jr();function a(i,o){var l=n(i)?t:r;return l(i,e(o,3))}return lt=a,lt}var rr;function Kn(){if(rr)return re;rr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.flattenNames=void 0;var t=qn(),e=s(t),r=Et(),n=s(r),a=Hn(),i=s(a),o=Xn(),l=s(o);function s(h){return h&&h.__esModule?h:{default:h}}var u=re.flattenNames=function h(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=[];return(0,l.default)(p,function(d){Array.isArray(d)?h(d).map(function(b){return f.push(b)}):(0,i.default)(d)?(0,n.default)(d,function(b,g){b===!0&&f.push(g),f.push(g+"-"+b)}):(0,e.default)(d)&&f.push(d)}),f};return re.default=u,re}var ne={},nr;function Yn(){if(nr)return ne;nr=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.mergeClasses=void 0;var t=Et(),e=i(t),r=Dn(),n=i(r),a=Object.assign||function(l){for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(l[h]=u[h])}return l};function i(l){return l&&l.__esModule?l:{default:l}}var o=ne.mergeClasses=function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=s.default&&(0,n.default)(s.default)||{};return u.map(function(p){var f=s[p];return f&&(0,e.default)(f,function(d,b){h[b]||(h[b]={}),h[b]=a({},h[b],f[b])}),p}),h};return ne.default=o,ne}var ae={},ar;function Zn(){if(ar)return ae;ar=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.autoprefix=void 0;var t=Et(),e=n(t),r=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var s=arguments[l];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(o[u]=s[u])}return o};function n(o){return o&&o.__esModule?o:{default:o}}var a={borderRadius:function(l){return{msBorderRadius:l,MozBorderRadius:l,OBorderRadius:l,WebkitBorderRadius:l,borderRadius:l}},boxShadow:function(l){return{msBoxShadow:l,MozBoxShadow:l,OBoxShadow:l,WebkitBoxShadow:l,boxShadow:l}},userSelect:function(l){return{WebkitTouchCallout:l,KhtmlUserSelect:l,MozUserSelect:l,msUserSelect:l,WebkitUserSelect:l,userSelect:l}},flex:function(l){return{WebkitBoxFlex:l,MozBoxFlex:l,WebkitFlex:l,msFlex:l,flex:l}},flexBasis:function(l){return{WebkitFlexBasis:l,flexBasis:l}},justifyContent:function(l){return{WebkitJustifyContent:l,justifyContent:l}},transition:function(l){return{msTransition:l,MozTransition:l,OTransition:l,WebkitTransition:l,transition:l}},transform:function(l){return{msTransform:l,MozTransform:l,OTransform:l,WebkitTransform:l,transform:l}},absolute:function(l){var s=l&&l.split(" ");return{position:"absolute",top:s&&s[0],right:s&&s[1],bottom:s&&s[2],left:s&&s[3]}},extend:function(l,s){var u=s[l];return u||{extend:l}}},i=ae.autoprefix=function(l){var s={};return(0,e.default)(l,function(u,h){var p={};(0,e.default)(u,function(f,d){var b=a[d];b?p=r({},p,b(f)):p[d]=f}),s[h]=p}),s};return ae.default=i,ae}var ie={},ir;function Jn(){if(ir)return ie;ir=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.hover=void 0;var t=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var h=arguments[u];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(s[p]=h[p])}return s},e=Ze(),r=n(e);function n(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function i(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function o(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var l=ie.hover=function(u){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(p){o(f,p);function f(){var d,b,g,m;a(this,f);for(var w=arguments.length,C=Array(w),O=0;O<w;O++)C[O]=arguments[O];return m=(b=(g=i(this,(d=f.__proto__||Object.getPrototypeOf(f)).call.apply(d,[this].concat(C))),g),g.state={hover:!1},g.handleMouseOver=function(){return g.setState({hover:!0})},g.handleMouseOut=function(){return g.setState({hover:!1})},g.render=function(){return r.default.createElement(h,{onMouseOver:g.handleMouseOver,onMouseOut:g.handleMouseOut},r.default.createElement(u,t({},g.props,g.state)))},b),i(g,m)}return f}(r.default.Component)};return ie.default=l,ie}var oe={},or;function Qn(){if(or)return oe;or=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.active=void 0;var t=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var h=arguments[u];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(s[p]=h[p])}return s},e=Ze(),r=n(e);function n(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function i(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function o(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var l=oe.active=function(u){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(p){o(f,p);function f(){var d,b,g,m;a(this,f);for(var w=arguments.length,C=Array(w),O=0;O<w;O++)C[O]=arguments[O];return m=(b=(g=i(this,(d=f.__proto__||Object.getPrototypeOf(f)).call.apply(d,[this].concat(C))),g),g.state={active:!1},g.handleMouseDown=function(){return g.setState({active:!0})},g.handleMouseUp=function(){return g.setState({active:!1})},g.render=function(){return r.default.createElement(h,{onMouseDown:g.handleMouseDown,onMouseUp:g.handleMouseUp},r.default.createElement(u,t({},g.props,g.state)))},b),i(g,m)}return f}(r.default.Component)};return oe.default=l,oe}var Ie={},lr;function ea(){if(lr)return Ie;lr=1,Object.defineProperty(Ie,"__esModule",{value:!0});var t=function(r,n){var a={},i=function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a[l]=s};return r===0&&i("first-child"),r===n-1&&i("last-child"),(r===0||r%2===0)&&i("even"),Math.abs(r%2)===1&&i("odd"),i("nth-child",r),a};return Ie.default=t,Ie}var sr;function ta(){if(sr)return T;sr=1,Object.defineProperty(T,"__esModule",{value:!0}),T.ReactCSS=T.loop=T.handleActive=T.handleHover=T.hover=void 0;var t=Kn(),e=f(t),r=Yn(),n=f(r),a=Zn(),i=f(a),o=Jn(),l=f(o),s=Qn(),u=f(s),h=ea(),p=f(h);function f(b){return b&&b.__esModule?b:{default:b}}T.hover=l.default,T.handleHover=l.default,T.handleActive=u.default,T.loop=p.default;var d=T.ReactCSS=function(g){for(var m=arguments.length,w=Array(m>1?m-1:0),C=1;C<m;C++)w[C-1]=arguments[C];var O=(0,e.default)(w),P=(0,n.default)(g,O);return(0,i.default)(P)};return T.default=d,T}var St=ta();const y=wt(St);var ra=function(e,r,n,a,i){var o=i.clientWidth,l=i.clientHeight,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,u=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,h=s-(i.getBoundingClientRect().left+window.pageXOffset),p=u-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(p<0?f=0:p>l?f=1:f=Math.round(p*100/l)/100,r.a!==f)return{h:r.h,s:r.s,l:r.l,a:f,source:"rgb"}}else{var d=void 0;if(h<0?d=0:h>o?d=1:d=Math.round(h*100/o)/100,a!==d)return{h:r.h,s:r.s,l:r.l,a:d,source:"rgb"}}return null},st={},na=function(e,r,n,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=n*2,i.height=n*2;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=r,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null},aa=function(e,r,n,a){var i=e+"-"+r+"-"+n+(a?"-server":"");if(st[i])return st[i];var o=na(e,r,n,a);return st[i]=o,o},ur=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ce=function(e){var r=e.white,n=e.grey,a=e.size,i=e.renderers,o=e.borderRadius,l=e.boxShadow,s=e.children,u=y({default:{grid:{borderRadius:o,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+aa(r,n,a,i.canvas)+") center left"}}});return A.isValidElement(s)?c.cloneElement(s,ur({},s.props,{style:ur({},s.props.style,u.grid)})):c.createElement("div",{style:u.grid})};Ce.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var ia=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},oa=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function la(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function sa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ct=function(t){sa(e,t);function e(){var r,n,a,i;la(this,e);for(var o=arguments.length,l=Array(o),s=0;s<o;s++)l[s]=arguments[s];return i=(n=(a=cr(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(l))),a),a.handleChange=function(u){var h=ra(u,a.props.hsl,a.props.direction,a.props.a,a.container);h&&typeof a.props.onChange=="function"&&a.props.onChange(h,u)},a.handleMouseDown=function(u){a.handleChange(u),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},n),cr(a,i)}return oa(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,a=this.props.rgb,i=y({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
2
|
+
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:a.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
3
|
+
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:ia({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return c.createElement("div",{style:i.alpha},c.createElement("div",{style:i.checkboard},c.createElement(Ce,{renderers:this.props.renderers})),c.createElement("div",{style:i.gradient}),c.createElement("div",{style:i.container,ref:function(l){return n.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("div",{style:i.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:i.slider}))))}}]),e}(A.PureComponent||A.Component),ua=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function ca(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ha(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pa(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var da=1,Qr=38,ga=40,ba=[Qr,ga],va=function(e){return ba.indexOf(e)>-1},xa=function(e){return Number(String(e).replace(/%/g,""))},ma=1,E=function(t){fa(e,t);function e(r){ha(this,e);var n=pa(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(a){n.setUpdatedValue(a.target.value,a)},n.handleKeyDown=function(a){var i=xa(a.target.value);if(!isNaN(i)&&va(a.keyCode)){var o=n.getArrowOffset(),l=a.keyCode===Qr?i+o:i-o;n.setUpdatedValue(l,a)}},n.handleDrag=function(a){if(n.props.dragLabel){var i=Math.round(n.props.value+a.movementX);i>=0&&i<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(i),a)}},n.handleMouseDown=function(a){n.props.dragLabel&&(a.preventDefault(),n.handleDrag(a),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(r.value).toUpperCase(),blurValue:String(r.value).toUpperCase()},n.inputId="rc-editable-input-"+ma++,n}return ua(e,[{key:"componentDidUpdate",value:function(n,a){this.props.value!==this.state.value&&(n.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return ca({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||da}},{key:"setUpdatedValue",value:function(n,a){var i=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(i,a),this.setState({value:n})}},{key:"render",value:function(){var n=this,a=y({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return c.createElement("div",{style:a.wrap},c.createElement("input",{id:this.inputId,style:a.input,ref:function(o){return n.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?c.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(A.PureComponent||A.Component),ya=function(e,r,n,a){var i=a.clientWidth,o=a.clientHeight,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,s=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=l-(a.getBoundingClientRect().left+window.pageXOffset),h=s-(a.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var p=void 0;if(h<0)p=359;else if(h>o)p=0;else{var f=-(h*100/o)+100;p=360*f/100}if(n.h!==p)return{h:p,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(u<0)d=0;else if(u>i)d=359;else{var b=u*100/i;d=360*b/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},wa=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Ea(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Sa(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _e=function(t){Sa(e,t);function e(){var r,n,a,i;Ea(this,e);for(var o=arguments.length,l=Array(o),s=0;s<o;s++)l[s]=arguments[s];return i=(n=(a=hr(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(l))),a),a.handleChange=function(u){var h=ya(u,a.props.direction,a.props.hsl,a.container);h&&typeof a.props.onChange=="function"&&a.props.onChange(h,u)},a.handleMouseDown=function(u){a.handleChange(u),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},n),hr(a,i)}return wa(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.direction,i=a===void 0?"horizontal":a,o=y({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return c.createElement("div",{style:o.hue},c.createElement("div",{className:"hue-"+i,style:o.container,ref:function(s){return n.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("style",null,`
|
|
4
|
+
.hue-horizontal {
|
|
5
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
6
|
+
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
7
|
+
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
8
|
+
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.hue-vertical {
|
|
12
|
+
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
13
|
+
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
14
|
+
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
15
|
+
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
16
|
+
}
|
|
17
|
+
`),c.createElement("div",{style:o.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:o.slider}))))}}]),e}(A.PureComponent||A.Component);function Ca(){this.__data__=[],this.size=0}function Ne(t,e){return t===e||t!==t&&e!==e}function Je(t,e){for(var r=t.length;r--;)if(Ne(t[r][0],e))return r;return-1}var _a=Array.prototype,Oa=_a.splice;function Ra(t){var e=this.__data__,r=Je(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Oa.call(e,r,1),--this.size,!0}function Aa(t){var e=this.__data__,r=Je(e,t);return r<0?void 0:e[r][1]}function Pa(t){return Je(this.__data__,t)>-1}function Ta(t,e){var r=this.__data__,n=Je(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function z(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}z.prototype.clear=Ca;z.prototype.delete=Ra;z.prototype.get=Aa;z.prototype.has=Pa;z.prototype.set=Ta;function Ma(){this.__data__=new z,this.size=0}function ka(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Fa(t){return this.__data__.get(t)}function $a(t){return this.__data__.has(t)}var en=typeof global=="object"&&global&&global.Object===Object&&global,Ba=typeof self=="object"&&self&&self.Object===Object&&self,N=en||Ba||Function("return this")(),V=N.Symbol,tn=Object.prototype,Ha=tn.hasOwnProperty,Da=tn.toString,Ae=V?V.toStringTag:void 0;function Na(t){var e=Ha.call(t,Ae),r=t[Ae];try{t[Ae]=void 0;var n=!0}catch{}var a=Da.call(t);return n&&(e?t[Ae]=r:delete t[Ae]),a}var La=Object.prototype,ja=La.toString;function Ia(t){return ja.call(t)}var za="[object Null]",Ga="[object Undefined]",pr=V?V.toStringTag:void 0;function Z(t){return t==null?t===void 0?Ga:za:pr&&pr in Object(t)?Na(t):Ia(t)}function B(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ua="[object AsyncFunction]",Wa="[object Function]",qa="[object GeneratorFunction]",Va="[object Proxy]";function _t(t){if(!B(t))return!1;var e=Z(t);return e==Wa||e==qa||e==Ua||e==Va}var ut=N["__core-js_shared__"],fr=function(){var t=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Xa(t){return!!fr&&fr in t}var Ka=Function.prototype,Ya=Ka.toString;function J(t){if(t!=null){try{return Ya.call(t)}catch{}try{return t+""}catch{}}return""}var Za=/[\\^$.*+?()[\]{}|]/g,Ja=/^\[object .+?Constructor\]$/,Qa=Function.prototype,ei=Object.prototype,ti=Qa.toString,ri=ei.hasOwnProperty,ni=RegExp("^"+ti.call(ri).replace(Za,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ai(t){if(!B(t)||Xa(t))return!1;var e=_t(t)?ni:Ja;return e.test(J(t))}function ii(t,e){return t?.[e]}function Q(t,e){var r=ii(t,e);return ai(r)?r:void 0}var Be=Q(N,"Map"),He=Q(Object,"create");function oi(){this.__data__=He?He(null):{},this.size=0}function li(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var si="__lodash_hash_undefined__",ui=Object.prototype,ci=ui.hasOwnProperty;function hi(t){var e=this.__data__;if(He){var r=e[t];return r===si?void 0:r}return ci.call(e,t)?e[t]:void 0}var pi=Object.prototype,fi=pi.hasOwnProperty;function di(t){var e=this.__data__;return He?e[t]!==void 0:fi.call(e,t)}var gi="__lodash_hash_undefined__";function bi(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=He&&e===void 0?gi:e,this}function Y(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Y.prototype.clear=oi;Y.prototype.delete=li;Y.prototype.get=hi;Y.prototype.has=di;Y.prototype.set=bi;function vi(){this.size=0,this.__data__={hash:new Y,map:new(Be||z),string:new Y}}function xi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Qe(t,e){var r=t.__data__;return xi(e)?r[typeof e=="string"?"string":"hash"]:r.map}function mi(t){var e=Qe(this,t).delete(t);return this.size-=e?1:0,e}function yi(t){return Qe(this,t).get(t)}function wi(t){return Qe(this,t).has(t)}function Ei(t,e){var r=Qe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function G(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}G.prototype.clear=vi;G.prototype.delete=mi;G.prototype.get=yi;G.prototype.has=wi;G.prototype.set=Ei;var Si=200;function Ci(t,e){var r=this.__data__;if(r instanceof z){var n=r.__data__;if(!Be||n.length<Si-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(t,e),this.size=r.size,this}function L(t){var e=this.__data__=new z(t);this.size=e.size}L.prototype.clear=Ma;L.prototype.delete=ka;L.prototype.get=Fa;L.prototype.has=$a;L.prototype.set=Ci;var We=function(){try{var t=Q(Object,"defineProperty");return t({},"",{}),t}catch{}}();function Ot(t,e,r){e=="__proto__"&&We?We(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function dt(t,e,r){(r!==void 0&&!Ne(t[e],r)||r===void 0&&!(e in t))&&Ot(t,e,r)}function _i(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),l=o.length;l--;){var s=o[++a];if(r(i[s],s,i)===!1)break}return e}}var rn=_i(),nn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dr=nn&&typeof module=="object"&&module&&!module.nodeType&&module,Oi=dr&&dr.exports===nn,gr=Oi?N.Buffer:void 0;gr&&gr.allocUnsafe;function Ri(t,e){return t.slice()}var qe=N.Uint8Array;function Ai(t){var e=new t.constructor(t.byteLength);return new qe(e).set(new qe(t)),e}function Pi(t,e){var r=Ai(t.buffer);return new t.constructor(r,t.byteOffset,t.length)}function Ti(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var br=Object.create,Mi=function(){function t(){}return function(e){if(!B(e))return{};if(br)return br(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function an(t,e){return function(r){return t(e(r))}}var on=an(Object.getPrototypeOf,Object),ki=Object.prototype;function Rt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ki;return t===r}function Fi(t){return typeof t.constructor=="function"&&!Rt(t)?Mi(on(t)):{}}function X(t){return t!=null&&typeof t=="object"}var $i="[object Arguments]";function vr(t){return X(t)&&Z(t)==$i}var ln=Object.prototype,Bi=ln.hasOwnProperty,Hi=ln.propertyIsEnumerable,Ve=vr(function(){return arguments}())?vr:function(t){return X(t)&&Bi.call(t,"callee")&&!Hi.call(t,"callee")},$=Array.isArray,Di=9007199254740991;function At(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Di}function Oe(t){return t!=null&&At(t.length)&&!_t(t)}function Ni(t){return X(t)&&Oe(t)}function Li(){return!1}var sn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xr=sn&&typeof module=="object"&&module&&!module.nodeType&&module,ji=xr&&xr.exports===sn,mr=ji?N.Buffer:void 0,Ii=mr?mr.isBuffer:void 0,Xe=Ii||Li,zi="[object Object]",Gi=Function.prototype,Ui=Object.prototype,un=Gi.toString,Wi=Ui.hasOwnProperty,qi=un.call(Object);function Vi(t){if(!X(t)||Z(t)!=zi)return!1;var e=on(t);if(e===null)return!0;var r=Wi.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&un.call(r)==qi}var Xi="[object Arguments]",Ki="[object Array]",Yi="[object Boolean]",Zi="[object Date]",Ji="[object Error]",Qi="[object Function]",eo="[object Map]",to="[object Number]",ro="[object Object]",no="[object RegExp]",ao="[object Set]",io="[object String]",oo="[object WeakMap]",lo="[object ArrayBuffer]",so="[object DataView]",uo="[object Float32Array]",co="[object Float64Array]",ho="[object Int8Array]",po="[object Int16Array]",fo="[object Int32Array]",go="[object Uint8Array]",bo="[object Uint8ClampedArray]",vo="[object Uint16Array]",xo="[object Uint32Array]",S={};S[uo]=S[co]=S[ho]=S[po]=S[fo]=S[go]=S[bo]=S[vo]=S[xo]=!0;S[Xi]=S[Ki]=S[lo]=S[Yi]=S[so]=S[Zi]=S[Ji]=S[Qi]=S[eo]=S[to]=S[ro]=S[no]=S[ao]=S[io]=S[oo]=!1;function mo(t){return X(t)&&At(t.length)&&!!S[Z(t)]}function yo(t){return function(e){return t(e)}}var cn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$e=cn&&typeof module=="object"&&module&&!module.nodeType&&module,wo=$e&&$e.exports===cn,ct=wo&&en.process,yr=function(){try{var t=$e&&$e.require&&$e.require("util").types;return t||ct&&ct.binding&&ct.binding("util")}catch{}}(),wr=yr&&yr.isTypedArray,Pt=wr?yo(wr):mo;function gt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Eo=Object.prototype,So=Eo.hasOwnProperty;function Co(t,e,r){var n=t[e];(!(So.call(t,e)&&Ne(n,r))||r===void 0&&!(e in t))&&Ot(t,e,r)}function _o(t,e,r,n){var a=!r;r||(r={});for(var i=-1,o=e.length;++i<o;){var l=e[i],s=void 0;s===void 0&&(s=t[l]),a?Ot(r,l,s):Co(r,l,s)}return r}function Oo(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ro=9007199254740991,Ao=/^(?:0|[1-9]\d*)$/;function Tt(t,e){var r=typeof t;return e=e??Ro,!!e&&(r=="number"||r!="symbol"&&Ao.test(t))&&t>-1&&t%1==0&&t<e}var Po=Object.prototype,To=Po.hasOwnProperty;function hn(t,e){var r=$(t),n=!r&&Ve(t),a=!r&&!n&&Xe(t),i=!r&&!n&&!a&&Pt(t),o=r||n||a||i,l=o?Oo(t.length,String):[],s=l.length;for(var u in t)(e||To.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Tt(u,s)))&&l.push(u);return l}function Mo(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ko=Object.prototype,Fo=ko.hasOwnProperty;function $o(t){if(!B(t))return Mo(t);var e=Rt(t),r=[];for(var n in t)n=="constructor"&&(e||!Fo.call(t,n))||r.push(n);return r}function pn(t){return Oe(t)?hn(t,!0):$o(t)}function Bo(t){return _o(t,pn(t))}function Ho(t,e,r,n,a,i,o){var l=gt(t,r),s=gt(e,r),u=o.get(s);if(u){dt(t,r,u);return}var h=i?i(l,s,r+"",t,e,o):void 0,p=h===void 0;if(p){var f=$(s),d=!f&&Xe(s),b=!f&&!d&&Pt(s);h=s,f||d||b?$(l)?h=l:Ni(l)?h=Ti(l):d?(p=!1,h=Ri(s)):b?(p=!1,h=Pi(s)):h=[]:Vi(s)||Ve(s)?(h=l,Ve(l)?h=Bo(l):(!B(l)||_t(l))&&(h=Fi(s))):p=!1}p&&(o.set(s,h),a(h,s,n,i,o),o.delete(s)),dt(t,r,h)}function fn(t,e,r,n,a){t!==e&&rn(e,function(i,o){if(a||(a=new L),B(i))Ho(t,e,o,r,fn,n,a);else{var l=n?n(gt(t,o),i,o+"",t,e,a):void 0;l===void 0&&(l=i),dt(t,o,l)}},pn)}function et(t){return t}function Do(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Er=Math.max;function No(t,e,r){return e=Er(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=Er(n.length-e,0),o=Array(i);++a<i;)o[a]=n[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=n[a];return l[e]=r(o),Do(t,this,l)}}function Lo(t){return function(){return t}}var jo=We?function(t,e){return We(t,"toString",{configurable:!0,enumerable:!1,value:Lo(e),writable:!0})}:et,Io=800,zo=16,Go=Date.now;function Uo(t){var e=0,r=0;return function(){var n=Go(),a=zo-(n-r);if(r=n,a>0){if(++e>=Io)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Wo=Uo(jo);function qo(t,e){return Wo(No(t,e,et),t+"")}function Vo(t,e,r){if(!B(r))return!1;var n=typeof e;return(n=="number"?Oe(r)&&Tt(e,r.length):n=="string"&&e in r)?Ne(r[e],t):!1}function Xo(t){return qo(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,o&&Vo(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=Object(e);++n<a;){var l=r[n];l&&t(e,l,n,i)}return e})}var M=Xo(function(t,e,r){fn(t,e,r)}),Le=function(e){var r=e.zDepth,n=e.radius,a=e.background,i=e.children,o=e.styles,l=o===void 0?{}:o,s=y(M({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+r+"px "+r*4+"px rgba(0,0,0,.24)",borderRadius:n,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":r===1});return c.createElement("div",{style:s.wrap},c.createElement("div",{style:s.bg}),c.createElement("div",{style:s.content},i))};Le.propTypes={background:v.string,zDepth:v.oneOf([0,1,2,3,4,5]),radius:v.number,styles:v.object};Le.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var ht=function(){return N.Date.now()},Ko=/\s/;function Yo(t){for(var e=t.length;e--&&Ko.test(t.charAt(e)););return e}var Zo=/^\s+/;function Jo(t){return t&&t.slice(0,Yo(t)+1).replace(Zo,"")}var Qo="[object Symbol]";function tt(t){return typeof t=="symbol"||X(t)&&Z(t)==Qo}var Sr=NaN,el=/^[-+]0x[0-9a-f]+$/i,tl=/^0b[01]+$/i,rl=/^0o[0-7]+$/i,nl=parseInt;function Cr(t){if(typeof t=="number")return t;if(tt(t))return Sr;if(B(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=B(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Jo(t);var r=tl.test(t);return r||rl.test(t)?nl(t.slice(2),r?2:8):el.test(t)?Sr:+t}var al="Expected a function",il=Math.max,ol=Math.min;function dn(t,e,r){var n,a,i,o,l,s,u=0,h=!1,p=!1,f=!0;if(typeof t!="function")throw new TypeError(al);e=Cr(e)||0,B(r)&&(h=!!r.leading,p="maxWait"in r,i=p?il(Cr(r.maxWait)||0,e):i,f="trailing"in r?!!r.trailing:f);function d(R){var W=n,Re=a;return n=a=void 0,u=R,o=t.apply(Re,W),o}function b(R){return u=R,l=setTimeout(w,e),h?d(R):o}function g(R){var W=R-s,Re=R-u,Yt=e-W;return p?ol(Yt,i-Re):Yt}function m(R){var W=R-s,Re=R-u;return s===void 0||W>=e||W<0||p&&Re>=i}function w(){var R=ht();if(m(R))return C(R);l=setTimeout(w,g(R))}function C(R){return l=void 0,f&&n?d(R):(n=a=void 0,o)}function O(){l!==void 0&&clearTimeout(l),u=0,n=s=a=l=void 0}function P(){return l===void 0?o:C(ht())}function U(){var R=ht(),W=m(R);if(n=arguments,a=this,s=R,W){if(l===void 0)return b(s);if(p)return clearTimeout(l),l=setTimeout(w,e),d(s)}return l===void 0&&(l=setTimeout(w,e)),o}return U.cancel=O,U.flush=P,U}var ll="Expected a function";function sl(t,e,r){var n=!0,a=!0;if(typeof t!="function")throw new TypeError(ll);return B(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),dn(t,e,{leading:n,maxWait:e,trailing:a})}var ul=function(e,r,n){var a=n.getBoundingClientRect(),i=a.width,o=a.height,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,s=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=l-(n.getBoundingClientRect().left+window.pageXOffset),h=s-(n.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>i&&(u=i),h<0?h=0:h>o&&(h=o);var p=u/i,f=1-h/o;return{h:r.h,s:p,v:f,a:r.a,source:"hsv"}},cl=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function hl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pl(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var je=function(t){fl(e,t);function e(r){hl(this,e);var n=pl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r));return n.handleChange=function(a){typeof n.props.onChange=="function"&&n.throttle(n.props.onChange,ul(a,n.props.hsl,n.container),a)},n.handleMouseDown=function(a){n.handleChange(a);var i=n.getContainerRenderWindow();i.addEventListener("mousemove",n.handleChange),i.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=sl(function(a,i,o){a(i,o)},50),n}return cl(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,a=window;!a.document.contains(n)&&a.parent!==a;)a=a.parent;return a}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.style||{},i=a.color,o=a.white,l=a.black,s=a.pointer,u=a.circle,h=y({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
18
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:o,black:l,pointer:s,circle:u}},{custom:!!this.props.style});return c.createElement("div",{style:h.color,ref:function(f){return n.container=f},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("style",null,`
|
|
19
|
+
.saturation-white {
|
|
20
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
21
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
22
|
+
}
|
|
23
|
+
.saturation-black {
|
|
24
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
25
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
26
|
+
}
|
|
27
|
+
`),c.createElement("div",{style:h.white,className:"saturation-white"},c.createElement("div",{style:h.black,className:"saturation-black"}),c.createElement("div",{style:h.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:h.circle}))))}}]),e}(A.PureComponent||A.Component);function dl(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var gl=an(Object.keys,Object),bl=Object.prototype,vl=bl.hasOwnProperty;function xl(t){if(!Rt(t))return gl(t);var e=[];for(var r in Object(t))vl.call(t,r)&&r!="constructor"&&e.push(r);return e}function Mt(t){return Oe(t)?hn(t):xl(t)}function ml(t,e){return t&&rn(t,e,Mt)}function yl(t,e){return function(r,n){if(r==null)return r;if(!Oe(r))return t(r,n);for(var a=r.length,i=-1,o=Object(r);++i<a&&n(o[i],i,o)!==!1;);return r}}var gn=yl(ml);function wl(t){return typeof t=="function"?t:et}function El(t,e){var r=$(t)?dl:gn;return r(t,wl(e))}function Ke(t){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(t)}var Sl=/^\s+/,Cl=/\s+$/;function x(t,e){if(t=t||"",e=e||{},t instanceof x)return t;if(!(this instanceof x))return new x(t,e);var r=_l(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}x.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),r,n,a,i,o,l;return r=e.r/255,n=e.g/255,a=e.b/255,r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?l=a/12.92:l=Math.pow((a+.055)/1.055,2.4),.2126*i+.7152*o+.0722*l},setAlpha:function(e){return this._a=bn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Or(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Or(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=_r(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=_r(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return Rr(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Pl(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(_(this._r,255)*100)+"%",g:Math.round(_(this._g,255)*100)+"%",b:Math.round(_(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(_(this._r,255)*100)+"%, "+Math.round(_(this._g,255)*100)+"%, "+Math.round(_(this._b,255)*100)+"%)":"rgba("+Math.round(_(this._r,255)*100)+"%, "+Math.round(_(this._g,255)*100)+"%, "+Math.round(_(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Il[Rr(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+Ar(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var i=x(e);n="#"+Ar(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,i=!r&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return x(this.toString())},_applyModification:function(e,r){var n=e.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Fl,arguments)},brighten:function(){return this._applyModification($l,arguments)},darken:function(){return this._applyModification(Bl,arguments)},desaturate:function(){return this._applyModification(Tl,arguments)},saturate:function(){return this._applyModification(Ml,arguments)},greyscale:function(){return this._applyModification(kl,arguments)},spin:function(){return this._applyModification(Hl,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Ll,arguments)},complement:function(){return this._applyCombination(Dl,arguments)},monochromatic:function(){return this._applyCombination(jl,arguments)},splitcomplement:function(){return this._applyCombination(Nl,arguments)},triad:function(){return this._applyCombination(Pr,[3])},tetrad:function(){return this._applyCombination(Pr,[4])}};x.fromRatio=function(t,e){if(Ke(t)=="object"){var r={};for(var n in t)t.hasOwnProperty(n)&&(n==="a"?r[n]=t[n]:r[n]=Me(t[n]));t=r}return x(t,e)};function _l(t){var e={r:0,g:0,b:0},r=1,n=null,a=null,i=null,o=!1,l=!1;return typeof t=="string"&&(t=Wl(t)),Ke(t)=="object"&&(j(t.r)&&j(t.g)&&j(t.b)?(e=Ol(t.r,t.g,t.b),o=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):j(t.h)&&j(t.s)&&j(t.v)?(n=Me(t.s),a=Me(t.v),e=Al(t.h,n,a),o=!0,l="hsv"):j(t.h)&&j(t.s)&&j(t.l)&&(n=Me(t.s),i=Me(t.l),e=Rl(t.h,n,i),o=!0,l="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=bn(r),{ok:o,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function Ol(t,e,r){return{r:_(t,255)*255,g:_(e,255)*255,b:_(r,255)*255}}function _r(t,e,r){t=_(t,255),e=_(e,255),r=_(r,255);var n=Math.max(t,e,r),a=Math.min(t,e,r),i,o,l=(n+a)/2;if(n==a)i=o=0;else{var s=n-a;switch(o=l>.5?s/(2-n-a):s/(n+a),n){case t:i=(e-r)/s+(e<r?6:0);break;case e:i=(r-t)/s+2;break;case r:i=(t-e)/s+4;break}i/=6}return{h:i,s:o,l}}function Rl(t,e,r){var n,a,i;t=_(t,360),e=_(e,100),r=_(r,100);function o(u,h,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?u+(h-u)*6*p:p<1/2?h:p<2/3?u+(h-u)*(2/3-p)*6:u}if(e===0)n=a=i=r;else{var l=r<.5?r*(1+e):r+e-r*e,s=2*r-l;n=o(s,l,t+1/3),a=o(s,l,t),i=o(s,l,t-1/3)}return{r:n*255,g:a*255,b:i*255}}function Or(t,e,r){t=_(t,255),e=_(e,255),r=_(r,255);var n=Math.max(t,e,r),a=Math.min(t,e,r),i,o,l=n,s=n-a;if(o=n===0?0:s/n,n==a)i=0;else{switch(n){case t:i=(e-r)/s+(e<r?6:0);break;case e:i=(r-t)/s+2;break;case r:i=(t-e)/s+4;break}i/=6}return{h:i,s:o,v:l}}function Al(t,e,r){t=_(t,360)*6,e=_(e,100),r=_(r,100);var n=Math.floor(t),a=t-n,i=r*(1-e),o=r*(1-a*e),l=r*(1-(1-a)*e),s=n%6,u=[r,o,i,i,l,r][s],h=[l,r,r,o,i,i][s],p=[i,i,l,r,r,o][s];return{r:u*255,g:h*255,b:p*255}}function Rr(t,e,r,n){var a=[D(Math.round(t).toString(16)),D(Math.round(e).toString(16)),D(Math.round(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Pl(t,e,r,n,a){var i=[D(Math.round(t).toString(16)),D(Math.round(e).toString(16)),D(Math.round(r).toString(16)),D(vn(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function Ar(t,e,r,n){var a=[D(vn(n)),D(Math.round(t).toString(16)),D(Math.round(e).toString(16)),D(Math.round(r).toString(16))];return a.join("")}x.equals=function(t,e){return!t||!e?!1:x(t).toRgbString()==x(e).toRgbString()};x.random=function(){return x.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Tl(t,e){e=e===0?0:e||10;var r=x(t).toHsl();return r.s-=e/100,r.s=rt(r.s),x(r)}function Ml(t,e){e=e===0?0:e||10;var r=x(t).toHsl();return r.s+=e/100,r.s=rt(r.s),x(r)}function kl(t){return x(t).desaturate(100)}function Fl(t,e){e=e===0?0:e||10;var r=x(t).toHsl();return r.l+=e/100,r.l=rt(r.l),x(r)}function $l(t,e){e=e===0?0:e||10;var r=x(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),x(r)}function Bl(t,e){e=e===0?0:e||10;var r=x(t).toHsl();return r.l-=e/100,r.l=rt(r.l),x(r)}function Hl(t,e){var r=x(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,x(r)}function Dl(t){var e=x(t).toHsl();return e.h=(e.h+180)%360,x(e)}function Pr(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=x(t).toHsl(),n=[x(t)],a=360/e,i=1;i<e;i++)n.push(x({h:(r.h+i*a)%360,s:r.s,l:r.l}));return n}function Nl(t){var e=x(t).toHsl(),r=e.h;return[x(t),x({h:(r+72)%360,s:e.s,l:e.l}),x({h:(r+216)%360,s:e.s,l:e.l})]}function Ll(t,e,r){e=e||6,r=r||30;var n=x(t).toHsl(),a=360/r,i=[x(t)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(x(n));return i}function jl(t,e){e=e||6;for(var r=x(t).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/e;e--;)o.push(x({h:n,s:a,v:i})),i=(i+l)%1;return o}x.mix=function(t,e,r){r=r===0?0:r||50;var n=x(t).toRgb(),a=x(e).toRgb(),i=r/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return x(o)};x.readability=function(t,e){var r=x(t),n=x(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};x.isReadable=function(t,e,r){var n=x.readability(t,e),a,i;switch(i=!1,a=ql(r),a.level+a.size){case"AAsmall":case"AAAlarge":i=n>=4.5;break;case"AAlarge":i=n>=3;break;case"AAAsmall":i=n>=7;break}return i};x.mostReadable=function(t,e,r){var n=null,a=0,i,o,l,s;r=r||{},o=r.includeFallbackColors,l=r.level,s=r.size;for(var u=0;u<e.length;u++)i=x.readability(t,e[u]),i>a&&(a=i,n=x(e[u]));return x.isReadable(t,n,{level:l,size:s})||!o?n:(r.includeFallbackColors=!1,x.mostReadable(t,["#fff","#000"],r))};var bt=x.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Il=x.hexNames=zl(bt);function zl(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function bn(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function _(t,e){Gl(t)&&(t="100%");var r=Ul(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function rt(t){return Math.min(1,Math.max(0,t))}function F(t){return parseInt(t,16)}function Gl(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Ul(t){return typeof t=="string"&&t.indexOf("%")!=-1}function D(t){return t.length==1?"0"+t:""+t}function Me(t){return t<=1&&(t=t*100+"%"),t}function vn(t){return Math.round(parseFloat(t)*255).toString(16)}function Tr(t){return F(t)/255}var H=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function j(t){return!!H.CSS_UNIT.exec(t)}function Wl(t){t=t.replace(Sl,"").replace(Cl,"").toLowerCase();var e=!1;if(bt[t])t=bt[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=H.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=H.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=H.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=H.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=H.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=H.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=H.hex8.exec(t))?{r:F(r[1]),g:F(r[2]),b:F(r[3]),a:Tr(r[4]),format:e?"name":"hex8"}:(r=H.hex6.exec(t))?{r:F(r[1]),g:F(r[2]),b:F(r[3]),format:e?"name":"hex"}:(r=H.hex4.exec(t))?{r:F(r[1]+""+r[1]),g:F(r[2]+""+r[2]),b:F(r[3]+""+r[3]),a:Tr(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=H.hex3.exec(t))?{r:F(r[1]+""+r[1]),g:F(r[2]+""+r[2]),b:F(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function ql(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}var Mr=function(e){var r=["r","g","b","a","h","s","l","v"],n=0,a=0;return El(r,function(i){if(e[i]&&(n+=1,isNaN(e[i])||(a+=1),i==="s"||i==="l")){var o=/^\d+%$/;o.test(e[i])&&(a+=1)}}),n===a?e:!1},ke=function(e,r){var n=e.hex?x(e.hex):x(e),a=n.toHsl(),i=n.toHsv(),o=n.toRgb(),l=n.toHex();a.s===0&&(a.h=r||0,i.h=r||0);var s=l==="000000"&&o.a===0;return{hsl:a,hex:s?"transparent":"#"+l,rgb:o,hsv:i,oldHue:e.h||r||a.h,source:e.source}},K=function(e){if(e==="transparent")return!0;var r=String(e).charAt(0)==="#"?1:0;return e.length!==4+r&&e.length<7+r&&x(e).isValid()},kt=function(e){if(!e)return"#fff";var r=ke(e);if(r.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(r.rgb.r*299+r.rgb.g*587+r.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},pt=function(e,r){var n=e.replace("°","");return x(r+" ("+n+")")._ok},Pe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vl=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Xl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kl(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Yl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var k=function(e){var r=function(n){Yl(a,n);function a(i){Xl(this,a);var o=Kl(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.handleChange=function(l,s){var u=Mr(l);if(u){var h=ke(l,l.h||o.state.oldHue);o.setState(h),o.props.onChangeComplete&&o.debounce(o.props.onChangeComplete,h,s),o.props.onChange&&o.props.onChange(h,s)}},o.handleSwatchHover=function(l,s){var u=Mr(l);if(u){var h=ke(l,l.h||o.state.oldHue);o.props.onSwatchHover&&o.props.onSwatchHover(h,s)}},o.state=Pe({},ke(i.color,0)),o.debounce=dn(function(l,s,u){l(s,u)},100),o}return Vl(a,[{key:"render",value:function(){var o={};return this.props.onSwatchHover&&(o.onSwatchHover=this.handleSwatchHover),c.createElement(e,Pe({},this.props,this.state,{onChange:this.handleChange},o))}}],[{key:"getDerivedStateFromProps",value:function(o,l){return Pe({},ke(o.color,l.oldHue))}}]),a}(A.PureComponent||A.Component);return r.propTypes=Pe({},e.propTypes),r.defaultProps=Pe({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),r},Zl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jl=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Ql(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function es(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ts=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){es(a,n);function a(){var i,o,l,s;Ql(this,a);for(var u=arguments.length,h=Array(u),p=0;p<u;p++)h[p]=arguments[p];return s=(o=(l=kr(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(h))),l),l.state={focus:!1},l.handleFocus=function(){return l.setState({focus:!0})},l.handleBlur=function(){return l.setState({focus:!1})},o),kr(l,s)}return Jl(a,[{key:"render",value:function(){return c.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},c.createElement(e,Zl({},this.props,this.state)))}}]),a}(c.Component)},Fr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rs=13,ns=function(e){var r=e.color,n=e.style,a=e.onClick,i=a===void 0?function(){}:a,o=e.onHover,l=e.title,s=l===void 0?r:l,u=e.children,h=e.focus,p=e.focusStyle,f=p===void 0?{}:p,d=r==="transparent",b=y({default:{swatch:Fr({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,h?f:{})}}),g=function(P){return i(r,P)},m=function(P){return P.keyCode===rs&&i(r,P)},w=function(P){return o(r,P)},C={};return o&&(C.onMouseOver=w),c.createElement("div",Fr({style:b.swatch,onClick:g,title:s,tabIndex:0,onKeyDown:m},C),u,d&&c.createElement(Ce,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const ee=ts(ns);var as=function(e){var r=e.direction,n=y({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return c.createElement("div",{style:n.picker})},is=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xn=function(e){var r=e.rgb,n=e.hsl,a=e.width,i=e.height,o=e.onChange,l=e.direction,s=e.style,u=e.renderers,h=e.pointer,p=e.className,f=p===void 0?"":p,d=y({default:{picker:{position:"relative",width:a,height:i},alpha:{radius:"2px",style:s}}});return c.createElement("div",{style:d.picker,className:"alpha-picker "+f},c.createElement(Ct,is({},d.alpha,{rgb:r,hsl:n,pointer:h,renderers:u,onChange:o,direction:l})))};xn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:as};k(xn);function mn(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var os="__lodash_hash_undefined__";function ls(t){return this.__data__.set(t,os),this}function ss(t){return this.__data__.has(t)}function Ye(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new G;++e<r;)this.add(t[e])}Ye.prototype.add=Ye.prototype.push=ls;Ye.prototype.has=ss;function us(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function cs(t,e){return t.has(e)}var hs=1,ps=2;function yn(t,e,r,n,a,i){var o=r&hs,l=t.length,s=e.length;if(l!=s&&!(o&&s>l))return!1;var u=i.get(t),h=i.get(e);if(u&&h)return u==e&&h==t;var p=-1,f=!0,d=r&ps?new Ye:void 0;for(i.set(t,e),i.set(e,t);++p<l;){var b=t[p],g=e[p];if(n)var m=o?n(g,b,p,e,t,i):n(b,g,p,t,e,i);if(m!==void 0){if(m)continue;f=!1;break}if(d){if(!us(e,function(w,C){if(!cs(d,C)&&(b===w||a(b,w,r,n,i)))return d.push(C)})){f=!1;break}}else if(!(b===g||a(b,g,r,n,i))){f=!1;break}}return i.delete(t),i.delete(e),f}function fs(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}function ds(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var gs=1,bs=2,vs="[object Boolean]",xs="[object Date]",ms="[object Error]",ys="[object Map]",ws="[object Number]",Es="[object RegExp]",Ss="[object Set]",Cs="[object String]",_s="[object Symbol]",Os="[object ArrayBuffer]",Rs="[object DataView]",$r=V?V.prototype:void 0,ft=$r?$r.valueOf:void 0;function As(t,e,r,n,a,i,o){switch(r){case Rs:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Os:return!(t.byteLength!=e.byteLength||!i(new qe(t),new qe(e)));case vs:case xs:case ws:return Ne(+t,+e);case ms:return t.name==e.name&&t.message==e.message;case Es:case Cs:return t==e+"";case ys:var l=fs;case Ss:var s=n&gs;if(l||(l=ds),t.size!=e.size&&!s)return!1;var u=o.get(t);if(u)return u==e;n|=bs,o.set(t,e);var h=yn(l(t),l(e),n,a,i,o);return o.delete(t),h;case _s:if(ft)return ft.call(t)==ft.call(e)}return!1}function Ps(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}function Ts(t,e,r){var n=e(t);return $(t)?n:Ps(n,r(t))}function Ms(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}function ks(){return[]}var Fs=Object.prototype,$s=Fs.propertyIsEnumerable,Br=Object.getOwnPropertySymbols,Bs=Br?function(t){return t==null?[]:(t=Object(t),Ms(Br(t),function(e){return $s.call(t,e)}))}:ks;function Hr(t){return Ts(t,Mt,Bs)}var Hs=1,Ds=Object.prototype,Ns=Ds.hasOwnProperty;function Ls(t,e,r,n,a,i){var o=r&Hs,l=Hr(t),s=l.length,u=Hr(e),h=u.length;if(s!=h&&!o)return!1;for(var p=s;p--;){var f=l[p];if(!(o?f in e:Ns.call(e,f)))return!1}var d=i.get(t),b=i.get(e);if(d&&b)return d==e&&b==t;var g=!0;i.set(t,e),i.set(e,t);for(var m=o;++p<s;){f=l[p];var w=t[f],C=e[f];if(n)var O=o?n(C,w,f,e,t,i):n(w,C,f,t,e,i);if(!(O===void 0?w===C||a(w,C,r,n,i):O)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var P=t.constructor,U=e.constructor;P!=U&&"constructor"in t&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof U=="function"&&U instanceof U)&&(g=!1)}return i.delete(t),i.delete(e),g}var vt=Q(N,"DataView"),xt=Q(N,"Promise"),mt=Q(N,"Set"),yt=Q(N,"WeakMap"),Dr="[object Map]",js="[object Object]",Nr="[object Promise]",Lr="[object Set]",jr="[object WeakMap]",Ir="[object DataView]",Is=J(vt),zs=J(Be),Gs=J(xt),Us=J(mt),Ws=J(yt),q=Z;(vt&&q(new vt(new ArrayBuffer(1)))!=Ir||Be&&q(new Be)!=Dr||xt&&q(xt.resolve())!=Nr||mt&&q(new mt)!=Lr||yt&&q(new yt)!=jr)&&(q=function(t){var e=Z(t),r=e==js?t.constructor:void 0,n=r?J(r):"";if(n)switch(n){case Is:return Ir;case zs:return Dr;case Gs:return Nr;case Us:return Lr;case Ws:return jr}return e});var qs=1,zr="[object Arguments]",Gr="[object Array]",ze="[object Object]",Vs=Object.prototype,Ur=Vs.hasOwnProperty;function Xs(t,e,r,n,a,i){var o=$(t),l=$(e),s=o?Gr:q(t),u=l?Gr:q(e);s=s==zr?ze:s,u=u==zr?ze:u;var h=s==ze,p=u==ze,f=s==u;if(f&&Xe(t)){if(!Xe(e))return!1;o=!0,h=!1}if(f&&!h)return i||(i=new L),o||Pt(t)?yn(t,e,r,n,a,i):As(t,e,s,r,n,a,i);if(!(r&qs)){var d=h&&Ur.call(t,"__wrapped__"),b=p&&Ur.call(e,"__wrapped__");if(d||b){var g=d?t.value():t,m=b?e.value():e;return i||(i=new L),a(g,m,r,n,i)}}return f?(i||(i=new L),Ls(t,e,r,n,a,i)):!1}function Ft(t,e,r,n,a){return t===e?!0:t==null||e==null||!X(t)&&!X(e)?t!==t&&e!==e:Xs(t,e,r,n,Ft,a)}var Ks=1,Ys=2;function Zs(t,e,r,n){var a=r.length,i=a;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a<i;){o=r[a];var l=o[0],s=t[l],u=o[1];if(o[2]){if(s===void 0&&!(l in t))return!1}else{var h=new L,p;if(!(p===void 0?Ft(u,s,Ks|Ys,n,h):p))return!1}}return!0}function wn(t){return t===t&&!B(t)}function Js(t){for(var e=Mt(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,wn(a)]}return e}function En(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Qs(t){var e=Js(t);return e.length==1&&e[0][2]?En(e[0][0],e[0][1]):function(r){return r===t||Zs(r,t,e)}}var eu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tu=/^\w*$/;function $t(t,e){if($(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||tt(t)?!0:tu.test(t)||!eu.test(t)||e!=null&&t in Object(e)}var ru="Expected a function";function Bt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ru);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Bt.Cache||G),r}Bt.Cache=G;var nu=500;function au(t){var e=Bt(t,function(n){return r.size===nu&&r.clear(),n}),r=e.cache;return e}var iu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ou=/\\(\\)?/g,lu=au(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(iu,function(r,n,a,i){e.push(a?i.replace(ou,"$1"):n||r)}),e}),Wr=V?V.prototype:void 0,qr=Wr?Wr.toString:void 0;function Sn(t){if(typeof t=="string")return t;if($(t))return mn(t,Sn)+"";if(tt(t))return qr?qr.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function su(t){return t==null?"":Sn(t)}function Cn(t,e){return $(t)?t:$t(t,e)?[t]:lu(su(t))}function nt(t){if(typeof t=="string"||tt(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function _n(t,e){e=Cn(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[nt(e[r++])];return r&&r==n?t:void 0}function uu(t,e,r){var n=t==null?void 0:_n(t,e);return n===void 0?r:n}function cu(t,e){return t!=null&&e in Object(t)}function hu(t,e,r){e=Cn(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=nt(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&At(a)&&Tt(o,a)&&($(t)||Ve(t)))}function pu(t,e){return t!=null&&hu(t,e,cu)}var fu=1,du=2;function gu(t,e){return $t(t)&&wn(e)?En(nt(t),e):function(r){var n=uu(r,t);return n===void 0&&n===e?pu(r,t):Ft(e,n,fu|du)}}function bu(t){return function(e){return e?.[t]}}function vu(t){return function(e){return _n(e,t)}}function xu(t){return $t(t)?bu(nt(t)):vu(t)}function mu(t){return typeof t=="function"?t:t==null?et:typeof t=="object"?$(t)?gu(t[0],t[1]):Qs(t):xu(t)}function yu(t,e){var r=-1,n=Oe(t)?Array(t.length):[];return gn(t,function(a,i,o){n[++r]=e(a,i,o)}),n}function te(t,e){var r=$(t)?mn:yu;return r(t,mu(e))}var wu=function(e){var r=e.colors,n=e.onClick,a=e.onSwatchHover,i=y({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return c.createElement("div",{style:i.swatches},te(r,function(o){return c.createElement(ee,{key:o,color:o,style:i.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+o}})}),c.createElement("div",{style:i.clear}))},Ht=function(e){var r=e.onChange,n=e.onSwatchHover,a=e.hex,i=e.colors,o=e.width,l=e.triangle,s=e.styles,u=s===void 0?{}:s,h=e.className,p=h===void 0?"":h,f=a==="transparent",d=function(m,w){K(m)&&r({hex:m,source:"hex"},w)},b=y(M({default:{card:{width:o,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:kt(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":l==="hide"});return c.createElement("div",{style:b.card,className:"block-picker "+p},c.createElement("div",{style:b.triangle}),c.createElement("div",{style:b.head},f&&c.createElement(Ce,{borderRadius:"6px 6px 0 0"}),c.createElement("div",{style:b.label},a)),c.createElement("div",{style:b.body},c.createElement(wu,{colors:i,onClick:d,onSwatchHover:n}),c.createElement(E,{style:{input:b.input},value:a,onChange:d})))};Ht.propTypes={width:v.oneOfType([v.string,v.number]),colors:v.arrayOf(v.string),triangle:v.oneOf(["top","hide"]),styles:v.object};Ht.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};k(Ht);var le={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},se={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},ue={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},ce={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},he={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},pe={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},fe={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},de={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},ge={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},Fe={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},be={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},ve={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},xe={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},me={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},ye={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},we={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},Ee={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},Se={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},On=function(e){var r=e.color,n=e.onClick,a=e.onSwatchHover,i=e.hover,o=e.active,l=e.circleSize,s=e.circleSpacing,u=y({default:{swatch:{width:l,height:l,marginRight:s,marginBottom:s,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+r,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+r}}},{hover:i,active:o});return c.createElement("div",{style:u.swatch},c.createElement(ee,{style:u.Swatch,color:r,onClick:n,onHover:a,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+r}}))};On.defaultProps={circleSize:28,circleSpacing:14};const Eu=St.handleHover(On);var Dt=function(e){var r=e.width,n=e.onChange,a=e.onSwatchHover,i=e.colors,o=e.hex,l=e.circleSize,s=e.styles,u=s===void 0?{}:s,h=e.circleSpacing,p=e.className,f=p===void 0?"":p,d=y(M({default:{card:{width:r,display:"flex",flexWrap:"wrap",marginRight:-h,marginBottom:-h}}},u)),b=function(m,w){return n({hex:m,source:"hex"},w)};return c.createElement("div",{style:d.card,className:"circle-picker "+f},te(i,function(g){return c.createElement(Eu,{key:g,color:g,onClick:b,onSwatchHover:a,active:o===g.toLowerCase(),circleSize:l,circleSpacing:h})}))};Dt.propTypes={width:v.oneOfType([v.string,v.number]),circleSize:v.number,circleSpacing:v.number,styles:v.object};Dt.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[le[500],se[500],ue[500],ce[500],he[500],pe[500],fe[500],de[500],ge[500],Fe[500],be[500],ve[500],xe[500],me[500],ye[500],we[500],Ee[500],Se[500]],styles:{}};k(Dt);function Vr(t){return t===void 0}var Ge={},Xr;function Su(){if(Xr)return Ge;Xr=1,Object.defineProperty(Ge,"__esModule",{value:!0});var t=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var s=arguments[l];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(o[u]=s[u])}return o},e=Ze(),r=n(e);function n(o){return o&&o.__esModule?o:{default:o}}function a(o,l){var s={};for(var u in o)l.indexOf(u)>=0||Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u]);return s}var i=24;return Ge.default=function(o){var l=o.fill,s=l===void 0?"currentColor":l,u=o.width,h=u===void 0?i:u,p=o.height,f=p===void 0?i:p,d=o.style,b=d===void 0?{}:d,g=a(o,["fill","width","height","style"]);return r.default.createElement("svg",t({viewBox:"0 0 "+i+" "+i,style:t({fill:s,width:h,height:f},b)},g),r.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},Ge}var Cu=Su();const _u=wt(Cu);var Ou=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Ru(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Au(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Pu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Rn=function(t){Pu(e,t);function e(r){Ru(this,e);var n=Au(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,i){a.hex?K(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},i):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},i):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},i)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number(Vr(a.s)?n.props.hsl.s:a.s),l:Number(Vr(a.l)?n.props.hsl.l:a.l),source:"hsl"},i))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},r.hsl.a!==1&&r.view==="hex"?n.state={view:"rgb"}:n.state={view:r.view},n}return Ou(e,[{key:"render",value:function(){var n=this,a=y({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),c.createElement("div",{style:a.alpha},c.createElement(E,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(E,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),c.createElement("div",{style:a.alpha},c.createElement(E,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),c.createElement("div",{style:a.wrap,className:"flexbox-fix"},i,c.createElement("div",{style:a.toggle},c.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(l){return n.icon=l}},c.createElement(_u,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),e}(c.Component);Rn.defaultProps={view:"hex"};var Kr=function(){var e=y({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return c.createElement("div",{style:e.picker})},Tu=function(){var e=y({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return c.createElement("div",{style:e.picker})},Nt=function(e){var r=e.width,n=e.onChange,a=e.disableAlpha,i=e.rgb,o=e.hsl,l=e.hsv,s=e.hex,u=e.renderers,h=e.styles,p=h===void 0?{}:h,f=e.className,d=f===void 0?"":f,b=e.defaultView,g=y(M({default:{picker:{width:r,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:a});return c.createElement("div",{style:g.picker,className:"chrome-picker "+d},c.createElement("div",{style:g.saturation},c.createElement(je,{style:g.Saturation,hsl:o,hsv:l,pointer:Tu,onChange:n})),c.createElement("div",{style:g.body},c.createElement("div",{style:g.controls,className:"flexbox-fix"},c.createElement("div",{style:g.color},c.createElement("div",{style:g.swatch},c.createElement("div",{style:g.active}),c.createElement(Ce,{renderers:u}))),c.createElement("div",{style:g.toggles},c.createElement("div",{style:g.hue},c.createElement(_e,{style:g.Hue,hsl:o,pointer:Kr,onChange:n})),c.createElement("div",{style:g.alpha},c.createElement(Ct,{style:g.Alpha,rgb:i,hsl:o,pointer:Kr,renderers:u,onChange:n})))),c.createElement(Rn,{rgb:i,hsl:o,hex:s,view:b,onChange:n,disableAlpha:a})))};Nt.propTypes={width:v.oneOfType([v.string,v.number]),disableAlpha:v.bool,styles:v.object,defaultView:v.oneOf(["hex","rgb","hsl"])};Nt.defaultProps={width:225,disableAlpha:!1,styles:{}};const Mu=k(Nt);var ku=function(e){var r=e.color,n=e.onClick,a=n===void 0?function(){}:n,i=e.onSwatchHover,o=e.active,l=y({default:{color:{background:r,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:kt(r),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return c.createElement(ee,{style:l.color,color:r,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+r}},c.createElement("div",{style:l.dot}))},Fu=function(e){var r=e.hex,n=e.rgb,a=e.onChange,i=y({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:r},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(s,u){s.r||s.g||s.b?a({r:s.r||n.r,g:s.g||n.g,b:s.b||n.b,source:"rgb"},u):a({hex:s.hex,source:"hex"},u)};return c.createElement("div",{style:i.fields,className:"flexbox-fix"},c.createElement("div",{style:i.active}),c.createElement(E,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:r,onChange:o}),c.createElement(E,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:o}),c.createElement(E,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:o}),c.createElement(E,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:o}))},Lt=function(e){var r=e.onChange,n=e.onSwatchHover,a=e.colors,i=e.hex,o=e.rgb,l=e.styles,s=l===void 0?{}:l,u=e.className,h=u===void 0?"":u,p=y(M({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),f=function(b,g){b.hex?K(b.hex)&&r({hex:b.hex,source:"hex"},g):r(b,g)};return c.createElement(Le,{style:p.Compact,styles:s},c.createElement("div",{style:p.compact,className:"compact-picker "+h},c.createElement("div",null,te(a,function(d){return c.createElement(ku,{key:d,color:d,active:d.toLowerCase()===i,onClick:f,onSwatchHover:n})}),c.createElement("div",{style:p.clear})),c.createElement(Fu,{hex:i,rgb:o,onChange:f})))};Lt.propTypes={colors:v.arrayOf(v.string),styles:v.object};Lt.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};k(Lt);var $u=function(e){var r=e.hover,n=e.color,a=e.onClick,i=e.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=y({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:r});return c.createElement("div",{style:l.swatch},c.createElement(ee,{color:n,onClick:a,onHover:i,focusStyle:o}))};const Bu=St.handleHover($u);var jt=function(e){var r=e.width,n=e.colors,a=e.onChange,i=e.onSwatchHover,o=e.triangle,l=e.styles,s=l===void 0?{}:l,u=e.className,h=u===void 0?"":u,p=y(M({default:{card:{width:r,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":o==="hide","top-left-triangle":o==="top-left","top-right-triangle":o==="top-right","bottom-left-triangle":o==="bottom-left","bottom-right-triangle":o==="bottom-right"}),f=function(b,g){return a({hex:b,source:"hex"},g)};return c.createElement("div",{style:p.card,className:"github-picker "+h},c.createElement("div",{style:p.triangleShadow}),c.createElement("div",{style:p.triangle}),te(n,function(d){return c.createElement(Bu,{color:d,key:d,onClick:f,onSwatchHover:i})}))};jt.propTypes={width:v.oneOfType([v.string,v.number]),colors:v.arrayOf(v.string),triangle:v.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:v.object};jt.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};k(jt);var Hu=function(e){var r=e.direction,n=y({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return c.createElement("div",{style:n.picker})},Du=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},It=function(e){var r=e.width,n=e.height,a=e.onChange,i=e.hsl,o=e.direction,l=e.pointer,s=e.styles,u=s===void 0?{}:s,h=e.className,p=h===void 0?"":h,f=y(M({default:{picker:{position:"relative",width:r,height:n},hue:{radius:"2px"}}},u)),d=function(g){return a({a:1,h:g.h,l:.5,s:1})};return c.createElement("div",{style:f.picker,className:"hue-picker "+p},c.createElement(_e,Du({},f.hue,{hsl:i,pointer:l,onChange:d,direction:o})))};It.propTypes={styles:v.object};It.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Hu,styles:{}};k(It);var Nu=function(e){var r=e.onChange,n=e.hex,a=e.rgb,i=e.styles,o=i===void 0?{}:i,l=e.className,s=l===void 0?"":l,u=y(M({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},o)),h=function(f,d){f.hex?K(f.hex)&&r({hex:f.hex,source:"hex"},d):(f.r||f.g||f.b)&&r({r:f.r||a.r,g:f.g||a.g,b:f.b||a.b,source:"rgb"},d)};return c.createElement(Le,{styles:o},c.createElement("div",{style:u.material,className:"material-picker "+s},c.createElement(E,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:n,onChange:h}),c.createElement("div",{style:u.split,className:"flexbox-fix"},c.createElement("div",{style:u.third},c.createElement(E,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:a.r,onChange:h})),c.createElement("div",{style:u.third},c.createElement(E,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:a.g,onChange:h})),c.createElement("div",{style:u.third},c.createElement(E,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:a.b,onChange:h})))))};k(Nu);var Lu=function(e){var r=e.onChange,n=e.rgb,a=e.hsv,i=e.hex,o=y({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(u,h){u["#"]?K(u["#"])&&r({hex:u["#"],source:"hex"},h):u.r||u.g||u.b?r({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,source:"rgb"},h):(u.h||u.s||u.v)&&r({h:u.h||a.h,s:u.s||a.s,v:u.v||a.v,source:"hsv"},h)};return c.createElement("div",{style:o.fields},c.createElement(E,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"h",value:Math.round(a.h),onChange:l}),c.createElement(E,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:l}),c.createElement(E,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:l}),c.createElement("div",{style:o.divider}),c.createElement(E,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:l}),c.createElement(E,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:l}),c.createElement(E,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:l}),c.createElement("div",{style:o.divider}),c.createElement(E,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"#",value:i.replace("#",""),onChange:l}),c.createElement("div",{style:o.fieldSymbols},c.createElement("div",{style:o.symbol},"°"),c.createElement("div",{style:o.symbol},"%"),c.createElement("div",{style:o.symbol},"%")))},ju=function(e){var r=e.hsl,n=y({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":r.l>.5});return c.createElement("div",{style:n.picker})},Iu=function(){var e=y({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return c.createElement("div",{style:e.pointer},c.createElement("div",{style:e.left},c.createElement("div",{style:e.leftInside})),c.createElement("div",{style:e.right},c.createElement("div",{style:e.rightInside})))},Yr=function(e){var r=e.onClick,n=e.label,a=e.children,i=e.active,o=y({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return c.createElement("div",{style:o.button,onClick:r},n||a)},zu=function(e){var r=e.rgb,n=e.currentColor,a=y({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+r.r+","+r.g+", "+r.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return c.createElement("div",null,c.createElement("div",{style:a.label},"new"),c.createElement("div",{style:a.swatches},c.createElement("div",{style:a.new}),c.createElement("div",{style:a.current})),c.createElement("div",{style:a.label},"current"))},Gu=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Uu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function qu(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var zt=function(t){qu(e,t);function e(r){Uu(this,e);var n=Wu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.state={currentColor:r.hex},n}return Gu(e,[{key:"render",value:function(){var n=this.props,a=n.styles,i=a===void 0?{}:a,o=n.className,l=o===void 0?"":o,s=y(M({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return c.createElement("div",{style:s.picker,className:"photoshop-picker "+l},c.createElement("div",{style:s.head},this.props.header),c.createElement("div",{style:s.body,className:"flexbox-fix"},c.createElement("div",{style:s.saturation},c.createElement(je,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:ju,onChange:this.props.onChange})),c.createElement("div",{style:s.hue},c.createElement(_e,{direction:"vertical",hsl:this.props.hsl,pointer:Iu,onChange:this.props.onChange})),c.createElement("div",{style:s.controls},c.createElement("div",{style:s.top,className:"flexbox-fix"},c.createElement("div",{style:s.previews},c.createElement(zu,{rgb:this.props.rgb,currentColor:this.state.currentColor})),c.createElement("div",{style:s.actions},c.createElement(Yr,{label:"OK",onClick:this.props.onAccept,active:!0}),c.createElement(Yr,{label:"Cancel",onClick:this.props.onCancel}),c.createElement(Lu,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(c.Component);zt.propTypes={header:v.string,styles:v.object};zt.defaultProps={header:"Color Picker",styles:{}};k(zt);var Vu=function(e){var r=e.onChange,n=e.rgb,a=e.hsl,i=e.hex,o=e.disableAlpha,l=y({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:o}),s=function(h,p){h.hex?K(h.hex)&&r({hex:h.hex,source:"hex"},p):h.r||h.g||h.b?r({r:h.r||n.r,g:h.g||n.g,b:h.b||n.b,a:n.a,source:"rgb"},p):h.a&&(h.a<0?h.a=0:h.a>100&&(h.a=100),h.a/=100,r({h:a.h,s:a.s,l:a.l,a:h.a,source:"rgb"},p))};return c.createElement("div",{style:l.fields,className:"flexbox-fix"},c.createElement("div",{style:l.double},c.createElement(E,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),c.createElement("div",{style:l.single},c.createElement(E,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:s,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:l.single},c.createElement(E,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:s,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:l.single},c.createElement(E,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:s,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:l.alpha},c.createElement(E,{style:{input:l.input,label:l.label},label:"a",value:Math.round(n.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},Xu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},An=function(e){var r=e.colors,n=e.onClick,a=n===void 0?function(){}:n,i=e.onSwatchHover,o=y({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!r||!r.length}),l=function(u,h){a({hex:u,source:"hex"},h)};return c.createElement("div",{style:o.colors,className:"flexbox-fix"},r.map(function(s){var u=typeof s=="string"?{color:s}:s,h=""+u.color+(u.title||"");return c.createElement("div",{key:h,style:o.swatchWrap},c.createElement(ee,Xu({},u,{style:o.swatch,onClick:l,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+u.color}})))}))};An.propTypes={colors:v.arrayOf(v.oneOfType([v.string,v.shape({color:v.string,title:v.string})])).isRequired};var Ku=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gt=function(e){var r=e.width,n=e.rgb,a=e.hex,i=e.hsv,o=e.hsl,l=e.onChange,s=e.onSwatchHover,u=e.disableAlpha,h=e.presetColors,p=e.renderers,f=e.styles,d=f===void 0?{}:f,b=e.className,g=b===void 0?"":b,m=y(M({default:Ku({picker:{width:r,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},d),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},d),{disableAlpha:u});return c.createElement("div",{style:m.picker,className:"sketch-picker "+g},c.createElement("div",{style:m.saturation},c.createElement(je,{style:m.Saturation,hsl:o,hsv:i,onChange:l})),c.createElement("div",{style:m.controls,className:"flexbox-fix"},c.createElement("div",{style:m.sliders},c.createElement("div",{style:m.hue},c.createElement(_e,{style:m.Hue,hsl:o,onChange:l})),c.createElement("div",{style:m.alpha},c.createElement(Ct,{style:m.Alpha,rgb:n,hsl:o,renderers:p,onChange:l}))),c.createElement("div",{style:m.color},c.createElement(Ce,null),c.createElement("div",{style:m.activeColor}))),c.createElement(Vu,{rgb:n,hsl:o,hex:a,onChange:l,disableAlpha:u}),c.createElement(An,{colors:h,onClick:l,onSwatchHover:s}))};Gt.propTypes={disableAlpha:v.bool,width:v.oneOfType([v.string,v.number]),styles:v.object};Gt.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};k(Gt);var Te=function(e){var r=e.hsl,n=e.offset,a=e.onClick,i=a===void 0?function(){}:a,o=e.active,l=e.first,s=e.last,u=y({default:{swatch:{height:"12px",background:"hsl("+r.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:o,first:l,last:s}),h=function(f){return i({h:r.h,s:.5,l:n,source:"hsl"},f)};return c.createElement("div",{style:u.swatch,onClick:h})},Yu=function(e){var r=e.onClick,n=e.hsl,a=y({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return c.createElement("div",{style:a.swatches},c.createElement("div",{style:a.swatch},c.createElement(Te,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<i&&Math.abs(n.s-.5)<i,onClick:r,first:!0})),c.createElement("div",{style:a.swatch},c.createElement(Te,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<i&&Math.abs(n.s-.5)<i,onClick:r})),c.createElement("div",{style:a.swatch},c.createElement(Te,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<i&&Math.abs(n.s-.5)<i,onClick:r})),c.createElement("div",{style:a.swatch},c.createElement(Te,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<i&&Math.abs(n.s-.5)<i,onClick:r})),c.createElement("div",{style:a.swatch},c.createElement(Te,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<i&&Math.abs(n.s-.5)<i,onClick:r,last:!0})),c.createElement("div",{style:a.clear}))},Zu=function(){var e=y({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return c.createElement("div",{style:e.picker})},Ut=function(e){var r=e.hsl,n=e.onChange,a=e.pointer,i=e.styles,o=i===void 0?{}:i,l=e.className,s=l===void 0?"":l,u=y(M({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},o));return c.createElement("div",{style:u.wrap||{},className:"slider-picker "+s},c.createElement("div",{style:u.hue},c.createElement(_e,{style:u.Hue,hsl:r,pointer:a,onChange:n})),c.createElement("div",{style:u.swatches},c.createElement(Yu,{hsl:r,onClick:n})))};Ut.propTypes={styles:v.object};Ut.defaultProps={pointer:Zu,styles:{}};k(Ut);var Ue={},Zr;function Ju(){if(Zr)return Ue;Zr=1,Object.defineProperty(Ue,"__esModule",{value:!0});var t=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var s=arguments[l];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(o[u]=s[u])}return o},e=Ze(),r=n(e);function n(o){return o&&o.__esModule?o:{default:o}}function a(o,l){var s={};for(var u in o)l.indexOf(u)>=0||Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u]);return s}var i=24;return Ue.default=function(o){var l=o.fill,s=l===void 0?"currentColor":l,u=o.width,h=u===void 0?i:u,p=o.height,f=p===void 0?i:p,d=o.style,b=d===void 0?{}:d,g=a(o,["fill","width","height","style"]);return r.default.createElement("svg",t({viewBox:"0 0 "+i+" "+i,style:t({fill:s,width:h,height:f},b)},g),r.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},Ue}var Qu=Ju();const ec=wt(Qu);var tc=function(e){var r=e.color,n=e.onClick,a=n===void 0?function(){}:n,i=e.onSwatchHover,o=e.first,l=e.last,s=e.active,u=y({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:r,marginBottom:"1px"},check:{color:kt(r),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:l,active:s,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return c.createElement(ee,{color:r,style:u.color,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+r}},c.createElement("div",{style:u.check},c.createElement(ec,null)))},rc=function(e){var r=e.onClick,n=e.onSwatchHover,a=e.group,i=e.active,o=y({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return c.createElement("div",{style:o.group},te(a,function(l,s){return c.createElement(tc,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===a.length-1,onClick:r,onSwatchHover:n})}))},Wt=function(e){var r=e.width,n=e.height,a=e.onChange,i=e.onSwatchHover,o=e.colors,l=e.hex,s=e.styles,u=s===void 0?{}:s,h=e.className,p=h===void 0?"":h,f=y(M({default:{picker:{width:r,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),d=function(g,m){return a({hex:g,source:"hex"},m)};return c.createElement("div",{style:f.picker,className:"swatches-picker "+p},c.createElement(Le,null,c.createElement("div",{style:f.overflow},c.createElement("div",{style:f.body},te(o,function(b){return c.createElement(rc,{key:b.toString(),group:b,active:l,onClick:d,onSwatchHover:i})}),c.createElement("div",{style:f.clear})))))};Wt.propTypes={width:v.oneOfType([v.string,v.number]),height:v.oneOfType([v.string,v.number]),colors:v.arrayOf(v.arrayOf(v.string)),styles:v.object};Wt.defaultProps={width:320,height:240,colors:[[le[900],le[700],le[500],le[300],le[100]],[se[900],se[700],se[500],se[300],se[100]],[ue[900],ue[700],ue[500],ue[300],ue[100]],[ce[900],ce[700],ce[500],ce[300],ce[100]],[he[900],he[700],he[500],he[300],he[100]],[pe[900],pe[700],pe[500],pe[300],pe[100]],[fe[900],fe[700],fe[500],fe[300],fe[100]],[de[900],de[700],de[500],de[300],de[100]],[ge[900],ge[700],ge[500],ge[300],ge[100]],["#194D33",Fe[700],Fe[500],Fe[300],Fe[100]],[be[900],be[700],be[500],be[300],be[100]],[ve[900],ve[700],ve[500],ve[300],ve[100]],[xe[900],xe[700],xe[500],xe[300],xe[100]],[me[900],me[700],me[500],me[300],me[100]],[ye[900],ye[700],ye[500],ye[300],ye[100]],[we[900],we[700],we[500],we[300],we[100]],[Ee[900],Ee[700],Ee[500],Ee[300],Ee[100]],[Se[900],Se[700],Se[500],Se[300],Se[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};k(Wt);var qt=function(e){var r=e.onChange,n=e.onSwatchHover,a=e.hex,i=e.colors,o=e.width,l=e.triangle,s=e.styles,u=s===void 0?{}:s,h=e.className,p=h===void 0?"":h,f=y(M({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),d=function(g,m){K(g)&&r({hex:g,source:"hex"},m)};return c.createElement("div",{style:f.card,className:"twitter-picker "+p},c.createElement("div",{style:f.triangleShadow}),c.createElement("div",{style:f.triangle}),c.createElement("div",{style:f.body},te(i,function(b,g){return c.createElement(ee,{key:g,color:b,hex:b,style:f.swatch,onClick:d,onHover:n,focusStyle:{boxShadow:"0 0 4px "+b}})}),c.createElement("div",{style:f.hash},"#"),c.createElement(E,{label:null,style:{input:f.input},value:a.replace("#",""),onChange:d}),c.createElement("div",{style:f.clear})))};qt.propTypes={width:v.oneOfType([v.string,v.number]),triangle:v.oneOf(["hide","top-left","top-right"]),colors:v.arrayOf(v.string),styles:v.object};qt.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};k(qt);var Vt=function(e){var r=y({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return c.createElement("div",{style:r.picker})};Vt.propTypes={hsl:v.shape({h:v.number,s:v.number,l:v.number,a:v.number})};Vt.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Xt=function(e){var r=y({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return c.createElement("div",{style:r.picker})};Xt.propTypes={hsl:v.shape({h:v.number,s:v.number,l:v.number,a:v.number})};Xt.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var nc=function(e){var r=e.onChange,n=e.rgb,a=e.hsl,i=e.hex,o=e.hsv,l=function(d,b){if(d.hex)K(d.hex)&&r({hex:d.hex,source:"hex"},b);else if(d.rgb){var g=d.rgb.split(",");pt(d.rgb,"rgb")&&r({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},b)}else if(d.hsv){var m=d.hsv.split(",");pt(d.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),r({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},b))}else if(d.hsl){var w=d.hsl.split(",");pt(d.hsl,"hsl")&&(w[2]=w[2].replace("%",""),w[1]=w[1].replace("%",""),w[0]=w[0].replace("°",""),p[1]==1?p[1]=.01:p[2]==1&&(p[2]=.01),r({h:Number(w[0]),s:Number(w[1]),v:Number(w[2]),source:"hsl"},b))}},s=y({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=n.r+", "+n.g+", "+n.b,h=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",p=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.v*100)+"%";return c.createElement("div",{style:s.wrap,className:"flexbox-fix"},c.createElement("div",{style:s.fields},c.createElement("div",{style:s.double},c.createElement(E,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),c.createElement("div",{style:s.column},c.createElement("div",{style:s.single},c.createElement(E,{style:{input:s.input2,label:s.label2},label:"rgb",value:u,onChange:l})),c.createElement("div",{style:s.single},c.createElement(E,{style:{input:s.input2,label:s.label2},label:"hsv",value:p,onChange:l})),c.createElement("div",{style:s.single},c.createElement(E,{style:{input:s.input2,label:s.label2},label:"hsl",value:h,onChange:l})))))},Kt=function(e){var r=e.width,n=e.onChange,a=e.rgb,i=e.hsl,o=e.hsv,l=e.hex,s=e.header,u=e.styles,h=u===void 0?{}:u,p=e.className,f=p===void 0?"":p,d=y(M({default:{picker:{width:r,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},h));return c.createElement("div",{style:d.picker,className:"google-picker "+f},c.createElement("div",{style:d.head},s),c.createElement("div",{style:d.swatch}),c.createElement("div",{style:d.saturation},c.createElement(je,{hsl:i,hsv:o,pointer:Vt,onChange:n})),c.createElement("div",{style:d.body},c.createElement("div",{style:d.controls,className:"flexbox-fix"},c.createElement("div",{style:d.hue},c.createElement(_e,{style:d.Hue,hsl:i,radius:"4px",pointer:Xt,onChange:n}))),c.createElement(nc,{rgb:a,hsl:i,hex:l,hsv:o,onChange:n})))};Kt.propTypes={width:v.oneOfType([v.string,v.number]),styles:v.object,header:v.string};Kt.defaultProps={width:652,styles:{},header:"Color picker"};k(Kt);const ac=De("div",{target:"e16b190t0"})(({disabled:t,theme:e})=>({fontFamily:e.genericFonts.bodyFont,display:"flex",flexDirection:"column",alignItems:"flex-start",cursor:t?"not-allowed":"default"})),ic=De("div",{target:"e16b190t1"})(({theme:t})=>({div:{fontFamily:`${t.genericFonts.bodyFont} !important`},label:{fontSize:`${t.fontSizes.sm} !important`,color:`${t.colors.bodyText} !important`},input:{fontSize:`${t.fontSizes.md} !important`,height:`${t.sizes.minElementHeight} !important`,backgroundColor:`${t.colors.secondaryBg} !important`,color:`${t.colors.bodyText} !important`,borderRadius:`${t.radii.default} !important`,boxShadow:"none !important","&:focus-visible":{outline:`${t.sizes.borderWidth} solid ${t.colors.primary} !important`}},svg:{fill:`${t.colors.bodyText} !important`}})),oc=De("div",{target:"e16b190t2"})(({disabled:t,theme:e})=>({height:e.sizes.minElementHeight,borderRadius:e.radii.default,borderColor:e.colors.borderColor,cursor:t?"not-allowed":"pointer",pointerEvents:t?"none":"auto",boxShadow:"none",lineHeight:e.lineHeights.base,gap:e.spacing.md,"&:focus":{outline:"none"},display:"flex"})),lc=De("div",{target:"e16b190t3"})(({backgroundColor:t,disabled:e,theme:r})=>({width:r.sizes.minElementHeight,height:r.sizes.minElementHeight,borderRadius:r.radii.default,borderColor:r.colors.borderColor,borderWidth:r.sizes.borderWidth,opacity:e?"0.4":"",backgroundColor:t,borderStyle:"solid",cursor:"pointer",lineHeight:r.lineHeights.base,"&:focus":{outline:"none"}})),sc=De("div",{target:"e16b190t4"})({display:"flex",alignItems:"center"});je.prototype.getContainerRenderWindow=function(){const t=this.container;let e=window,r=window;try{for(;!e.document.contains(t)&&e.parent!==e;)r=e,e=e.parent}catch{e=r}return e};const uc=t=>{const{disabled:e,value:r,showValue:n,label:a,labelVisibility:i,onChange:o,help:l}=t,[s,u]=A.useState(r),h=Nn();A.useEffect(()=>{u(r)},[r]);const p=A.useCallback(b=>{u(b.hex)},[]),f=A.useCallback(()=>{o(s)},[o,s]),d={default:{picker:{borderRadius:h.radii.default,boxShadow:"none",backgroundColor:h.colors.bgColor},saturation:{borderRadius:`${h.radii.default} ${h.radii.default} 0 0`,userSelect:"none"},body:{padding:h.spacing.xl}}};return Zt(ac,{className:"stColorPicker","data-testid":"stColorPicker",disabled:e,children:[I(zn,{label:a,disabled:e,labelVisibility:i,children:l&&I(Ln,{children:I(jn,{content:l,placement:In.TOP_RIGHT})})}),I(Gn,{onClose:f,placement:"bottomLeft",content:()=>I(ic,{"data-testid":"stColorPickerPopover",children:I(Mu,{color:s,onChange:p,disableAlpha:!0,styles:d})}),children:Zt(oc,{disabled:e,children:[I(lc,{"data-testid":"stColorPickerBlock",backgroundColor:s,disabled:e}),n&&I(sc,{children:s.toUpperCase()})]})})]})},cc=A.memo(uc),hc=(t,e)=>t.getStringValue(e),pc=t=>t.default??null,fc=t=>t.value??null,dc=(t,e,r,n)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},n)},gc=({element:t,disabled:e,widgetMgr:r,fragmentId:n})=>{const[a,i]=Wn({getStateFromWidgetMgr:hc,getDefaultStateFromProto:pc,getCurrStateFromProto:fc,updateWidgetMgrState:dc,element:t,widgetMgr:r,fragmentId:n}),o=A.useCallback(l=>{i({value:l,fromUi:!0})},[i]);return I(cc,{label:t.label,labelVisibility:Un(t.labelVisibility?.value),help:t.help,onChange:o,disabled:e,value:a})},mc=A.memo(gc);export{mc as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,B as n,j as e,a as u,b as c,c as d,D as B,d as m}from"./index.
|
|
1
|
+
import{r as l,B as n,j as e,a as u,b as c,c as d,D as B,d as m}from"./index.CAj-7vWz.js";function p(i){const{disabled:o,element:t,widgetMgr:s,fragmentId:r}=i;let a=n.SECONDARY;return t.type==="primary"?a=n.PRIMARY:t.type==="tertiary"&&(a=n.TERTIARY),e(m,{className:"stButton","data-testid":"stButton",children:e(u,{help:t.help,containerWidth:!0,children:e(c,{kind:a,size:d.SMALL,disabled:o,containerWidth:!0,onClick:()=>s.setTriggerValue(t,{fromUi:!0},r),children:e(B,{icon:t.icon,label:t.label})})})})}const h=l.memo(p);export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as Vt,r as gt,j as lt,F as $t}from"./index.CD8HuT3N.js";/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:At,setPrototypeOf:ct,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:y,create:ht}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});y||(y=function(n){return n});we||(we=function(n,s,l){return n.apply(s,l)});xe||(xe=function(n,s){return new n(...s)});const le=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),ft=R(Array.prototype.pop),$=R(Array.prototype.push),Qt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),De=R(String.prototype.toString),ut=R(String.prototype.match),q=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),L=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),K=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,l=new Array(s>1?s-1:0),T=1;T<s;T++)l[T-1]=arguments[T];return we(a,n,l)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return xe(a,s)}}function r(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;ct&&ct(a,null);let l=n.length;for(;l--;){let T=n[l];if(typeof T=="string"){const D=s(T);D!==T&&(qt(n)||(n[l]=D),T=D)}a[T]=!0}return a}function on(a){for(let n=0;n<a.length;n++)L(a,n)||(a[n]=null);return a}function C(a){const n=ht(null);for(const[s,l]of At(a))L(a,s)&&(Array.isArray(l)?n[s]=on(l):l&&typeof l=="object"&&l.constructor===Object?n[s]=C(l):n[s]=l);return n}function Z(a,n){for(;a!==null;){const l=Zt(a,n);if(l){if(l.get)return R(l.get);if(typeof l.value=="function")return R(l.value)}a=Kt(a)}function s(){return null}return s}const mt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ne=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Me=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pt=S(["#text"]),dt=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ce=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=y(/<%[\w\W]*|[\w\W]*%>/gm),cn=y(/\$\{[\w\W]*/gm),fn=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=y(/^aria-[\-\w]+$/),St=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=y(/^(?:\w+script|data):/i),pn=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rt=y(/^html$/i),dn=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:Rt,ERB_EXPR:ln,IS_ALLOWED_URI:St,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const J={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},_n=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let l=null;const T="data-tt-policy-suffix";s&&s.hasAttribute(T)&&(l=s.getAttribute(T));const D="dompurify"+(l?"#"+l:"");try{return n.createPolicy(D,{createHTML(x){return x},createScriptURL(x){return x}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}},Et=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.2.6",n.removed=[],!a||!a.document||a.document.nodeType!==J.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const l=s,T=l.currentScript,{DocumentFragment:D,HTMLTemplateElement:x,Node:ue,Element:ve,NodeFilter:G,NamedNodeMap:yt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Lt,DOMParser:bt,trustedTypes:Q}=a,W=ve.prototype,Dt=Z(W,"cloneNode"),Nt=Z(W,"remove"),It=Z(W,"nextSibling"),Mt=Z(W,"childNodes"),ee=Z(W,"parentNode");if(typeof x=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,B="";const{implementation:me,createNodeIterator:Ct,createDocumentFragment:wt,getElementsByTagName:xt}=s,{importNode:Pt}=l;let A=Et();n.isSupported=typeof At=="function"&&typeof ee=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,DATA_ATTR:kt,ARIA_ATTR:vt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:Ue,CUSTOM_ELEMENT:Ft}=_t;let{IS_ALLOWED_URI:Fe}=_t,m=null;const He=r({},[...mt,...Ne,...Ie,...Me,...pt]);let d=null;const ze=r({},[...dt,...Ce,...Tt,...ce]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,_e=null,Ge=!0,Ee=!0,We=!1,Be=!0,P=!1,te=!0,w=!1,ge=!1,Ae=!1,k=!1,ne=!1,oe=!1,Ye=!0,Xe=!1;const Ht="user-content-";let he=!0,X=!1,v={},U=null;const je=r({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const $e=r({},["audio","video","img","source","image","track"]);let Se=null;const qe=r({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",ae="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let F=N,Re=!1,Oe=null;const zt=r({},[ie,ae,N],De);let re=r({},["mi","mo","mn","ms","mtext"]),se=r({},["annotation-xml"]);const Gt=r({},["title","style","font","a","script"]);let j=null;const Wt=["application/xhtml+xml","text/html"],Bt="text/html";let p=null,H=null;const Yt=s.createElement("form"),Ke=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),j=Wt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Bt:e.PARSER_MEDIA_TYPE,p=j==="application/xhtml+xml"?De:fe,m=L(e,"ALLOWED_TAGS")?r({},e.ALLOWED_TAGS,p):He,d=L(e,"ALLOWED_ATTR")?r({},e.ALLOWED_ATTR,p):ze,Oe=L(e,"ALLOWED_NAMESPACES")?r({},e.ALLOWED_NAMESPACES,De):zt,Se=L(e,"ADD_URI_SAFE_ATTR")?r(C(qe),e.ADD_URI_SAFE_ATTR,p):qe,Ve=L(e,"ADD_DATA_URI_TAGS")?r(C($e),e.ADD_DATA_URI_TAGS,p):$e,U=L(e,"FORBID_CONTENTS")?r({},e.FORBID_CONTENTS,p):je,Y=L(e,"FORBID_TAGS")?r({},e.FORBID_TAGS,p):C({}),_e=L(e,"FORBID_ATTR")?r({},e.FORBID_ATTR,p):C({}),v=L(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,We=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Be=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,te=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Ae=e.FORCE_BODY||!1,Ye=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||St,F=e.NAMESPACE||N,re=e.MATHML_TEXT_INTEGRATION_POINTS||re,se=e.HTML_INTEGRATION_POINTS||se,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Ee=!1),ne&&(k=!0),v&&(m=r({},pt),d=[],v.html===!0&&(r(m,mt),r(d,dt)),v.svg===!0&&(r(m,Ne),r(d,Ce),r(d,ce)),v.svgFilters===!0&&(r(m,Ie),r(d,Ce),r(d,ce)),v.mathMl===!0&&(r(m,Me),r(d,Tt),r(d,ce))),e.ADD_TAGS&&(m===He&&(m=C(m)),r(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===ze&&(d=C(d)),r(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&r(Se,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===je&&(U=C(U)),r(U,e.FORBID_CONTENTS,p)),he&&(m["#text"]=!0),w&&r(m,["html","head","body"]),m.table&&(r(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,B=g.createHTML("")}else g===void 0&&(g=_n(Q,T)),g!==null&&typeof B=="string"&&(B=g.createHTML(""));S&&S(e),H=e}},Ze=r({},[...Ne,...Ie,...an]),Je=r({},[...Me,...rn]),Xt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=fe(e.tagName),c=fe(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===ae?t.namespaceURI===N?o==="svg":t.namespaceURI===ie?o==="svg"&&(c==="annotation-xml"||re[c]):!!Ze[o]:e.namespaceURI===ie?t.namespaceURI===N?o==="math":t.namespaceURI===ae?o==="math"&&se[c]:!!Je[o]:e.namespaceURI===N?t.namespaceURI===ae&&!se[c]||t.namespaceURI===ie&&!re[c]?!1:!Je[o]&&(Gt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},b=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Nt(e)}},z=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(k||ne)try{b(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(Ae)e="<remove></remove>"+e;else{const u=ut(e,/^[\r\n\t ]+/);o=u&&u[0]}j==="application/xhtml+xml"&&F===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=g?g.createHTML(e):e;if(F===N)try{t=new bt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Re?B:c}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),F===N?xt.call(t,w?"html":"body")[0]:w?t.documentElement:_},et=function(e){return Ct.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof Lt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof yt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},tt=function(e){return typeof ue=="function"&&e instanceof ue};function I(i,e,t){le(i,o=>{o.call(n,e,t,H)})}const nt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),Le(e))return b(e),!0;const o=p(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:m}),te&&e.hasChildNodes()&&!tt(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===J.progressingInstruction||te&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return b(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&it(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!U[o]){const c=ee(e)||e.parentNode,_=Mt(e)||e.childNodes;if(_&&c){const u=_.length;for(let O=u-1;O>=0;--O){const M=Dt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,c.insertBefore(M,It(e))}}}return b(e),!0}return e instanceof ve&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(b(e),!0):(P&&e.nodeType===J.text&&(t=e.textContent,le([pe,de,Te],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},ot=function(e,t,o){if(Ye&&(t==="id"||t==="name")&&(o in s||o in Yt))return!1;if(!(Ee&&!_e[t]&&h(kt,t))){if(!(Ge&&h(vt,t))){if(!d[t]||_e[t]){if(!(it(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Se[t]){if(!h(Fe,q(o,Ue,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ve[e])){if(!(We&&!h(Ut,q(o,Ue,"")))){if(o)return!1}}}}}}return!0},it=function(e){return e!=="annotation-xml"&&ut(e,Ft)},at=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const _=t[c],{name:u,namespaceURI:O,value:M}=_,V=p(u),be=M;let E=u==="value"?be:tn(be);if(o.attrName=V,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,Xe&&(V==="id"||V==="name")&&(z(u,e),E=Ht+E),te&&h(/((--!?|])>)|<\/(style|title)/i,E)){z(u,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){z(u,e);continue}if(!Be&&h(/\/>/i,E)){z(u,e);continue}P&&le([pe,de,Te],st=>{E=q(E,st," ")});const rt=p(e.nodeName);if(!ot(rt,V,E)){z(u,e);continue}if(g&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!O)switch(Q.getAttributeType(rt,V)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==be)try{O?e.setAttributeNS(O,u,E):e.setAttribute(u,E),Le(e)?b(e):ft(n.removed)}catch{z(u,e)}}I(A.afterSanitizeAttributes,e,null)},jt=function i(e){let t=null;const o=et(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),nt(t),at(t),t.content instanceof D&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,_=null;if(Re=!i,Re&&(i="<!-->"),typeof i!="string"&&!tt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(ge||ye(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const M=p(i.nodeName);if(!m[M]||Y[M])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof ue)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!k&&!P&&!w&&i.indexOf("<")===-1)return g&&oe?g.createHTML(i):i;if(t=Qe(i),!t)return k?null:oe?B:""}t&&Ae&&b(t.firstChild);const u=et(X?i:t);for(;c=u.nextNode();)nt(c),at(c),c.content instanceof D&&jt(c.content);if(X)return i;if(k){if(ne)for(_=wt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(d.shadowroot||d.shadowrootmode)&&(_=Pt.call(l,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(Rt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
1
|
+
import{s as Vt,r as gt,j as lt,F as $t}from"./index.CAj-7vWz.js";/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:At,setPrototypeOf:ct,isFrozen:qt,getPrototypeOf:Kt,getOwnPropertyDescriptor:Zt}=Object;let{freeze:S,seal:y,create:ht}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(n){return n});y||(y=function(n){return n});we||(we=function(n,s,l){return n.apply(s,l)});xe||(xe=function(n,s){return new n(...s)});const le=R(Array.prototype.forEach),Jt=R(Array.prototype.lastIndexOf),ft=R(Array.prototype.pop),$=R(Array.prototype.push),Qt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),De=R(String.prototype.toString),ut=R(String.prototype.match),q=R(String.prototype.replace),en=R(String.prototype.indexOf),tn=R(String.prototype.trim),L=R(Object.prototype.hasOwnProperty),h=R(RegExp.prototype.test),K=nn(TypeError);function R(a){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,l=new Array(s>1?s-1:0),T=1;T<s;T++)l[T-1]=arguments[T];return we(a,n,l)}}function nn(a){return function(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];return xe(a,s)}}function r(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;ct&&ct(a,null);let l=n.length;for(;l--;){let T=n[l];if(typeof T=="string"){const D=s(T);D!==T&&(qt(n)||(n[l]=D),T=D)}a[T]=!0}return a}function on(a){for(let n=0;n<a.length;n++)L(a,n)||(a[n]=null);return a}function C(a){const n=ht(null);for(const[s,l]of At(a))L(a,s)&&(Array.isArray(l)?n[s]=on(l):l&&typeof l=="object"&&l.constructor===Object?n[s]=C(l):n[s]=l);return n}function Z(a,n){for(;a!==null;){const l=Zt(a,n);if(l){if(l.get)return R(l.get);if(typeof l.value=="function")return R(l.value)}a=Kt(a)}function s(){return null}return s}const mt=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ne=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),an=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Me=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),rn=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pt=S(["#text"]),dt=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ce=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sn=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=y(/<%[\w\W]*|[\w\W]*%>/gm),cn=y(/\$\{[\w\W]*/gm),fn=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=y(/^aria-[\-\w]+$/),St=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=y(/^(?:\w+script|data):/i),pn=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rt=y(/^html$/i),dn=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:pn,CUSTOM_ELEMENT:dn,DATA_ATTR:fn,DOCTYPE_NAME:Rt,ERB_EXPR:ln,IS_ALLOWED_URI:St,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:sn,TMPLIT_EXPR:cn});const J={element:1,text:3,progressingInstruction:7,comment:8,document:9},Tn=function(){return typeof window>"u"?null:window},_n=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let l=null;const T="data-tt-policy-suffix";s&&s.hasAttribute(T)&&(l=s.getAttribute(T));const D="dompurify"+(l?"#"+l:"");try{return n.createPolicy(D,{createHTML(x){return x},createScriptURL(x){return x}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}},Et=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ot(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tn();const n=i=>Ot(i);if(n.version="3.2.6",n.removed=[],!a||!a.document||a.document.nodeType!==J.document||!a.Element)return n.isSupported=!1,n;let{document:s}=a;const l=s,T=l.currentScript,{DocumentFragment:D,HTMLTemplateElement:x,Node:ue,Element:ve,NodeFilter:G,NamedNodeMap:yt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Lt,DOMParser:bt,trustedTypes:Q}=a,W=ve.prototype,Dt=Z(W,"cloneNode"),Nt=Z(W,"remove"),It=Z(W,"nextSibling"),Mt=Z(W,"childNodes"),ee=Z(W,"parentNode");if(typeof x=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let g,B="";const{implementation:me,createNodeIterator:Ct,createDocumentFragment:wt,getElementsByTagName:xt}=s,{importNode:Pt}=l;let A=Et();n.isSupported=typeof At=="function"&&typeof ee=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,DATA_ATTR:kt,ARIA_ATTR:vt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:Ue,CUSTOM_ELEMENT:Ft}=_t;let{IS_ALLOWED_URI:Fe}=_t,m=null;const He=r({},[...mt,...Ne,...Ie,...Me,...pt]);let d=null;const ze=r({},[...dt,...Ce,...Tt,...ce]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,_e=null,Ge=!0,Ee=!0,We=!1,Be=!0,P=!1,te=!0,w=!1,ge=!1,Ae=!1,k=!1,ne=!1,oe=!1,Ye=!0,Xe=!1;const Ht="user-content-";let he=!0,X=!1,v={},U=null;const je=r({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const $e=r({},["audio","video","img","source","image","track"]);let Se=null;const qe=r({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",ae="http://www.w3.org/2000/svg",N="http://www.w3.org/1999/xhtml";let F=N,Re=!1,Oe=null;const zt=r({},[ie,ae,N],De);let re=r({},["mi","mo","mn","ms","mtext"]),se=r({},["annotation-xml"]);const Gt=r({},["title","style","font","a","script"]);let j=null;const Wt=["application/xhtml+xml","text/html"],Bt="text/html";let p=null,H=null;const Yt=s.createElement("form"),Ke=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),j=Wt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Bt:e.PARSER_MEDIA_TYPE,p=j==="application/xhtml+xml"?De:fe,m=L(e,"ALLOWED_TAGS")?r({},e.ALLOWED_TAGS,p):He,d=L(e,"ALLOWED_ATTR")?r({},e.ALLOWED_ATTR,p):ze,Oe=L(e,"ALLOWED_NAMESPACES")?r({},e.ALLOWED_NAMESPACES,De):zt,Se=L(e,"ADD_URI_SAFE_ATTR")?r(C(qe),e.ADD_URI_SAFE_ATTR,p):qe,Ve=L(e,"ADD_DATA_URI_TAGS")?r(C($e),e.ADD_DATA_URI_TAGS,p):$e,U=L(e,"FORBID_CONTENTS")?r({},e.FORBID_CONTENTS,p):je,Y=L(e,"FORBID_TAGS")?r({},e.FORBID_TAGS,p):C({}),_e=L(e,"FORBID_ATTR")?r({},e.FORBID_ATTR,p):C({}),v=L(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,We=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Be=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,te=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,k=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Ae=e.FORCE_BODY||!1,Ye=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||St,F=e.NAMESPACE||N,re=e.MATHML_TEXT_INTEGRATION_POINTS||re,se=e.HTML_INTEGRATION_POINTS||se,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Ee=!1),ne&&(k=!0),v&&(m=r({},pt),d=[],v.html===!0&&(r(m,mt),r(d,dt)),v.svg===!0&&(r(m,Ne),r(d,Ce),r(d,ce)),v.svgFilters===!0&&(r(m,Ie),r(d,Ce),r(d,ce)),v.mathMl===!0&&(r(m,Me),r(d,Tt),r(d,ce))),e.ADD_TAGS&&(m===He&&(m=C(m)),r(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===ze&&(d=C(d)),r(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&r(Se,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===je&&(U=C(U)),r(U,e.FORBID_CONTENTS,p)),he&&(m["#text"]=!0),w&&r(m,["html","head","body"]),m.table&&(r(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,B=g.createHTML("")}else g===void 0&&(g=_n(Q,T)),g!==null&&typeof B=="string"&&(B=g.createHTML(""));S&&S(e),H=e}},Ze=r({},[...Ne,...Ie,...an]),Je=r({},[...Me,...rn]),Xt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const o=fe(e.tagName),c=fe(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===ae?t.namespaceURI===N?o==="svg":t.namespaceURI===ie?o==="svg"&&(c==="annotation-xml"||re[c]):!!Ze[o]:e.namespaceURI===ie?t.namespaceURI===N?o==="math":t.namespaceURI===ae?o==="math"&&se[c]:!!Je[o]:e.namespaceURI===N?t.namespaceURI===ae&&!se[c]||t.namespaceURI===ie&&!re[c]?!1:!Je[o]&&(Gt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},b=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Nt(e)}},z=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(k||ne)try{b(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(Ae)e="<remove></remove>"+e;else{const u=ut(e,/^[\r\n\t ]+/);o=u&&u[0]}j==="application/xhtml+xml"&&F===N&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=g?g.createHTML(e):e;if(F===N)try{t=new bt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Re?B:c}catch{}}const _=t.body||t.documentElement;return e&&o&&_.insertBefore(s.createTextNode(o),_.childNodes[0]||null),F===N?xt.call(t,w?"html":"body")[0]:w?t.documentElement:_},et=function(e){return Ct.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof Lt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof yt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},tt=function(e){return typeof ue=="function"&&e instanceof ue};function I(i,e,t){le(i,o=>{o.call(n,e,t,H)})}const nt=function(e){let t=null;if(I(A.beforeSanitizeElements,e,null),Le(e))return b(e),!0;const o=p(e.nodeName);if(I(A.uponSanitizeElement,e,{tagName:o,allowedTags:m}),te&&e.hasChildNodes()&&!tt(e.firstElementChild)&&h(/<[/\w!]/g,e.innerHTML)&&h(/<[/\w!]/g,e.textContent)||e.nodeType===J.progressingInstruction||te&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return b(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&it(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!U[o]){const c=ee(e)||e.parentNode,_=Mt(e)||e.childNodes;if(_&&c){const u=_.length;for(let O=u-1;O>=0;--O){const M=Dt(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,c.insertBefore(M,It(e))}}}return b(e),!0}return e instanceof ve&&!Xt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(b(e),!0):(P&&e.nodeType===J.text&&(t=e.textContent,le([pe,de,Te],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),I(A.afterSanitizeElements,e,null),!1)},ot=function(e,t,o){if(Ye&&(t==="id"||t==="name")&&(o in s||o in Yt))return!1;if(!(Ee&&!_e[t]&&h(kt,t))){if(!(Ge&&h(vt,t))){if(!d[t]||_e[t]){if(!(it(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Se[t]){if(!h(Fe,q(o,Ue,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&en(o,"data:")===0&&Ve[e])){if(!(We&&!h(Ut,q(o,Ue,"")))){if(o)return!1}}}}}}return!0},it=function(e){return e!=="annotation-xml"&&ut(e,Ft)},at=function(e){I(A.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const _=t[c],{name:u,namespaceURI:O,value:M}=_,V=p(u),be=M;let E=u==="value"?be:tn(be);if(o.attrName=V,o.attrValue=E,o.keepAttr=!0,o.forceKeepAttr=void 0,I(A.uponSanitizeAttribute,e,o),E=o.attrValue,Xe&&(V==="id"||V==="name")&&(z(u,e),E=Ht+E),te&&h(/((--!?|])>)|<\/(style|title)/i,E)){z(u,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){z(u,e);continue}if(!Be&&h(/\/>/i,E)){z(u,e);continue}P&&le([pe,de,Te],st=>{E=q(E,st," ")});const rt=p(e.nodeName);if(!ot(rt,V,E)){z(u,e);continue}if(g&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!O)switch(Q.getAttributeType(rt,V)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==be)try{O?e.setAttributeNS(O,u,E):e.setAttribute(u,E),Le(e)?b(e):ft(n.removed)}catch{z(u,e)}}I(A.afterSanitizeAttributes,e,null)},jt=function i(e){let t=null;const o=et(e);for(I(A.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)I(A.uponSanitizeShadowNode,t,null),nt(t),at(t),t.content instanceof D&&i(t.content);I(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,_=null;if(Re=!i,Re&&(i="<!-->"),typeof i!="string"&&!tt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(ge||ye(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const M=p(i.nodeName);if(!m[M]||Y[M])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof ue)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!k&&!P&&!w&&i.indexOf("<")===-1)return g&&oe?g.createHTML(i):i;if(t=Qe(i),!t)return k?null:oe?B:""}t&&Ae&&b(t.firstChild);const u=et(X?i:t);for(;c=u.nextNode();)nt(c),at(c),c.content instanceof D&&jt(c.content);if(X)return i;if(k){if(ne)for(_=wt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(d.shadowroot||d.shadowrootmode)&&(_=Pt.call(l,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(Rt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
2
2
|
`+O),P&&le([pe,de,Te],M=>{O=q(O,M," ")}),g&&oe?g.createHTML(O):O},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ye(i),ge=!0},n.clearConfig=function(){H=null,ge=!1},n.isValidAttribute=function(i,e,t){H||ye({});const o=p(i),c=p(e);return ot(o,c,t)},n.addHook=function(i,e){typeof e=="function"&&$(A[i],e)},n.removeHook=function(i,e){if(e!==void 0){const t=Jt(A[i],e);return t===-1?void 0:Qt(A[i],t,1)[0]}return ft(A[i])},n.removeHooks=function(i){A[i]=[]},n.removeAllHooks=function(){A=Et()},n}var ke=Ot();const En=Vt("div",{target:"ez8s6cm0"})({width:"100%"}),Pe="data-temp-href-target";ke.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(Pe,"_blank")});ke.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(Pe)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(Pe))});const gn=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return ke.sanitize(a,n)};function An({element:a}){const{body:n}=a,s=gt.useMemo(()=>gn(n),[n]);return lt($t,{children:s&<(En,{className:"stHtml","data-testid":"stHtml",dangerouslySetInnerHTML:{__html:s}})})}const Sn=gt.memo(An);export{Sn as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aa as _,ab as ye,o as $,r as u,u as $e,e as ne,j as R,f as Re,T as Oe,P as _e,W as Se,S as oe,ax as ie,ay as ae,l as Pe}from"./index.CAj-7vWz.js";import{u as we}from"./useBasicWidgetState.D6sOH6oI.js";import"./FormClearHelper.BB1Km6eP.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(p),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=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},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){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 Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=$(s.RadioGroupRoot,q),c=Ee(a,2),p=c[0],g=c[1];return u.createElement(p,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},g),u.Children.map(this.props.children,function(f,l){if(!u.isValidElement(f))return null;var d=o.props.value===f.props.value;return u.cloneElement(f,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||f.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(b){return o.handleBlur(b,l)},onFocus:function(b){return o.handleFocus(b,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=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},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){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 Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(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 Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=$(i.Root,X),a=M(s,2),c=a[0],p=a[1],g=$(i.Label,Q),f=M(g,2),l=f[0],d=f[1],S=$(i.Input,Y),b=M(S,2),P=b[0],H=b[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,K),ee=M(m,2),de=ee[0],he=ee[1],ge=$(i.RadioMarkOuter,J),te=M(ge,2),be=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},w,p),et(this.props.labelPlacement)&&re,u.createElement(be,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[p,g]=u.useState(n??null);u.useEffect(()=>{n!==p&&g(n??null)},[n]);const f=u.useCallback(v=>{const h=parseInt(v.target.value,10);g(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,b=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?" ":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:f,value:p!==null?p.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:b.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:p,label:g,labelVisibility:f,help:l}=t;return R(it,{label:g,onChange:s,options:c,captions:p,disabled:e,horizontal:a,labelVisibility:Pe(f?.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const gt=u.memo(at);export{gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,L as h,B as i,j as e,a as k,b as g,c as R,D as C}from"./index.
|
|
1
|
+
import{r as o,L as h,B as i,j as e,a as k,b as g,c as R,D as C}from"./index.CAj-7vWz.js";import{c as L}from"./createDownloadLinkElement.ZaXNnPK4.js";function x(d){const{disabled:c,element:l,widgetMgr:u,endpoints:t,fragmentId:f}=d,{help:m,label:B,icon:w,ignoreRerun:D,type:s,url:r}=l,{libConfig:{enforceDownloadInNewTab:p=!1}}=o.useContext(h);let n=i.SECONDARY;s==="primary"?n=i.PRIMARY:s==="tertiary"&&(n=i.TERTIARY);const a=o.useMemo(()=>t.buildDownloadUrl(r),[t,r]);o.useEffect(()=>{t.checkSourceUrlResponse(a,"Download Button")},[a,t]);const b=()=>{D||u.setTriggerValue(l,{fromUi:!0},f),L({filename:"",url:a,enforceDownloadInNewTab:p}).click()};return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:e(k,{help:m,containerWidth:!0,children:e(g,{kind:n,size:R.SMALL,disabled:c,onClick:b,containerWidth:!0,children:e(C,{icon:w,label:B})})})})}const A=o.memo(x);export{A as default};
|