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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as reactExports,j as jsx}from"./index.
|
|
1
|
+
import{r as reactExports,j as jsx}from"./index.CAj-7vWz.js";/*!
|
|
2
2
|
* Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
@@ -1614,4 +1614,4 @@ Sorting....`),b.sort(this.options.sortFn)}},{key:"_format",value:function(b){var
|
|
|
1614
1614
|
|
|
1615
1615
|
Output:
|
|
1616
1616
|
|
|
1617
|
-
`,JSON.stringify(b,function(N,B){if(i(B)==="object"&&B!==null){if(A.indexOf(B)!==-1)return;A.push(B)}return B})),A=null}var L=[];this.options.includeMatches&&L.push(function(N,B){var D=N.output;B.matches=[];for(var j=0,M=D.length;j<M;j+=1){var F=D[j];if(F.matchedIndices.length!==0){var W={indices:F.matchedIndices,value:F.value};F.key&&(W.key=F.key),F.hasOwnProperty("arrayIndex")&&F.arrayIndex>-1&&(W.arrayIndex=F.arrayIndex),B.matches.push(W)}}}),this.options.includeScore&&L.push(function(N,B){B.score=N.score});for(var x=0,H=b.length;x<H;x+=1){var S=b[x];if(this.options.id&&(S.item=this.options.getFn(S.item,this.options.id)[0]),L.length){for(var k={item:S.item},E=0,P=L.length;E<P;E+=1)L[E](S,k);y.push(k)}else y.push(S.item)}return y}},{key:"_log",value:function(){var b;this.options.verbose&&(b=console).log.apply(b,arguments)}}])&&t(m.prototype,f),d}();c.exports=l},function(c,o,r){function i(l,d){for(var m=0;m<d.length;m++){var f=d[m];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}var t=r(3),s=r(4),a=r(7),u=function(){function l(f,b){var y=b.location,A=y===void 0?0:y,L=b.distance,x=L===void 0?100:L,H=b.threshold,S=H===void 0?.6:H,k=b.maxPatternLength,E=k===void 0?32:k,P=b.isCaseSensitive,N=P!==void 0&&P,B=b.tokenSeparator,D=B===void 0?/ +/g:B,j=b.findAllMatches,M=j!==void 0&&j,F=b.minMatchCharLength,W=F===void 0?1:F;(function(U,q){if(!(U instanceof q))throw new TypeError("Cannot call a class as a function")})(this,l),this.options={location:A,distance:x,threshold:S,maxPatternLength:E,isCaseSensitive:N,tokenSeparator:D,findAllMatches:M,minMatchCharLength:W},this.pattern=this.options.isCaseSensitive?f:f.toLowerCase(),this.pattern.length<=E&&(this.patternAlphabet=a(this.pattern))}var d,m;return d=l,(m=[{key:"search",value:function(f){if(this.options.isCaseSensitive||(f=f.toLowerCase()),this.pattern===f)return{isMatch:!0,score:0,matchedIndices:[[0,f.length-1]]};var b=this.options,y=b.maxPatternLength,A=b.tokenSeparator;if(this.pattern.length>y)return t(f,this.pattern,A);var L=this.options,x=L.location,H=L.distance,S=L.threshold,k=L.findAllMatches,E=L.minMatchCharLength;return s(f,this.pattern,this.patternAlphabet,{location:x,distance:H,threshold:S,findAllMatches:k,minMatchCharLength:E})}}])&&i(d.prototype,m),l}();c.exports=u},function(c,o){var r=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;c.exports=function(i,t){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,a=new RegExp(t.replace(r,"\\$&").replace(s,"|")),u=i.match(a),l=!!u,d=[];if(l)for(var m=0,f=u.length;m<f;m+=1){var b=u[m];d.push([i.indexOf(b),b.length-1])}return{score:l?.5:1,isMatch:l,matchedIndices:d}}},function(c,o,r){var i=r(5),t=r(6);c.exports=function(s,a,u,l){for(var d=l.location,m=d===void 0?0:d,f=l.distance,b=f===void 0?100:f,y=l.threshold,A=y===void 0?.6:y,L=l.findAllMatches,x=L!==void 0&&L,H=l.minMatchCharLength,S=H===void 0?1:H,k=m,E=s.length,P=A,N=s.indexOf(a,k),B=a.length,D=[],j=0;j<E;j+=1)D[j]=0;if(N!==-1){var M=i(a,{errors:0,currentLocation:N,expectedLocation:k,distance:b});if(P=Math.min(M,P),(N=s.lastIndexOf(a,k+B))!==-1){var F=i(a,{errors:0,currentLocation:N,expectedLocation:k,distance:b});P=Math.min(F,P)}}N=-1;for(var W=[],U=1,q=B+E,X=1<<B-1,ae=0;ae<B;ae+=1){for(var me=0,Ve=q;me<Ve;)i(a,{errors:ae,currentLocation:k+Ve,expectedLocation:k,distance:b})<=P?me=Ve:q=Ve,Ve=Math.floor((q-me)/2+me);q=Ve;var Je=Math.max(1,k-Ve+1),rt=x?E:Math.min(k+Ve,E)+B,yt=Array(rt+2);yt[rt+1]=(1<<ae)-1;for(var xt=rt;xt>=Je;xt-=1){var r1=xt-1,t1=u[s.charAt(r1)];if(t1&&(D[r1]=1),yt[xt]=(yt[xt+1]<<1|1)&t1,ae!==0&&(yt[xt]|=(W[xt+1]|W[xt])<<1|1|W[xt+1]),yt[xt]&X&&(U=i(a,{errors:ae,currentLocation:r1,expectedLocation:k,distance:b}))<=P){if(P=U,(N=r1)<=k)break;Je=Math.max(1,2*k-N)}}if(i(a,{errors:ae+1,currentLocation:k,expectedLocation:k,distance:b})>P)break;W=yt}return{isMatch:N>=0,score:U===0?.001:U,matchedIndices:t(D,S)}}},function(c,o){c.exports=function(r,i){var t=i.errors,s=t===void 0?0:t,a=i.currentLocation,u=a===void 0?0:a,l=i.expectedLocation,d=l===void 0?0:l,m=i.distance,f=m===void 0?100:m,b=s/r.length,y=Math.abs(d-u);return f?b+y/f:y?1:b}},function(c,o){c.exports=function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,t=[],s=-1,a=-1,u=0,l=r.length;u<l;u+=1){var d=r[u];d&&s===-1?s=u:d||s===-1||((a=u-1)-s+1>=i&&t.push([s,a]),s=-1)}return r[u-1]&&u-s>=i&&t.push([s,u-1]),t}},function(c,o){c.exports=function(r){for(var i={},t=r.length,s=0;s<t;s+=1)i[r.charAt(s)]=0;for(var a=0;a<t;a+=1)i[r.charAt(a)]|=1<<t-a-1;return i}},function(c,o,r){var i=r(0);c.exports=function(t,s){return function a(u,l,d){if(l){var m=l.indexOf("."),f=l,b=null;m!==-1&&(f=l.slice(0,m),b=l.slice(m+1));var y=u[f];if(y!=null)if(b||typeof y!="string"&&typeof y!="number")if(i(y))for(var A=0,L=y.length;A<L;A+=1)a(y[A],b,d);else b&&a(y,b,d);else d.push(y.toString())}else d.push(u);return d}(t,s,[])}}])},function(g,p,T){function c(o){var r,i=o.Symbol;return typeof i=="function"?i.observable?r=i.observable:(r=i("observable"),i.observable=r):r="@@observable",r}T.d(p,"a",function(){return c})},function(g,p,T){g.exports=T(7)},function(g,p){var T;T=function(){return this}();try{T=T||new Function("return this")()}catch{typeof window=="object"&&(T=window)}g.exports=T},function(g,p){g.exports=function(T){if(!T.webpackPolyfill){var c=Object.create(T);c.children||(c.children=[]),Object.defineProperty(c,"loaded",{enumerable:!0,get:function(){return c.l}}),Object.defineProperty(c,"id",{enumerable:!0,get:function(){return c.i}}),Object.defineProperty(c,"exports",{enumerable:!0}),c.webpackPolyfill=1}return c}},function(g,p,T){T.r(p);var c=T(2),o=T.n(c),r=T(0),i=T.n(r),t=T(1),s=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function u(oe){if(typeof oe!="object"||oe===null)return!1;for(var K=oe;Object.getPrototypeOf(K)!==null;)K=Object.getPrototypeOf(K);return Object.getPrototypeOf(oe)===K}function l(oe,K,ue){var se;if(typeof K=="function"&&typeof ue=="function"||typeof ue=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if(typeof K=="function"&&ue===void 0&&(ue=K,K=void 0),ue!==void 0){if(typeof ue!="function")throw new Error("Expected the enhancer to be a function.");return ue(l)(oe,K)}if(typeof oe!="function")throw new Error("Expected the reducer to be a function.");var ne=oe,J=K,re=[],Qe=re,Le=!1;function Re(){Qe===re&&(Qe=re.slice())}function ct(){if(Le)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return J}function Y(ht){if(typeof ht!="function")throw new Error("Expected the listener to be a function.");if(Le)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var Lt=!0;return Re(),Qe.push(ht),function(){if(Lt){if(Le)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");Lt=!1,Re();var e1=Qe.indexOf(ht);Qe.splice(e1,1)}}}function de(ht){if(!u(ht))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(ht.type===void 0)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(Le)throw new Error("Reducers may not dispatch actions.");try{Le=!0,J=ne(J,ht)}finally{Le=!1}for(var Lt=re=Qe,e1=0;e1<Lt.length;e1++)(0,Lt[e1])();return ht}function He(ht){if(typeof ht!="function")throw new Error("Expected the nextReducer to be a function.");ne=ht,de({type:a.REPLACE})}function tt(){var ht,Lt=Y;return(ht={subscribe:function(e1){if(typeof e1!="object"||e1===null)throw new TypeError("Expected the observer to be an object.");function m1(){e1.next&&e1.next(ct())}return m1(),{unsubscribe:Lt(m1)}}})[t.a]=function(){return this},ht}return de({type:a.INIT}),(se={dispatch:de,subscribe:Y,getState:ct,replaceReducer:He})[t.a]=tt,se}function d(oe,K){var ue=K&&K.type;return"Given "+(ue&&'action "'+String(ue)+'"'||"an action")+', reducer "'+oe+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}var m,f=[],b=[],y=[],A={loading:!1},L=function(oe,K){return oe===void 0&&(oe=A),K.type==="SET_IS_LOADING"?{loading:K.isLoading}:oe},x=function(oe){return Array.from({length:oe},function(){return(K=0,ue=36,Math.floor(Math.random()*(ue-K)+K)).toString(36);var K,ue}).join("")},H=function(oe){return Object.prototype.toString.call(oe).slice(8,-1)},S=function(oe,K){return K!=null&&H(K)===oe},k=function(oe){return typeof oe!="string"?oe:oe.replace(/&/g,"&").replace(/>/g,"&rt;").replace(/</g,"<").replace(/"/g,""")},E=(m=document.createElement("div"),function(oe){var K=oe.trim();m.innerHTML=K;for(var ue=m.children[0];m.firstChild;)m.removeChild(m.firstChild);return ue}),P=function(oe,K){return oe.score-K.score},N=function(oe){return JSON.parse(JSON.stringify(oe))},B=function(oe){for(var K=Object.keys(oe),ue={},se=0;se<K.length;se++){var ne=K[se];typeof oe[ne]=="function"&&(ue[ne]=oe[ne])}var J,re=Object.keys(ue);try{(function(Qe){Object.keys(Qe).forEach(function(Le){var Re=Qe[Le];if(Re(void 0,{type:a.INIT})===void 0)throw new Error('Reducer "'+Le+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(Re(void 0,{type:a.PROBE_UNKNOWN_ACTION()})===void 0)throw new Error('Reducer "'+Le+`" returned undefined when probed with a random type. Don't try to handle `+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})})(ue)}catch(Qe){J=Qe}return function(Qe,Le){if(Qe===void 0&&(Qe={}),J)throw J;for(var Re=!1,ct={},Y=0;Y<re.length;Y++){var de=re[Y],He=ue[de],tt=Qe[de],ht=He(tt,Le);if(ht===void 0){var Lt=d(de,Le);throw new Error(Lt)}ct[de]=ht,Re=Re||ht!==tt}return Re?ct:Qe}}({items:function(oe,K){switch(oe===void 0&&(oe=f),K.type){case"ADD_ITEM":return[].concat(oe,[{id:K.id,choiceId:K.choiceId,groupId:K.groupId,value:K.value,label:K.label,active:!0,highlighted:!1,customProperties:K.customProperties,placeholder:K.placeholder||!1,keyCode:null}]).map(function(ue){var se=ue;return se.highlighted=!1,se});case"REMOVE_ITEM":return oe.map(function(ue){var se=ue;return se.id===K.id&&(se.active=!1),se});case"HIGHLIGHT_ITEM":return oe.map(function(ue){var se=ue;return se.id===K.id&&(se.highlighted=K.highlighted),se});default:return oe}},groups:function(oe,K){switch(oe===void 0&&(oe=b),K.type){case"ADD_GROUP":return[].concat(oe,[{id:K.id,value:K.value,active:K.active,disabled:K.disabled}]);case"CLEAR_CHOICES":return[];default:return oe}},choices:function(oe,K){switch(oe===void 0&&(oe=y),K.type){case"ADD_CHOICE":return[].concat(oe,[{id:K.id,elementId:K.elementId,groupId:K.groupId,value:K.value,label:K.label||K.value,disabled:K.disabled||!1,selected:!1,active:!0,score:9999,customProperties:K.customProperties,placeholder:K.placeholder||!1,keyCode:null}]);case"ADD_ITEM":return K.activateOptions?oe.map(function(ue){var se=ue;return se.active=K.active,se}):K.choiceId>-1?oe.map(function(ue){var se=ue;return se.id===parseInt(K.choiceId,10)&&(se.selected=!0),se}):oe;case"REMOVE_ITEM":return K.choiceId>-1?oe.map(function(ue){var se=ue;return se.id===parseInt(K.choiceId,10)&&(se.selected=!1),se}):oe;case"FILTER_CHOICES":return oe.map(function(ue){var se=ue;return se.active=K.results.some(function(ne){var J=ne.item,re=ne.score;return J.id===se.id&&(se.score=re,!0)}),se});case"ACTIVATE_CHOICES":return oe.map(function(ue){var se=ue;return se.active=K.active,se});case"CLEAR_CHOICES":return y;default:return oe}},general:L}),D=function(oe,K){var ue=oe;if(K.type==="CLEAR_ALL")ue=void 0;else if(K.type==="RESET_TO")return N(K.state);return B(ue,K)};function j(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var M=function(){function oe(){this._store=l(D,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}var K,ue,se=oe.prototype;return se.subscribe=function(ne){this._store.subscribe(ne)},se.dispatch=function(ne){this._store.dispatch(ne)},se.isLoading=function(){return this.state.general.loading},se.getChoiceById=function(ne){return this.activeChoices.find(function(J){return J.id===parseInt(ne,10)})},se.getGroupById=function(ne){return this.groups.find(function(J){return J.id===ne})},K=oe,ue=[{key:"state",get:function(){return this._store.getState()}},{key:"items",get:function(){return this.state.items}},{key:"activeItems",get:function(){return this.items.filter(function(ne){return ne.active===!0})}},{key:"highlightedActiveItems",get:function(){return this.items.filter(function(ne){return ne.active&&ne.highlighted})}},{key:"choices",get:function(){return this.state.choices}},{key:"activeChoices",get:function(){return this.choices.filter(function(ne){return ne.active===!0})}},{key:"selectableChoices",get:function(){return this.choices.filter(function(ne){return ne.disabled!==!0})}},{key:"searchableChoices",get:function(){return this.selectableChoices.filter(function(ne){return ne.placeholder!==!0})}},{key:"placeholderChoice",get:function(){return[].concat(this.choices).reverse().find(function(ne){return ne.placeholder===!0})}},{key:"groups",get:function(){return this.state.groups}},{key:"activeGroups",get:function(){var ne=this.groups,J=this.choices;return ne.filter(function(re){var Qe=re.active===!0&&re.disabled===!1,Le=J.some(function(Re){return Re.active===!0&&Re.disabled===!1});return Qe&&Le},[])}}],ue&&j(K.prototype,ue),oe}();function F(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var W=function(){function oe(ne){var J=ne.element,re=ne.type,Qe=ne.classNames;this.element=J,this.classNames=Qe,this.type=re,this.isActive=!1}var K,ue,se=oe.prototype;return se.getChild=function(ne){return this.element.querySelector(ne)},se.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},se.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},K=oe,(ue=[{key:"distanceFromTopWindow",get:function(){return this.element.getBoundingClientRect().bottom}}])&&F(K.prototype,ue),oe}(),U={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:function(oe,K){var ue=oe.value,se=oe.label,ne=se===void 0?ue:se,J=K.value,re=K.label,Qe=re===void 0?J:re;return ne.localeCompare(Qe,[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(oe){return'Press Enter to add <b>"'+k(oe)+'"</b>'},maxItemText:function(oe){return"Only "+oe+" values can be added"},valueComparer:function(oe,K){return oe===K},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:{containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"}},q="showDropdown",X="hideDropdown",ae="change",me="choice",Ve="search",Je="addItem",rt="removeItem",yt="highlightItem",xt="highlightChoice",r1="ADD_CHOICE",t1="FILTER_CHOICES",Bt="ACTIVATE_CHOICES",Kt="CLEAR_CHOICES",wt="ADD_GROUP",Rt="ADD_ITEM",Ht="REMOVE_ITEM",dt="HIGHLIGHT_ITEM",Wt=46,jt=8,a1=13,ye=65,ie=27,nt=38,St=40,mt=33,Pt=34,Xt="text",u1="select-one",v1="select-multiple",h1=function(){function oe(ue){var se=ue.element,ne=ue.type,J=ue.classNames,re=ue.position;this.element=se,this.classNames=J,this.type=ne,this.position=re,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var K=oe.prototype;return K.addEventListeners=function(){this.element.addEventListener("focus",this._onFocus),this.element.addEventListener("blur",this._onBlur)},K.removeEventListeners=function(){this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},K.shouldFlip=function(ue){if(typeof ue!="number")return!1;var se=!1;return this.position==="auto"?se=!window.matchMedia("(min-height: "+(ue+1)+"px)").matches:this.position==="top"&&(se=!0),se},K.setActiveDescendant=function(ue){this.element.setAttribute("aria-activedescendant",ue)},K.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},K.open=function(ue){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(ue)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},K.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},K.focus=function(){this.isFocussed||this.element.focus()},K.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},K.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},K.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.type===u1&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},K.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.type===u1&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},K.wrap=function(ue){(function(se,ne){ne===void 0&&(ne=document.createElement("div")),se.nextSibling?se.parentNode.insertBefore(ne,se.nextSibling):se.parentNode.appendChild(ne),ne.appendChild(se)})(ue,this.element)},K.unwrap=function(ue){this.element.parentNode.insertBefore(ue,this.element),this.element.parentNode.removeChild(this.element)},K.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},K.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},K._onFocus=function(){this.isFocussed=!0},K._onBlur=function(){this.isFocussed=!1},oe}();function De(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var Ze=function(){function oe(ne){var J=ne.element,re=ne.type,Qe=ne.classNames,Le=ne.preventPaste;this.element=J,this.type=re,this.classNames=Qe,this.preventPaste=Le,this.isFocussed=this.element===document.activeElement,this.isDisabled=J.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var K,ue,se=oe.prototype;return se.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},se.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput,{passive:!0}),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus,{passive:!0}),this.element.removeEventListener("blur",this._onBlur,{passive:!0})},se.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},se.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},se.focus=function(){this.isFocussed||this.element.focus()},se.blur=function(){this.isFocussed&&this.element.blur()},se.clear=function(ne){return ne===void 0&&(ne=!0),this.element.value&&(this.element.value=""),ne&&this.setWidth(),this},se.setWidth=function(){var ne=this.element,J=ne.style,re=ne.value,Qe=ne.placeholder;J.minWidth=Qe.length+1+"ch",J.width=re.length+1+"ch"},se.setActiveDescendant=function(ne){this.element.setAttribute("aria-activedescendant",ne)},se.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},se._onInput=function(){this.type!==u1&&this.setWidth()},se._onPaste=function(ne){this.preventPaste&&ne.preventDefault()},se._onFocus=function(){this.isFocussed=!0},se._onBlur=function(){this.isFocussed=!1},K=oe,(ue=[{key:"placeholder",set:function(ne){this.element.placeholder=ne}},{key:"value",get:function(){return k(this.element.value)},set:function(ne){this.element.value=ne}}])&&De(K.prototype,ue),oe}(),$e=function(){function oe(ue){var se=ue.element;this.element=se,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}var K=oe.prototype;return K.clear=function(){this.element.innerHTML=""},K.append=function(ue){this.element.appendChild(ue)},K.getChild=function(ue){return this.element.querySelector(ue)},K.hasChildren=function(){return this.element.hasChildNodes()},K.scrollToTop=function(){this.element.scrollTop=0},K.scrollToChildElement=function(ue,se){var ne=this;if(ue){var J=this.element.offsetHeight,re=this.element.scrollTop+J,Qe=ue.offsetHeight,Le=ue.offsetTop+Qe,Re=se>0?this.element.scrollTop+Le-re:ue.offsetTop;requestAnimationFrame(function(){ne._animateScroll(Re,se)})}},K._scrollDown=function(ue,se,ne){var J=(ne-ue)/se,re=J>1?J:1;this.element.scrollTop=ue+re},K._scrollUp=function(ue,se,ne){var J=(ue-ne)/se,re=J>1?J:1;this.element.scrollTop=ue-re},K._animateScroll=function(ue,se){var ne=this,J=this.element.scrollTop,re=!1;se>0?(this._scrollDown(J,4,ue),J<ue&&(re=!0)):(this._scrollUp(J,4,ue),J>ue&&(re=!0)),re&&requestAnimationFrame(function(){ne._animateScroll(ue,se)})},oe}();function Qt(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var It=function(){function oe(ne){var J=ne.element,re=ne.classNames;if(this.element=J,this.classNames=re,!(J instanceof HTMLInputElement||J instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}var K,ue,se=oe.prototype;return se.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var ne=this.element.getAttribute("style");ne&&this.element.setAttribute("data-choice-orig-style",ne),this.element.setAttribute("data-choice","active")},se.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var ne=this.element.getAttribute("data-choice-orig-style");ne?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",ne)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},se.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},se.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},se.triggerEvent=function(ne,J){(function(re,Qe,Le){Le===void 0&&(Le=null);var Re=new CustomEvent(Qe,{detail:Le,bubbles:!0,cancelable:!0});re.dispatchEvent(Re)})(this.element,ne,J)},K=oe,(ue=[{key:"isActive",get:function(){return this.element.dataset.choice==="active"}},{key:"dir",get:function(){return this.element.dir}},{key:"value",get:function(){return this.element.value},set:function(ne){this.element.value=ne}}])&&Qt(K.prototype,ue),oe}();function Ut(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var Zt=function(oe){var K,ue,se,ne;function J(re){var Qe,Le=re.element,Re=re.classNames,ct=re.delimiter;return(Qe=oe.call(this,{element:Le,classNames:Re})||this).delimiter=ct,Qe}return ue=oe,(K=J).prototype=Object.create(ue.prototype),K.prototype.constructor=K,K.__proto__=ue,se=J,(ne=[{key:"value",get:function(){return this.element.value},set:function(re){var Qe=re.map(function(Le){return Le.value}).join(this.delimiter);this.element.setAttribute("value",Qe),this.element.value=Qe}}])&&Ut(se.prototype,ne),J}(It);function b1(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var k1=function(oe){var K,ue,se,ne;function J(re){var Qe,Le=re.element,Re=re.classNames,ct=re.template;return(Qe=oe.call(this,{element:Le,classNames:Re})||this).template=ct,Qe}return ue=oe,(K=J).prototype=Object.create(ue.prototype),K.prototype.constructor=K,K.__proto__=ue,J.prototype.appendDocFragment=function(re){this.element.innerHTML="",this.element.appendChild(re)},se=J,(ne=[{key:"placeholderOption",get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")}},{key:"optionGroups",get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))}},{key:"options",get:function(){return Array.from(this.element.options)},set:function(re){var Qe=this,Le=document.createDocumentFragment();re.forEach(function(Re){return ct=Re,Y=Qe.template(ct),void Le.appendChild(Y);var ct,Y}),this.appendDocFragment(Le)}}])&&b1(se.prototype,ne),J}(It),A1={containerOuter:function(oe,K,ue,se,ne,J){var re=oe.containerOuter,Qe=Object.assign(document.createElement("div"),{className:re});return Qe.dataset.type=J,K&&(Qe.dir=K),se&&(Qe.tabIndex=0),ue&&(Qe.setAttribute("role",ne?"combobox":"listbox"),ne&&Qe.setAttribute("aria-autocomplete","list")),Qe.setAttribute("aria-haspopup","true"),Qe.setAttribute("aria-expanded","false"),Qe},containerInner:function(oe){var K=oe.containerInner;return Object.assign(document.createElement("div"),{className:K})},itemList:function(oe,K){var ue=oe.list,se=oe.listSingle,ne=oe.listItems;return Object.assign(document.createElement("div"),{className:ue+" "+(K?se:ne)})},placeholder:function(oe,K){var ue=oe.placeholder;return Object.assign(document.createElement("div"),{className:ue,innerHTML:K})},item:function(oe,K,ue){var se=oe.item,ne=oe.button,J=oe.highlightedState,re=oe.itemSelectable,Qe=oe.placeholder,Le=K.id,Re=K.value,ct=K.label,Y=K.customProperties,de=K.active,He=K.disabled,tt=K.highlighted,ht=K.placeholder,Lt=Object.assign(document.createElement("div"),{className:se,innerHTML:ct});if(Object.assign(Lt.dataset,{item:"",id:Le,value:Re,customProperties:Y}),de&&Lt.setAttribute("aria-selected","true"),He&&Lt.setAttribute("aria-disabled","true"),ht&&Lt.classList.add(Qe),Lt.classList.add(tt?J:re),ue){He&&Lt.classList.remove(re),Lt.dataset.deletable="";var e1="Remove item",m1=Object.assign(document.createElement("button"),{type:"button",className:ne,innerHTML:e1});m1.setAttribute("aria-label","Remove item: '"+Re+"'"),m1.dataset.button="",Lt.appendChild(m1)}return Lt},choiceList:function(oe,K){var ue=oe.list,se=Object.assign(document.createElement("div"),{className:ue});return K||se.setAttribute("aria-multiselectable","true"),se.setAttribute("role","listbox"),se},choiceGroup:function(oe,K){var ue=oe.group,se=oe.groupHeading,ne=oe.itemDisabled,J=K.id,re=K.value,Qe=K.disabled,Le=Object.assign(document.createElement("div"),{className:ue+" "+(Qe?ne:"")});return Le.setAttribute("role","group"),Object.assign(Le.dataset,{group:"",id:J,value:re}),Qe&&Le.setAttribute("aria-disabled","true"),Le.appendChild(Object.assign(document.createElement("div"),{className:se,innerHTML:re})),Le},choice:function(oe,K,ue){var se=oe.item,ne=oe.itemChoice,J=oe.itemSelectable,re=oe.selectedState,Qe=oe.itemDisabled,Le=oe.placeholder,Re=K.id,ct=K.value,Y=K.label,de=K.groupId,He=K.elementId,tt=K.disabled,ht=K.selected,Lt=K.placeholder,e1=Object.assign(document.createElement("div"),{id:He,innerHTML:Y,className:se+" "+ne});return ht&&e1.classList.add(re),Lt&&e1.classList.add(Le),e1.setAttribute("role",de>0?"treeitem":"option"),Object.assign(e1.dataset,{choice:"",id:Re,value:ct,selectText:ue}),tt?(e1.classList.add(Qe),e1.dataset.choiceDisabled="",e1.setAttribute("aria-disabled","true")):(e1.classList.add(J),e1.dataset.choiceSelectable=""),e1},input:function(oe,K){var ue=oe.input,se=oe.inputCloned,ne=Object.assign(document.createElement("input"),{type:"text",className:ue+" "+se,autocomplete:"off",autocapitalize:"off",spellcheck:!1});return ne.setAttribute("role","textbox"),ne.setAttribute("aria-autocomplete","list"),ne.setAttribute("aria-label",K),ne},dropdown:function(oe){var K=oe.list,ue=oe.listDropdown,se=document.createElement("div");return se.classList.add(K,ue),se.setAttribute("aria-expanded","false"),se},notice:function(oe,K,ue){var se=oe.item,ne=oe.itemChoice,J=oe.noResults,re=oe.noChoices;ue===void 0&&(ue="");var Qe=[se,ne];return ue==="no-choices"?Qe.push(re):ue==="no-results"&&Qe.push(J),Object.assign(document.createElement("div"),{innerHTML:K,className:Qe.join(" ")})},option:function(oe){var K=oe.label,ue=oe.value,se=oe.customProperties,ne=oe.active,J=oe.disabled,re=new Option(K,ue,!1,ne);return se&&(re.dataset.customProperties=se),re.disabled=J,re}},W1=function(oe){return{type:Bt,active:oe}},S1=function(oe,K){return{type:dt,id:oe,highlighted:K}},Z1=function(oe){var K=oe.value,ue=oe.id,se=oe.active,ne=oe.disabled;return{type:wt,value:K,id:ue,active:se,disabled:ne}},o2=function(oe){return{type:"SET_IS_LOADING",isLoading:oe}};function d2(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var Q2="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,w2={},P2=function(){var oe,K,ue;function se(J,re){var Qe=this;J===void 0&&(J="[data-choice]"),re===void 0&&(re={}),this.config=i.a.all([U,se.defaults.options,re],{arrayMerge:function(Lt,e1){return[].concat(e1)}});var Le,Re,ct,Y,de=(Le=this.config,Re=U,ct=Object.keys(Le).sort(),Y=Object.keys(Re).sort(),ct.filter(function(Lt){return Y.indexOf(Lt)<0}));de.length&&console.warn("Unknown config option(s) passed",de.join(", "));var He=typeof J=="string"?document.querySelector(J):J;if(!(He instanceof HTMLInputElement||He instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement=He.type===Xt,this._isSelectOneElement=He.type===u1,this._isSelectMultipleElement=He.type===v1,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this.config.searchEnabled=this._isSelectMultipleElement||this.config.searchEnabled,["auto","always"].includes(this.config.renderSelectedChoices)||(this.config.renderSelectedChoices="auto"),re.addItemFilter&&typeof re.addItemFilter!="function"){var tt=re.addItemFilter instanceof RegExp?re.addItemFilter:new RegExp(re.addItemFilter);this.config.addItemFilter=tt.test.bind(tt)}if(this._isTextElement?this.passedElement=new Zt({element:He,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new k1({element:He,classNames:this.config.classNames,template:function(Lt){return Qe._templates.option(Lt)}}),this.initialised=!1,this._store=new M,this._initialState={},this._currentState={},this._prevState={},this._currentValue="",this._canSearch=this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=function(Lt,e1){var m1=Lt.id||Lt.name&&Lt.name+"-"+x(2)||x(4);return e1+"-"+m1.replace(/(:|\.|\[|\]|,)/g,"")}(this.passedElement.element,"choices-"),this._direction=this.passedElement.dir,!this._direction){var ht=window.getComputedStyle(this.passedElement.element).direction;ht!==window.getComputedStyle(document.documentElement).direction&&(this._direction=ht)}if(this._idNames={itemChoice:"item-choice"},this._presetGroups=this.passedElement.optionGroups,this._presetOptions=this.passedElement.options,this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&(this._presetItems=this._presetItems.concat(this.passedElement.value.split(this.config.delimiter))),this.passedElement.options&&this.passedElement.options.forEach(function(Lt){Qe._presetChoices.push({value:Lt.value,label:Lt.innerHTML,selected:Lt.selected,disabled:Lt.disabled||Lt.parentNode.disabled,placeholder:Lt.value===""||Lt.hasAttribute("placeholder"),customProperties:Lt.getAttribute("data-custom-properties")})}),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onAKey=this._onAKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive)return this.config.silent||console.warn("Trying to initialise Choices on element already initialised"),void(this.initialised=!0);this.init()}oe=se,ue=[{key:"defaults",get:function(){return Object.preventExtensions({get options(){return w2},get templates(){return A1}})}}],(K=null)&&d2(oe.prototype,K),ue&&d2(oe,ue);var ne=se.prototype;return ne.init=function(){if(!this.initialised){this._createTemplates(),this._createElements(),this._createStructure(),this._initialState=N(this._store.state),this._store.subscribe(this._render),this._render(),this._addEventListeners(),(!this.config.addItems||this.passedElement.element.hasAttribute("disabled"))&&this.disable(),this.initialised=!0;var J=this.config.callbackOnInit;J&&typeof J=="function"&&J.call(this)}},ne.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this.clearStore(),this._isSelectElement&&(this.passedElement.options=this._presetOptions),this._templates=null,this.initialised=!1)},ne.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},ne.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},ne.highlightItem=function(J,re){if(re===void 0&&(re=!0),!J)return this;var Qe=J.id,Le=J.groupId,Re=Le===void 0?-1:Le,ct=J.value,Y=ct===void 0?"":ct,de=J.label,He=de===void 0?"":de,tt=Re>=0?this._store.getGroupById(Re):null;return this._store.dispatch(S1(Qe,!0)),re&&this.passedElement.triggerEvent(yt,{id:Qe,value:Y,label:He,groupValue:tt&&tt.value?tt.value:null}),this},ne.unhighlightItem=function(J){if(!J)return this;var re=J.id,Qe=J.groupId,Le=Qe===void 0?-1:Qe,Re=J.value,ct=Re===void 0?"":Re,Y=J.label,de=Y===void 0?"":Y,He=Le>=0?this._store.getGroupById(Le):null;return this._store.dispatch(S1(re,!1)),this.passedElement.triggerEvent(yt,{id:re,value:ct,label:de,groupValue:He&&He.value?He.value:null}),this},ne.highlightAll=function(){var J=this;return this._store.items.forEach(function(re){return J.highlightItem(re)}),this},ne.unhighlightAll=function(){var J=this;return this._store.items.forEach(function(re){return J.unhighlightItem(re)}),this},ne.removeActiveItemsByValue=function(J){var re=this;return this._store.activeItems.filter(function(Qe){return Qe.value===J}).forEach(function(Qe){return re._removeItem(Qe)}),this},ne.removeActiveItems=function(J){var re=this;return this._store.activeItems.filter(function(Qe){return Qe.id!==J}).forEach(function(Qe){return re._removeItem(Qe)}),this},ne.removeHighlightedItems=function(J){var re=this;return J===void 0&&(J=!1),this._store.highlightedActiveItems.forEach(function(Qe){re._removeItem(Qe),J&&re._triggerChange(Qe.value)}),this},ne.showDropdown=function(J){var re=this;return this.dropdown.isActive||requestAnimationFrame(function(){re.dropdown.show(),re.containerOuter.open(re.dropdown.distanceFromTopWindow),!J&&re._canSearch&&re.input.focus(),re.passedElement.triggerEvent(q,{})}),this},ne.hideDropdown=function(J){var re=this;return this.dropdown.isActive?(requestAnimationFrame(function(){re.dropdown.hide(),re.containerOuter.close(),!J&&re._canSearch&&(re.input.removeActiveDescendant(),re.input.blur()),re.passedElement.triggerEvent(X,{})}),this):this},ne.getValue=function(J){J===void 0&&(J=!1);var re=this._store.activeItems.reduce(function(Qe,Le){var Re=J?Le.value:Le;return Qe.push(Re),Qe},[]);return this._isSelectOneElement?re[0]:re},ne.setValue=function(J){var re=this;return this.initialised?(J.forEach(function(Qe){return re._setChoiceOrItem(Qe)}),this):this},ne.setChoiceByValue=function(J){var re=this;return!this.initialised||this._isTextElement||(Array.isArray(J)?J:[J]).forEach(function(Qe){return re._findAndSelectChoiceByValue(Qe)}),this},ne.setChoices=function(J,re,Qe,Le){var Re=this;if(J===void 0&&(J=[]),re===void 0&&(re="value"),Qe===void 0&&(Qe="label"),Le===void 0&&(Le=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if(typeof re!="string"||!re)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(Le&&this.clearChoices(),typeof J=="function"){var ct=J(this);if(typeof Promise=="function"&&ct instanceof Promise)return new Promise(function(Y){return requestAnimationFrame(Y)}).then(function(){return Re._handleLoadingState(!0)}).then(function(){return ct}).then(function(Y){return Re.setChoices(Y,re,Qe,Le)}).catch(function(Y){Re.config.silent||console.error(Y)}).then(function(){return Re._handleLoadingState(!1)}).then(function(){return Re});if(!Array.isArray(ct))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: "+typeof ct);return this.setChoices(ct,re,Qe,!1)}if(!Array.isArray(J))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),J.forEach(function(Y){Y.choices?Re._addGroup({id:parseInt(Y.id,10)||null,group:Y,valueKey:re,labelKey:Qe}):Re._addChoice({value:Y[re],label:Y[Qe],isSelected:Y.selected,isDisabled:Y.disabled,customProperties:Y.customProperties,placeholder:Y.placeholder})}),this._stopLoading(),this},ne.clearChoices=function(){return this._store.dispatch({type:Kt}),this},ne.clearStore=function(){return this._store.dispatch({type:"CLEAR_ALL"}),this},ne.clearInput=function(){var J=!this._isSelectOneElement;return this.input.clear(J),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(W1(!0))),this},ne._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var J=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,re=this._isSelectElement,Qe=this._currentState.items!==this._prevState.items;J&&(re&&this._renderChoices(),Qe&&this._renderItems(),this._prevState=this._currentState)}},ne._renderChoices=function(){var J=this,re=this._store,Qe=re.activeGroups,Le=re.activeChoices,Re=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return J.choiceList.scrollToTop()}),Qe.length>=1&&!this._isSearching){var ct=Le.filter(function(ht){return ht.placeholder===!0&&ht.groupId===-1});ct.length>=1&&(Re=this._createChoicesFragment(ct,Re)),Re=this._createGroupsFragment(Qe,Le,Re)}else Le.length>=1&&(Re=this._createChoicesFragment(Le,Re));if(Re.childNodes&&Re.childNodes.length>0){var Y=this._store.activeItems,de=this._canAddItem(Y,this.input.value);de.response?(this.choiceList.append(Re),this._highlightChoice()):this.choiceList.append(this._getTemplate("notice",de.notice))}else{var He,tt;this._isSearching?(tt=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,He=this._getTemplate("notice",tt,"no-results")):(tt=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,He=this._getTemplate("notice",tt,"no-choices")),this.choiceList.append(He)}},ne._renderItems=function(){var J=this._store.activeItems||[];this.itemList.clear();var re=this._createItemsFragment(J);re.childNodes&&this.itemList.append(re)},ne._createGroupsFragment=function(J,re,Qe){var Le=this;return Qe===void 0&&(Qe=document.createDocumentFragment()),this.config.shouldSort&&J.sort(this.config.sorter),J.forEach(function(Re){var ct=function(de){return re.filter(function(He){return Le._isSelectOneElement?He.groupId===de.id:He.groupId===de.id&&(Le.config.renderSelectedChoices==="always"||!He.selected)})}(Re);if(ct.length>=1){var Y=Le._getTemplate("choiceGroup",Re);Qe.appendChild(Y),Le._createChoicesFragment(ct,Qe,!0)}}),Qe},ne._createChoicesFragment=function(J,re,Qe){var Le=this;re===void 0&&(re=document.createDocumentFragment()),Qe===void 0&&(Qe=!1);var Re=this.config,ct=Re.renderSelectedChoices,Y=Re.searchResultLimit,de=Re.renderChoiceLimit,He=this._isSearching?P:this.config.sorter,tt=function(D1){if(ct!=="auto"||Le._isSelectOneElement||!D1.selected){var U1=Le._getTemplate("choice",D1,Le.config.itemSelectText);re.appendChild(U1)}},ht=J;ct!=="auto"||this._isSelectOneElement||(ht=J.filter(function(D1){return!D1.selected}));var Lt=ht.reduce(function(D1,U1){return U1.placeholder?D1.placeholderChoices.push(U1):D1.normalChoices.push(U1),D1},{placeholderChoices:[],normalChoices:[]}),e1=Lt.placeholderChoices,m1=Lt.normalChoices;(this.config.shouldSort||this._isSearching)&&m1.sort(He);var n1=ht.length,E1=this._isSelectOneElement?[].concat(e1,m1):m1;this._isSearching?n1=Y:de&&de>0&&!Qe&&(n1=de);for(var K1=0;K1<n1;K1+=1)E1[K1]&&tt(E1[K1]);return re},ne._createItemsFragment=function(J,re){var Qe=this;re===void 0&&(re=document.createDocumentFragment());var Le=this.config,Re=Le.shouldSortItems,ct=Le.sorter,Y=Le.removeItemButton;return Re&&!this._isSelectOneElement&&J.sort(ct),this._isTextElement?this.passedElement.value=J:this.passedElement.options=J,J.forEach(function(de){var He=Qe._getTemplate("item",de,Y);re.appendChild(He)}),re},ne._triggerChange=function(J){J!=null&&this.passedElement.triggerEvent(ae,{value:J})},ne._selectPlaceholderChoice=function(){var J=this._store.placeholderChoice;J&&(this._addItem({value:J.value,label:J.label,choiceId:J.id,groupId:J.groupId,placeholder:J.placeholder}),this._triggerChange(J.value))},ne._handleButtonAction=function(J,re){if(J&&re&&this.config.removeItems&&this.config.removeItemButton){var Qe=re.parentNode.getAttribute("data-id"),Le=J.find(function(Re){return Re.id===parseInt(Qe,10)});this._removeItem(Le),this._triggerChange(Le.value),this._isSelectOneElement&&this._selectPlaceholderChoice()}},ne._handleItemAction=function(J,re,Qe){var Le=this;if(Qe===void 0&&(Qe=!1),J&&re&&this.config.removeItems&&!this._isSelectOneElement){var Re=re.getAttribute("data-id");J.forEach(function(ct){ct.id!==parseInt(Re,10)||ct.highlighted?!Qe&&ct.highlighted&&Le.unhighlightItem(ct):Le.highlightItem(ct)}),this.input.focus()}},ne._handleChoiceAction=function(J,re){if(J&&re){var Qe=re.dataset.id,Le=this._store.getChoiceById(Qe);if(Le){var Re=J[0]&&J[0].keyCode?J[0].keyCode:null,ct=this.dropdown.isActive;Le.keyCode=Re,this.passedElement.triggerEvent(me,{choice:Le}),Le.selected||Le.disabled||this._canAddItem(J,Le.value).response&&(this._addItem({value:Le.value,label:Le.label,choiceId:Le.id,groupId:Le.groupId,customProperties:Le.customProperties,placeholder:Le.placeholder,keyCode:Le.keyCode}),this._triggerChange(Le.value)),this.clearInput(),ct&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},ne._handleBackspace=function(J){if(this.config.removeItems&&J){var re=J[J.length-1],Qe=J.some(function(Le){return Le.highlighted});this.config.editItems&&!Qe&&re?(this.input.value=re.value,this.input.setWidth(),this._removeItem(re),this._triggerChange(re.value)):(Qe||this.highlightItem(re,!1),this.removeHighlightedItems(!0))}},ne._startLoading=function(){this._store.dispatch(o2(!0))},ne._stopLoading=function(){this._store.dispatch(o2(!1))},ne._handleLoadingState=function(J){J===void 0&&(J=!0);var re=this.itemList.getChild("."+this.config.classNames.placeholder);J?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?re?re.innerHTML=this.config.loadingText:(re=this._getTemplate("placeholder",this.config.loadingText),this.itemList.append(re)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?re.innerHTML=this._placeholderValue||"":this.input.placeholder=this._placeholderValue||"")},ne._handleSearch=function(J){if(J&&this.input.isFocussed){var re=this._store.choices,Qe=this.config,Le=Qe.searchFloor,Re=Qe.searchChoices,ct=re.some(function(de){return!de.active});if(J&&J.length>=Le){var Y=Re?this._searchChoices(J):0;this.passedElement.triggerEvent(Ve,{value:J,resultCount:Y})}else ct&&(this._isSearching=!1,this._store.dispatch(W1(!0)))}},ne._canAddItem=function(J,re){var Qe=!0,Le=typeof this.config.addItemText=="function"?this.config.addItemText(re):this.config.addItemText;if(!this._isSelectOneElement){var Re=function(ct,Y,de){return de===void 0&&(de="value"),ct.some(function(He){return typeof Y=="string"?He[de]===Y.trim():He[de]===Y})}(J,re);this.config.maxItemCount>0&&this.config.maxItemCount<=J.length&&(Qe=!1,Le=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&Re&&Qe&&(Qe=!1,Le=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(re):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&Qe&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(re)&&(Qe=!1,Le=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(re):this.config.customAddItemText)}return{response:Qe,notice:Le}},ne._searchChoices=function(J){var re=typeof J=="string"?J.trim():J,Qe=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(re.length<1&&re===Qe+" ")return 0;var Le=this._store.searchableChoices,Re=re,ct=[].concat(this.config.searchFields),Y=Object.assign(this.config.fuseOptions,{keys:ct}),de=new o.a(Le,Y).search(Re);return this._currentValue=re,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(function(He){return{type:t1,results:He}}(de)),de.length},ne._addEventListeners=function(){var J=document.documentElement;J.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),J.addEventListener("click",this._onClick,{passive:!0}),J.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},ne._removeEventListeners=function(){var J=document.documentElement;J.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),J.removeEventListener("click",this._onClick),J.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},ne._onKeyDown=function(J){var re,Qe=J.target,Le=J.keyCode,Re=J.ctrlKey,ct=J.metaKey,Y=this._store.activeItems,de=this.input.isFocussed,He=this.dropdown.isActive,tt=this.itemList.hasChildren(),ht=String.fromCharCode(Le),Lt=Wt,e1=jt,m1=a1,n1=ye,E1=ie,K1=nt,D1=St,U1=mt,t2=Pt,R1=Re||ct;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(ht)&&this.showDropdown();var y2=((re={})[n1]=this._onAKey,re[m1]=this._onEnterKey,re[E1]=this._onEscapeKey,re[K1]=this._onDirectionKey,re[U1]=this._onDirectionKey,re[D1]=this._onDirectionKey,re[t2]=this._onDirectionKey,re[e1]=this._onDeleteKey,re[Lt]=this._onDeleteKey,re);y2[Le]&&y2[Le]({event:J,target:Qe,keyCode:Le,metaKey:ct,activeItems:Y,hasFocusedInput:de,hasActiveDropdown:He,hasItems:tt,hasCtrlDownKeyPressed:R1})},ne._onKeyUp=function(J){var re=J.target,Qe=J.keyCode,Le=this.input.value,Re=this._store.activeItems,ct=this._canAddItem(Re,Le),Y=Wt,de=jt;if(this._isTextElement)if(ct.notice&&Le){var He=this._getTemplate("notice",ct.notice);this.dropdown.element.innerHTML=He.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var tt=(Qe===Y||Qe===de)&&!re.value,ht=!this._isTextElement&&this._isSearching,Lt=this._canSearch&&ct.response;tt&&ht?(this._isSearching=!1,this._store.dispatch(W1(!0))):Lt&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},ne._onAKey=function(J){var re=J.hasItems;J.hasCtrlDownKeyPressed&&re&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},ne._onEnterKey=function(J){var re=J.event,Qe=J.target,Le=J.activeItems,Re=J.hasActiveDropdown,ct=a1,Y=Qe.hasAttribute("data-button");if(this._isTextElement&&Qe.value){var de=this.input.value;this._canAddItem(Le,de).response&&(this.hideDropdown(!0),this._addItem({value:de}),this._triggerChange(de),this.clearInput())}if(Y&&(this._handleButtonAction(Le,Qe),re.preventDefault()),Re){var He=this.dropdown.getChild("."+this.config.classNames.highlightedState);He&&(Le[0]&&(Le[0].keyCode=ct),this._handleChoiceAction(Le,He)),re.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),re.preventDefault())},ne._onEscapeKey=function(J){J.hasActiveDropdown&&(this.hideDropdown(!0),this.containerOuter.focus())},ne._onDirectionKey=function(J){var re,Qe,Le,Re=J.event,ct=J.hasActiveDropdown,Y=J.keyCode,de=J.metaKey,He=St,tt=mt,ht=Pt;if(ct||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var Lt,e1=Y===He||Y===ht?1:-1,m1="[data-choice-selectable]";if(de||Y===ht||Y===tt)Lt=e1>0?this.dropdown.element.querySelector("[data-choice-selectable]:last-of-type"):this.dropdown.element.querySelector(m1);else{var n1=this.dropdown.element.querySelector("."+this.config.classNames.highlightedState);Lt=n1?function(E1,K1,D1){if(D1===void 0&&(D1=1),E1 instanceof Element&&typeof K1=="string"){for(var U1=(D1>0?"next":"previous")+"ElementSibling",t2=E1[U1];t2;){if(t2.matches(K1))return t2;t2=t2[U1]}return t2}}(n1,m1,e1):this.dropdown.element.querySelector(m1)}Lt&&(re=Lt,Qe=this.choiceList.element,(Le=e1)===void 0&&(Le=1),re&&(Le>0?Qe.scrollTop+Qe.offsetHeight>=re.offsetTop+re.offsetHeight:re.offsetTop>=Qe.scrollTop)||this.choiceList.scrollToChildElement(Lt,e1),this._highlightChoice(Lt)),Re.preventDefault()}},ne._onDeleteKey=function(J){var re=J.event,Qe=J.target,Le=J.hasFocusedInput,Re=J.activeItems;!Le||Qe.value||this._isSelectOneElement||(this._handleBackspace(Re),re.preventDefault())},ne._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},ne._onTouchEnd=function(J){var re=(J||J.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(re)&&((re===this.containerOuter.element||re===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),J.stopPropagation()),this._wasTap=!0},ne._onMouseDown=function(J){var re=J.target;if(re instanceof HTMLElement){if(Q2&&this.choiceList.element.contains(re)){var Qe=this.choiceList.element.firstElementChild,Le=this._direction==="ltr"?J.offsetX>=Qe.offsetWidth:J.offsetX<Qe.offsetLeft;this._isScrollingOnIe=Le}if(re!==this.input.element){var Re=re.closest("[data-button],[data-item],[data-choice]");if(Re instanceof HTMLElement){var ct=J.shiftKey,Y=this._store.activeItems,de=Re.dataset;"button"in de?this._handleButtonAction(Y,Re):"item"in de?this._handleItemAction(Y,Re,ct):"choice"in de&&this._handleChoiceAction(Y,Re)}J.preventDefault()}}},ne._onMouseOver=function(J){var re=J.target;re instanceof HTMLElement&&"choice"in re.dataset&&this._highlightChoice(re)},ne._onClick=function(J){var re=J.target;this.containerOuter.element.contains(re)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&re!==this.input.element&&!this.dropdown.element.contains(re)&&this.hideDropdown():this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),this.containerOuter.focus()):(this._store.highlightedActiveItems.length>0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},ne._onFocus=function(J){var re,Qe=this,Le=J.target;this.containerOuter.element.contains(Le)&&((re={}).text=function(){Le===Qe.input.element&&Qe.containerOuter.addFocusState()},re["select-one"]=function(){Qe.containerOuter.addFocusState(),Le===Qe.input.element&&Qe.showDropdown(!0)},re["select-multiple"]=function(){Le===Qe.input.element&&(Qe.showDropdown(!0),Qe.containerOuter.addFocusState())},re)[this.passedElement.element.type]()},ne._onBlur=function(J){var re=this,Qe=J.target;if(this.containerOuter.element.contains(Qe)&&!this._isScrollingOnIe){var Le,Re=this._store.activeItems.some(function(ct){return ct.highlighted});((Le={}).text=function(){Qe===re.input.element&&(re.containerOuter.removeFocusState(),Re&&re.unhighlightAll(),re.hideDropdown(!0))},Le["select-one"]=function(){re.containerOuter.removeFocusState(),(Qe===re.input.element||Qe===re.containerOuter.element&&!re._canSearch)&&re.hideDropdown(!0)},Le["select-multiple"]=function(){Qe===re.input.element&&(re.containerOuter.removeFocusState(),re.hideDropdown(!0),Re&&re.unhighlightAll())},Le)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},ne._onFormReset=function(){this._store.dispatch({type:"RESET_TO",state:this._initialState})},ne._highlightChoice=function(J){var re=this;J===void 0&&(J=null);var Qe=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(Qe.length){var Le=J;Array.from(this.dropdown.element.querySelectorAll("."+this.config.classNames.highlightedState)).forEach(function(Re){Re.classList.remove(re.config.classNames.highlightedState),Re.setAttribute("aria-selected","false")}),Le?this._highlightPosition=Qe.indexOf(Le):(Le=Qe.length>this._highlightPosition?Qe[this._highlightPosition]:Qe[Qe.length-1])||(Le=Qe[0]),Le.classList.add(this.config.classNames.highlightedState),Le.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(xt,{el:Le}),this.dropdown.isActive&&(this.input.setActiveDescendant(Le.id),this.containerOuter.setActiveDescendant(Le.id))}},ne._addItem=function(J){var re=J.value,Qe=J.label,Le=Qe===void 0?null:Qe,Re=J.choiceId,ct=Re===void 0?-1:Re,Y=J.groupId,de=Y===void 0?-1:Y,He=J.customProperties,tt=He===void 0?null:He,ht=J.placeholder,Lt=ht!==void 0&&ht,e1=J.keyCode,m1=e1===void 0?null:e1,n1=typeof re=="string"?re.trim():re,E1=m1,K1=tt,D1=this._store.items,U1=Le||n1,t2=ct||-1,R1=de>=0?this._store.getGroupById(de):null,y2=D1?D1.length+1:1;return this.config.prependValue&&(n1=this.config.prependValue+n1.toString()),this.config.appendValue&&(n1+=this.config.appendValue.toString()),this._store.dispatch(function(n2){var e2=n2.value,Z2=n2.label,I2=n2.id,s2=n2.choiceId,Ye=n2.groupId,lt=n2.customProperties,pt=n2.placeholder,Dt=n2.keyCode;return{type:Rt,value:e2,label:Z2,id:I2,choiceId:s2,groupId:Ye,customProperties:lt,placeholder:pt,keyCode:Dt}}({value:n1,label:U1,id:y2,choiceId:t2,groupId:de,customProperties:tt,placeholder:Lt,keyCode:E1})),this._isSelectOneElement&&this.removeActiveItems(y2),this.passedElement.triggerEvent(Je,{id:y2,value:n1,label:U1,customProperties:K1,groupValue:R1&&R1.value?R1.value:void 0,keyCode:E1}),this},ne._removeItem=function(J){if(!J||!S("Object",J))return this;var re=J.id,Qe=J.value,Le=J.label,Re=J.choiceId,ct=J.groupId,Y=ct>=0?this._store.getGroupById(ct):null;return this._store.dispatch(function(de,He){return{type:Ht,id:de,choiceId:He}}(re,Re)),Y&&Y.value?this.passedElement.triggerEvent(rt,{id:re,value:Qe,label:Le,groupValue:Y.value}):this.passedElement.triggerEvent(rt,{id:re,value:Qe,label:Le}),this},ne._addChoice=function(J){var re=J.value,Qe=J.label,Le=Qe===void 0?null:Qe,Re=J.isSelected,ct=Re!==void 0&&Re,Y=J.isDisabled,de=Y!==void 0&&Y,He=J.groupId,tt=He===void 0?-1:He,ht=J.customProperties,Lt=ht===void 0?null:ht,e1=J.placeholder,m1=e1!==void 0&&e1,n1=J.keyCode,E1=n1===void 0?null:n1;if(re!=null){var K1=this._store.choices,D1=Le||re,U1=K1?K1.length+1:1,t2=this._baseId+"-"+this._idNames.itemChoice+"-"+U1;this._store.dispatch(function(R1){var y2=R1.value,n2=R1.label,e2=R1.id,Z2=R1.groupId,I2=R1.disabled,s2=R1.elementId,Ye=R1.customProperties,lt=R1.placeholder,pt=R1.keyCode;return{type:r1,value:y2,label:n2,id:e2,groupId:Z2,disabled:I2,elementId:s2,customProperties:Ye,placeholder:lt,keyCode:pt}}({id:U1,groupId:tt,elementId:t2,value:re,label:D1,disabled:de,customProperties:Lt,placeholder:m1,keyCode:E1})),ct&&this._addItem({value:re,label:D1,choiceId:U1,customProperties:Lt,placeholder:m1,keyCode:E1})}},ne._addGroup=function(J){var re=this,Qe=J.group,Le=J.id,Re=J.valueKey,ct=Re===void 0?"value":Re,Y=J.labelKey,de=Y===void 0?"label":Y,He=S("Object",Qe)?Qe.choices:Array.from(Qe.getElementsByTagName("OPTION")),tt=Le||Math.floor(new Date().valueOf()*Math.random()),ht=!!Qe.disabled&&Qe.disabled;He?(this._store.dispatch(Z1({value:Qe.label,id:tt,active:!0,disabled:ht})),He.forEach(function(Lt){var e1=Lt.disabled||Lt.parentNode&&Lt.parentNode.disabled;re._addChoice({value:Lt[ct],label:S("Object",Lt)?Lt[de]:Lt.innerHTML,isSelected:Lt.selected,isDisabled:e1,groupId:tt,customProperties:Lt.customProperties,placeholder:Lt.placeholder})})):this._store.dispatch(Z1({value:Qe.label,id:Qe.id,active:!1,disabled:Qe.disabled}))},ne._getTemplate=function(J){var re;if(!J)return null;for(var Qe=this.config.classNames,Le=arguments.length,Re=new Array(Le>1?Le-1:0),ct=1;ct<Le;ct++)Re[ct-1]=arguments[ct];return(re=this._templates[J]).call.apply(re,[this,Qe].concat(Re))},ne._createTemplates=function(){var J=this.config.callbackOnCreateTemplates,re={};J&&typeof J=="function"&&(re=J.call(this,E)),this._templates=i()(A1,re)},ne._createElements=function(){this.containerOuter=new h1({element:this._getTemplate("containerOuter",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new h1({element:this._getTemplate("containerInner"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new Ze({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new $e({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new $e({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new W({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},ne._createStructure=function(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth()),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement&&(this._highlightPosition=0,this._isSearching=!1,this._startLoading(),this._presetGroups.length?this._addPredefinedGroups(this._presetGroups):this._addPredefinedChoices(this._presetChoices),this._stopLoading()),this._isTextElement&&this._addPredefinedItems(this._presetItems)},ne._addPredefinedGroups=function(J){var re=this,Qe=this.passedElement.placeholderOption;Qe&&Qe.parentNode.tagName==="SELECT"&&this._addChoice({value:Qe.value,label:Qe.innerHTML,isSelected:Qe.selected,isDisabled:Qe.disabled,placeholder:!0}),J.forEach(function(Le){return re._addGroup({group:Le,id:Le.id||null})})},ne._addPredefinedChoices=function(J){var re=this;this.config.shouldSort&&J.sort(this.config.sorter);var Qe=J.some(function(Re){return Re.selected}),Le=J.findIndex(function(Re){return Re.disabled===void 0||!Re.disabled});J.forEach(function(Re,ct){var Y=Re.value,de=Re.label,He=Re.customProperties,tt=Re.placeholder;if(re._isSelectElement)if(Re.choices)re._addGroup({group:Re,id:Re.id||null});else{var ht=!(!re._isSelectOneElement||Qe||ct!==Le)||Re.selected,Lt=Re.disabled;re._addChoice({value:Y,label:de,isSelected:ht,isDisabled:Lt,customProperties:He,placeholder:tt})}else re._addChoice({value:Y,label:de,isSelected:Re.selected,isDisabled:Re.disabled,customProperties:He,placeholder:tt})})},ne._addPredefinedItems=function(J){var re=this;J.forEach(function(Qe){typeof Qe=="object"&&Qe.value&&re._addItem({value:Qe.value,label:Qe.label,choiceId:Qe.id,customProperties:Qe.customProperties,placeholder:Qe.placeholder}),typeof Qe=="string"&&re._addItem({value:Qe})})},ne._setChoiceOrItem=function(J){var re=this;({object:function(){J.value&&(re._isTextElement?re._addItem({value:J.value,label:J.label,choiceId:J.id,customProperties:J.customProperties,placeholder:J.placeholder}):re._addChoice({value:J.value,label:J.label,isSelected:!0,isDisabled:!1,customProperties:J.customProperties,placeholder:J.placeholder}))},string:function(){re._isTextElement?re._addItem({value:J}):re._addChoice({value:J,label:J,isSelected:!0,isDisabled:!1})}})[H(J).toLowerCase()]()},ne._findAndSelectChoiceByValue=function(J){var re=this,Qe=this._store.choices.find(function(Le){return re.config.valueComparer(Le.value,J)});Qe&&!Qe.selected&&this._addItem({value:Qe.value,label:Qe.label,choiceId:Qe.id,groupId:Qe.groupId,customProperties:Qe.customProperties,placeholder:Qe.placeholder,keyCode:Qe.keyCode})},ne._generatePlaceholderValue=function(){if(this._isSelectElement){var J=this.passedElement.placeholderOption;return!!J&&J.text}var re=this.config,Qe=re.placeholder,Le=re.placeholderValue,Re=this.passedElement.element.dataset;if(Qe){if(Le)return Le;if(Re.placeholder)return Re.placeholder}return!1},se}();p.default=P2}]).default},typeof e=="object"&&typeof O=="object"?O.exports=w():typeof define=="function"&&define.amd?define([],w):typeof e=="object"?e.Choices=w():v.Choices=w()},477:function V(Q,O,e,C,R){C(),e.root="bk-root",e.default=".bk-root{}.bk-root .choices{position:relative;margin-bottom:24px;font-size:16px;}.bk-root .choices:focus{outline:none;}.bk-root .choices:last-child{margin-bottom:0;}.bk-root .choices.is-disabled .choices__inner,.bk-root .choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.bk-root .choices.is-disabled .choices__item{cursor:not-allowed;}.bk-root .choices [hidden]{display:none !important;}.bk-root .choices[data-type*='select-one']{cursor:pointer;}.bk-root .choices[data-type*='select-one'] .choices__inner{padding-bottom:7.5px;}.bk-root .choices[data-type*='select-one'] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #dddddd;background-color:#ffffff;margin:0;}.bk-root .choices[data-type*='select-one'] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:0.5;}.bk-root .choices[data-type*='select-one'] .choices__button:hover,.bk-root .choices[data-type*='select-one'] .choices__button:focus{opacity:1;}.bk-root .choices[data-type*='select-one'] .choices__button:focus{box-shadow:0px 0px 0px 2px #00bcd4;}.bk-root .choices[data-type*='select-one'] .choices__item[data-value=''] .choices__button{display:none;}.bk-root .choices[data-type*='select-one']:after{content:'';height:0;width:0;border-style:solid;border-color:#333333 transparent transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none;}.bk-root .choices[data-type*='select-one'].is-open:after{border-color:transparent transparent #333333 transparent;margin-top:-7.5px;}.bk-root .choices[data-type*='select-one'][dir='rtl']:after{left:11.5px;right:auto;}.bk-root .choices[data-type*='select-one'][dir='rtl'] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0;}.bk-root .choices[data-type*='select-multiple'] .choices__inner,.bk-root .choices[data-type*='text'] .choices__inner{cursor:text;}.bk-root .choices[data-type*='select-multiple'] .choices__button,.bk-root .choices[data-type*='text'] .choices__button{position:relative;display:inline-block;margin-top:0;margin-right:-4px;margin-bottom:0;margin-left:8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:0.75;border-radius:0;}.bk-root .choices[data-type*='select-multiple'] .choices__button:hover,.bk-root .choices[data-type*='select-multiple'] .choices__button:focus,.bk-root .choices[data-type*='text'] .choices__button:hover,.bk-root .choices[data-type*='text'] .choices__button:focus{opacity:1;}.bk-root .choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #dddddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden;}.bk-root .is-focused .choices__inner,.bk-root .is-open .choices__inner{border-color:#b7b7b7;}.bk-root .is-open .choices__inner{border-radius:2.5px 2.5px 0 0;}.bk-root .is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px;}.bk-root .choices__list{margin:0;padding-left:0;list-style:none;}.bk-root .choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%;}.bk-root [dir='rtl'] .choices__list--single{padding-right:4px;padding-left:16px;}.bk-root .choices__list--single .choices__item{width:100%;}.bk-root .choices__list--multiple{display:inline;}.bk-root .choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#ffffff;word-break:break-all;box-sizing:border-box;}.bk-root .choices__list--multiple .choices__item[data-deletable]{padding-right:5px;}.bk-root [dir='rtl'] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px;}.bk-root .choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1;}.bk-root .is-disabled .choices__list--multiple .choices__item{background-color:#aaaaaa;border:1px solid #919191;}.bk-root .choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#ffffff;border:1px solid #dddddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility;}.bk-root .choices__list--dropdown.is-active{visibility:visible;}.bk-root .is-open .choices__list--dropdown{border-color:#b7b7b7;}.bk-root .is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:0.25rem 0.25rem 0 0;}.bk-root .choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position;}.bk-root .choices__list--dropdown .choices__item{position:relative;padding:10px;font-size:14px;}.bk-root [dir='rtl'] .choices__list--dropdown .choices__item{text-align:right;}@media (min-width: 640px){.bk-root .choices__list--dropdown .choices__item--selectable{padding-right:100px;}.bk-root .choices__list--dropdown .choices__item--selectable:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%);}.bk-root [dir='rtl'] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px;}.bk-root [dir='rtl'] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px;}}.bk-root .choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#f2f2f2;}.bk-root .choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:0.5;}.bk-root .choices__item{cursor:default;}.bk-root .choices__item--selectable{cursor:pointer;}.bk-root .choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5;}.bk-root .choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray;}.bk-root .choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer;}.bk-root .choices__button:focus{outline:none;}.bk-root .choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px;}.bk-root .choices__input:focus{outline:0;}.bk-root [dir='rtl'] .choices__input{padding-right:2px;padding-left:0;}.bk-root .choices__placeholder{opacity:0.5;}.bk-root .choices{width:100%;}.bk-root .choices{box-sizing:border-box;}.bk-root .choices *,.bk-root .choices *:before,.bk-root .choices *:after{box-sizing:inherit;}.bk-root .choices__inner .choices__item.light{background-color:rgba(0, 126, 255, 0.08);border-radius:5px;border:1px solid rgba(0, 126, 255, 0.24);color:#007eff;}.bk-root .choices__inner .choices__item.solid{background-color:#1f77b4;border:none;border-radius:5px;color:white;}.bk-root .choices__inner .choices__item.solid .is-highlighted{background-color:#1f77b4;border:none;}.bk-root .choices__input{background-color:transparent;}.bk-root .choices__inner{background:transparent;border:1px solid darkgray;border-radius:5px;min-height:unset;}.bk-root .choices__list{white-space:initial;}.bk-root .choices__list--dropdown{z-index:100;}.bk-root .choices[data-type*=select-multiple] .choices__button.light{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDA3ZWZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);}.bk-root .choices[data-type*=select-multiple] .choices__button.solid{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmZmZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);border-left:1px solid white;opacity:1;}"},478:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=(0,v.__importStar)(Q(153)),p=Q(448),T=Q(131),c=Q(43),o=Q(8),r=Q(11),i=(0,v.__importStar)(Q(449)),t=/^[-+]?\d*$/,s=/^[-+]?\d*\.?\d*(?:(?:\d|\d.)[eE][-+]?)*\d*$/;class a extends p.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,()=>{var d;return this.input_el.name=(d=this.model.name)!==null&&d!==void 0?d:""}),this.connect(this.model.properties.value.change,()=>{this.input_el.value=this.format_value,this.old_value=this.input_el.value}),this.connect(this.model.properties.low.change,()=>{const{value:d,low:m,high:f}=this.model;m!=null&&f!=null&&(0,r.assert)(m<=f,"Invalid bounds, low must be inferior to high"),d!=null&&m!=null&&d<m&&(this.model.value=m)}),this.connect(this.model.properties.high.change,()=>{const{value:d,low:m,high:f}=this.model;m!=null&&f!=null&&(0,r.assert)(f>=m,"Invalid bounds, high must be superior to low"),d!=null&&f!=null&&d>f&&(this.model.value=f)}),this.connect(this.model.properties.high.change,()=>this.input_el.placeholder=this.model.placeholder),this.connect(this.model.properties.disabled.change,()=>this.input_el.disabled=this.model.disabled),this.connect(this.model.properties.placeholder.change,()=>this.input_el.placeholder=this.model.placeholder)}get format_value(){return this.model.value!=null?this.model.pretty(this.model.value):""}_set_input_filter(d){this.input_el.addEventListener("input",()=>{const{selectionStart:m,selectionEnd:f}=this.input_el;if(d(this.input_el.value))this.old_value=this.input_el.value;else{const b=this.old_value.length-this.input_el.value.length;this.input_el.value=this.old_value,m&&f&&this.input_el.setSelectionRange(m-1,f+b)}})}render(){super.render(),this.input_el=(0,c.input)({type:"text",class:i.input,name:this.model.name,value:this.format_value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.old_value=this.format_value,this.set_input_filter(),this.input_el.addEventListener("change",()=>this.change_input()),this.input_el.addEventListener("focusout",()=>this.input_el.value=this.format_value),this.group_el.appendChild(this.input_el)}set_input_filter(){this.model.mode=="int"?this._set_input_filter(d=>t.test(d)):this.model.mode=="float"&&this._set_input_filter(d=>s.test(d))}bound_value(d){let m=d;const{low:f,high:b}=this.model;return m=f!=null?Math.max(f,m):m,m=b!=null?Math.min(b,m):m,m}get value(){let d=this.input_el.value!=""?Number(this.input_el.value):null;return d!=null&&(d=this.bound_value(d)),d}change_input(){this.value==null?this.model.value=null:Number.isNaN(this.value)||(this.model.value=this.value)}}e.NumericInputView=a,a.__name__="NumericInputView";class u extends p.InputWidget{constructor(d){super(d)}_formatter(d,m){return(0,o.isString)(m)?g.format(d,m):m.doFormat([d],{loc:0})[0]}pretty(d){return this.format!=null?this._formatter(d,this.format):`${d}`}}e.NumericInput=u,w=u,u.__name__="NumericInput",w.prototype.default_view=a,w.define(({Number:l,String:d,Enum:m,Ref:f,Or:b,Nullable:y})=>({value:[y(l),null],placeholder:[d,""],mode:[m("int","float"),"int"],format:[y(b(d,f(T.TickFormatter))),null],low:[y(l),null],high:[y(l),null]}))},479:function V(Q,O,e,C,R){var v;C();const w=Q(468),g=Q(43);class p extends w.MarkupView{render(){super.render();const o=(0,g.pre)({style:{overflow:"auto"}},this.model.text);this.markup_el.appendChild(o)}}e.PreTextView=p,p.__name__="PreTextView";class T extends w.Markup{constructor(o){super(o)}}e.PreText=T,v=T,T.__name__="PreText",v.prototype.default_view=p},480:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(452),p=Q(43),T=(0,v.__importStar)(Q(318));class c extends g.ButtonGroupView{change_active(i){this.model.active!==i&&(this.model.active=i)}_update_active(){const{active:i}=this.model;this._buttons.forEach((t,s)=>{(0,p.classes)(t).toggle(T.active,i===s)})}}e.RadioButtonGroupView=c,c.__name__="RadioButtonGroupView";class o extends g.ButtonGroup{constructor(i){super(i)}}e.RadioButtonGroup=o,w=o,o.__name__="RadioButtonGroup",w.prototype.default_view=c,w.define(({Int:r,Nullable:i})=>({active:[i(r),null]}))},481:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(43),p=Q(34),T=Q(455),c=(0,v.__importStar)(Q(449));class o extends T.InputGroupView{render(){super.render();const t=(0,g.div)({class:[c.input_group,this.model.inline?c.inline:null]});this.el.appendChild(t);const s=(0,p.uniqueId)(),{active:a,labels:u}=this.model;this._inputs=[];for(let l=0;l<u.length;l++){const d=(0,g.input)({type:"radio",name:s,value:`${l}`});d.addEventListener("change",()=>this.change_active(l)),this._inputs.push(d),this.model.disabled&&(d.disabled=!0),l==a&&(d.checked=!0);const m=(0,g.label)(d,(0,g.span)(u[l]));t.appendChild(m)}}change_active(t){this.model.active=t}}e.RadioGroupView=o,o.__name__="RadioGroupView";class r extends T.InputGroup{constructor(t){super(t)}}e.RadioGroup=r,w=r,r.__name__="RadioGroup",w.prototype.default_view=o,w.define(({Boolean:i,Int:t,String:s,Array:a,Nullable:u})=>({active:[u(t),null],labels:[a(s),[]],inline:[i,!1]}))},482:function V(Q,O,e,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractRangeSliderView{}e.RangeSliderView=T,T.__name__="RangeSliderView";class c extends g.AbstractSlider{constructor(r){super(r),this.behaviour="drag",this.connected=[!1,!0,!1]}_formatter(r,i){return(0,p.isString)(i)?w.format(r,i):i.compute(r)}}e.RangeSlider=c,v=c,c.__name__="RangeSlider",v.prototype.default_view=T,v.override({format:"0[.]00"})},483:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(43),p=Q(8),T=Q(13),c=Q(448),o=(0,v.__importStar)(Q(449));class r extends c.InputWidgetView{constructor(){super(...arguments),this._known_values=new Set}connect_signals(){super.connect_signals();const{value:s,options:a}=this.model.properties;this.on_change(s,()=>{this._update_value()}),this.on_change(a,()=>{(0,g.empty)(this.input_el),(0,g.append)(this.input_el,...this.options_el()),this._update_value()})}options_el(){const{_known_values:s}=this;function a(l){return l.map(d=>{let m,f;return(0,p.isString)(d)?m=f=d:[m,f]=d,s.add(m),(0,g.option)({value:m},f)})}s.clear();const{options:u}=this.model;return(0,p.isArray)(u)?a(u):(0,T.entries)(u).map(([l,d])=>(0,g.optgroup)({label:l},a(d)))}render(){super.render(),this.input_el=(0,g.select)({class:o.input,name:this.model.name,disabled:this.model.disabled},this.options_el()),this._update_value(),this.input_el.addEventListener("change",()=>this.change_input()),this.group_el.appendChild(this.input_el)}change_input(){const s=this.input_el.value;this.model.value=s,super.change_input()}_update_value(){const{value:s}=this.model;this._known_values.has(s)?this.input_el.value=s:this.input_el.removeAttribute("value")}}e.SelectView=r,r.__name__="SelectView";class i extends c.InputWidget{constructor(s){super(s)}}e.Select=i,w=i,i.__name__="Select",w.prototype.default_view=r,w.define(({String:t,Array:s,Tuple:a,Dict:u,Or:l})=>{const d=s(l(t,a(t,t)));return{value:[t,""],options:[l(d,u(d)),[]]}})},484:function V(Q,O,e,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractSliderView{}e.SliderView=T,T.__name__="SliderView";class c extends g.AbstractSlider{constructor(r){super(r),this.behaviour="tap",this.connected=[!0,!1]}_formatter(r,i){return(0,p.isString)(i)?w.format(r,i):i.compute(r)}}e.Slider=c,v=c,c.__name__="Slider",v.prototype.default_view=T,v.override({format:"0[.]00"})},485:function V(Q,O,e,C,R){var v;C();const w=Q(478),g=Q(43),{min:p,max:T,floor:c,abs:o}=Math;function r(s){return c(s)!==s?s.toFixed(16).replace(/0+$/,"").split(".")[1].length:0}class i extends w.NumericInputView{*buttons(){yield this.btn_up_el,yield this.btn_down_el}initialize(){super.initialize(),this._handles={interval:void 0,timeout:void 0},this._interval=200}connect_signals(){super.connect_signals();const a=this.model.properties;this.on_change(a.disabled,()=>{for(const u of this.buttons())(0,g.toggle_attribute)(u,"disabled",this.model.disabled)})}render(){super.render(),this.wrapper_el=(0,g.div)({class:"bk-spin-wrapper"}),this.group_el.replaceChild(this.wrapper_el,this.input_el),this.btn_up_el=(0,g.button)({class:"bk-spin-btn bk-spin-btn-up"}),this.btn_down_el=(0,g.button)({class:"bk-spin-btn bk-spin-btn-down"}),this.wrapper_el.appendChild(this.input_el),this.wrapper_el.appendChild(this.btn_up_el),this.wrapper_el.appendChild(this.btn_down_el);for(const a of this.buttons())(0,g.toggle_attribute)(a,"disabled",this.model.disabled),a.addEventListener("mousedown",u=>this._btn_mouse_down(u)),a.addEventListener("mouseup",()=>this._btn_mouse_up()),a.addEventListener("mouseleave",()=>this._btn_mouse_leave());this.input_el.addEventListener("keydown",a=>this._input_key_down(a)),this.input_el.addEventListener("keyup",()=>this.model.value_throttled=this.model.value),this.input_el.addEventListener("wheel",a=>this._input_mouse_wheel(a)),this.input_el.addEventListener("wheel",function(a,u,l=!1){let d;return function(...m){const f=this,b=l&&d===void 0;d!==void 0&&clearTimeout(d),d=setTimeout(function(){d=void 0,l||a.apply(f,m)},u),b&&a.apply(f,m)}}(()=>{this.model.value_throttled=this.model.value},this.model.wheel_wait,!1))}get precision(){const{low:a,high:u,step:l}=this.model,d=r;return T(d(o(a??0)),d(o(u??0)),d(o(l)))}remove(){this._stop_incrementation(),super.remove()}_start_incrementation(a){clearInterval(this._handles.interval),this._counter=0;const{step:u}=this.model,l=d=>{if(this._counter+=1,this._counter%5==0){const m=Math.floor(this._counter/5);m<10?(clearInterval(this._handles.interval),this._handles.interval=setInterval(()=>l(d),this._interval/(m+1))):m>=10&&m<=13&&(clearInterval(this._handles.interval),this._handles.interval=setInterval(()=>l(2*d),this._interval/10))}this.increment(d)};this._handles.interval=setInterval(()=>l(a*u),this._interval)}_stop_incrementation(){clearTimeout(this._handles.timeout),this._handles.timeout=void 0,clearInterval(this._handles.interval),this._handles.interval=void 0,this.model.value_throttled=this.model.value}_btn_mouse_down(a){a.preventDefault();const u=a.currentTarget===this.btn_up_el?1:-1;this.increment(u*this.model.step),this.input_el.focus(),this._handles.timeout=setTimeout(()=>this._start_incrementation(u),this._interval)}_btn_mouse_up(){this._stop_incrementation()}_btn_mouse_leave(){this._stop_incrementation()}_input_mouse_wheel(a){if(document.activeElement===this.input_el){a.preventDefault();const u=a.deltaY>0?-1:1;this.increment(u*this.model.step)}}_input_key_down(a){switch(a.keyCode){case g.Keys.Up:return a.preventDefault(),this.increment(this.model.step);case g.Keys.Down:return a.preventDefault(),this.increment(-this.model.step);case g.Keys.PageUp:return a.preventDefault(),this.increment(this.model.page_step_multiplier*this.model.step);case g.Keys.PageDown:return a.preventDefault(),this.increment(-this.model.page_step_multiplier*this.model.step)}}adjust_to_precision(a){return this.bound_value(Number(a.toFixed(this.precision)))}increment(a){const{low:u,high:l}=this.model;this.model.value==null?a>0?this.model.value=u??(l!=null?p(0,l):0):a<0&&(this.model.value=l??(u!=null?T(u,0):0)):this.model.value=this.adjust_to_precision(this.model.value+a)}change_input(){super.change_input(),this.model.value_throttled=this.model.value}}e.SpinnerView=i,i.__name__="SpinnerView";class t extends w.NumericInput{constructor(a){super(a)}}e.Spinner=t,v=t,t.__name__="Spinner",v.prototype.default_view=i,v.define(({Number:s,Nullable:a})=>({value_throttled:[a(s),null],step:[s,1],page_step_multiplier:[s,10],wheel_wait:[s,100]})),v.override({mode:"float"})},486:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(447),p=Q(43),T=(0,v.__importStar)(Q(449));class c extends g.TextLikeInputView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.rows.change,()=>this.input_el.rows=this.model.rows),this.connect(this.model.properties.cols.change,()=>this.input_el.cols=this.model.cols)}_render_input(){this.input_el=(0,p.textarea)({class:T.input})}render(){super.render(),this.input_el.cols=this.model.cols,this.input_el.rows=this.model.rows}}e.TextAreaInputView=c,c.__name__="TextAreaInputView";class o extends g.TextLikeInput{constructor(i){super(i)}}e.TextAreaInput=o,w=o,o.__name__="TextAreaInput",w.prototype.default_view=c,w.define(({Int:r})=>({cols:[r,20],rows:[r,2]})),w.override({max_length:500})},487:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(441),p=Q(43),T=(0,v.__importStar)(Q(318));class c extends g.AbstractButtonView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,()=>this._update_active())}render(){super.render(),this._update_active()}click(){this.model.active=!this.model.active,super.click()}_update_active(){(0,p.classes)(this.button_el).toggle(T.active,this.model.active)}}e.ToggleView=c,c.__name__="ToggleView";class o extends g.AbstractButton{constructor(i){super(i)}}e.Toggle=o,w=o,o.__name__="Toggle",w.prototype.default_view=c,w.define(({Boolean:r})=>({active:[r,!1]})),w.override({label:"Toggle"})}},439,{"models/widgets/main":439,"models/widgets/index":440,"models/widgets/abstract_button":441,"models/widgets/control":442,"models/widgets/widget":512,"models/widgets/abstract_icon":444,"models/widgets/autocomplete_input":445,"models/widgets/text_input":446,"models/widgets/text_like_input":447,"models/widgets/input_widget":448,"styles/widgets/inputs.css":449,"models/widgets/button":450,"models/widgets/checkbox_button_group":451,"models/widgets/button_group":452,"models/widgets/oriented_control":453,"models/widgets/checkbox_group":454,"models/widgets/input_group":455,"models/widgets/color_picker":456,"models/widgets/date_picker":457,"styles/widgets/flatpickr.css":459,"models/widgets/date_range_slider":460,"models/widgets/abstract_slider":461,"styles/widgets/sliders.css":463,"styles/widgets/nouislider.css":464,"models/widgets/date_slider":465,"models/widgets/datetime_range_slider":466,"models/widgets/div":467,"models/widgets/markup":468,"styles/clearfix.css":469,"models/widgets/dropdown":470,"models/widgets/file_input":471,"models/widgets/multiselect":472,"models/widgets/paragraph":473,"models/widgets/password_input":474,"models/widgets/multichoice":475,"styles/widgets/choices.css":477,"models/widgets/numeric_input":478,"models/widgets/pretext":479,"models/widgets/radio_button_group":480,"models/widgets/radio_group":481,"models/widgets/range_slider":482,"models/widgets/selectbox":483,"models/widgets/slider":484,"models/widgets/spinner":485,"models/widgets/textarea_input":486,"models/widgets/toggle":487});function BokehChart({width:V,element:Q,height:O}){const e=`bokeh-chart-${Q.elementId}`,C=reactExports.useCallback(()=>JSON.parse(Q.figure),[Q]),R=reactExports.useCallback(p=>{let T=p.attributes.plot_width,c=p.attributes.plot_height;return O?(T=V,c=O):Q.useContainerWidth&&(T=V),{chartWidth:T,chartHeight:c}},[Q.useContainerWidth,O,V]),v=p=>{for(;p.lastChild;)p.lastChild.remove()},w=p=>{const T=document.getElementById(e),c=p&&p.doc&&p.doc.roots&&p.doc.roots.references?p.doc.roots.references.find(o=>o.type==="Plot"):void 0;if(c){const{chartWidth:o,chartHeight:r}=R(c);o>0&&(c.attributes.plot_width=o),r>0&&(c.attributes.plot_height=r)}T!==null&&(v(T),main.embed.embed_item(p,e))},g=reactExports.useCallback(w,[e,R]);return reactExports.useEffect(()=>{g(C())},[V,O,Q,C,g]),jsx("div",{id:e,className:"stBokehChart","data-testid":"stBokehChart"})}const BokehChart$1=reactExports.memo(BokehChart);export{BokehChart$1 as default};
|
|
1617
|
+
`,JSON.stringify(b,function(N,B){if(i(B)==="object"&&B!==null){if(A.indexOf(B)!==-1)return;A.push(B)}return B})),A=null}var L=[];this.options.includeMatches&&L.push(function(N,B){var D=N.output;B.matches=[];for(var j=0,M=D.length;j<M;j+=1){var F=D[j];if(F.matchedIndices.length!==0){var W={indices:F.matchedIndices,value:F.value};F.key&&(W.key=F.key),F.hasOwnProperty("arrayIndex")&&F.arrayIndex>-1&&(W.arrayIndex=F.arrayIndex),B.matches.push(W)}}}),this.options.includeScore&&L.push(function(N,B){B.score=N.score});for(var x=0,H=b.length;x<H;x+=1){var S=b[x];if(this.options.id&&(S.item=this.options.getFn(S.item,this.options.id)[0]),L.length){for(var k={item:S.item},E=0,P=L.length;E<P;E+=1)L[E](S,k);y.push(k)}else y.push(S.item)}return y}},{key:"_log",value:function(){var b;this.options.verbose&&(b=console).log.apply(b,arguments)}}])&&t(m.prototype,f),d}();c.exports=l},function(c,o,r){function i(l,d){for(var m=0;m<d.length;m++){var f=d[m];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}var t=r(3),s=r(4),a=r(7),u=function(){function l(f,b){var y=b.location,A=y===void 0?0:y,L=b.distance,x=L===void 0?100:L,H=b.threshold,S=H===void 0?.6:H,k=b.maxPatternLength,E=k===void 0?32:k,P=b.isCaseSensitive,N=P!==void 0&&P,B=b.tokenSeparator,D=B===void 0?/ +/g:B,j=b.findAllMatches,M=j!==void 0&&j,F=b.minMatchCharLength,W=F===void 0?1:F;(function(U,q){if(!(U instanceof q))throw new TypeError("Cannot call a class as a function")})(this,l),this.options={location:A,distance:x,threshold:S,maxPatternLength:E,isCaseSensitive:N,tokenSeparator:D,findAllMatches:M,minMatchCharLength:W},this.pattern=this.options.isCaseSensitive?f:f.toLowerCase(),this.pattern.length<=E&&(this.patternAlphabet=a(this.pattern))}var d,m;return d=l,(m=[{key:"search",value:function(f){if(this.options.isCaseSensitive||(f=f.toLowerCase()),this.pattern===f)return{isMatch:!0,score:0,matchedIndices:[[0,f.length-1]]};var b=this.options,y=b.maxPatternLength,A=b.tokenSeparator;if(this.pattern.length>y)return t(f,this.pattern,A);var L=this.options,x=L.location,H=L.distance,S=L.threshold,k=L.findAllMatches,E=L.minMatchCharLength;return s(f,this.pattern,this.patternAlphabet,{location:x,distance:H,threshold:S,findAllMatches:k,minMatchCharLength:E})}}])&&i(d.prototype,m),l}();c.exports=u},function(c,o){var r=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;c.exports=function(i,t){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,a=new RegExp(t.replace(r,"\\$&").replace(s,"|")),u=i.match(a),l=!!u,d=[];if(l)for(var m=0,f=u.length;m<f;m+=1){var b=u[m];d.push([i.indexOf(b),b.length-1])}return{score:l?.5:1,isMatch:l,matchedIndices:d}}},function(c,o,r){var i=r(5),t=r(6);c.exports=function(s,a,u,l){for(var d=l.location,m=d===void 0?0:d,f=l.distance,b=f===void 0?100:f,y=l.threshold,A=y===void 0?.6:y,L=l.findAllMatches,x=L!==void 0&&L,H=l.minMatchCharLength,S=H===void 0?1:H,k=m,E=s.length,P=A,N=s.indexOf(a,k),B=a.length,D=[],j=0;j<E;j+=1)D[j]=0;if(N!==-1){var M=i(a,{errors:0,currentLocation:N,expectedLocation:k,distance:b});if(P=Math.min(M,P),(N=s.lastIndexOf(a,k+B))!==-1){var F=i(a,{errors:0,currentLocation:N,expectedLocation:k,distance:b});P=Math.min(F,P)}}N=-1;for(var W=[],U=1,q=B+E,X=1<<B-1,ae=0;ae<B;ae+=1){for(var me=0,Ve=q;me<Ve;)i(a,{errors:ae,currentLocation:k+Ve,expectedLocation:k,distance:b})<=P?me=Ve:q=Ve,Ve=Math.floor((q-me)/2+me);q=Ve;var Je=Math.max(1,k-Ve+1),rt=x?E:Math.min(k+Ve,E)+B,yt=Array(rt+2);yt[rt+1]=(1<<ae)-1;for(var xt=rt;xt>=Je;xt-=1){var r1=xt-1,t1=u[s.charAt(r1)];if(t1&&(D[r1]=1),yt[xt]=(yt[xt+1]<<1|1)&t1,ae!==0&&(yt[xt]|=(W[xt+1]|W[xt])<<1|1|W[xt+1]),yt[xt]&X&&(U=i(a,{errors:ae,currentLocation:r1,expectedLocation:k,distance:b}))<=P){if(P=U,(N=r1)<=k)break;Je=Math.max(1,2*k-N)}}if(i(a,{errors:ae+1,currentLocation:k,expectedLocation:k,distance:b})>P)break;W=yt}return{isMatch:N>=0,score:U===0?.001:U,matchedIndices:t(D,S)}}},function(c,o){c.exports=function(r,i){var t=i.errors,s=t===void 0?0:t,a=i.currentLocation,u=a===void 0?0:a,l=i.expectedLocation,d=l===void 0?0:l,m=i.distance,f=m===void 0?100:m,b=s/r.length,y=Math.abs(d-u);return f?b+y/f:y?1:b}},function(c,o){c.exports=function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,t=[],s=-1,a=-1,u=0,l=r.length;u<l;u+=1){var d=r[u];d&&s===-1?s=u:d||s===-1||((a=u-1)-s+1>=i&&t.push([s,a]),s=-1)}return r[u-1]&&u-s>=i&&t.push([s,u-1]),t}},function(c,o){c.exports=function(r){for(var i={},t=r.length,s=0;s<t;s+=1)i[r.charAt(s)]=0;for(var a=0;a<t;a+=1)i[r.charAt(a)]|=1<<t-a-1;return i}},function(c,o,r){var i=r(0);c.exports=function(t,s){return function a(u,l,d){if(l){var m=l.indexOf("."),f=l,b=null;m!==-1&&(f=l.slice(0,m),b=l.slice(m+1));var y=u[f];if(y!=null)if(b||typeof y!="string"&&typeof y!="number")if(i(y))for(var A=0,L=y.length;A<L;A+=1)a(y[A],b,d);else b&&a(y,b,d);else d.push(y.toString())}else d.push(u);return d}(t,s,[])}}])},function(g,p,T){function c(o){var r,i=o.Symbol;return typeof i=="function"?i.observable?r=i.observable:(r=i("observable"),i.observable=r):r="@@observable",r}T.d(p,"a",function(){return c})},function(g,p,T){g.exports=T(7)},function(g,p){var T;T=function(){return this}();try{T=T||new Function("return this")()}catch{typeof window=="object"&&(T=window)}g.exports=T},function(g,p){g.exports=function(T){if(!T.webpackPolyfill){var c=Object.create(T);c.children||(c.children=[]),Object.defineProperty(c,"loaded",{enumerable:!0,get:function(){return c.l}}),Object.defineProperty(c,"id",{enumerable:!0,get:function(){return c.i}}),Object.defineProperty(c,"exports",{enumerable:!0}),c.webpackPolyfill=1}return c}},function(g,p,T){T.r(p);var c=T(2),o=T.n(c),r=T(0),i=T.n(r),t=T(1),s=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function u(oe){if(typeof oe!="object"||oe===null)return!1;for(var K=oe;Object.getPrototypeOf(K)!==null;)K=Object.getPrototypeOf(K);return Object.getPrototypeOf(oe)===K}function l(oe,K,ue){var se;if(typeof K=="function"&&typeof ue=="function"||typeof ue=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if(typeof K=="function"&&ue===void 0&&(ue=K,K=void 0),ue!==void 0){if(typeof ue!="function")throw new Error("Expected the enhancer to be a function.");return ue(l)(oe,K)}if(typeof oe!="function")throw new Error("Expected the reducer to be a function.");var ne=oe,J=K,re=[],Qe=re,Le=!1;function Re(){Qe===re&&(Qe=re.slice())}function ct(){if(Le)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return J}function Y(ht){if(typeof ht!="function")throw new Error("Expected the listener to be a function.");if(Le)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var Lt=!0;return Re(),Qe.push(ht),function(){if(Lt){if(Le)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");Lt=!1,Re();var e1=Qe.indexOf(ht);Qe.splice(e1,1)}}}function de(ht){if(!u(ht))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(ht.type===void 0)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(Le)throw new Error("Reducers may not dispatch actions.");try{Le=!0,J=ne(J,ht)}finally{Le=!1}for(var Lt=re=Qe,e1=0;e1<Lt.length;e1++)(0,Lt[e1])();return ht}function He(ht){if(typeof ht!="function")throw new Error("Expected the nextReducer to be a function.");ne=ht,de({type:a.REPLACE})}function tt(){var ht,Lt=Y;return(ht={subscribe:function(e1){if(typeof e1!="object"||e1===null)throw new TypeError("Expected the observer to be an object.");function m1(){e1.next&&e1.next(ct())}return m1(),{unsubscribe:Lt(m1)}}})[t.a]=function(){return this},ht}return de({type:a.INIT}),(se={dispatch:de,subscribe:Y,getState:ct,replaceReducer:He})[t.a]=tt,se}function d(oe,K){var ue=K&&K.type;return"Given "+(ue&&'action "'+String(ue)+'"'||"an action")+', reducer "'+oe+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}var m,f=[],b=[],y=[],A={loading:!1},L=function(oe,K){return oe===void 0&&(oe=A),K.type==="SET_IS_LOADING"?{loading:K.isLoading}:oe},x=function(oe){return Array.from({length:oe},function(){return(K=0,ue=36,Math.floor(Math.random()*(ue-K)+K)).toString(36);var K,ue}).join("")},H=function(oe){return Object.prototype.toString.call(oe).slice(8,-1)},S=function(oe,K){return K!=null&&H(K)===oe},k=function(oe){return typeof oe!="string"?oe:oe.replace(/&/g,"&").replace(/>/g,"&rt;").replace(/</g,"<").replace(/"/g,""")},E=(m=document.createElement("div"),function(oe){var K=oe.trim();m.innerHTML=K;for(var ue=m.children[0];m.firstChild;)m.removeChild(m.firstChild);return ue}),P=function(oe,K){return oe.score-K.score},N=function(oe){return JSON.parse(JSON.stringify(oe))},B=function(oe){for(var K=Object.keys(oe),ue={},se=0;se<K.length;se++){var ne=K[se];typeof oe[ne]=="function"&&(ue[ne]=oe[ne])}var J,re=Object.keys(ue);try{(function(Qe){Object.keys(Qe).forEach(function(Le){var Re=Qe[Le];if(Re(void 0,{type:a.INIT})===void 0)throw new Error('Reducer "'+Le+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(Re(void 0,{type:a.PROBE_UNKNOWN_ACTION()})===void 0)throw new Error('Reducer "'+Le+`" returned undefined when probed with a random type. Don't try to handle `+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})})(ue)}catch(Qe){J=Qe}return function(Qe,Le){if(Qe===void 0&&(Qe={}),J)throw J;for(var Re=!1,ct={},Y=0;Y<re.length;Y++){var de=re[Y],He=ue[de],tt=Qe[de],ht=He(tt,Le);if(ht===void 0){var Lt=d(de,Le);throw new Error(Lt)}ct[de]=ht,Re=Re||ht!==tt}return Re?ct:Qe}}({items:function(oe,K){switch(oe===void 0&&(oe=f),K.type){case"ADD_ITEM":return[].concat(oe,[{id:K.id,choiceId:K.choiceId,groupId:K.groupId,value:K.value,label:K.label,active:!0,highlighted:!1,customProperties:K.customProperties,placeholder:K.placeholder||!1,keyCode:null}]).map(function(ue){var se=ue;return se.highlighted=!1,se});case"REMOVE_ITEM":return oe.map(function(ue){var se=ue;return se.id===K.id&&(se.active=!1),se});case"HIGHLIGHT_ITEM":return oe.map(function(ue){var se=ue;return se.id===K.id&&(se.highlighted=K.highlighted),se});default:return oe}},groups:function(oe,K){switch(oe===void 0&&(oe=b),K.type){case"ADD_GROUP":return[].concat(oe,[{id:K.id,value:K.value,active:K.active,disabled:K.disabled}]);case"CLEAR_CHOICES":return[];default:return oe}},choices:function(oe,K){switch(oe===void 0&&(oe=y),K.type){case"ADD_CHOICE":return[].concat(oe,[{id:K.id,elementId:K.elementId,groupId:K.groupId,value:K.value,label:K.label||K.value,disabled:K.disabled||!1,selected:!1,active:!0,score:9999,customProperties:K.customProperties,placeholder:K.placeholder||!1,keyCode:null}]);case"ADD_ITEM":return K.activateOptions?oe.map(function(ue){var se=ue;return se.active=K.active,se}):K.choiceId>-1?oe.map(function(ue){var se=ue;return se.id===parseInt(K.choiceId,10)&&(se.selected=!0),se}):oe;case"REMOVE_ITEM":return K.choiceId>-1?oe.map(function(ue){var se=ue;return se.id===parseInt(K.choiceId,10)&&(se.selected=!1),se}):oe;case"FILTER_CHOICES":return oe.map(function(ue){var se=ue;return se.active=K.results.some(function(ne){var J=ne.item,re=ne.score;return J.id===se.id&&(se.score=re,!0)}),se});case"ACTIVATE_CHOICES":return oe.map(function(ue){var se=ue;return se.active=K.active,se});case"CLEAR_CHOICES":return y;default:return oe}},general:L}),D=function(oe,K){var ue=oe;if(K.type==="CLEAR_ALL")ue=void 0;else if(K.type==="RESET_TO")return N(K.state);return B(ue,K)};function j(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var M=function(){function oe(){this._store=l(D,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}var K,ue,se=oe.prototype;return se.subscribe=function(ne){this._store.subscribe(ne)},se.dispatch=function(ne){this._store.dispatch(ne)},se.isLoading=function(){return this.state.general.loading},se.getChoiceById=function(ne){return this.activeChoices.find(function(J){return J.id===parseInt(ne,10)})},se.getGroupById=function(ne){return this.groups.find(function(J){return J.id===ne})},K=oe,ue=[{key:"state",get:function(){return this._store.getState()}},{key:"items",get:function(){return this.state.items}},{key:"activeItems",get:function(){return this.items.filter(function(ne){return ne.active===!0})}},{key:"highlightedActiveItems",get:function(){return this.items.filter(function(ne){return ne.active&&ne.highlighted})}},{key:"choices",get:function(){return this.state.choices}},{key:"activeChoices",get:function(){return this.choices.filter(function(ne){return ne.active===!0})}},{key:"selectableChoices",get:function(){return this.choices.filter(function(ne){return ne.disabled!==!0})}},{key:"searchableChoices",get:function(){return this.selectableChoices.filter(function(ne){return ne.placeholder!==!0})}},{key:"placeholderChoice",get:function(){return[].concat(this.choices).reverse().find(function(ne){return ne.placeholder===!0})}},{key:"groups",get:function(){return this.state.groups}},{key:"activeGroups",get:function(){var ne=this.groups,J=this.choices;return ne.filter(function(re){var Qe=re.active===!0&&re.disabled===!1,Le=J.some(function(Re){return Re.active===!0&&Re.disabled===!1});return Qe&&Le},[])}}],ue&&j(K.prototype,ue),oe}();function F(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var W=function(){function oe(ne){var J=ne.element,re=ne.type,Qe=ne.classNames;this.element=J,this.classNames=Qe,this.type=re,this.isActive=!1}var K,ue,se=oe.prototype;return se.getChild=function(ne){return this.element.querySelector(ne)},se.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},se.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},K=oe,(ue=[{key:"distanceFromTopWindow",get:function(){return this.element.getBoundingClientRect().bottom}}])&&F(K.prototype,ue),oe}(),U={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:function(oe,K){var ue=oe.value,se=oe.label,ne=se===void 0?ue:se,J=K.value,re=K.label,Qe=re===void 0?J:re;return ne.localeCompare(Qe,[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(oe){return'Press Enter to add <b>"'+k(oe)+'"</b>'},maxItemText:function(oe){return"Only "+oe+" values can be added"},valueComparer:function(oe,K){return oe===K},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:{containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"}},q="showDropdown",X="hideDropdown",ae="change",me="choice",Ve="search",Je="addItem",rt="removeItem",yt="highlightItem",xt="highlightChoice",r1="ADD_CHOICE",t1="FILTER_CHOICES",Bt="ACTIVATE_CHOICES",Kt="CLEAR_CHOICES",wt="ADD_GROUP",Rt="ADD_ITEM",Ht="REMOVE_ITEM",dt="HIGHLIGHT_ITEM",Wt=46,jt=8,a1=13,ye=65,ie=27,nt=38,St=40,mt=33,Pt=34,Xt="text",u1="select-one",v1="select-multiple",h1=function(){function oe(ue){var se=ue.element,ne=ue.type,J=ue.classNames,re=ue.position;this.element=se,this.classNames=J,this.type=ne,this.position=re,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var K=oe.prototype;return K.addEventListeners=function(){this.element.addEventListener("focus",this._onFocus),this.element.addEventListener("blur",this._onBlur)},K.removeEventListeners=function(){this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},K.shouldFlip=function(ue){if(typeof ue!="number")return!1;var se=!1;return this.position==="auto"?se=!window.matchMedia("(min-height: "+(ue+1)+"px)").matches:this.position==="top"&&(se=!0),se},K.setActiveDescendant=function(ue){this.element.setAttribute("aria-activedescendant",ue)},K.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},K.open=function(ue){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(ue)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},K.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},K.focus=function(){this.isFocussed||this.element.focus()},K.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},K.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},K.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.type===u1&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},K.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.type===u1&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},K.wrap=function(ue){(function(se,ne){ne===void 0&&(ne=document.createElement("div")),se.nextSibling?se.parentNode.insertBefore(ne,se.nextSibling):se.parentNode.appendChild(ne),ne.appendChild(se)})(ue,this.element)},K.unwrap=function(ue){this.element.parentNode.insertBefore(ue,this.element),this.element.parentNode.removeChild(this.element)},K.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},K.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},K._onFocus=function(){this.isFocussed=!0},K._onBlur=function(){this.isFocussed=!1},oe}();function De(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var Ze=function(){function oe(ne){var J=ne.element,re=ne.type,Qe=ne.classNames,Le=ne.preventPaste;this.element=J,this.type=re,this.classNames=Qe,this.preventPaste=Le,this.isFocussed=this.element===document.activeElement,this.isDisabled=J.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var K,ue,se=oe.prototype;return se.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},se.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput,{passive:!0}),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus,{passive:!0}),this.element.removeEventListener("blur",this._onBlur,{passive:!0})},se.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},se.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},se.focus=function(){this.isFocussed||this.element.focus()},se.blur=function(){this.isFocussed&&this.element.blur()},se.clear=function(ne){return ne===void 0&&(ne=!0),this.element.value&&(this.element.value=""),ne&&this.setWidth(),this},se.setWidth=function(){var ne=this.element,J=ne.style,re=ne.value,Qe=ne.placeholder;J.minWidth=Qe.length+1+"ch",J.width=re.length+1+"ch"},se.setActiveDescendant=function(ne){this.element.setAttribute("aria-activedescendant",ne)},se.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},se._onInput=function(){this.type!==u1&&this.setWidth()},se._onPaste=function(ne){this.preventPaste&&ne.preventDefault()},se._onFocus=function(){this.isFocussed=!0},se._onBlur=function(){this.isFocussed=!1},K=oe,(ue=[{key:"placeholder",set:function(ne){this.element.placeholder=ne}},{key:"value",get:function(){return k(this.element.value)},set:function(ne){this.element.value=ne}}])&&De(K.prototype,ue),oe}(),$e=function(){function oe(ue){var se=ue.element;this.element=se,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}var K=oe.prototype;return K.clear=function(){this.element.innerHTML=""},K.append=function(ue){this.element.appendChild(ue)},K.getChild=function(ue){return this.element.querySelector(ue)},K.hasChildren=function(){return this.element.hasChildNodes()},K.scrollToTop=function(){this.element.scrollTop=0},K.scrollToChildElement=function(ue,se){var ne=this;if(ue){var J=this.element.offsetHeight,re=this.element.scrollTop+J,Qe=ue.offsetHeight,Le=ue.offsetTop+Qe,Re=se>0?this.element.scrollTop+Le-re:ue.offsetTop;requestAnimationFrame(function(){ne._animateScroll(Re,se)})}},K._scrollDown=function(ue,se,ne){var J=(ne-ue)/se,re=J>1?J:1;this.element.scrollTop=ue+re},K._scrollUp=function(ue,se,ne){var J=(ue-ne)/se,re=J>1?J:1;this.element.scrollTop=ue-re},K._animateScroll=function(ue,se){var ne=this,J=this.element.scrollTop,re=!1;se>0?(this._scrollDown(J,4,ue),J<ue&&(re=!0)):(this._scrollUp(J,4,ue),J>ue&&(re=!0)),re&&requestAnimationFrame(function(){ne._animateScroll(ue,se)})},oe}();function Qt(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var It=function(){function oe(ne){var J=ne.element,re=ne.classNames;if(this.element=J,this.classNames=re,!(J instanceof HTMLInputElement||J instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}var K,ue,se=oe.prototype;return se.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var ne=this.element.getAttribute("style");ne&&this.element.setAttribute("data-choice-orig-style",ne),this.element.setAttribute("data-choice","active")},se.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var ne=this.element.getAttribute("data-choice-orig-style");ne?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",ne)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},se.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},se.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},se.triggerEvent=function(ne,J){(function(re,Qe,Le){Le===void 0&&(Le=null);var Re=new CustomEvent(Qe,{detail:Le,bubbles:!0,cancelable:!0});re.dispatchEvent(Re)})(this.element,ne,J)},K=oe,(ue=[{key:"isActive",get:function(){return this.element.dataset.choice==="active"}},{key:"dir",get:function(){return this.element.dir}},{key:"value",get:function(){return this.element.value},set:function(ne){this.element.value=ne}}])&&Qt(K.prototype,ue),oe}();function Ut(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var Zt=function(oe){var K,ue,se,ne;function J(re){var Qe,Le=re.element,Re=re.classNames,ct=re.delimiter;return(Qe=oe.call(this,{element:Le,classNames:Re})||this).delimiter=ct,Qe}return ue=oe,(K=J).prototype=Object.create(ue.prototype),K.prototype.constructor=K,K.__proto__=ue,se=J,(ne=[{key:"value",get:function(){return this.element.value},set:function(re){var Qe=re.map(function(Le){return Le.value}).join(this.delimiter);this.element.setAttribute("value",Qe),this.element.value=Qe}}])&&Ut(se.prototype,ne),J}(It);function b1(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var k1=function(oe){var K,ue,se,ne;function J(re){var Qe,Le=re.element,Re=re.classNames,ct=re.template;return(Qe=oe.call(this,{element:Le,classNames:Re})||this).template=ct,Qe}return ue=oe,(K=J).prototype=Object.create(ue.prototype),K.prototype.constructor=K,K.__proto__=ue,J.prototype.appendDocFragment=function(re){this.element.innerHTML="",this.element.appendChild(re)},se=J,(ne=[{key:"placeholderOption",get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")}},{key:"optionGroups",get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))}},{key:"options",get:function(){return Array.from(this.element.options)},set:function(re){var Qe=this,Le=document.createDocumentFragment();re.forEach(function(Re){return ct=Re,Y=Qe.template(ct),void Le.appendChild(Y);var ct,Y}),this.appendDocFragment(Le)}}])&&b1(se.prototype,ne),J}(It),A1={containerOuter:function(oe,K,ue,se,ne,J){var re=oe.containerOuter,Qe=Object.assign(document.createElement("div"),{className:re});return Qe.dataset.type=J,K&&(Qe.dir=K),se&&(Qe.tabIndex=0),ue&&(Qe.setAttribute("role",ne?"combobox":"listbox"),ne&&Qe.setAttribute("aria-autocomplete","list")),Qe.setAttribute("aria-haspopup","true"),Qe.setAttribute("aria-expanded","false"),Qe},containerInner:function(oe){var K=oe.containerInner;return Object.assign(document.createElement("div"),{className:K})},itemList:function(oe,K){var ue=oe.list,se=oe.listSingle,ne=oe.listItems;return Object.assign(document.createElement("div"),{className:ue+" "+(K?se:ne)})},placeholder:function(oe,K){var ue=oe.placeholder;return Object.assign(document.createElement("div"),{className:ue,innerHTML:K})},item:function(oe,K,ue){var se=oe.item,ne=oe.button,J=oe.highlightedState,re=oe.itemSelectable,Qe=oe.placeholder,Le=K.id,Re=K.value,ct=K.label,Y=K.customProperties,de=K.active,He=K.disabled,tt=K.highlighted,ht=K.placeholder,Lt=Object.assign(document.createElement("div"),{className:se,innerHTML:ct});if(Object.assign(Lt.dataset,{item:"",id:Le,value:Re,customProperties:Y}),de&&Lt.setAttribute("aria-selected","true"),He&&Lt.setAttribute("aria-disabled","true"),ht&&Lt.classList.add(Qe),Lt.classList.add(tt?J:re),ue){He&&Lt.classList.remove(re),Lt.dataset.deletable="";var e1="Remove item",m1=Object.assign(document.createElement("button"),{type:"button",className:ne,innerHTML:e1});m1.setAttribute("aria-label","Remove item: '"+Re+"'"),m1.dataset.button="",Lt.appendChild(m1)}return Lt},choiceList:function(oe,K){var ue=oe.list,se=Object.assign(document.createElement("div"),{className:ue});return K||se.setAttribute("aria-multiselectable","true"),se.setAttribute("role","listbox"),se},choiceGroup:function(oe,K){var ue=oe.group,se=oe.groupHeading,ne=oe.itemDisabled,J=K.id,re=K.value,Qe=K.disabled,Le=Object.assign(document.createElement("div"),{className:ue+" "+(Qe?ne:"")});return Le.setAttribute("role","group"),Object.assign(Le.dataset,{group:"",id:J,value:re}),Qe&&Le.setAttribute("aria-disabled","true"),Le.appendChild(Object.assign(document.createElement("div"),{className:se,innerHTML:re})),Le},choice:function(oe,K,ue){var se=oe.item,ne=oe.itemChoice,J=oe.itemSelectable,re=oe.selectedState,Qe=oe.itemDisabled,Le=oe.placeholder,Re=K.id,ct=K.value,Y=K.label,de=K.groupId,He=K.elementId,tt=K.disabled,ht=K.selected,Lt=K.placeholder,e1=Object.assign(document.createElement("div"),{id:He,innerHTML:Y,className:se+" "+ne});return ht&&e1.classList.add(re),Lt&&e1.classList.add(Le),e1.setAttribute("role",de>0?"treeitem":"option"),Object.assign(e1.dataset,{choice:"",id:Re,value:ct,selectText:ue}),tt?(e1.classList.add(Qe),e1.dataset.choiceDisabled="",e1.setAttribute("aria-disabled","true")):(e1.classList.add(J),e1.dataset.choiceSelectable=""),e1},input:function(oe,K){var ue=oe.input,se=oe.inputCloned,ne=Object.assign(document.createElement("input"),{type:"text",className:ue+" "+se,autocomplete:"off",autocapitalize:"off",spellcheck:!1});return ne.setAttribute("role","textbox"),ne.setAttribute("aria-autocomplete","list"),ne.setAttribute("aria-label",K),ne},dropdown:function(oe){var K=oe.list,ue=oe.listDropdown,se=document.createElement("div");return se.classList.add(K,ue),se.setAttribute("aria-expanded","false"),se},notice:function(oe,K,ue){var se=oe.item,ne=oe.itemChoice,J=oe.noResults,re=oe.noChoices;ue===void 0&&(ue="");var Qe=[se,ne];return ue==="no-choices"?Qe.push(re):ue==="no-results"&&Qe.push(J),Object.assign(document.createElement("div"),{innerHTML:K,className:Qe.join(" ")})},option:function(oe){var K=oe.label,ue=oe.value,se=oe.customProperties,ne=oe.active,J=oe.disabled,re=new Option(K,ue,!1,ne);return se&&(re.dataset.customProperties=se),re.disabled=J,re}},W1=function(oe){return{type:Bt,active:oe}},S1=function(oe,K){return{type:dt,id:oe,highlighted:K}},Z1=function(oe){var K=oe.value,ue=oe.id,se=oe.active,ne=oe.disabled;return{type:wt,value:K,id:ue,active:se,disabled:ne}},o2=function(oe){return{type:"SET_IS_LOADING",isLoading:oe}};function d2(oe,K){for(var ue=0;ue<K.length;ue++){var se=K[ue];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(oe,se.key,se)}}var Q2="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,w2={},P2=function(){var oe,K,ue;function se(J,re){var Qe=this;J===void 0&&(J="[data-choice]"),re===void 0&&(re={}),this.config=i.a.all([U,se.defaults.options,re],{arrayMerge:function(Lt,e1){return[].concat(e1)}});var Le,Re,ct,Y,de=(Le=this.config,Re=U,ct=Object.keys(Le).sort(),Y=Object.keys(Re).sort(),ct.filter(function(Lt){return Y.indexOf(Lt)<0}));de.length&&console.warn("Unknown config option(s) passed",de.join(", "));var He=typeof J=="string"?document.querySelector(J):J;if(!(He instanceof HTMLInputElement||He instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement=He.type===Xt,this._isSelectOneElement=He.type===u1,this._isSelectMultipleElement=He.type===v1,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this.config.searchEnabled=this._isSelectMultipleElement||this.config.searchEnabled,["auto","always"].includes(this.config.renderSelectedChoices)||(this.config.renderSelectedChoices="auto"),re.addItemFilter&&typeof re.addItemFilter!="function"){var tt=re.addItemFilter instanceof RegExp?re.addItemFilter:new RegExp(re.addItemFilter);this.config.addItemFilter=tt.test.bind(tt)}if(this._isTextElement?this.passedElement=new Zt({element:He,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new k1({element:He,classNames:this.config.classNames,template:function(Lt){return Qe._templates.option(Lt)}}),this.initialised=!1,this._store=new M,this._initialState={},this._currentState={},this._prevState={},this._currentValue="",this._canSearch=this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=function(Lt,e1){var m1=Lt.id||Lt.name&&Lt.name+"-"+x(2)||x(4);return e1+"-"+m1.replace(/(:|\.|\[|\]|,)/g,"")}(this.passedElement.element,"choices-"),this._direction=this.passedElement.dir,!this._direction){var ht=window.getComputedStyle(this.passedElement.element).direction;ht!==window.getComputedStyle(document.documentElement).direction&&(this._direction=ht)}if(this._idNames={itemChoice:"item-choice"},this._presetGroups=this.passedElement.optionGroups,this._presetOptions=this.passedElement.options,this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&(this._presetItems=this._presetItems.concat(this.passedElement.value.split(this.config.delimiter))),this.passedElement.options&&this.passedElement.options.forEach(function(Lt){Qe._presetChoices.push({value:Lt.value,label:Lt.innerHTML,selected:Lt.selected,disabled:Lt.disabled||Lt.parentNode.disabled,placeholder:Lt.value===""||Lt.hasAttribute("placeholder"),customProperties:Lt.getAttribute("data-custom-properties")})}),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onAKey=this._onAKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive)return this.config.silent||console.warn("Trying to initialise Choices on element already initialised"),void(this.initialised=!0);this.init()}oe=se,ue=[{key:"defaults",get:function(){return Object.preventExtensions({get options(){return w2},get templates(){return A1}})}}],(K=null)&&d2(oe.prototype,K),ue&&d2(oe,ue);var ne=se.prototype;return ne.init=function(){if(!this.initialised){this._createTemplates(),this._createElements(),this._createStructure(),this._initialState=N(this._store.state),this._store.subscribe(this._render),this._render(),this._addEventListeners(),(!this.config.addItems||this.passedElement.element.hasAttribute("disabled"))&&this.disable(),this.initialised=!0;var J=this.config.callbackOnInit;J&&typeof J=="function"&&J.call(this)}},ne.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this.clearStore(),this._isSelectElement&&(this.passedElement.options=this._presetOptions),this._templates=null,this.initialised=!1)},ne.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},ne.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},ne.highlightItem=function(J,re){if(re===void 0&&(re=!0),!J)return this;var Qe=J.id,Le=J.groupId,Re=Le===void 0?-1:Le,ct=J.value,Y=ct===void 0?"":ct,de=J.label,He=de===void 0?"":de,tt=Re>=0?this._store.getGroupById(Re):null;return this._store.dispatch(S1(Qe,!0)),re&&this.passedElement.triggerEvent(yt,{id:Qe,value:Y,label:He,groupValue:tt&&tt.value?tt.value:null}),this},ne.unhighlightItem=function(J){if(!J)return this;var re=J.id,Qe=J.groupId,Le=Qe===void 0?-1:Qe,Re=J.value,ct=Re===void 0?"":Re,Y=J.label,de=Y===void 0?"":Y,He=Le>=0?this._store.getGroupById(Le):null;return this._store.dispatch(S1(re,!1)),this.passedElement.triggerEvent(yt,{id:re,value:ct,label:de,groupValue:He&&He.value?He.value:null}),this},ne.highlightAll=function(){var J=this;return this._store.items.forEach(function(re){return J.highlightItem(re)}),this},ne.unhighlightAll=function(){var J=this;return this._store.items.forEach(function(re){return J.unhighlightItem(re)}),this},ne.removeActiveItemsByValue=function(J){var re=this;return this._store.activeItems.filter(function(Qe){return Qe.value===J}).forEach(function(Qe){return re._removeItem(Qe)}),this},ne.removeActiveItems=function(J){var re=this;return this._store.activeItems.filter(function(Qe){return Qe.id!==J}).forEach(function(Qe){return re._removeItem(Qe)}),this},ne.removeHighlightedItems=function(J){var re=this;return J===void 0&&(J=!1),this._store.highlightedActiveItems.forEach(function(Qe){re._removeItem(Qe),J&&re._triggerChange(Qe.value)}),this},ne.showDropdown=function(J){var re=this;return this.dropdown.isActive||requestAnimationFrame(function(){re.dropdown.show(),re.containerOuter.open(re.dropdown.distanceFromTopWindow),!J&&re._canSearch&&re.input.focus(),re.passedElement.triggerEvent(q,{})}),this},ne.hideDropdown=function(J){var re=this;return this.dropdown.isActive?(requestAnimationFrame(function(){re.dropdown.hide(),re.containerOuter.close(),!J&&re._canSearch&&(re.input.removeActiveDescendant(),re.input.blur()),re.passedElement.triggerEvent(X,{})}),this):this},ne.getValue=function(J){J===void 0&&(J=!1);var re=this._store.activeItems.reduce(function(Qe,Le){var Re=J?Le.value:Le;return Qe.push(Re),Qe},[]);return this._isSelectOneElement?re[0]:re},ne.setValue=function(J){var re=this;return this.initialised?(J.forEach(function(Qe){return re._setChoiceOrItem(Qe)}),this):this},ne.setChoiceByValue=function(J){var re=this;return!this.initialised||this._isTextElement||(Array.isArray(J)?J:[J]).forEach(function(Qe){return re._findAndSelectChoiceByValue(Qe)}),this},ne.setChoices=function(J,re,Qe,Le){var Re=this;if(J===void 0&&(J=[]),re===void 0&&(re="value"),Qe===void 0&&(Qe="label"),Le===void 0&&(Le=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if(typeof re!="string"||!re)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(Le&&this.clearChoices(),typeof J=="function"){var ct=J(this);if(typeof Promise=="function"&&ct instanceof Promise)return new Promise(function(Y){return requestAnimationFrame(Y)}).then(function(){return Re._handleLoadingState(!0)}).then(function(){return ct}).then(function(Y){return Re.setChoices(Y,re,Qe,Le)}).catch(function(Y){Re.config.silent||console.error(Y)}).then(function(){return Re._handleLoadingState(!1)}).then(function(){return Re});if(!Array.isArray(ct))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: "+typeof ct);return this.setChoices(ct,re,Qe,!1)}if(!Array.isArray(J))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),J.forEach(function(Y){Y.choices?Re._addGroup({id:parseInt(Y.id,10)||null,group:Y,valueKey:re,labelKey:Qe}):Re._addChoice({value:Y[re],label:Y[Qe],isSelected:Y.selected,isDisabled:Y.disabled,customProperties:Y.customProperties,placeholder:Y.placeholder})}),this._stopLoading(),this},ne.clearChoices=function(){return this._store.dispatch({type:Kt}),this},ne.clearStore=function(){return this._store.dispatch({type:"CLEAR_ALL"}),this},ne.clearInput=function(){var J=!this._isSelectOneElement;return this.input.clear(J),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(W1(!0))),this},ne._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var J=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,re=this._isSelectElement,Qe=this._currentState.items!==this._prevState.items;J&&(re&&this._renderChoices(),Qe&&this._renderItems(),this._prevState=this._currentState)}},ne._renderChoices=function(){var J=this,re=this._store,Qe=re.activeGroups,Le=re.activeChoices,Re=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return J.choiceList.scrollToTop()}),Qe.length>=1&&!this._isSearching){var ct=Le.filter(function(ht){return ht.placeholder===!0&&ht.groupId===-1});ct.length>=1&&(Re=this._createChoicesFragment(ct,Re)),Re=this._createGroupsFragment(Qe,Le,Re)}else Le.length>=1&&(Re=this._createChoicesFragment(Le,Re));if(Re.childNodes&&Re.childNodes.length>0){var Y=this._store.activeItems,de=this._canAddItem(Y,this.input.value);de.response?(this.choiceList.append(Re),this._highlightChoice()):this.choiceList.append(this._getTemplate("notice",de.notice))}else{var He,tt;this._isSearching?(tt=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,He=this._getTemplate("notice",tt,"no-results")):(tt=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,He=this._getTemplate("notice",tt,"no-choices")),this.choiceList.append(He)}},ne._renderItems=function(){var J=this._store.activeItems||[];this.itemList.clear();var re=this._createItemsFragment(J);re.childNodes&&this.itemList.append(re)},ne._createGroupsFragment=function(J,re,Qe){var Le=this;return Qe===void 0&&(Qe=document.createDocumentFragment()),this.config.shouldSort&&J.sort(this.config.sorter),J.forEach(function(Re){var ct=function(de){return re.filter(function(He){return Le._isSelectOneElement?He.groupId===de.id:He.groupId===de.id&&(Le.config.renderSelectedChoices==="always"||!He.selected)})}(Re);if(ct.length>=1){var Y=Le._getTemplate("choiceGroup",Re);Qe.appendChild(Y),Le._createChoicesFragment(ct,Qe,!0)}}),Qe},ne._createChoicesFragment=function(J,re,Qe){var Le=this;re===void 0&&(re=document.createDocumentFragment()),Qe===void 0&&(Qe=!1);var Re=this.config,ct=Re.renderSelectedChoices,Y=Re.searchResultLimit,de=Re.renderChoiceLimit,He=this._isSearching?P:this.config.sorter,tt=function(D1){if(ct!=="auto"||Le._isSelectOneElement||!D1.selected){var U1=Le._getTemplate("choice",D1,Le.config.itemSelectText);re.appendChild(U1)}},ht=J;ct!=="auto"||this._isSelectOneElement||(ht=J.filter(function(D1){return!D1.selected}));var Lt=ht.reduce(function(D1,U1){return U1.placeholder?D1.placeholderChoices.push(U1):D1.normalChoices.push(U1),D1},{placeholderChoices:[],normalChoices:[]}),e1=Lt.placeholderChoices,m1=Lt.normalChoices;(this.config.shouldSort||this._isSearching)&&m1.sort(He);var n1=ht.length,E1=this._isSelectOneElement?[].concat(e1,m1):m1;this._isSearching?n1=Y:de&&de>0&&!Qe&&(n1=de);for(var K1=0;K1<n1;K1+=1)E1[K1]&&tt(E1[K1]);return re},ne._createItemsFragment=function(J,re){var Qe=this;re===void 0&&(re=document.createDocumentFragment());var Le=this.config,Re=Le.shouldSortItems,ct=Le.sorter,Y=Le.removeItemButton;return Re&&!this._isSelectOneElement&&J.sort(ct),this._isTextElement?this.passedElement.value=J:this.passedElement.options=J,J.forEach(function(de){var He=Qe._getTemplate("item",de,Y);re.appendChild(He)}),re},ne._triggerChange=function(J){J!=null&&this.passedElement.triggerEvent(ae,{value:J})},ne._selectPlaceholderChoice=function(){var J=this._store.placeholderChoice;J&&(this._addItem({value:J.value,label:J.label,choiceId:J.id,groupId:J.groupId,placeholder:J.placeholder}),this._triggerChange(J.value))},ne._handleButtonAction=function(J,re){if(J&&re&&this.config.removeItems&&this.config.removeItemButton){var Qe=re.parentNode.getAttribute("data-id"),Le=J.find(function(Re){return Re.id===parseInt(Qe,10)});this._removeItem(Le),this._triggerChange(Le.value),this._isSelectOneElement&&this._selectPlaceholderChoice()}},ne._handleItemAction=function(J,re,Qe){var Le=this;if(Qe===void 0&&(Qe=!1),J&&re&&this.config.removeItems&&!this._isSelectOneElement){var Re=re.getAttribute("data-id");J.forEach(function(ct){ct.id!==parseInt(Re,10)||ct.highlighted?!Qe&&ct.highlighted&&Le.unhighlightItem(ct):Le.highlightItem(ct)}),this.input.focus()}},ne._handleChoiceAction=function(J,re){if(J&&re){var Qe=re.dataset.id,Le=this._store.getChoiceById(Qe);if(Le){var Re=J[0]&&J[0].keyCode?J[0].keyCode:null,ct=this.dropdown.isActive;Le.keyCode=Re,this.passedElement.triggerEvent(me,{choice:Le}),Le.selected||Le.disabled||this._canAddItem(J,Le.value).response&&(this._addItem({value:Le.value,label:Le.label,choiceId:Le.id,groupId:Le.groupId,customProperties:Le.customProperties,placeholder:Le.placeholder,keyCode:Le.keyCode}),this._triggerChange(Le.value)),this.clearInput(),ct&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},ne._handleBackspace=function(J){if(this.config.removeItems&&J){var re=J[J.length-1],Qe=J.some(function(Le){return Le.highlighted});this.config.editItems&&!Qe&&re?(this.input.value=re.value,this.input.setWidth(),this._removeItem(re),this._triggerChange(re.value)):(Qe||this.highlightItem(re,!1),this.removeHighlightedItems(!0))}},ne._startLoading=function(){this._store.dispatch(o2(!0))},ne._stopLoading=function(){this._store.dispatch(o2(!1))},ne._handleLoadingState=function(J){J===void 0&&(J=!0);var re=this.itemList.getChild("."+this.config.classNames.placeholder);J?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?re?re.innerHTML=this.config.loadingText:(re=this._getTemplate("placeholder",this.config.loadingText),this.itemList.append(re)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?re.innerHTML=this._placeholderValue||"":this.input.placeholder=this._placeholderValue||"")},ne._handleSearch=function(J){if(J&&this.input.isFocussed){var re=this._store.choices,Qe=this.config,Le=Qe.searchFloor,Re=Qe.searchChoices,ct=re.some(function(de){return!de.active});if(J&&J.length>=Le){var Y=Re?this._searchChoices(J):0;this.passedElement.triggerEvent(Ve,{value:J,resultCount:Y})}else ct&&(this._isSearching=!1,this._store.dispatch(W1(!0)))}},ne._canAddItem=function(J,re){var Qe=!0,Le=typeof this.config.addItemText=="function"?this.config.addItemText(re):this.config.addItemText;if(!this._isSelectOneElement){var Re=function(ct,Y,de){return de===void 0&&(de="value"),ct.some(function(He){return typeof Y=="string"?He[de]===Y.trim():He[de]===Y})}(J,re);this.config.maxItemCount>0&&this.config.maxItemCount<=J.length&&(Qe=!1,Le=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&Re&&Qe&&(Qe=!1,Le=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(re):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&Qe&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(re)&&(Qe=!1,Le=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(re):this.config.customAddItemText)}return{response:Qe,notice:Le}},ne._searchChoices=function(J){var re=typeof J=="string"?J.trim():J,Qe=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(re.length<1&&re===Qe+" ")return 0;var Le=this._store.searchableChoices,Re=re,ct=[].concat(this.config.searchFields),Y=Object.assign(this.config.fuseOptions,{keys:ct}),de=new o.a(Le,Y).search(Re);return this._currentValue=re,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(function(He){return{type:t1,results:He}}(de)),de.length},ne._addEventListeners=function(){var J=document.documentElement;J.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),J.addEventListener("click",this._onClick,{passive:!0}),J.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},ne._removeEventListeners=function(){var J=document.documentElement;J.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),J.removeEventListener("click",this._onClick),J.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},ne._onKeyDown=function(J){var re,Qe=J.target,Le=J.keyCode,Re=J.ctrlKey,ct=J.metaKey,Y=this._store.activeItems,de=this.input.isFocussed,He=this.dropdown.isActive,tt=this.itemList.hasChildren(),ht=String.fromCharCode(Le),Lt=Wt,e1=jt,m1=a1,n1=ye,E1=ie,K1=nt,D1=St,U1=mt,t2=Pt,R1=Re||ct;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(ht)&&this.showDropdown();var y2=((re={})[n1]=this._onAKey,re[m1]=this._onEnterKey,re[E1]=this._onEscapeKey,re[K1]=this._onDirectionKey,re[U1]=this._onDirectionKey,re[D1]=this._onDirectionKey,re[t2]=this._onDirectionKey,re[e1]=this._onDeleteKey,re[Lt]=this._onDeleteKey,re);y2[Le]&&y2[Le]({event:J,target:Qe,keyCode:Le,metaKey:ct,activeItems:Y,hasFocusedInput:de,hasActiveDropdown:He,hasItems:tt,hasCtrlDownKeyPressed:R1})},ne._onKeyUp=function(J){var re=J.target,Qe=J.keyCode,Le=this.input.value,Re=this._store.activeItems,ct=this._canAddItem(Re,Le),Y=Wt,de=jt;if(this._isTextElement)if(ct.notice&&Le){var He=this._getTemplate("notice",ct.notice);this.dropdown.element.innerHTML=He.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var tt=(Qe===Y||Qe===de)&&!re.value,ht=!this._isTextElement&&this._isSearching,Lt=this._canSearch&&ct.response;tt&&ht?(this._isSearching=!1,this._store.dispatch(W1(!0))):Lt&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},ne._onAKey=function(J){var re=J.hasItems;J.hasCtrlDownKeyPressed&&re&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},ne._onEnterKey=function(J){var re=J.event,Qe=J.target,Le=J.activeItems,Re=J.hasActiveDropdown,ct=a1,Y=Qe.hasAttribute("data-button");if(this._isTextElement&&Qe.value){var de=this.input.value;this._canAddItem(Le,de).response&&(this.hideDropdown(!0),this._addItem({value:de}),this._triggerChange(de),this.clearInput())}if(Y&&(this._handleButtonAction(Le,Qe),re.preventDefault()),Re){var He=this.dropdown.getChild("."+this.config.classNames.highlightedState);He&&(Le[0]&&(Le[0].keyCode=ct),this._handleChoiceAction(Le,He)),re.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),re.preventDefault())},ne._onEscapeKey=function(J){J.hasActiveDropdown&&(this.hideDropdown(!0),this.containerOuter.focus())},ne._onDirectionKey=function(J){var re,Qe,Le,Re=J.event,ct=J.hasActiveDropdown,Y=J.keyCode,de=J.metaKey,He=St,tt=mt,ht=Pt;if(ct||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var Lt,e1=Y===He||Y===ht?1:-1,m1="[data-choice-selectable]";if(de||Y===ht||Y===tt)Lt=e1>0?this.dropdown.element.querySelector("[data-choice-selectable]:last-of-type"):this.dropdown.element.querySelector(m1);else{var n1=this.dropdown.element.querySelector("."+this.config.classNames.highlightedState);Lt=n1?function(E1,K1,D1){if(D1===void 0&&(D1=1),E1 instanceof Element&&typeof K1=="string"){for(var U1=(D1>0?"next":"previous")+"ElementSibling",t2=E1[U1];t2;){if(t2.matches(K1))return t2;t2=t2[U1]}return t2}}(n1,m1,e1):this.dropdown.element.querySelector(m1)}Lt&&(re=Lt,Qe=this.choiceList.element,(Le=e1)===void 0&&(Le=1),re&&(Le>0?Qe.scrollTop+Qe.offsetHeight>=re.offsetTop+re.offsetHeight:re.offsetTop>=Qe.scrollTop)||this.choiceList.scrollToChildElement(Lt,e1),this._highlightChoice(Lt)),Re.preventDefault()}},ne._onDeleteKey=function(J){var re=J.event,Qe=J.target,Le=J.hasFocusedInput,Re=J.activeItems;!Le||Qe.value||this._isSelectOneElement||(this._handleBackspace(Re),re.preventDefault())},ne._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},ne._onTouchEnd=function(J){var re=(J||J.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(re)&&((re===this.containerOuter.element||re===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),J.stopPropagation()),this._wasTap=!0},ne._onMouseDown=function(J){var re=J.target;if(re instanceof HTMLElement){if(Q2&&this.choiceList.element.contains(re)){var Qe=this.choiceList.element.firstElementChild,Le=this._direction==="ltr"?J.offsetX>=Qe.offsetWidth:J.offsetX<Qe.offsetLeft;this._isScrollingOnIe=Le}if(re!==this.input.element){var Re=re.closest("[data-button],[data-item],[data-choice]");if(Re instanceof HTMLElement){var ct=J.shiftKey,Y=this._store.activeItems,de=Re.dataset;"button"in de?this._handleButtonAction(Y,Re):"item"in de?this._handleItemAction(Y,Re,ct):"choice"in de&&this._handleChoiceAction(Y,Re)}J.preventDefault()}}},ne._onMouseOver=function(J){var re=J.target;re instanceof HTMLElement&&"choice"in re.dataset&&this._highlightChoice(re)},ne._onClick=function(J){var re=J.target;this.containerOuter.element.contains(re)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&re!==this.input.element&&!this.dropdown.element.contains(re)&&this.hideDropdown():this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),this.containerOuter.focus()):(this._store.highlightedActiveItems.length>0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},ne._onFocus=function(J){var re,Qe=this,Le=J.target;this.containerOuter.element.contains(Le)&&((re={}).text=function(){Le===Qe.input.element&&Qe.containerOuter.addFocusState()},re["select-one"]=function(){Qe.containerOuter.addFocusState(),Le===Qe.input.element&&Qe.showDropdown(!0)},re["select-multiple"]=function(){Le===Qe.input.element&&(Qe.showDropdown(!0),Qe.containerOuter.addFocusState())},re)[this.passedElement.element.type]()},ne._onBlur=function(J){var re=this,Qe=J.target;if(this.containerOuter.element.contains(Qe)&&!this._isScrollingOnIe){var Le,Re=this._store.activeItems.some(function(ct){return ct.highlighted});((Le={}).text=function(){Qe===re.input.element&&(re.containerOuter.removeFocusState(),Re&&re.unhighlightAll(),re.hideDropdown(!0))},Le["select-one"]=function(){re.containerOuter.removeFocusState(),(Qe===re.input.element||Qe===re.containerOuter.element&&!re._canSearch)&&re.hideDropdown(!0)},Le["select-multiple"]=function(){Qe===re.input.element&&(re.containerOuter.removeFocusState(),re.hideDropdown(!0),Re&&re.unhighlightAll())},Le)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},ne._onFormReset=function(){this._store.dispatch({type:"RESET_TO",state:this._initialState})},ne._highlightChoice=function(J){var re=this;J===void 0&&(J=null);var Qe=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(Qe.length){var Le=J;Array.from(this.dropdown.element.querySelectorAll("."+this.config.classNames.highlightedState)).forEach(function(Re){Re.classList.remove(re.config.classNames.highlightedState),Re.setAttribute("aria-selected","false")}),Le?this._highlightPosition=Qe.indexOf(Le):(Le=Qe.length>this._highlightPosition?Qe[this._highlightPosition]:Qe[Qe.length-1])||(Le=Qe[0]),Le.classList.add(this.config.classNames.highlightedState),Le.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(xt,{el:Le}),this.dropdown.isActive&&(this.input.setActiveDescendant(Le.id),this.containerOuter.setActiveDescendant(Le.id))}},ne._addItem=function(J){var re=J.value,Qe=J.label,Le=Qe===void 0?null:Qe,Re=J.choiceId,ct=Re===void 0?-1:Re,Y=J.groupId,de=Y===void 0?-1:Y,He=J.customProperties,tt=He===void 0?null:He,ht=J.placeholder,Lt=ht!==void 0&&ht,e1=J.keyCode,m1=e1===void 0?null:e1,n1=typeof re=="string"?re.trim():re,E1=m1,K1=tt,D1=this._store.items,U1=Le||n1,t2=ct||-1,R1=de>=0?this._store.getGroupById(de):null,y2=D1?D1.length+1:1;return this.config.prependValue&&(n1=this.config.prependValue+n1.toString()),this.config.appendValue&&(n1+=this.config.appendValue.toString()),this._store.dispatch(function(n2){var e2=n2.value,Z2=n2.label,I2=n2.id,s2=n2.choiceId,Ye=n2.groupId,lt=n2.customProperties,pt=n2.placeholder,Dt=n2.keyCode;return{type:Rt,value:e2,label:Z2,id:I2,choiceId:s2,groupId:Ye,customProperties:lt,placeholder:pt,keyCode:Dt}}({value:n1,label:U1,id:y2,choiceId:t2,groupId:de,customProperties:tt,placeholder:Lt,keyCode:E1})),this._isSelectOneElement&&this.removeActiveItems(y2),this.passedElement.triggerEvent(Je,{id:y2,value:n1,label:U1,customProperties:K1,groupValue:R1&&R1.value?R1.value:void 0,keyCode:E1}),this},ne._removeItem=function(J){if(!J||!S("Object",J))return this;var re=J.id,Qe=J.value,Le=J.label,Re=J.choiceId,ct=J.groupId,Y=ct>=0?this._store.getGroupById(ct):null;return this._store.dispatch(function(de,He){return{type:Ht,id:de,choiceId:He}}(re,Re)),Y&&Y.value?this.passedElement.triggerEvent(rt,{id:re,value:Qe,label:Le,groupValue:Y.value}):this.passedElement.triggerEvent(rt,{id:re,value:Qe,label:Le}),this},ne._addChoice=function(J){var re=J.value,Qe=J.label,Le=Qe===void 0?null:Qe,Re=J.isSelected,ct=Re!==void 0&&Re,Y=J.isDisabled,de=Y!==void 0&&Y,He=J.groupId,tt=He===void 0?-1:He,ht=J.customProperties,Lt=ht===void 0?null:ht,e1=J.placeholder,m1=e1!==void 0&&e1,n1=J.keyCode,E1=n1===void 0?null:n1;if(re!=null){var K1=this._store.choices,D1=Le||re,U1=K1?K1.length+1:1,t2=this._baseId+"-"+this._idNames.itemChoice+"-"+U1;this._store.dispatch(function(R1){var y2=R1.value,n2=R1.label,e2=R1.id,Z2=R1.groupId,I2=R1.disabled,s2=R1.elementId,Ye=R1.customProperties,lt=R1.placeholder,pt=R1.keyCode;return{type:r1,value:y2,label:n2,id:e2,groupId:Z2,disabled:I2,elementId:s2,customProperties:Ye,placeholder:lt,keyCode:pt}}({id:U1,groupId:tt,elementId:t2,value:re,label:D1,disabled:de,customProperties:Lt,placeholder:m1,keyCode:E1})),ct&&this._addItem({value:re,label:D1,choiceId:U1,customProperties:Lt,placeholder:m1,keyCode:E1})}},ne._addGroup=function(J){var re=this,Qe=J.group,Le=J.id,Re=J.valueKey,ct=Re===void 0?"value":Re,Y=J.labelKey,de=Y===void 0?"label":Y,He=S("Object",Qe)?Qe.choices:Array.from(Qe.getElementsByTagName("OPTION")),tt=Le||Math.floor(new Date().valueOf()*Math.random()),ht=!!Qe.disabled&&Qe.disabled;He?(this._store.dispatch(Z1({value:Qe.label,id:tt,active:!0,disabled:ht})),He.forEach(function(Lt){var e1=Lt.disabled||Lt.parentNode&&Lt.parentNode.disabled;re._addChoice({value:Lt[ct],label:S("Object",Lt)?Lt[de]:Lt.innerHTML,isSelected:Lt.selected,isDisabled:e1,groupId:tt,customProperties:Lt.customProperties,placeholder:Lt.placeholder})})):this._store.dispatch(Z1({value:Qe.label,id:Qe.id,active:!1,disabled:Qe.disabled}))},ne._getTemplate=function(J){var re;if(!J)return null;for(var Qe=this.config.classNames,Le=arguments.length,Re=new Array(Le>1?Le-1:0),ct=1;ct<Le;ct++)Re[ct-1]=arguments[ct];return(re=this._templates[J]).call.apply(re,[this,Qe].concat(Re))},ne._createTemplates=function(){var J=this.config.callbackOnCreateTemplates,re={};J&&typeof J=="function"&&(re=J.call(this,E)),this._templates=i()(A1,re)},ne._createElements=function(){this.containerOuter=new h1({element:this._getTemplate("containerOuter",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new h1({element:this._getTemplate("containerInner"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new Ze({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new $e({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new $e({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new W({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},ne._createStructure=function(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth()),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement&&(this._highlightPosition=0,this._isSearching=!1,this._startLoading(),this._presetGroups.length?this._addPredefinedGroups(this._presetGroups):this._addPredefinedChoices(this._presetChoices),this._stopLoading()),this._isTextElement&&this._addPredefinedItems(this._presetItems)},ne._addPredefinedGroups=function(J){var re=this,Qe=this.passedElement.placeholderOption;Qe&&Qe.parentNode.tagName==="SELECT"&&this._addChoice({value:Qe.value,label:Qe.innerHTML,isSelected:Qe.selected,isDisabled:Qe.disabled,placeholder:!0}),J.forEach(function(Le){return re._addGroup({group:Le,id:Le.id||null})})},ne._addPredefinedChoices=function(J){var re=this;this.config.shouldSort&&J.sort(this.config.sorter);var Qe=J.some(function(Re){return Re.selected}),Le=J.findIndex(function(Re){return Re.disabled===void 0||!Re.disabled});J.forEach(function(Re,ct){var Y=Re.value,de=Re.label,He=Re.customProperties,tt=Re.placeholder;if(re._isSelectElement)if(Re.choices)re._addGroup({group:Re,id:Re.id||null});else{var ht=!(!re._isSelectOneElement||Qe||ct!==Le)||Re.selected,Lt=Re.disabled;re._addChoice({value:Y,label:de,isSelected:ht,isDisabled:Lt,customProperties:He,placeholder:tt})}else re._addChoice({value:Y,label:de,isSelected:Re.selected,isDisabled:Re.disabled,customProperties:He,placeholder:tt})})},ne._addPredefinedItems=function(J){var re=this;J.forEach(function(Qe){typeof Qe=="object"&&Qe.value&&re._addItem({value:Qe.value,label:Qe.label,choiceId:Qe.id,customProperties:Qe.customProperties,placeholder:Qe.placeholder}),typeof Qe=="string"&&re._addItem({value:Qe})})},ne._setChoiceOrItem=function(J){var re=this;({object:function(){J.value&&(re._isTextElement?re._addItem({value:J.value,label:J.label,choiceId:J.id,customProperties:J.customProperties,placeholder:J.placeholder}):re._addChoice({value:J.value,label:J.label,isSelected:!0,isDisabled:!1,customProperties:J.customProperties,placeholder:J.placeholder}))},string:function(){re._isTextElement?re._addItem({value:J}):re._addChoice({value:J,label:J,isSelected:!0,isDisabled:!1})}})[H(J).toLowerCase()]()},ne._findAndSelectChoiceByValue=function(J){var re=this,Qe=this._store.choices.find(function(Le){return re.config.valueComparer(Le.value,J)});Qe&&!Qe.selected&&this._addItem({value:Qe.value,label:Qe.label,choiceId:Qe.id,groupId:Qe.groupId,customProperties:Qe.customProperties,placeholder:Qe.placeholder,keyCode:Qe.keyCode})},ne._generatePlaceholderValue=function(){if(this._isSelectElement){var J=this.passedElement.placeholderOption;return!!J&&J.text}var re=this.config,Qe=re.placeholder,Le=re.placeholderValue,Re=this.passedElement.element.dataset;if(Qe){if(Le)return Le;if(Re.placeholder)return Re.placeholder}return!1},se}();p.default=P2}]).default},typeof e=="object"&&typeof O=="object"?O.exports=w():typeof define=="function"&&define.amd?define([],w):typeof e=="object"?e.Choices=w():v.Choices=w()},477:function V(Q,O,e,C,R){C(),e.root="bk-root",e.default=".bk-root{}.bk-root .choices{position:relative;margin-bottom:24px;font-size:16px;}.bk-root .choices:focus{outline:none;}.bk-root .choices:last-child{margin-bottom:0;}.bk-root .choices.is-disabled .choices__inner,.bk-root .choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.bk-root .choices.is-disabled .choices__item{cursor:not-allowed;}.bk-root .choices [hidden]{display:none !important;}.bk-root .choices[data-type*='select-one']{cursor:pointer;}.bk-root .choices[data-type*='select-one'] .choices__inner{padding-bottom:7.5px;}.bk-root .choices[data-type*='select-one'] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #dddddd;background-color:#ffffff;margin:0;}.bk-root .choices[data-type*='select-one'] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:0.5;}.bk-root .choices[data-type*='select-one'] .choices__button:hover,.bk-root .choices[data-type*='select-one'] .choices__button:focus{opacity:1;}.bk-root .choices[data-type*='select-one'] .choices__button:focus{box-shadow:0px 0px 0px 2px #00bcd4;}.bk-root .choices[data-type*='select-one'] .choices__item[data-value=''] .choices__button{display:none;}.bk-root .choices[data-type*='select-one']:after{content:'';height:0;width:0;border-style:solid;border-color:#333333 transparent transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none;}.bk-root .choices[data-type*='select-one'].is-open:after{border-color:transparent transparent #333333 transparent;margin-top:-7.5px;}.bk-root .choices[data-type*='select-one'][dir='rtl']:after{left:11.5px;right:auto;}.bk-root .choices[data-type*='select-one'][dir='rtl'] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0;}.bk-root .choices[data-type*='select-multiple'] .choices__inner,.bk-root .choices[data-type*='text'] .choices__inner{cursor:text;}.bk-root .choices[data-type*='select-multiple'] .choices__button,.bk-root .choices[data-type*='text'] .choices__button{position:relative;display:inline-block;margin-top:0;margin-right:-4px;margin-bottom:0;margin-left:8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:0.75;border-radius:0;}.bk-root .choices[data-type*='select-multiple'] .choices__button:hover,.bk-root .choices[data-type*='select-multiple'] .choices__button:focus,.bk-root .choices[data-type*='text'] .choices__button:hover,.bk-root .choices[data-type*='text'] .choices__button:focus{opacity:1;}.bk-root .choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #dddddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden;}.bk-root .is-focused .choices__inner,.bk-root .is-open .choices__inner{border-color:#b7b7b7;}.bk-root .is-open .choices__inner{border-radius:2.5px 2.5px 0 0;}.bk-root .is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px;}.bk-root .choices__list{margin:0;padding-left:0;list-style:none;}.bk-root .choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%;}.bk-root [dir='rtl'] .choices__list--single{padding-right:4px;padding-left:16px;}.bk-root .choices__list--single .choices__item{width:100%;}.bk-root .choices__list--multiple{display:inline;}.bk-root .choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#ffffff;word-break:break-all;box-sizing:border-box;}.bk-root .choices__list--multiple .choices__item[data-deletable]{padding-right:5px;}.bk-root [dir='rtl'] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px;}.bk-root .choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1;}.bk-root .is-disabled .choices__list--multiple .choices__item{background-color:#aaaaaa;border:1px solid #919191;}.bk-root .choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#ffffff;border:1px solid #dddddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility;}.bk-root .choices__list--dropdown.is-active{visibility:visible;}.bk-root .is-open .choices__list--dropdown{border-color:#b7b7b7;}.bk-root .is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:0.25rem 0.25rem 0 0;}.bk-root .choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position;}.bk-root .choices__list--dropdown .choices__item{position:relative;padding:10px;font-size:14px;}.bk-root [dir='rtl'] .choices__list--dropdown .choices__item{text-align:right;}@media (min-width: 640px){.bk-root .choices__list--dropdown .choices__item--selectable{padding-right:100px;}.bk-root .choices__list--dropdown .choices__item--selectable:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%);}.bk-root [dir='rtl'] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px;}.bk-root [dir='rtl'] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px;}}.bk-root .choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#f2f2f2;}.bk-root .choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:0.5;}.bk-root .choices__item{cursor:default;}.bk-root .choices__item--selectable{cursor:pointer;}.bk-root .choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5;}.bk-root .choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray;}.bk-root .choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer;}.bk-root .choices__button:focus{outline:none;}.bk-root .choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px;}.bk-root .choices__input:focus{outline:0;}.bk-root [dir='rtl'] .choices__input{padding-right:2px;padding-left:0;}.bk-root .choices__placeholder{opacity:0.5;}.bk-root .choices{width:100%;}.bk-root .choices{box-sizing:border-box;}.bk-root .choices *,.bk-root .choices *:before,.bk-root .choices *:after{box-sizing:inherit;}.bk-root .choices__inner .choices__item.light{background-color:rgba(0, 126, 255, 0.08);border-radius:5px;border:1px solid rgba(0, 126, 255, 0.24);color:#007eff;}.bk-root .choices__inner .choices__item.solid{background-color:#1f77b4;border:none;border-radius:5px;color:white;}.bk-root .choices__inner .choices__item.solid .is-highlighted{background-color:#1f77b4;border:none;}.bk-root .choices__input{background-color:transparent;}.bk-root .choices__inner{background:transparent;border:1px solid darkgray;border-radius:5px;min-height:unset;}.bk-root .choices__list{white-space:initial;}.bk-root .choices__list--dropdown{z-index:100;}.bk-root .choices[data-type*=select-multiple] .choices__button.light{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDA3ZWZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);}.bk-root .choices[data-type*=select-multiple] .choices__button.solid{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmZmZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);border-left:1px solid white;opacity:1;}"},478:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=(0,v.__importStar)(Q(153)),p=Q(448),T=Q(131),c=Q(43),o=Q(8),r=Q(11),i=(0,v.__importStar)(Q(449)),t=/^[-+]?\d*$/,s=/^[-+]?\d*\.?\d*(?:(?:\d|\d.)[eE][-+]?)*\d*$/;class a extends p.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,()=>{var d;return this.input_el.name=(d=this.model.name)!==null&&d!==void 0?d:""}),this.connect(this.model.properties.value.change,()=>{this.input_el.value=this.format_value,this.old_value=this.input_el.value}),this.connect(this.model.properties.low.change,()=>{const{value:d,low:m,high:f}=this.model;m!=null&&f!=null&&(0,r.assert)(m<=f,"Invalid bounds, low must be inferior to high"),d!=null&&m!=null&&d<m&&(this.model.value=m)}),this.connect(this.model.properties.high.change,()=>{const{value:d,low:m,high:f}=this.model;m!=null&&f!=null&&(0,r.assert)(f>=m,"Invalid bounds, high must be superior to low"),d!=null&&f!=null&&d>f&&(this.model.value=f)}),this.connect(this.model.properties.high.change,()=>this.input_el.placeholder=this.model.placeholder),this.connect(this.model.properties.disabled.change,()=>this.input_el.disabled=this.model.disabled),this.connect(this.model.properties.placeholder.change,()=>this.input_el.placeholder=this.model.placeholder)}get format_value(){return this.model.value!=null?this.model.pretty(this.model.value):""}_set_input_filter(d){this.input_el.addEventListener("input",()=>{const{selectionStart:m,selectionEnd:f}=this.input_el;if(d(this.input_el.value))this.old_value=this.input_el.value;else{const b=this.old_value.length-this.input_el.value.length;this.input_el.value=this.old_value,m&&f&&this.input_el.setSelectionRange(m-1,f+b)}})}render(){super.render(),this.input_el=(0,c.input)({type:"text",class:i.input,name:this.model.name,value:this.format_value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.old_value=this.format_value,this.set_input_filter(),this.input_el.addEventListener("change",()=>this.change_input()),this.input_el.addEventListener("focusout",()=>this.input_el.value=this.format_value),this.group_el.appendChild(this.input_el)}set_input_filter(){this.model.mode=="int"?this._set_input_filter(d=>t.test(d)):this.model.mode=="float"&&this._set_input_filter(d=>s.test(d))}bound_value(d){let m=d;const{low:f,high:b}=this.model;return m=f!=null?Math.max(f,m):m,m=b!=null?Math.min(b,m):m,m}get value(){let d=this.input_el.value!=""?Number(this.input_el.value):null;return d!=null&&(d=this.bound_value(d)),d}change_input(){this.value==null?this.model.value=null:Number.isNaN(this.value)||(this.model.value=this.value)}}e.NumericInputView=a,a.__name__="NumericInputView";class u extends p.InputWidget{constructor(d){super(d)}_formatter(d,m){return(0,o.isString)(m)?g.format(d,m):m.doFormat([d],{loc:0})[0]}pretty(d){return this.format!=null?this._formatter(d,this.format):`${d}`}}e.NumericInput=u,w=u,u.__name__="NumericInput",w.prototype.default_view=a,w.define(({Number:l,String:d,Enum:m,Ref:f,Or:b,Nullable:y})=>({value:[y(l),null],placeholder:[d,""],mode:[m("int","float"),"int"],format:[y(b(d,f(T.TickFormatter))),null],low:[y(l),null],high:[y(l),null]}))},479:function V(Q,O,e,C,R){var v;C();const w=Q(468),g=Q(43);class p extends w.MarkupView{render(){super.render();const o=(0,g.pre)({style:{overflow:"auto"}},this.model.text);this.markup_el.appendChild(o)}}e.PreTextView=p,p.__name__="PreTextView";class T extends w.Markup{constructor(o){super(o)}}e.PreText=T,v=T,T.__name__="PreText",v.prototype.default_view=p},480:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(452),p=Q(43),T=(0,v.__importStar)(Q(318));class c extends g.ButtonGroupView{change_active(i){this.model.active!==i&&(this.model.active=i)}_update_active(){const{active:i}=this.model;this._buttons.forEach((t,s)=>{(0,p.classes)(t).toggle(T.active,i===s)})}}e.RadioButtonGroupView=c,c.__name__="RadioButtonGroupView";class o extends g.ButtonGroup{constructor(i){super(i)}}e.RadioButtonGroup=o,w=o,o.__name__="RadioButtonGroup",w.prototype.default_view=c,w.define(({Int:r,Nullable:i})=>({active:[i(r),null]}))},481:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(43),p=Q(34),T=Q(455),c=(0,v.__importStar)(Q(449));class o extends T.InputGroupView{render(){super.render();const t=(0,g.div)({class:[c.input_group,this.model.inline?c.inline:null]});this.el.appendChild(t);const s=(0,p.uniqueId)(),{active:a,labels:u}=this.model;this._inputs=[];for(let l=0;l<u.length;l++){const d=(0,g.input)({type:"radio",name:s,value:`${l}`});d.addEventListener("change",()=>this.change_active(l)),this._inputs.push(d),this.model.disabled&&(d.disabled=!0),l==a&&(d.checked=!0);const m=(0,g.label)(d,(0,g.span)(u[l]));t.appendChild(m)}}change_active(t){this.model.active=t}}e.RadioGroupView=o,o.__name__="RadioGroupView";class r extends T.InputGroup{constructor(t){super(t)}}e.RadioGroup=r,w=r,r.__name__="RadioGroup",w.prototype.default_view=o,w.define(({Boolean:i,Int:t,String:s,Array:a,Nullable:u})=>({active:[u(t),null],labels:[a(s),[]],inline:[i,!1]}))},482:function V(Q,O,e,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractRangeSliderView{}e.RangeSliderView=T,T.__name__="RangeSliderView";class c extends g.AbstractSlider{constructor(r){super(r),this.behaviour="drag",this.connected=[!1,!0,!1]}_formatter(r,i){return(0,p.isString)(i)?w.format(r,i):i.compute(r)}}e.RangeSlider=c,v=c,c.__name__="RangeSlider",v.prototype.default_view=T,v.override({format:"0[.]00"})},483:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(43),p=Q(8),T=Q(13),c=Q(448),o=(0,v.__importStar)(Q(449));class r extends c.InputWidgetView{constructor(){super(...arguments),this._known_values=new Set}connect_signals(){super.connect_signals();const{value:s,options:a}=this.model.properties;this.on_change(s,()=>{this._update_value()}),this.on_change(a,()=>{(0,g.empty)(this.input_el),(0,g.append)(this.input_el,...this.options_el()),this._update_value()})}options_el(){const{_known_values:s}=this;function a(l){return l.map(d=>{let m,f;return(0,p.isString)(d)?m=f=d:[m,f]=d,s.add(m),(0,g.option)({value:m},f)})}s.clear();const{options:u}=this.model;return(0,p.isArray)(u)?a(u):(0,T.entries)(u).map(([l,d])=>(0,g.optgroup)({label:l},a(d)))}render(){super.render(),this.input_el=(0,g.select)({class:o.input,name:this.model.name,disabled:this.model.disabled},this.options_el()),this._update_value(),this.input_el.addEventListener("change",()=>this.change_input()),this.group_el.appendChild(this.input_el)}change_input(){const s=this.input_el.value;this.model.value=s,super.change_input()}_update_value(){const{value:s}=this.model;this._known_values.has(s)?this.input_el.value=s:this.input_el.removeAttribute("value")}}e.SelectView=r,r.__name__="SelectView";class i extends c.InputWidget{constructor(s){super(s)}}e.Select=i,w=i,i.__name__="Select",w.prototype.default_view=r,w.define(({String:t,Array:s,Tuple:a,Dict:u,Or:l})=>{const d=s(l(t,a(t,t)));return{value:[t,""],options:[l(d,u(d)),[]]}})},484:function V(Q,O,e,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractSliderView{}e.SliderView=T,T.__name__="SliderView";class c extends g.AbstractSlider{constructor(r){super(r),this.behaviour="tap",this.connected=[!0,!1]}_formatter(r,i){return(0,p.isString)(i)?w.format(r,i):i.compute(r)}}e.Slider=c,v=c,c.__name__="Slider",v.prototype.default_view=T,v.override({format:"0[.]00"})},485:function V(Q,O,e,C,R){var v;C();const w=Q(478),g=Q(43),{min:p,max:T,floor:c,abs:o}=Math;function r(s){return c(s)!==s?s.toFixed(16).replace(/0+$/,"").split(".")[1].length:0}class i extends w.NumericInputView{*buttons(){yield this.btn_up_el,yield this.btn_down_el}initialize(){super.initialize(),this._handles={interval:void 0,timeout:void 0},this._interval=200}connect_signals(){super.connect_signals();const a=this.model.properties;this.on_change(a.disabled,()=>{for(const u of this.buttons())(0,g.toggle_attribute)(u,"disabled",this.model.disabled)})}render(){super.render(),this.wrapper_el=(0,g.div)({class:"bk-spin-wrapper"}),this.group_el.replaceChild(this.wrapper_el,this.input_el),this.btn_up_el=(0,g.button)({class:"bk-spin-btn bk-spin-btn-up"}),this.btn_down_el=(0,g.button)({class:"bk-spin-btn bk-spin-btn-down"}),this.wrapper_el.appendChild(this.input_el),this.wrapper_el.appendChild(this.btn_up_el),this.wrapper_el.appendChild(this.btn_down_el);for(const a of this.buttons())(0,g.toggle_attribute)(a,"disabled",this.model.disabled),a.addEventListener("mousedown",u=>this._btn_mouse_down(u)),a.addEventListener("mouseup",()=>this._btn_mouse_up()),a.addEventListener("mouseleave",()=>this._btn_mouse_leave());this.input_el.addEventListener("keydown",a=>this._input_key_down(a)),this.input_el.addEventListener("keyup",()=>this.model.value_throttled=this.model.value),this.input_el.addEventListener("wheel",a=>this._input_mouse_wheel(a)),this.input_el.addEventListener("wheel",function(a,u,l=!1){let d;return function(...m){const f=this,b=l&&d===void 0;d!==void 0&&clearTimeout(d),d=setTimeout(function(){d=void 0,l||a.apply(f,m)},u),b&&a.apply(f,m)}}(()=>{this.model.value_throttled=this.model.value},this.model.wheel_wait,!1))}get precision(){const{low:a,high:u,step:l}=this.model,d=r;return T(d(o(a??0)),d(o(u??0)),d(o(l)))}remove(){this._stop_incrementation(),super.remove()}_start_incrementation(a){clearInterval(this._handles.interval),this._counter=0;const{step:u}=this.model,l=d=>{if(this._counter+=1,this._counter%5==0){const m=Math.floor(this._counter/5);m<10?(clearInterval(this._handles.interval),this._handles.interval=setInterval(()=>l(d),this._interval/(m+1))):m>=10&&m<=13&&(clearInterval(this._handles.interval),this._handles.interval=setInterval(()=>l(2*d),this._interval/10))}this.increment(d)};this._handles.interval=setInterval(()=>l(a*u),this._interval)}_stop_incrementation(){clearTimeout(this._handles.timeout),this._handles.timeout=void 0,clearInterval(this._handles.interval),this._handles.interval=void 0,this.model.value_throttled=this.model.value}_btn_mouse_down(a){a.preventDefault();const u=a.currentTarget===this.btn_up_el?1:-1;this.increment(u*this.model.step),this.input_el.focus(),this._handles.timeout=setTimeout(()=>this._start_incrementation(u),this._interval)}_btn_mouse_up(){this._stop_incrementation()}_btn_mouse_leave(){this._stop_incrementation()}_input_mouse_wheel(a){if(document.activeElement===this.input_el){a.preventDefault();const u=a.deltaY>0?-1:1;this.increment(u*this.model.step)}}_input_key_down(a){switch(a.keyCode){case g.Keys.Up:return a.preventDefault(),this.increment(this.model.step);case g.Keys.Down:return a.preventDefault(),this.increment(-this.model.step);case g.Keys.PageUp:return a.preventDefault(),this.increment(this.model.page_step_multiplier*this.model.step);case g.Keys.PageDown:return a.preventDefault(),this.increment(-this.model.page_step_multiplier*this.model.step)}}adjust_to_precision(a){return this.bound_value(Number(a.toFixed(this.precision)))}increment(a){const{low:u,high:l}=this.model;this.model.value==null?a>0?this.model.value=u??(l!=null?p(0,l):0):a<0&&(this.model.value=l??(u!=null?T(u,0):0)):this.model.value=this.adjust_to_precision(this.model.value+a)}change_input(){super.change_input(),this.model.value_throttled=this.model.value}}e.SpinnerView=i,i.__name__="SpinnerView";class t extends w.NumericInput{constructor(a){super(a)}}e.Spinner=t,v=t,t.__name__="Spinner",v.prototype.default_view=i,v.define(({Number:s,Nullable:a})=>({value_throttled:[a(s),null],step:[s,1],page_step_multiplier:[s,10],wheel_wait:[s,100]})),v.override({mode:"float"})},486:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(447),p=Q(43),T=(0,v.__importStar)(Q(449));class c extends g.TextLikeInputView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.rows.change,()=>this.input_el.rows=this.model.rows),this.connect(this.model.properties.cols.change,()=>this.input_el.cols=this.model.cols)}_render_input(){this.input_el=(0,p.textarea)({class:T.input})}render(){super.render(),this.input_el.cols=this.model.cols,this.input_el.rows=this.model.rows}}e.TextAreaInputView=c,c.__name__="TextAreaInputView";class o extends g.TextLikeInput{constructor(i){super(i)}}e.TextAreaInput=o,w=o,o.__name__="TextAreaInput",w.prototype.default_view=c,w.define(({Int:r})=>({cols:[r,20],rows:[r,2]})),w.override({max_length:500})},487:function V(Q,O,e,C,R){C();const v=Q(1);var w;const g=Q(441),p=Q(43),T=(0,v.__importStar)(Q(318));class c extends g.AbstractButtonView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,()=>this._update_active())}render(){super.render(),this._update_active()}click(){this.model.active=!this.model.active,super.click()}_update_active(){(0,p.classes)(this.button_el).toggle(T.active,this.model.active)}}e.ToggleView=c,c.__name__="ToggleView";class o extends g.AbstractButton{constructor(i){super(i)}}e.Toggle=o,w=o,o.__name__="Toggle",w.prototype.default_view=c,w.define(({Boolean:r})=>({active:[r,!1]})),w.override({label:"Toggle"})}},439,{"models/widgets/main":439,"models/widgets/index":440,"models/widgets/abstract_button":441,"models/widgets/control":442,"models/widgets/widget":512,"models/widgets/abstract_icon":444,"models/widgets/autocomplete_input":445,"models/widgets/text_input":446,"models/widgets/text_like_input":447,"models/widgets/input_widget":448,"styles/widgets/inputs.css":449,"models/widgets/button":450,"models/widgets/checkbox_button_group":451,"models/widgets/button_group":452,"models/widgets/oriented_control":453,"models/widgets/checkbox_group":454,"models/widgets/input_group":455,"models/widgets/color_picker":456,"models/widgets/date_picker":457,"styles/widgets/flatpickr.css":459,"models/widgets/date_range_slider":460,"models/widgets/abstract_slider":461,"styles/widgets/sliders.css":463,"styles/widgets/nouislider.css":464,"models/widgets/date_slider":465,"models/widgets/datetime_range_slider":466,"models/widgets/div":467,"models/widgets/markup":468,"styles/clearfix.css":469,"models/widgets/dropdown":470,"models/widgets/file_input":471,"models/widgets/multiselect":472,"models/widgets/paragraph":473,"models/widgets/password_input":474,"models/widgets/multichoice":475,"styles/widgets/choices.css":477,"models/widgets/numeric_input":478,"models/widgets/pretext":479,"models/widgets/radio_button_group":480,"models/widgets/radio_group":481,"models/widgets/range_slider":482,"models/widgets/selectbox":483,"models/widgets/slider":484,"models/widgets/spinner":485,"models/widgets/textarea_input":486,"models/widgets/toggle":487});function BokehChart({width:V,element:Q,height:O}){const e=`bokeh-chart-${Q.elementId}`,C=reactExports.useCallback(()=>JSON.parse(Q.figure),[Q]),R=reactExports.useCallback(p=>{let T=p.attributes.plot_width,c=p.attributes.plot_height;return O?(T=V,c=O):Q.useContainerWidth&&(T=V),{chartWidth:T,chartHeight:c}},[Q.useContainerWidth,O,V]),v=p=>{for(;p.lastChild;)p.lastChild.remove()},w=p=>{const T=document.getElementById(e),c=p?.doc?.roots?.references?p.doc.roots.references.find(o=>o.type==="Plot"):void 0;if(c){const{chartWidth:o,chartHeight:r}=R(c);o>0&&(c.attributes.plot_width=o),r>0&&(c.attributes.plot_height=r)}T!==null&&(v(T),main.embed.embed_item(p,e))},g=reactExports.useCallback(w,[e,R]);return reactExports.useEffect(()=>{g(C())},[V,O,Q,C,g]),jsx("div",{id:e,className:"stBokehChart","data-testid":"stBokehChart"})}const BokehChart$1=reactExports.memo(BokehChart);export{BokehChart$1 as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as a,r as t,n as i,j as d,G as e,H as c,k as l}from"./index.CAj-7vWz.js";const g=a("iframe",{target:"evfee5y0"})(({theme:o,disableScrolling:r})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}));function n(o){return l(o)||o===""?void 0:o}function f({element:o}){const r=n(o.src),s=i(r)?void 0:n(o.srcdoc);return d(g,{className:"stIFrame","data-testid":"stIFrame",allow:c,disableScrolling:!o.scrolling,src:r,srcDoc:s,scrolling:o.scrolling?"auto":"no",sandbox:e,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const I=t.memo(f);export{I as default};
|