streamlit-nightly 1.42.1.dev20250209__py2.py3-none-any.whl → 1.42.1.dev20250210__py2.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.
Files changed (86) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/static/js/{FileDownload.esm.D9415avj.js → FileDownload.esm.CJC5yID5.js} +1 -1
  3. streamlit/static/static/js/{FileDropzone.Cd515bsy.js → FileDropzone.BxEWox87.js} +1 -1
  4. streamlit/static/static/js/{FormClearHelper.BBpErIGP.js → FormClearHelper.D3S2tctS.js} +1 -1
  5. streamlit/static/static/js/{Hooks.CeSTXIj2.js → Hooks.BwOODKo2.js} +1 -1
  6. streamlit/static/static/js/{InputInstructions.BU5Td5cJ.js → InputInstructions.Cm2uD0mH.js} +1 -1
  7. streamlit/static/static/js/{ProgressBar.J2QhvKtD.js → ProgressBar.BqFWIdp2.js} +2 -2
  8. streamlit/static/static/js/{RenderInPortalIfExists.BbbrvJaa.js → RenderInPortalIfExists.ax0m2H0_.js} +1 -1
  9. streamlit/static/static/js/{Toolbar.D-hUr0RX.js → Toolbar.CRowl_WL.js} +1 -1
  10. streamlit/static/static/js/{base-input.CNkkCv4B.js → base-input.krLFbHyn.js} +4 -4
  11. streamlit/static/static/js/{createSuper.DHhKMTIx.js → createSuper.k6SaTk0j.js} +1 -1
  12. streamlit/static/static/js/{data-grid-overlay-editor.CRylpesE.js → data-grid-overlay-editor.BUaZRQkO.js} +1 -1
  13. streamlit/static/static/js/{downloader.D_08g5mI.js → downloader.CFLXdJg2.js} +1 -1
  14. streamlit/static/static/js/{es6.B-Rq6ajt.js → es6.gxLg_8ha.js} +2 -2
  15. streamlit/static/static/js/{iframeResizer.contentWindow.CFL3MAVr.js → iframeResizer.contentWindow.DkwEeyR9.js} +1 -1
  16. streamlit/static/static/js/{index.JSS70wsq.js → index.B7i1hjL6.js} +2 -2
  17. streamlit/static/static/js/{index.CEj-S3PF.js → index.BAHug0jz.js} +1 -1
  18. streamlit/static/static/js/index.BOCJ0fVC.js +1 -0
  19. streamlit/static/static/js/{index.D9M0iUu5.js → index.BOR0ctru.js} +1 -1
  20. streamlit/static/static/js/{index.-SmXSkUY.js → index.BOVOcQJK.js} +1 -1
  21. streamlit/static/static/js/{index.BlcNB-sY.js → index.BSsjknPR.js} +1 -1
  22. streamlit/static/static/js/index.BaBZULmv.js +1 -0
  23. streamlit/static/static/js/{index.D94jjl7_.js → index.BbOp1EEY.js} +5 -5
  24. streamlit/static/static/js/{index.zzxJWhBg.js → index.BdR17uHT.js} +1 -1
  25. streamlit/static/static/js/{index.CMcCB4vg.js → index.Be3Ud760.js} +1 -1
  26. streamlit/static/static/js/index.BiQ_POiE.js +1 -0
  27. streamlit/static/static/js/{index.9wBA4A4f.js → index.Blgy4CCd.js} +18 -18
  28. streamlit/static/static/js/{index.B2evntzQ.js → index.C-4bC9wo.js} +1 -1
  29. streamlit/static/static/js/{index.C-_AHUSz.js → index.C1ewZGYv.js} +2 -2
  30. streamlit/static/static/js/index.C8CCX_u3.js +1 -0
  31. streamlit/static/static/js/index.CUPb182F.js +1 -0
  32. streamlit/static/static/js/{index.Bw9RDCaH.js → index.CVtSssNQ.js} +1 -1
  33. streamlit/static/static/js/index.C_Vm41WK.js +1 -0
  34. streamlit/static/static/js/index.C_eNMQ0G.js +1 -0
  35. streamlit/static/static/js/index.Cesoqj5i.js +1 -0
  36. streamlit/static/static/js/{index.CuNiy4LB.js → index.Cj8uDDnI.js} +1 -1
  37. streamlit/static/static/js/index.Cksh9dIb.js +1 -0
  38. streamlit/static/static/js/index.CoIye-dC.js +1 -0
  39. streamlit/static/static/js/index.D69WEQtH.js +1 -0
  40. streamlit/static/static/js/{index.BqePTNWb.js → index.D8KPGiS9.js} +2 -2
  41. streamlit/static/static/js/{index.BCYuLMdi.js → index.DEpXqZe9.js} +3 -3
  42. streamlit/static/static/js/index.DJY4JXFf.js +1 -0
  43. streamlit/static/static/js/{index.CEWcZMdD.js → index.DXBI5Jkr.js} +2 -2
  44. streamlit/static/static/js/index.DooQ24w4.js +1 -0
  45. streamlit/static/static/js/{index.DYHaq5Cw.js → index.DrwNQ7G8.js} +6 -6
  46. streamlit/static/static/js/{index.BVbWPXFU.js → index.DxK0b7hW.js} +1 -1
  47. streamlit/static/static/js/{index.B9q8XlSH.js → index.FyfJgAtw.js} +2 -2
  48. streamlit/static/static/js/{index.BevO9CYu.js → index.PzwaVSFN.js} +2 -2
  49. streamlit/static/static/js/index.UW7UEFVt.js +1 -0
  50. streamlit/static/static/js/{index.DwWMkgFE.js → index.cRZuEjlj.js} +1 -1
  51. streamlit/static/static/js/{index.B0xfT3p4.js → index.waVftNUu.js} +2 -2
  52. streamlit/static/static/js/index.xMCeK5i-.js +2 -0
  53. streamlit/static/static/js/{input.Dbc83Str.js → input.RldPkbfl.js} +2 -2
  54. streamlit/static/static/js/{memory.BzHgTb9i.js → memory.CJUkEDwO.js} +1 -1
  55. streamlit/static/static/js/{mergeWith.BCa1_PWb.js → mergeWith.mP6-fMJS.js} +1 -1
  56. streamlit/static/static/js/{number-overlay-editor.CtUWknLp.js → number-overlay-editor.Cexyv1f1.js} +1 -1
  57. streamlit/static/static/js/{possibleConstructorReturn.DGVrr2j8.js → possibleConstructorReturn.Bfw_ecB7.js} +1 -1
  58. streamlit/static/static/js/{sandbox.C20zasAf.js → sandbox.B9QCFfso.js} +1 -1
  59. streamlit/static/static/js/{textarea.BeRVLTOp.js → textarea.BphfZ_P9.js} +2 -2
  60. streamlit/static/static/js/{timepicker.DyU-jgSC.js → timepicker.BGFe-2JD.js} +1 -1
  61. streamlit/static/static/js/{toConsumableArray.D4FxxWIg.js → toConsumableArray.BtjgDmTZ.js} +1 -1
  62. streamlit/static/static/js/{uniqueId.CAAlIP1-.js → uniqueId.BG3aVKeE.js} +1 -1
  63. streamlit/static/static/js/{useBasicWidgetState.C207Y3_O.js → useBasicWidgetState.GQaAM6uH.js} +1 -1
  64. streamlit/static/static/js/{useOnInputChange.CsqRc0X0.js → useOnInputChange.B6mIpebi.js} +1 -1
  65. streamlit/static/static/js/{withFullScreenWrapper.DwHjQb3H.js → withFullScreenWrapper.XgZUnj3Y.js} +1 -1
  66. {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/METADATA +1 -1
  67. {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/RECORD +71 -71
  68. streamlit/static/static/js/index.B-4MHYvl.js +0 -1
  69. streamlit/static/static/js/index.BA5ubsQA.js +0 -1
  70. streamlit/static/static/js/index.BNrZwkh1.js +0 -1
  71. streamlit/static/static/js/index.BpmrfDoR.js +0 -2
  72. streamlit/static/static/js/index.CFtAnwvU.js +0 -1
  73. streamlit/static/static/js/index.CQ_wmqnz.js +0 -1
  74. streamlit/static/static/js/index.CvADzqCD.js +0 -1
  75. streamlit/static/static/js/index.DPs04g4h.js +0 -1
  76. streamlit/static/static/js/index.DWIf4xZP.js +0 -1
  77. streamlit/static/static/js/index.DfCewjMv.js +0 -1
  78. streamlit/static/static/js/index.DgwklVRJ.js +0 -1
  79. streamlit/static/static/js/index.Yr32ts47.js +0 -1
  80. streamlit/static/static/js/index.i2uLxrqv.js +0 -1
  81. streamlit/static/static/js/index.joQNIDux.js +0 -1
  82. streamlit/static/static/js/index.pzjWTi64.js +0 -1
  83. {streamlit_nightly-1.42.1.dev20250209.data → streamlit_nightly-1.42.1.dev20250210.data}/scripts/streamlit.cmd +0 -0
  84. {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/WHEEL +0 -0
  85. {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/entry_points.txt +0 -0
  86. {streamlit_nightly-1.42.1.dev20250209.dist-info → streamlit_nightly-1.42.1.dev20250210.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r as s,y as U,cq as T,z as k,j as l,bs as A,bF as L,bt as P,bc as B,bu as D}from"./index.9wBA4A4f.js";import{u as j}from"./uniqueId.CAAlIP1-.js";import{u as _,a as q,b as K}from"./useOnInputChange.CsqRc0X0.js";import{I as O}from"./InputInstructions.BU5Td5cJ.js";import{a as $}from"./useBasicWidgetState.C207Y3_O.js";import{T as G}from"./textarea.BeRVLTOp.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.BBpErIGP.js";import"./base-input.CNkkCv4B.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=$({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),F=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),V=s.useCallback(()=>{g(!0)},[]),C=q({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=K(t.formId,p,r,o,u,!0),z={width:h},{height:f,placeholder:E,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:z,children:[l(D,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(L,{children:l(P,{content:t.help,placement:B.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:F,onFocus:V,onChange:C,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
1
+ import{r as s,y as U,cp as T,z as k,j as l,br as A,bE as L,bs as P,bb as B,bt as D}from"./index.Blgy4CCd.js";import{u as j}from"./uniqueId.BG3aVKeE.js";import{u as _,a as K,b as O}from"./useOnInputChange.B6mIpebi.js";import{I as $}from"./InputInstructions.Cm2uD0mH.js";import{a as q}from"./useBasicWidgetState.GQaAM6uH.js";import{T as G}from"./textarea.BphfZ_P9.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.D3S2tctS.js";import"./base-input.krLFbHyn.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=q({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),C=s.useCallback(()=>{g(!0)},[]),F=K({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=O(t.formId,p,r,o,u,!0),E={width:h},{height:f,placeholder:z,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:E,children:[l(D,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(L,{children:l(P,{content:t.help,placement:B.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:z,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l($,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
@@ -1,4 +1,4 @@
1
- import{r as reactExports,j as jsx}from"./index.9wBA4A4f.js";/*!
1
+ import{r as reactExports,j as jsx}from"./index.Blgy4CCd.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)}}])&&e(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 e=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 e(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,e){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,a=new RegExp(e.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),e=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,at=0;at<B;at+=1){for(var mt=0,Vt=q;mt<Vt;)i(a,{errors:at,currentLocation:k+Vt,expectedLocation:k,distance:b})<=P?mt=Vt:q=Vt,Vt=Math.floor((q-mt)/2+mt);q=Vt;var Jt=Math.max(1,k-Vt+1),re=x?E:Math.min(k+Vt,E)+B,ye=Array(re+2);ye[re+1]=(1<<at)-1;for(var xe=re;xe>=Jt;xe-=1){var r1=xe-1,e1=u[s.charAt(r1)];if(e1&&(D[r1]=1),ye[xe]=(ye[xe+1]<<1|1)&e1,at!==0&&(ye[xe]|=(W[xe+1]|W[xe])<<1|1|W[xe+1]),ye[xe]&X&&(U=i(a,{errors:at,currentLocation:r1,expectedLocation:k,distance:b}))<=P){if(P=U,(N=r1)<=k)break;Jt=Math.max(1,2*k-N)}}if(i(a,{errors:at+1,currentLocation:k,expectedLocation:k,distance:b})>P)break;W=ye}return{isMatch:N>=0,score:U===0?.001:U,matchedIndices:e(D,S)}}},function(c,o){c.exports=function(r,i){var e=i.errors,s=e===void 0?0:e,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,e=[],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&&e.push([s,a]),s=-1)}return r[u-1]&&u-s>=i&&e.push([s,u-1]),e}},function(c,o){c.exports=function(r){for(var i={},e=r.length,s=0;s<e;s+=1)i[r.charAt(s)]=0;for(var a=0;a<e;a+=1)i[r.charAt(a)]|=1<<e-a-1;return i}},function(c,o,r){var i=r(0);c.exports=function(e,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}(e,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),e=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(ot){if(typeof ot!="object"||ot===null)return!1;for(var K=ot;Object.getPrototypeOf(K)!==null;)K=Object.getPrototypeOf(K);return Object.getPrototypeOf(ot)===K}function l(ot,K,ut){var st;if(typeof K=="function"&&typeof ut=="function"||typeof ut=="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"&&ut===void 0&&(ut=K,K=void 0),ut!==void 0){if(typeof ut!="function")throw new Error("Expected the enhancer to be a function.");return ut(l)(ot,K)}if(typeof ot!="function")throw new Error("Expected the reducer to be a function.");var nt=ot,J=K,rt=[],Qt=rt,Lt=!1;function Rt(){Qt===rt&&(Qt=rt.slice())}function ce(){if(Lt)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(he){if(typeof he!="function")throw new Error("Expected the listener to be a function.");if(Lt)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 Le=!0;return Rt(),Qt.push(he),function(){if(Le){if(Lt)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.");Le=!1,Rt();var t1=Qt.indexOf(he);Qt.splice(t1,1)}}}function dt(he){if(!u(he))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(he.type===void 0)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(Lt)throw new Error("Reducers may not dispatch actions.");try{Lt=!0,J=nt(J,he)}finally{Lt=!1}for(var Le=rt=Qt,t1=0;t1<Le.length;t1++)(0,Le[t1])();return he}function Ht(he){if(typeof he!="function")throw new Error("Expected the nextReducer to be a function.");nt=he,dt({type:a.REPLACE})}function ee(){var he,Le=Y;return(he={subscribe:function(t1){if(typeof t1!="object"||t1===null)throw new TypeError("Expected the observer to be an object.");function m1(){t1.next&&t1.next(ce())}return m1(),{unsubscribe:Le(m1)}}})[e.a]=function(){return this},he}return dt({type:a.INIT}),(st={dispatch:dt,subscribe:Y,getState:ce,replaceReducer:Ht})[e.a]=ee,st}function d(ot,K){var ut=K&&K.type;return"Given "+(ut&&'action "'+String(ut)+'"'||"an action")+', reducer "'+ot+'" 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(ot,K){return ot===void 0&&(ot=A),K.type==="SET_IS_LOADING"?{loading:K.isLoading}:ot},x=function(ot){return Array.from({length:ot},function(){return(K=0,ut=36,Math.floor(Math.random()*(ut-K)+K)).toString(36);var K,ut}).join("")},H=function(ot){return Object.prototype.toString.call(ot).slice(8,-1)},S=function(ot,K){return K!=null&&H(K)===ot},k=function(ot){return typeof ot!="string"?ot:ot.replace(/&/g,"&amp;").replace(/>/g,"&rt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},E=(m=document.createElement("div"),function(ot){var K=ot.trim();m.innerHTML=K;for(var ut=m.children[0];m.firstChild;)m.removeChild(m.firstChild);return ut}),P=function(ot,K){return ot.score-K.score},N=function(ot){return JSON.parse(JSON.stringify(ot))},B=function(ot){for(var K=Object.keys(ot),ut={},st=0;st<K.length;st++){var nt=K[st];typeof ot[nt]=="function"&&(ut[nt]=ot[nt])}var J,rt=Object.keys(ut);try{(function(Qt){Object.keys(Qt).forEach(function(Lt){var Rt=Qt[Lt];if(Rt(void 0,{type:a.INIT})===void 0)throw new Error('Reducer "'+Lt+`" 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(Rt(void 0,{type:a.PROBE_UNKNOWN_ACTION()})===void 0)throw new Error('Reducer "'+Lt+`" 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.')})})(ut)}catch(Qt){J=Qt}return function(Qt,Lt){if(Qt===void 0&&(Qt={}),J)throw J;for(var Rt=!1,ce={},Y=0;Y<rt.length;Y++){var dt=rt[Y],Ht=ut[dt],ee=Qt[dt],he=Ht(ee,Lt);if(he===void 0){var Le=d(dt,Lt);throw new Error(Le)}ce[dt]=he,Rt=Rt||he!==ee}return Rt?ce:Qt}}({items:function(ot,K){switch(ot===void 0&&(ot=f),K.type){case"ADD_ITEM":return[].concat(ot,[{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(ut){var st=ut;return st.highlighted=!1,st});case"REMOVE_ITEM":return ot.map(function(ut){var st=ut;return st.id===K.id&&(st.active=!1),st});case"HIGHLIGHT_ITEM":return ot.map(function(ut){var st=ut;return st.id===K.id&&(st.highlighted=K.highlighted),st});default:return ot}},groups:function(ot,K){switch(ot===void 0&&(ot=b),K.type){case"ADD_GROUP":return[].concat(ot,[{id:K.id,value:K.value,active:K.active,disabled:K.disabled}]);case"CLEAR_CHOICES":return[];default:return ot}},choices:function(ot,K){switch(ot===void 0&&(ot=y),K.type){case"ADD_CHOICE":return[].concat(ot,[{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?ot.map(function(ut){var st=ut;return st.active=K.active,st}):K.choiceId>-1?ot.map(function(ut){var st=ut;return st.id===parseInt(K.choiceId,10)&&(st.selected=!0),st}):ot;case"REMOVE_ITEM":return K.choiceId>-1?ot.map(function(ut){var st=ut;return st.id===parseInt(K.choiceId,10)&&(st.selected=!1),st}):ot;case"FILTER_CHOICES":return ot.map(function(ut){var st=ut;return st.active=K.results.some(function(nt){var J=nt.item,rt=nt.score;return J.id===st.id&&(st.score=rt,!0)}),st});case"ACTIVATE_CHOICES":return ot.map(function(ut){var st=ut;return st.active=K.active,st});case"CLEAR_CHOICES":return y;default:return ot}},general:L}),D=function(ot,K){var ut=ot;if(K.type==="CLEAR_ALL")ut=void 0;else if(K.type==="RESET_TO")return N(K.state);return B(ut,K)};function j(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var M=function(){function ot(){this._store=l(D,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}var K,ut,st=ot.prototype;return st.subscribe=function(nt){this._store.subscribe(nt)},st.dispatch=function(nt){this._store.dispatch(nt)},st.isLoading=function(){return this.state.general.loading},st.getChoiceById=function(nt){return this.activeChoices.find(function(J){return J.id===parseInt(nt,10)})},st.getGroupById=function(nt){return this.groups.find(function(J){return J.id===nt})},K=ot,ut=[{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(nt){return nt.active===!0})}},{key:"highlightedActiveItems",get:function(){return this.items.filter(function(nt){return nt.active&&nt.highlighted})}},{key:"choices",get:function(){return this.state.choices}},{key:"activeChoices",get:function(){return this.choices.filter(function(nt){return nt.active===!0})}},{key:"selectableChoices",get:function(){return this.choices.filter(function(nt){return nt.disabled!==!0})}},{key:"searchableChoices",get:function(){return this.selectableChoices.filter(function(nt){return nt.placeholder!==!0})}},{key:"placeholderChoice",get:function(){return[].concat(this.choices).reverse().find(function(nt){return nt.placeholder===!0})}},{key:"groups",get:function(){return this.state.groups}},{key:"activeGroups",get:function(){var nt=this.groups,J=this.choices;return nt.filter(function(rt){var Qt=rt.active===!0&&rt.disabled===!1,Lt=J.some(function(Rt){return Rt.active===!0&&Rt.disabled===!1});return Qt&&Lt},[])}}],ut&&j(K.prototype,ut),ot}();function F(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var W=function(){function ot(nt){var J=nt.element,rt=nt.type,Qt=nt.classNames;this.element=J,this.classNames=Qt,this.type=rt,this.isActive=!1}var K,ut,st=ot.prototype;return st.getChild=function(nt){return this.element.querySelector(nt)},st.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},st.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},K=ot,(ut=[{key:"distanceFromTopWindow",get:function(){return this.element.getBoundingClientRect().bottom}}])&&F(K.prototype,ut),ot}(),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(ot,K){var ut=ot.value,st=ot.label,nt=st===void 0?ut:st,J=K.value,rt=K.label,Qt=rt===void 0?J:rt;return nt.localeCompare(Qt,[],{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(ot){return'Press Enter to add <b>"'+k(ot)+'"</b>'},maxItemText:function(ot){return"Only "+ot+" values can be added"},valueComparer:function(ot,K){return ot===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",at="change",mt="choice",Vt="search",Jt="addItem",re="removeItem",ye="highlightItem",xe="highlightChoice",r1="ADD_CHOICE",e1="FILTER_CHOICES",Be="ACTIVATE_CHOICES",Ke="CLEAR_CHOICES",we="ADD_GROUP",Re="ADD_ITEM",He="REMOVE_ITEM",de="HIGHLIGHT_ITEM",We=46,je=8,a1=13,yt=65,it=27,ne=38,Se=40,me=33,Pe=34,Xe="text",u1="select-one",v1="select-multiple",h1=function(){function ot(ut){var st=ut.element,nt=ut.type,J=ut.classNames,rt=ut.position;this.element=st,this.classNames=J,this.type=nt,this.position=rt,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=ot.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(ut){if(typeof ut!="number")return!1;var st=!1;return this.position==="auto"?st=!window.matchMedia("(min-height: "+(ut+1)+"px)").matches:this.position==="top"&&(st=!0),st},K.setActiveDescendant=function(ut){this.element.setAttribute("aria-activedescendant",ut)},K.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},K.open=function(ut){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(ut)&&(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(ut){(function(st,nt){nt===void 0&&(nt=document.createElement("div")),st.nextSibling?st.parentNode.insertBefore(nt,st.nextSibling):st.parentNode.appendChild(nt),nt.appendChild(st)})(ut,this.element)},K.unwrap=function(ut){this.element.parentNode.insertBefore(ut,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},ot}();function Dt(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Zt=function(){function ot(nt){var J=nt.element,rt=nt.type,Qt=nt.classNames,Lt=nt.preventPaste;this.element=J,this.type=rt,this.classNames=Qt,this.preventPaste=Lt,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,ut,st=ot.prototype;return st.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})},st.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})},st.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},st.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},st.focus=function(){this.isFocussed||this.element.focus()},st.blur=function(){this.isFocussed&&this.element.blur()},st.clear=function(nt){return nt===void 0&&(nt=!0),this.element.value&&(this.element.value=""),nt&&this.setWidth(),this},st.setWidth=function(){var nt=this.element,J=nt.style,rt=nt.value,Qt=nt.placeholder;J.minWidth=Qt.length+1+"ch",J.width=rt.length+1+"ch"},st.setActiveDescendant=function(nt){this.element.setAttribute("aria-activedescendant",nt)},st.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},st._onInput=function(){this.type!==u1&&this.setWidth()},st._onPaste=function(nt){this.preventPaste&&nt.preventDefault()},st._onFocus=function(){this.isFocussed=!0},st._onBlur=function(){this.isFocussed=!1},K=ot,(ut=[{key:"placeholder",set:function(nt){this.element.placeholder=nt}},{key:"value",get:function(){return k(this.element.value)},set:function(nt){this.element.value=nt}}])&&Dt(K.prototype,ut),ot}(),$t=function(){function ot(ut){var st=ut.element;this.element=st,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}var K=ot.prototype;return K.clear=function(){this.element.innerHTML=""},K.append=function(ut){this.element.appendChild(ut)},K.getChild=function(ut){return this.element.querySelector(ut)},K.hasChildren=function(){return this.element.hasChildNodes()},K.scrollToTop=function(){this.element.scrollTop=0},K.scrollToChildElement=function(ut,st){var nt=this;if(ut){var J=this.element.offsetHeight,rt=this.element.scrollTop+J,Qt=ut.offsetHeight,Lt=ut.offsetTop+Qt,Rt=st>0?this.element.scrollTop+Lt-rt:ut.offsetTop;requestAnimationFrame(function(){nt._animateScroll(Rt,st)})}},K._scrollDown=function(ut,st,nt){var J=(nt-ut)/st,rt=J>1?J:1;this.element.scrollTop=ut+rt},K._scrollUp=function(ut,st,nt){var J=(ut-nt)/st,rt=J>1?J:1;this.element.scrollTop=ut-rt},K._animateScroll=function(ut,st){var nt=this,J=this.element.scrollTop,rt=!1;st>0?(this._scrollDown(J,4,ut),J<ut&&(rt=!0)):(this._scrollUp(J,4,ut),J>ut&&(rt=!0)),rt&&requestAnimationFrame(function(){nt._animateScroll(ut,st)})},ot}();function Qe(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Ie=function(){function ot(nt){var J=nt.element,rt=nt.classNames;if(this.element=J,this.classNames=rt,!(J instanceof HTMLInputElement||J instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}var K,ut,st=ot.prototype;return st.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var nt=this.element.getAttribute("style");nt&&this.element.setAttribute("data-choice-orig-style",nt),this.element.setAttribute("data-choice","active")},st.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var nt=this.element.getAttribute("data-choice-orig-style");nt?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",nt)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},st.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},st.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},st.triggerEvent=function(nt,J){(function(rt,Qt,Lt){Lt===void 0&&(Lt=null);var Rt=new CustomEvent(Qt,{detail:Lt,bubbles:!0,cancelable:!0});rt.dispatchEvent(Rt)})(this.element,nt,J)},K=ot,(ut=[{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(nt){this.element.value=nt}}])&&Qe(K.prototype,ut),ot}();function Ue(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Ze=function(ot){var K,ut,st,nt;function J(rt){var Qt,Lt=rt.element,Rt=rt.classNames,ce=rt.delimiter;return(Qt=ot.call(this,{element:Lt,classNames:Rt})||this).delimiter=ce,Qt}return ut=ot,(K=J).prototype=Object.create(ut.prototype),K.prototype.constructor=K,K.__proto__=ut,st=J,(nt=[{key:"value",get:function(){return this.element.value},set:function(rt){var Qt=rt.map(function(Lt){return Lt.value}).join(this.delimiter);this.element.setAttribute("value",Qt),this.element.value=Qt}}])&&Ue(st.prototype,nt),J}(Ie);function b1(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var k1=function(ot){var K,ut,st,nt;function J(rt){var Qt,Lt=rt.element,Rt=rt.classNames,ce=rt.template;return(Qt=ot.call(this,{element:Lt,classNames:Rt})||this).template=ce,Qt}return ut=ot,(K=J).prototype=Object.create(ut.prototype),K.prototype.constructor=K,K.__proto__=ut,J.prototype.appendDocFragment=function(rt){this.element.innerHTML="",this.element.appendChild(rt)},st=J,(nt=[{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(rt){var Qt=this,Lt=document.createDocumentFragment();rt.forEach(function(Rt){return ce=Rt,Y=Qt.template(ce),void Lt.appendChild(Y);var ce,Y}),this.appendDocFragment(Lt)}}])&&b1(st.prototype,nt),J}(Ie),A1={containerOuter:function(ot,K,ut,st,nt,J){var rt=ot.containerOuter,Qt=Object.assign(document.createElement("div"),{className:rt});return Qt.dataset.type=J,K&&(Qt.dir=K),st&&(Qt.tabIndex=0),ut&&(Qt.setAttribute("role",nt?"combobox":"listbox"),nt&&Qt.setAttribute("aria-autocomplete","list")),Qt.setAttribute("aria-haspopup","true"),Qt.setAttribute("aria-expanded","false"),Qt},containerInner:function(ot){var K=ot.containerInner;return Object.assign(document.createElement("div"),{className:K})},itemList:function(ot,K){var ut=ot.list,st=ot.listSingle,nt=ot.listItems;return Object.assign(document.createElement("div"),{className:ut+" "+(K?st:nt)})},placeholder:function(ot,K){var ut=ot.placeholder;return Object.assign(document.createElement("div"),{className:ut,innerHTML:K})},item:function(ot,K,ut){var st=ot.item,nt=ot.button,J=ot.highlightedState,rt=ot.itemSelectable,Qt=ot.placeholder,Lt=K.id,Rt=K.value,ce=K.label,Y=K.customProperties,dt=K.active,Ht=K.disabled,ee=K.highlighted,he=K.placeholder,Le=Object.assign(document.createElement("div"),{className:st,innerHTML:ce});if(Object.assign(Le.dataset,{item:"",id:Lt,value:Rt,customProperties:Y}),dt&&Le.setAttribute("aria-selected","true"),Ht&&Le.setAttribute("aria-disabled","true"),he&&Le.classList.add(Qt),Le.classList.add(ee?J:rt),ut){Ht&&Le.classList.remove(rt),Le.dataset.deletable="";var t1="Remove item",m1=Object.assign(document.createElement("button"),{type:"button",className:nt,innerHTML:t1});m1.setAttribute("aria-label","Remove item: '"+Rt+"'"),m1.dataset.button="",Le.appendChild(m1)}return Le},choiceList:function(ot,K){var ut=ot.list,st=Object.assign(document.createElement("div"),{className:ut});return K||st.setAttribute("aria-multiselectable","true"),st.setAttribute("role","listbox"),st},choiceGroup:function(ot,K){var ut=ot.group,st=ot.groupHeading,nt=ot.itemDisabled,J=K.id,rt=K.value,Qt=K.disabled,Lt=Object.assign(document.createElement("div"),{className:ut+" "+(Qt?nt:"")});return Lt.setAttribute("role","group"),Object.assign(Lt.dataset,{group:"",id:J,value:rt}),Qt&&Lt.setAttribute("aria-disabled","true"),Lt.appendChild(Object.assign(document.createElement("div"),{className:st,innerHTML:rt})),Lt},choice:function(ot,K,ut){var st=ot.item,nt=ot.itemChoice,J=ot.itemSelectable,rt=ot.selectedState,Qt=ot.itemDisabled,Lt=ot.placeholder,Rt=K.id,ce=K.value,Y=K.label,dt=K.groupId,Ht=K.elementId,ee=K.disabled,he=K.selected,Le=K.placeholder,t1=Object.assign(document.createElement("div"),{id:Ht,innerHTML:Y,className:st+" "+nt});return he&&t1.classList.add(rt),Le&&t1.classList.add(Lt),t1.setAttribute("role",dt>0?"treeitem":"option"),Object.assign(t1.dataset,{choice:"",id:Rt,value:ce,selectText:ut}),ee?(t1.classList.add(Qt),t1.dataset.choiceDisabled="",t1.setAttribute("aria-disabled","true")):(t1.classList.add(J),t1.dataset.choiceSelectable=""),t1},input:function(ot,K){var ut=ot.input,st=ot.inputCloned,nt=Object.assign(document.createElement("input"),{type:"text",className:ut+" "+st,autocomplete:"off",autocapitalize:"off",spellcheck:!1});return nt.setAttribute("role","textbox"),nt.setAttribute("aria-autocomplete","list"),nt.setAttribute("aria-label",K),nt},dropdown:function(ot){var K=ot.list,ut=ot.listDropdown,st=document.createElement("div");return st.classList.add(K,ut),st.setAttribute("aria-expanded","false"),st},notice:function(ot,K,ut){var st=ot.item,nt=ot.itemChoice,J=ot.noResults,rt=ot.noChoices;ut===void 0&&(ut="");var Qt=[st,nt];return ut==="no-choices"?Qt.push(rt):ut==="no-results"&&Qt.push(J),Object.assign(document.createElement("div"),{innerHTML:K,className:Qt.join(" ")})},option:function(ot){var K=ot.label,ut=ot.value,st=ot.customProperties,nt=ot.active,J=ot.disabled,rt=new Option(K,ut,!1,nt);return st&&(rt.dataset.customProperties=st),rt.disabled=J,rt}},W1=function(ot){return{type:Be,active:ot}},S1=function(ot,K){return{type:de,id:ot,highlighted:K}},Z1=function(ot){var K=ot.value,ut=ot.id,st=ot.active,nt=ot.disabled;return{type:we,value:K,id:ut,active:st,disabled:nt}},o2=function(ot){return{type:"SET_IS_LOADING",isLoading:ot}};function d2(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Q2="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,w2={},P2=function(){var ot,K,ut;function st(J,rt){var Qt=this;J===void 0&&(J="[data-choice]"),rt===void 0&&(rt={}),this.config=i.a.all([U,st.defaults.options,rt],{arrayMerge:function(Le,t1){return[].concat(t1)}});var Lt,Rt,ce,Y,dt=(Lt=this.config,Rt=U,ce=Object.keys(Lt).sort(),Y=Object.keys(Rt).sort(),ce.filter(function(Le){return Y.indexOf(Le)<0}));dt.length&&console.warn("Unknown config option(s) passed",dt.join(", "));var Ht=typeof J=="string"?document.querySelector(J):J;if(!(Ht instanceof HTMLInputElement||Ht instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement=Ht.type===Xe,this._isSelectOneElement=Ht.type===u1,this._isSelectMultipleElement=Ht.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"),rt.addItemFilter&&typeof rt.addItemFilter!="function"){var ee=rt.addItemFilter instanceof RegExp?rt.addItemFilter:new RegExp(rt.addItemFilter);this.config.addItemFilter=ee.test.bind(ee)}if(this._isTextElement?this.passedElement=new Ze({element:Ht,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new k1({element:Ht,classNames:this.config.classNames,template:function(Le){return Qt._templates.option(Le)}}),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(Le,t1){var m1=Le.id||Le.name&&Le.name+"-"+x(2)||x(4);return t1+"-"+m1.replace(/(:|\.|\[|\]|,)/g,"")}(this.passedElement.element,"choices-"),this._direction=this.passedElement.dir,!this._direction){var he=window.getComputedStyle(this.passedElement.element).direction;he!==window.getComputedStyle(document.documentElement).direction&&(this._direction=he)}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(Le){Qt._presetChoices.push({value:Le.value,label:Le.innerHTML,selected:Le.selected,disabled:Le.disabled||Le.parentNode.disabled,placeholder:Le.value===""||Le.hasAttribute("placeholder"),customProperties:Le.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()}ot=st,ut=[{key:"defaults",get:function(){return Object.preventExtensions({get options(){return w2},get templates(){return A1}})}}],(K=null)&&d2(ot.prototype,K),ut&&d2(ot,ut);var nt=st.prototype;return nt.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)}},nt.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)},nt.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},nt.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},nt.highlightItem=function(J,rt){if(rt===void 0&&(rt=!0),!J)return this;var Qt=J.id,Lt=J.groupId,Rt=Lt===void 0?-1:Lt,ce=J.value,Y=ce===void 0?"":ce,dt=J.label,Ht=dt===void 0?"":dt,ee=Rt>=0?this._store.getGroupById(Rt):null;return this._store.dispatch(S1(Qt,!0)),rt&&this.passedElement.triggerEvent(ye,{id:Qt,value:Y,label:Ht,groupValue:ee&&ee.value?ee.value:null}),this},nt.unhighlightItem=function(J){if(!J)return this;var rt=J.id,Qt=J.groupId,Lt=Qt===void 0?-1:Qt,Rt=J.value,ce=Rt===void 0?"":Rt,Y=J.label,dt=Y===void 0?"":Y,Ht=Lt>=0?this._store.getGroupById(Lt):null;return this._store.dispatch(S1(rt,!1)),this.passedElement.triggerEvent(ye,{id:rt,value:ce,label:dt,groupValue:Ht&&Ht.value?Ht.value:null}),this},nt.highlightAll=function(){var J=this;return this._store.items.forEach(function(rt){return J.highlightItem(rt)}),this},nt.unhighlightAll=function(){var J=this;return this._store.items.forEach(function(rt){return J.unhighlightItem(rt)}),this},nt.removeActiveItemsByValue=function(J){var rt=this;return this._store.activeItems.filter(function(Qt){return Qt.value===J}).forEach(function(Qt){return rt._removeItem(Qt)}),this},nt.removeActiveItems=function(J){var rt=this;return this._store.activeItems.filter(function(Qt){return Qt.id!==J}).forEach(function(Qt){return rt._removeItem(Qt)}),this},nt.removeHighlightedItems=function(J){var rt=this;return J===void 0&&(J=!1),this._store.highlightedActiveItems.forEach(function(Qt){rt._removeItem(Qt),J&&rt._triggerChange(Qt.value)}),this},nt.showDropdown=function(J){var rt=this;return this.dropdown.isActive||requestAnimationFrame(function(){rt.dropdown.show(),rt.containerOuter.open(rt.dropdown.distanceFromTopWindow),!J&&rt._canSearch&&rt.input.focus(),rt.passedElement.triggerEvent(q,{})}),this},nt.hideDropdown=function(J){var rt=this;return this.dropdown.isActive?(requestAnimationFrame(function(){rt.dropdown.hide(),rt.containerOuter.close(),!J&&rt._canSearch&&(rt.input.removeActiveDescendant(),rt.input.blur()),rt.passedElement.triggerEvent(X,{})}),this):this},nt.getValue=function(J){J===void 0&&(J=!1);var rt=this._store.activeItems.reduce(function(Qt,Lt){var Rt=J?Lt.value:Lt;return Qt.push(Rt),Qt},[]);return this._isSelectOneElement?rt[0]:rt},nt.setValue=function(J){var rt=this;return this.initialised?(J.forEach(function(Qt){return rt._setChoiceOrItem(Qt)}),this):this},nt.setChoiceByValue=function(J){var rt=this;return!this.initialised||this._isTextElement||(Array.isArray(J)?J:[J]).forEach(function(Qt){return rt._findAndSelectChoiceByValue(Qt)}),this},nt.setChoices=function(J,rt,Qt,Lt){var Rt=this;if(J===void 0&&(J=[]),rt===void 0&&(rt="value"),Qt===void 0&&(Qt="label"),Lt===void 0&&(Lt=!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 rt!="string"||!rt)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(Lt&&this.clearChoices(),typeof J=="function"){var ce=J(this);if(typeof Promise=="function"&&ce instanceof Promise)return new Promise(function(Y){return requestAnimationFrame(Y)}).then(function(){return Rt._handleLoadingState(!0)}).then(function(){return ce}).then(function(Y){return Rt.setChoices(Y,rt,Qt,Lt)}).catch(function(Y){Rt.config.silent||console.error(Y)}).then(function(){return Rt._handleLoadingState(!1)}).then(function(){return Rt});if(!Array.isArray(ce))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: "+typeof ce);return this.setChoices(ce,rt,Qt,!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?Rt._addGroup({id:parseInt(Y.id,10)||null,group:Y,valueKey:rt,labelKey:Qt}):Rt._addChoice({value:Y[rt],label:Y[Qt],isSelected:Y.selected,isDisabled:Y.disabled,customProperties:Y.customProperties,placeholder:Y.placeholder})}),this._stopLoading(),this},nt.clearChoices=function(){return this._store.dispatch({type:Ke}),this},nt.clearStore=function(){return this._store.dispatch({type:"CLEAR_ALL"}),this},nt.clearInput=function(){var J=!this._isSelectOneElement;return this.input.clear(J),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(W1(!0))),this},nt._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,rt=this._isSelectElement,Qt=this._currentState.items!==this._prevState.items;J&&(rt&&this._renderChoices(),Qt&&this._renderItems(),this._prevState=this._currentState)}},nt._renderChoices=function(){var J=this,rt=this._store,Qt=rt.activeGroups,Lt=rt.activeChoices,Rt=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return J.choiceList.scrollToTop()}),Qt.length>=1&&!this._isSearching){var ce=Lt.filter(function(he){return he.placeholder===!0&&he.groupId===-1});ce.length>=1&&(Rt=this._createChoicesFragment(ce,Rt)),Rt=this._createGroupsFragment(Qt,Lt,Rt)}else Lt.length>=1&&(Rt=this._createChoicesFragment(Lt,Rt));if(Rt.childNodes&&Rt.childNodes.length>0){var Y=this._store.activeItems,dt=this._canAddItem(Y,this.input.value);dt.response?(this.choiceList.append(Rt),this._highlightChoice()):this.choiceList.append(this._getTemplate("notice",dt.notice))}else{var Ht,ee;this._isSearching?(ee=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,Ht=this._getTemplate("notice",ee,"no-results")):(ee=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,Ht=this._getTemplate("notice",ee,"no-choices")),this.choiceList.append(Ht)}},nt._renderItems=function(){var J=this._store.activeItems||[];this.itemList.clear();var rt=this._createItemsFragment(J);rt.childNodes&&this.itemList.append(rt)},nt._createGroupsFragment=function(J,rt,Qt){var Lt=this;return Qt===void 0&&(Qt=document.createDocumentFragment()),this.config.shouldSort&&J.sort(this.config.sorter),J.forEach(function(Rt){var ce=function(dt){return rt.filter(function(Ht){return Lt._isSelectOneElement?Ht.groupId===dt.id:Ht.groupId===dt.id&&(Lt.config.renderSelectedChoices==="always"||!Ht.selected)})}(Rt);if(ce.length>=1){var Y=Lt._getTemplate("choiceGroup",Rt);Qt.appendChild(Y),Lt._createChoicesFragment(ce,Qt,!0)}}),Qt},nt._createChoicesFragment=function(J,rt,Qt){var Lt=this;rt===void 0&&(rt=document.createDocumentFragment()),Qt===void 0&&(Qt=!1);var Rt=this.config,ce=Rt.renderSelectedChoices,Y=Rt.searchResultLimit,dt=Rt.renderChoiceLimit,Ht=this._isSearching?P:this.config.sorter,ee=function(D1){if(ce!=="auto"||Lt._isSelectOneElement||!D1.selected){var U1=Lt._getTemplate("choice",D1,Lt.config.itemSelectText);rt.appendChild(U1)}},he=J;ce!=="auto"||this._isSelectOneElement||(he=J.filter(function(D1){return!D1.selected}));var Le=he.reduce(function(D1,U1){return U1.placeholder?D1.placeholderChoices.push(U1):D1.normalChoices.push(U1),D1},{placeholderChoices:[],normalChoices:[]}),t1=Le.placeholderChoices,m1=Le.normalChoices;(this.config.shouldSort||this._isSearching)&&m1.sort(Ht);var n1=he.length,E1=this._isSelectOneElement?[].concat(t1,m1):m1;this._isSearching?n1=Y:dt&&dt>0&&!Qt&&(n1=dt);for(var K1=0;K1<n1;K1+=1)E1[K1]&&ee(E1[K1]);return rt},nt._createItemsFragment=function(J,rt){var Qt=this;rt===void 0&&(rt=document.createDocumentFragment());var Lt=this.config,Rt=Lt.shouldSortItems,ce=Lt.sorter,Y=Lt.removeItemButton;return Rt&&!this._isSelectOneElement&&J.sort(ce),this._isTextElement?this.passedElement.value=J:this.passedElement.options=J,J.forEach(function(dt){var Ht=Qt._getTemplate("item",dt,Y);rt.appendChild(Ht)}),rt},nt._triggerChange=function(J){J!=null&&this.passedElement.triggerEvent(at,{value:J})},nt._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))},nt._handleButtonAction=function(J,rt){if(J&&rt&&this.config.removeItems&&this.config.removeItemButton){var Qt=rt.parentNode.getAttribute("data-id"),Lt=J.find(function(Rt){return Rt.id===parseInt(Qt,10)});this._removeItem(Lt),this._triggerChange(Lt.value),this._isSelectOneElement&&this._selectPlaceholderChoice()}},nt._handleItemAction=function(J,rt,Qt){var Lt=this;if(Qt===void 0&&(Qt=!1),J&&rt&&this.config.removeItems&&!this._isSelectOneElement){var Rt=rt.getAttribute("data-id");J.forEach(function(ce){ce.id!==parseInt(Rt,10)||ce.highlighted?!Qt&&ce.highlighted&&Lt.unhighlightItem(ce):Lt.highlightItem(ce)}),this.input.focus()}},nt._handleChoiceAction=function(J,rt){if(J&&rt){var Qt=rt.dataset.id,Lt=this._store.getChoiceById(Qt);if(Lt){var Rt=J[0]&&J[0].keyCode?J[0].keyCode:null,ce=this.dropdown.isActive;Lt.keyCode=Rt,this.passedElement.triggerEvent(mt,{choice:Lt}),Lt.selected||Lt.disabled||this._canAddItem(J,Lt.value).response&&(this._addItem({value:Lt.value,label:Lt.label,choiceId:Lt.id,groupId:Lt.groupId,customProperties:Lt.customProperties,placeholder:Lt.placeholder,keyCode:Lt.keyCode}),this._triggerChange(Lt.value)),this.clearInput(),ce&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},nt._handleBackspace=function(J){if(this.config.removeItems&&J){var rt=J[J.length-1],Qt=J.some(function(Lt){return Lt.highlighted});this.config.editItems&&!Qt&&rt?(this.input.value=rt.value,this.input.setWidth(),this._removeItem(rt),this._triggerChange(rt.value)):(Qt||this.highlightItem(rt,!1),this.removeHighlightedItems(!0))}},nt._startLoading=function(){this._store.dispatch(o2(!0))},nt._stopLoading=function(){this._store.dispatch(o2(!1))},nt._handleLoadingState=function(J){J===void 0&&(J=!0);var rt=this.itemList.getChild("."+this.config.classNames.placeholder);J?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?rt?rt.innerHTML=this.config.loadingText:(rt=this._getTemplate("placeholder",this.config.loadingText),this.itemList.append(rt)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?rt.innerHTML=this._placeholderValue||"":this.input.placeholder=this._placeholderValue||"")},nt._handleSearch=function(J){if(J&&this.input.isFocussed){var rt=this._store.choices,Qt=this.config,Lt=Qt.searchFloor,Rt=Qt.searchChoices,ce=rt.some(function(dt){return!dt.active});if(J&&J.length>=Lt){var Y=Rt?this._searchChoices(J):0;this.passedElement.triggerEvent(Vt,{value:J,resultCount:Y})}else ce&&(this._isSearching=!1,this._store.dispatch(W1(!0)))}},nt._canAddItem=function(J,rt){var Qt=!0,Lt=typeof this.config.addItemText=="function"?this.config.addItemText(rt):this.config.addItemText;if(!this._isSelectOneElement){var Rt=function(ce,Y,dt){return dt===void 0&&(dt="value"),ce.some(function(Ht){return typeof Y=="string"?Ht[dt]===Y.trim():Ht[dt]===Y})}(J,rt);this.config.maxItemCount>0&&this.config.maxItemCount<=J.length&&(Qt=!1,Lt=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&Rt&&Qt&&(Qt=!1,Lt=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(rt):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&Qt&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(rt)&&(Qt=!1,Lt=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(rt):this.config.customAddItemText)}return{response:Qt,notice:Lt}},nt._searchChoices=function(J){var rt=typeof J=="string"?J.trim():J,Qt=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(rt.length<1&&rt===Qt+" ")return 0;var Lt=this._store.searchableChoices,Rt=rt,ce=[].concat(this.config.searchFields),Y=Object.assign(this.config.fuseOptions,{keys:ce}),dt=new o.a(Lt,Y).search(Rt);return this._currentValue=rt,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(function(Ht){return{type:e1,results:Ht}}(dt)),dt.length},nt._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()},nt._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()},nt._onKeyDown=function(J){var rt,Qt=J.target,Lt=J.keyCode,Rt=J.ctrlKey,ce=J.metaKey,Y=this._store.activeItems,dt=this.input.isFocussed,Ht=this.dropdown.isActive,ee=this.itemList.hasChildren(),he=String.fromCharCode(Lt),Le=We,t1=je,m1=a1,n1=yt,E1=it,K1=ne,D1=Se,U1=me,e2=Pe,R1=Rt||ce;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(he)&&this.showDropdown();var y2=((rt={})[n1]=this._onAKey,rt[m1]=this._onEnterKey,rt[E1]=this._onEscapeKey,rt[K1]=this._onDirectionKey,rt[U1]=this._onDirectionKey,rt[D1]=this._onDirectionKey,rt[e2]=this._onDirectionKey,rt[t1]=this._onDeleteKey,rt[Le]=this._onDeleteKey,rt);y2[Lt]&&y2[Lt]({event:J,target:Qt,keyCode:Lt,metaKey:ce,activeItems:Y,hasFocusedInput:dt,hasActiveDropdown:Ht,hasItems:ee,hasCtrlDownKeyPressed:R1})},nt._onKeyUp=function(J){var rt=J.target,Qt=J.keyCode,Lt=this.input.value,Rt=this._store.activeItems,ce=this._canAddItem(Rt,Lt),Y=We,dt=je;if(this._isTextElement)if(ce.notice&&Lt){var Ht=this._getTemplate("notice",ce.notice);this.dropdown.element.innerHTML=Ht.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var ee=(Qt===Y||Qt===dt)&&!rt.value,he=!this._isTextElement&&this._isSearching,Le=this._canSearch&&ce.response;ee&&he?(this._isSearching=!1,this._store.dispatch(W1(!0))):Le&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},nt._onAKey=function(J){var rt=J.hasItems;J.hasCtrlDownKeyPressed&&rt&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},nt._onEnterKey=function(J){var rt=J.event,Qt=J.target,Lt=J.activeItems,Rt=J.hasActiveDropdown,ce=a1,Y=Qt.hasAttribute("data-button");if(this._isTextElement&&Qt.value){var dt=this.input.value;this._canAddItem(Lt,dt).response&&(this.hideDropdown(!0),this._addItem({value:dt}),this._triggerChange(dt),this.clearInput())}if(Y&&(this._handleButtonAction(Lt,Qt),rt.preventDefault()),Rt){var Ht=this.dropdown.getChild("."+this.config.classNames.highlightedState);Ht&&(Lt[0]&&(Lt[0].keyCode=ce),this._handleChoiceAction(Lt,Ht)),rt.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),rt.preventDefault())},nt._onEscapeKey=function(J){J.hasActiveDropdown&&(this.hideDropdown(!0),this.containerOuter.focus())},nt._onDirectionKey=function(J){var rt,Qt,Lt,Rt=J.event,ce=J.hasActiveDropdown,Y=J.keyCode,dt=J.metaKey,Ht=Se,ee=me,he=Pe;if(ce||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var Le,t1=Y===Ht||Y===he?1:-1,m1="[data-choice-selectable]";if(dt||Y===he||Y===ee)Le=t1>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);Le=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",e2=E1[U1];e2;){if(e2.matches(K1))return e2;e2=e2[U1]}return e2}}(n1,m1,t1):this.dropdown.element.querySelector(m1)}Le&&(rt=Le,Qt=this.choiceList.element,(Lt=t1)===void 0&&(Lt=1),rt&&(Lt>0?Qt.scrollTop+Qt.offsetHeight>=rt.offsetTop+rt.offsetHeight:rt.offsetTop>=Qt.scrollTop)||this.choiceList.scrollToChildElement(Le,t1),this._highlightChoice(Le)),Rt.preventDefault()}},nt._onDeleteKey=function(J){var rt=J.event,Qt=J.target,Lt=J.hasFocusedInput,Rt=J.activeItems;!Lt||Qt.value||this._isSelectOneElement||(this._handleBackspace(Rt),rt.preventDefault())},nt._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},nt._onTouchEnd=function(J){var rt=(J||J.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(rt)&&((rt===this.containerOuter.element||rt===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),J.stopPropagation()),this._wasTap=!0},nt._onMouseDown=function(J){var rt=J.target;if(rt instanceof HTMLElement){if(Q2&&this.choiceList.element.contains(rt)){var Qt=this.choiceList.element.firstElementChild,Lt=this._direction==="ltr"?J.offsetX>=Qt.offsetWidth:J.offsetX<Qt.offsetLeft;this._isScrollingOnIe=Lt}if(rt!==this.input.element){var Rt=rt.closest("[data-button],[data-item],[data-choice]");if(Rt instanceof HTMLElement){var ce=J.shiftKey,Y=this._store.activeItems,dt=Rt.dataset;"button"in dt?this._handleButtonAction(Y,Rt):"item"in dt?this._handleItemAction(Y,Rt,ce):"choice"in dt&&this._handleChoiceAction(Y,Rt)}J.preventDefault()}}},nt._onMouseOver=function(J){var rt=J.target;rt instanceof HTMLElement&&"choice"in rt.dataset&&this._highlightChoice(rt)},nt._onClick=function(J){var rt=J.target;this.containerOuter.element.contains(rt)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&rt!==this.input.element&&!this.dropdown.element.contains(rt)&&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))},nt._onFocus=function(J){var rt,Qt=this,Lt=J.target;this.containerOuter.element.contains(Lt)&&((rt={}).text=function(){Lt===Qt.input.element&&Qt.containerOuter.addFocusState()},rt["select-one"]=function(){Qt.containerOuter.addFocusState(),Lt===Qt.input.element&&Qt.showDropdown(!0)},rt["select-multiple"]=function(){Lt===Qt.input.element&&(Qt.showDropdown(!0),Qt.containerOuter.addFocusState())},rt)[this.passedElement.element.type]()},nt._onBlur=function(J){var rt=this,Qt=J.target;if(this.containerOuter.element.contains(Qt)&&!this._isScrollingOnIe){var Lt,Rt=this._store.activeItems.some(function(ce){return ce.highlighted});((Lt={}).text=function(){Qt===rt.input.element&&(rt.containerOuter.removeFocusState(),Rt&&rt.unhighlightAll(),rt.hideDropdown(!0))},Lt["select-one"]=function(){rt.containerOuter.removeFocusState(),(Qt===rt.input.element||Qt===rt.containerOuter.element&&!rt._canSearch)&&rt.hideDropdown(!0)},Lt["select-multiple"]=function(){Qt===rt.input.element&&(rt.containerOuter.removeFocusState(),rt.hideDropdown(!0),Rt&&rt.unhighlightAll())},Lt)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},nt._onFormReset=function(){this._store.dispatch({type:"RESET_TO",state:this._initialState})},nt._highlightChoice=function(J){var rt=this;J===void 0&&(J=null);var Qt=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(Qt.length){var Lt=J;Array.from(this.dropdown.element.querySelectorAll("."+this.config.classNames.highlightedState)).forEach(function(Rt){Rt.classList.remove(rt.config.classNames.highlightedState),Rt.setAttribute("aria-selected","false")}),Lt?this._highlightPosition=Qt.indexOf(Lt):(Lt=Qt.length>this._highlightPosition?Qt[this._highlightPosition]:Qt[Qt.length-1])||(Lt=Qt[0]),Lt.classList.add(this.config.classNames.highlightedState),Lt.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(xe,{el:Lt}),this.dropdown.isActive&&(this.input.setActiveDescendant(Lt.id),this.containerOuter.setActiveDescendant(Lt.id))}},nt._addItem=function(J){var rt=J.value,Qt=J.label,Lt=Qt===void 0?null:Qt,Rt=J.choiceId,ce=Rt===void 0?-1:Rt,Y=J.groupId,dt=Y===void 0?-1:Y,Ht=J.customProperties,ee=Ht===void 0?null:Ht,he=J.placeholder,Le=he!==void 0&&he,t1=J.keyCode,m1=t1===void 0?null:t1,n1=typeof rt=="string"?rt.trim():rt,E1=m1,K1=ee,D1=this._store.items,U1=Lt||n1,e2=ce||-1,R1=dt>=0?this._store.getGroupById(dt):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 t2=n2.value,Z2=n2.label,I2=n2.id,s2=n2.choiceId,Yt=n2.groupId,le=n2.customProperties,pe=n2.placeholder,De=n2.keyCode;return{type:Re,value:t2,label:Z2,id:I2,choiceId:s2,groupId:Yt,customProperties:le,placeholder:pe,keyCode:De}}({value:n1,label:U1,id:y2,choiceId:e2,groupId:dt,customProperties:ee,placeholder:Le,keyCode:E1})),this._isSelectOneElement&&this.removeActiveItems(y2),this.passedElement.triggerEvent(Jt,{id:y2,value:n1,label:U1,customProperties:K1,groupValue:R1&&R1.value?R1.value:void 0,keyCode:E1}),this},nt._removeItem=function(J){if(!J||!S("Object",J))return this;var rt=J.id,Qt=J.value,Lt=J.label,Rt=J.choiceId,ce=J.groupId,Y=ce>=0?this._store.getGroupById(ce):null;return this._store.dispatch(function(dt,Ht){return{type:He,id:dt,choiceId:Ht}}(rt,Rt)),Y&&Y.value?this.passedElement.triggerEvent(re,{id:rt,value:Qt,label:Lt,groupValue:Y.value}):this.passedElement.triggerEvent(re,{id:rt,value:Qt,label:Lt}),this},nt._addChoice=function(J){var rt=J.value,Qt=J.label,Lt=Qt===void 0?null:Qt,Rt=J.isSelected,ce=Rt!==void 0&&Rt,Y=J.isDisabled,dt=Y!==void 0&&Y,Ht=J.groupId,ee=Ht===void 0?-1:Ht,he=J.customProperties,Le=he===void 0?null:he,t1=J.placeholder,m1=t1!==void 0&&t1,n1=J.keyCode,E1=n1===void 0?null:n1;if(rt!=null){var K1=this._store.choices,D1=Lt||rt,U1=K1?K1.length+1:1,e2=this._baseId+"-"+this._idNames.itemChoice+"-"+U1;this._store.dispatch(function(R1){var y2=R1.value,n2=R1.label,t2=R1.id,Z2=R1.groupId,I2=R1.disabled,s2=R1.elementId,Yt=R1.customProperties,le=R1.placeholder,pe=R1.keyCode;return{type:r1,value:y2,label:n2,id:t2,groupId:Z2,disabled:I2,elementId:s2,customProperties:Yt,placeholder:le,keyCode:pe}}({id:U1,groupId:ee,elementId:e2,value:rt,label:D1,disabled:dt,customProperties:Le,placeholder:m1,keyCode:E1})),ce&&this._addItem({value:rt,label:D1,choiceId:U1,customProperties:Le,placeholder:m1,keyCode:E1})}},nt._addGroup=function(J){var rt=this,Qt=J.group,Lt=J.id,Rt=J.valueKey,ce=Rt===void 0?"value":Rt,Y=J.labelKey,dt=Y===void 0?"label":Y,Ht=S("Object",Qt)?Qt.choices:Array.from(Qt.getElementsByTagName("OPTION")),ee=Lt||Math.floor(new Date().valueOf()*Math.random()),he=!!Qt.disabled&&Qt.disabled;Ht?(this._store.dispatch(Z1({value:Qt.label,id:ee,active:!0,disabled:he})),Ht.forEach(function(Le){var t1=Le.disabled||Le.parentNode&&Le.parentNode.disabled;rt._addChoice({value:Le[ce],label:S("Object",Le)?Le[dt]:Le.innerHTML,isSelected:Le.selected,isDisabled:t1,groupId:ee,customProperties:Le.customProperties,placeholder:Le.placeholder})})):this._store.dispatch(Z1({value:Qt.label,id:Qt.id,active:!1,disabled:Qt.disabled}))},nt._getTemplate=function(J){var rt;if(!J)return null;for(var Qt=this.config.classNames,Lt=arguments.length,Rt=new Array(Lt>1?Lt-1:0),ce=1;ce<Lt;ce++)Rt[ce-1]=arguments[ce];return(rt=this._templates[J]).call.apply(rt,[this,Qt].concat(Rt))},nt._createTemplates=function(){var J=this.config.callbackOnCreateTemplates,rt={};J&&typeof J=="function"&&(rt=J.call(this,E)),this._templates=i()(A1,rt)},nt._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 Zt({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new $t({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new $t({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new W({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},nt._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)},nt._addPredefinedGroups=function(J){var rt=this,Qt=this.passedElement.placeholderOption;Qt&&Qt.parentNode.tagName==="SELECT"&&this._addChoice({value:Qt.value,label:Qt.innerHTML,isSelected:Qt.selected,isDisabled:Qt.disabled,placeholder:!0}),J.forEach(function(Lt){return rt._addGroup({group:Lt,id:Lt.id||null})})},nt._addPredefinedChoices=function(J){var rt=this;this.config.shouldSort&&J.sort(this.config.sorter);var Qt=J.some(function(Rt){return Rt.selected}),Lt=J.findIndex(function(Rt){return Rt.disabled===void 0||!Rt.disabled});J.forEach(function(Rt,ce){var Y=Rt.value,dt=Rt.label,Ht=Rt.customProperties,ee=Rt.placeholder;if(rt._isSelectElement)if(Rt.choices)rt._addGroup({group:Rt,id:Rt.id||null});else{var he=!(!rt._isSelectOneElement||Qt||ce!==Lt)||Rt.selected,Le=Rt.disabled;rt._addChoice({value:Y,label:dt,isSelected:he,isDisabled:Le,customProperties:Ht,placeholder:ee})}else rt._addChoice({value:Y,label:dt,isSelected:Rt.selected,isDisabled:Rt.disabled,customProperties:Ht,placeholder:ee})})},nt._addPredefinedItems=function(J){var rt=this;J.forEach(function(Qt){typeof Qt=="object"&&Qt.value&&rt._addItem({value:Qt.value,label:Qt.label,choiceId:Qt.id,customProperties:Qt.customProperties,placeholder:Qt.placeholder}),typeof Qt=="string"&&rt._addItem({value:Qt})})},nt._setChoiceOrItem=function(J){var rt=this;({object:function(){J.value&&(rt._isTextElement?rt._addItem({value:J.value,label:J.label,choiceId:J.id,customProperties:J.customProperties,placeholder:J.placeholder}):rt._addChoice({value:J.value,label:J.label,isSelected:!0,isDisabled:!1,customProperties:J.customProperties,placeholder:J.placeholder}))},string:function(){rt._isTextElement?rt._addItem({value:J}):rt._addChoice({value:J,label:J,isSelected:!0,isDisabled:!1})}})[H(J).toLowerCase()]()},nt._findAndSelectChoiceByValue=function(J){var rt=this,Qt=this._store.choices.find(function(Lt){return rt.config.valueComparer(Lt.value,J)});Qt&&!Qt.selected&&this._addItem({value:Qt.value,label:Qt.label,choiceId:Qt.id,groupId:Qt.groupId,customProperties:Qt.customProperties,placeholder:Qt.placeholder,keyCode:Qt.keyCode})},nt._generatePlaceholderValue=function(){if(this._isSelectElement){var J=this.passedElement.placeholderOption;return!!J&&J.text}var rt=this.config,Qt=rt.placeholder,Lt=rt.placeholderValue,Rt=this.passedElement.element.dataset;if(Qt){if(Lt)return Lt;if(Rt.placeholder)return Rt.placeholder}return!1},st}();p.default=P2}]).default},typeof t=="object"&&typeof O=="object"?O.exports=w():typeof define=="function"&&define.amd?define([],w):typeof t=="object"?t.Choices=w():v.Choices=w()},477:function V(Q,O,t,C,R){C(),t.root="bk-root",t.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,t,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)),e=/^[-+]?\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=>e.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)}}t.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}`}}t.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,t,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)}}t.PreTextView=p,p.__name__="PreTextView";class T extends w.Markup{constructor(o){super(o)}}t.PreText=T,v=T,T.__name__="PreText",v.prototype.default_view=p},480:function V(Q,O,t,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((e,s)=>{(0,p.classes)(e).toggle(T.active,i===s)})}}t.RadioButtonGroupView=c,c.__name__="RadioButtonGroupView";class o extends g.ButtonGroup{constructor(i){super(i)}}t.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,t,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 e=(0,g.div)({class:[c.input_group,this.model.inline?c.inline:null]});this.el.appendChild(e);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]));e.appendChild(m)}}change_active(e){this.model.active=e}}t.RadioGroupView=o,o.__name__="RadioGroupView";class r extends T.InputGroup{constructor(e){super(e)}}t.RadioGroup=r,w=r,r.__name__="RadioGroup",w.prototype.default_view=o,w.define(({Boolean:i,Int:e,String:s,Array:a,Nullable:u})=>({active:[u(e),null],labels:[a(s),[]],inline:[i,!1]}))},482:function V(Q,O,t,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractRangeSliderView{}t.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)}}t.RangeSlider=c,v=c,c.__name__="RangeSlider",v.prototype.default_view=T,v.override({format:"0[.]00"})},483:function V(Q,O,t,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")}}t.SelectView=r,r.__name__="SelectView";class i extends c.InputWidget{constructor(s){super(s)}}t.Select=i,w=i,i.__name__="Select",w.prototype.default_view=r,w.define(({String:e,Array:s,Tuple:a,Dict:u,Or:l})=>{const d=s(l(e,a(e,e)));return{value:[e,""],options:[l(d,u(d)),[]]}})},484:function V(Q,O,t,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractSliderView{}t.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)}}t.Slider=c,v=c,c.__name__="Slider",v.prototype.default_view=T,v.override({format:"0[.]00"})},485:function V(Q,O,t,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}}t.SpinnerView=i,i.__name__="SpinnerView";class e extends w.NumericInput{constructor(a){super(a)}}t.Spinner=e,v=e,e.__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,t,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}}t.TextAreaInputView=c,c.__name__="TextAreaInputView";class o extends g.TextLikeInput{constructor(i){super(i)}}t.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,t,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)}}t.ToggleView=c,c.__name__="ToggleView";class o extends g.AbstractButton{constructor(i){super(i)}}t.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 t=`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(t),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,t))},g=reactExports.useCallback(w,[t,R]);return reactExports.useEffect(()=>{g(C())},[V,O,Q,C,g]),jsx("div",{id:t,className:"stBokehChart","data-testid":"stBokehChart"})}export{BokehChart 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)}}])&&e(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 e=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 e(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,e){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,a=new RegExp(e.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),e=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,at=0;at<B;at+=1){for(var mt=0,Vt=q;mt<Vt;)i(a,{errors:at,currentLocation:k+Vt,expectedLocation:k,distance:b})<=P?mt=Vt:q=Vt,Vt=Math.floor((q-mt)/2+mt);q=Vt;var Jt=Math.max(1,k-Vt+1),re=x?E:Math.min(k+Vt,E)+B,ye=Array(re+2);ye[re+1]=(1<<at)-1;for(var xe=re;xe>=Jt;xe-=1){var r1=xe-1,e1=u[s.charAt(r1)];if(e1&&(D[r1]=1),ye[xe]=(ye[xe+1]<<1|1)&e1,at!==0&&(ye[xe]|=(W[xe+1]|W[xe])<<1|1|W[xe+1]),ye[xe]&X&&(U=i(a,{errors:at,currentLocation:r1,expectedLocation:k,distance:b}))<=P){if(P=U,(N=r1)<=k)break;Jt=Math.max(1,2*k-N)}}if(i(a,{errors:at+1,currentLocation:k,expectedLocation:k,distance:b})>P)break;W=ye}return{isMatch:N>=0,score:U===0?.001:U,matchedIndices:e(D,S)}}},function(c,o){c.exports=function(r,i){var e=i.errors,s=e===void 0?0:e,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,e=[],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&&e.push([s,a]),s=-1)}return r[u-1]&&u-s>=i&&e.push([s,u-1]),e}},function(c,o){c.exports=function(r){for(var i={},e=r.length,s=0;s<e;s+=1)i[r.charAt(s)]=0;for(var a=0;a<e;a+=1)i[r.charAt(a)]|=1<<e-a-1;return i}},function(c,o,r){var i=r(0);c.exports=function(e,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}(e,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),e=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(ot){if(typeof ot!="object"||ot===null)return!1;for(var K=ot;Object.getPrototypeOf(K)!==null;)K=Object.getPrototypeOf(K);return Object.getPrototypeOf(ot)===K}function l(ot,K,ut){var st;if(typeof K=="function"&&typeof ut=="function"||typeof ut=="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"&&ut===void 0&&(ut=K,K=void 0),ut!==void 0){if(typeof ut!="function")throw new Error("Expected the enhancer to be a function.");return ut(l)(ot,K)}if(typeof ot!="function")throw new Error("Expected the reducer to be a function.");var nt=ot,J=K,rt=[],Qt=rt,Lt=!1;function Rt(){Qt===rt&&(Qt=rt.slice())}function ce(){if(Lt)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(he){if(typeof he!="function")throw new Error("Expected the listener to be a function.");if(Lt)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 Le=!0;return Rt(),Qt.push(he),function(){if(Le){if(Lt)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.");Le=!1,Rt();var t1=Qt.indexOf(he);Qt.splice(t1,1)}}}function dt(he){if(!u(he))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(he.type===void 0)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(Lt)throw new Error("Reducers may not dispatch actions.");try{Lt=!0,J=nt(J,he)}finally{Lt=!1}for(var Le=rt=Qt,t1=0;t1<Le.length;t1++)(0,Le[t1])();return he}function Ht(he){if(typeof he!="function")throw new Error("Expected the nextReducer to be a function.");nt=he,dt({type:a.REPLACE})}function ee(){var he,Le=Y;return(he={subscribe:function(t1){if(typeof t1!="object"||t1===null)throw new TypeError("Expected the observer to be an object.");function m1(){t1.next&&t1.next(ce())}return m1(),{unsubscribe:Le(m1)}}})[e.a]=function(){return this},he}return dt({type:a.INIT}),(st={dispatch:dt,subscribe:Y,getState:ce,replaceReducer:Ht})[e.a]=ee,st}function d(ot,K){var ut=K&&K.type;return"Given "+(ut&&'action "'+String(ut)+'"'||"an action")+', reducer "'+ot+'" 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(ot,K){return ot===void 0&&(ot=A),K.type==="SET_IS_LOADING"?{loading:K.isLoading}:ot},x=function(ot){return Array.from({length:ot},function(){return(K=0,ut=36,Math.floor(Math.random()*(ut-K)+K)).toString(36);var K,ut}).join("")},H=function(ot){return Object.prototype.toString.call(ot).slice(8,-1)},S=function(ot,K){return K!=null&&H(K)===ot},k=function(ot){return typeof ot!="string"?ot:ot.replace(/&/g,"&amp;").replace(/>/g,"&rt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},E=(m=document.createElement("div"),function(ot){var K=ot.trim();m.innerHTML=K;for(var ut=m.children[0];m.firstChild;)m.removeChild(m.firstChild);return ut}),P=function(ot,K){return ot.score-K.score},N=function(ot){return JSON.parse(JSON.stringify(ot))},B=function(ot){for(var K=Object.keys(ot),ut={},st=0;st<K.length;st++){var nt=K[st];typeof ot[nt]=="function"&&(ut[nt]=ot[nt])}var J,rt=Object.keys(ut);try{(function(Qt){Object.keys(Qt).forEach(function(Lt){var Rt=Qt[Lt];if(Rt(void 0,{type:a.INIT})===void 0)throw new Error('Reducer "'+Lt+`" 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(Rt(void 0,{type:a.PROBE_UNKNOWN_ACTION()})===void 0)throw new Error('Reducer "'+Lt+`" 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.')})})(ut)}catch(Qt){J=Qt}return function(Qt,Lt){if(Qt===void 0&&(Qt={}),J)throw J;for(var Rt=!1,ce={},Y=0;Y<rt.length;Y++){var dt=rt[Y],Ht=ut[dt],ee=Qt[dt],he=Ht(ee,Lt);if(he===void 0){var Le=d(dt,Lt);throw new Error(Le)}ce[dt]=he,Rt=Rt||he!==ee}return Rt?ce:Qt}}({items:function(ot,K){switch(ot===void 0&&(ot=f),K.type){case"ADD_ITEM":return[].concat(ot,[{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(ut){var st=ut;return st.highlighted=!1,st});case"REMOVE_ITEM":return ot.map(function(ut){var st=ut;return st.id===K.id&&(st.active=!1),st});case"HIGHLIGHT_ITEM":return ot.map(function(ut){var st=ut;return st.id===K.id&&(st.highlighted=K.highlighted),st});default:return ot}},groups:function(ot,K){switch(ot===void 0&&(ot=b),K.type){case"ADD_GROUP":return[].concat(ot,[{id:K.id,value:K.value,active:K.active,disabled:K.disabled}]);case"CLEAR_CHOICES":return[];default:return ot}},choices:function(ot,K){switch(ot===void 0&&(ot=y),K.type){case"ADD_CHOICE":return[].concat(ot,[{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?ot.map(function(ut){var st=ut;return st.active=K.active,st}):K.choiceId>-1?ot.map(function(ut){var st=ut;return st.id===parseInt(K.choiceId,10)&&(st.selected=!0),st}):ot;case"REMOVE_ITEM":return K.choiceId>-1?ot.map(function(ut){var st=ut;return st.id===parseInt(K.choiceId,10)&&(st.selected=!1),st}):ot;case"FILTER_CHOICES":return ot.map(function(ut){var st=ut;return st.active=K.results.some(function(nt){var J=nt.item,rt=nt.score;return J.id===st.id&&(st.score=rt,!0)}),st});case"ACTIVATE_CHOICES":return ot.map(function(ut){var st=ut;return st.active=K.active,st});case"CLEAR_CHOICES":return y;default:return ot}},general:L}),D=function(ot,K){var ut=ot;if(K.type==="CLEAR_ALL")ut=void 0;else if(K.type==="RESET_TO")return N(K.state);return B(ut,K)};function j(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var M=function(){function ot(){this._store=l(D,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}var K,ut,st=ot.prototype;return st.subscribe=function(nt){this._store.subscribe(nt)},st.dispatch=function(nt){this._store.dispatch(nt)},st.isLoading=function(){return this.state.general.loading},st.getChoiceById=function(nt){return this.activeChoices.find(function(J){return J.id===parseInt(nt,10)})},st.getGroupById=function(nt){return this.groups.find(function(J){return J.id===nt})},K=ot,ut=[{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(nt){return nt.active===!0})}},{key:"highlightedActiveItems",get:function(){return this.items.filter(function(nt){return nt.active&&nt.highlighted})}},{key:"choices",get:function(){return this.state.choices}},{key:"activeChoices",get:function(){return this.choices.filter(function(nt){return nt.active===!0})}},{key:"selectableChoices",get:function(){return this.choices.filter(function(nt){return nt.disabled!==!0})}},{key:"searchableChoices",get:function(){return this.selectableChoices.filter(function(nt){return nt.placeholder!==!0})}},{key:"placeholderChoice",get:function(){return[].concat(this.choices).reverse().find(function(nt){return nt.placeholder===!0})}},{key:"groups",get:function(){return this.state.groups}},{key:"activeGroups",get:function(){var nt=this.groups,J=this.choices;return nt.filter(function(rt){var Qt=rt.active===!0&&rt.disabled===!1,Lt=J.some(function(Rt){return Rt.active===!0&&Rt.disabled===!1});return Qt&&Lt},[])}}],ut&&j(K.prototype,ut),ot}();function F(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var W=function(){function ot(nt){var J=nt.element,rt=nt.type,Qt=nt.classNames;this.element=J,this.classNames=Qt,this.type=rt,this.isActive=!1}var K,ut,st=ot.prototype;return st.getChild=function(nt){return this.element.querySelector(nt)},st.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},st.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},K=ot,(ut=[{key:"distanceFromTopWindow",get:function(){return this.element.getBoundingClientRect().bottom}}])&&F(K.prototype,ut),ot}(),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(ot,K){var ut=ot.value,st=ot.label,nt=st===void 0?ut:st,J=K.value,rt=K.label,Qt=rt===void 0?J:rt;return nt.localeCompare(Qt,[],{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(ot){return'Press Enter to add <b>"'+k(ot)+'"</b>'},maxItemText:function(ot){return"Only "+ot+" values can be added"},valueComparer:function(ot,K){return ot===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",at="change",mt="choice",Vt="search",Jt="addItem",re="removeItem",ye="highlightItem",xe="highlightChoice",r1="ADD_CHOICE",e1="FILTER_CHOICES",Be="ACTIVATE_CHOICES",Ke="CLEAR_CHOICES",we="ADD_GROUP",Re="ADD_ITEM",He="REMOVE_ITEM",de="HIGHLIGHT_ITEM",We=46,je=8,a1=13,yt=65,it=27,ne=38,Se=40,me=33,Pe=34,Xe="text",u1="select-one",v1="select-multiple",h1=function(){function ot(ut){var st=ut.element,nt=ut.type,J=ut.classNames,rt=ut.position;this.element=st,this.classNames=J,this.type=nt,this.position=rt,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=ot.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(ut){if(typeof ut!="number")return!1;var st=!1;return this.position==="auto"?st=!window.matchMedia("(min-height: "+(ut+1)+"px)").matches:this.position==="top"&&(st=!0),st},K.setActiveDescendant=function(ut){this.element.setAttribute("aria-activedescendant",ut)},K.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},K.open=function(ut){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(ut)&&(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(ut){(function(st,nt){nt===void 0&&(nt=document.createElement("div")),st.nextSibling?st.parentNode.insertBefore(nt,st.nextSibling):st.parentNode.appendChild(nt),nt.appendChild(st)})(ut,this.element)},K.unwrap=function(ut){this.element.parentNode.insertBefore(ut,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},ot}();function Dt(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Zt=function(){function ot(nt){var J=nt.element,rt=nt.type,Qt=nt.classNames,Lt=nt.preventPaste;this.element=J,this.type=rt,this.classNames=Qt,this.preventPaste=Lt,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,ut,st=ot.prototype;return st.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})},st.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})},st.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},st.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},st.focus=function(){this.isFocussed||this.element.focus()},st.blur=function(){this.isFocussed&&this.element.blur()},st.clear=function(nt){return nt===void 0&&(nt=!0),this.element.value&&(this.element.value=""),nt&&this.setWidth(),this},st.setWidth=function(){var nt=this.element,J=nt.style,rt=nt.value,Qt=nt.placeholder;J.minWidth=Qt.length+1+"ch",J.width=rt.length+1+"ch"},st.setActiveDescendant=function(nt){this.element.setAttribute("aria-activedescendant",nt)},st.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},st._onInput=function(){this.type!==u1&&this.setWidth()},st._onPaste=function(nt){this.preventPaste&&nt.preventDefault()},st._onFocus=function(){this.isFocussed=!0},st._onBlur=function(){this.isFocussed=!1},K=ot,(ut=[{key:"placeholder",set:function(nt){this.element.placeholder=nt}},{key:"value",get:function(){return k(this.element.value)},set:function(nt){this.element.value=nt}}])&&Dt(K.prototype,ut),ot}(),$t=function(){function ot(ut){var st=ut.element;this.element=st,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}var K=ot.prototype;return K.clear=function(){this.element.innerHTML=""},K.append=function(ut){this.element.appendChild(ut)},K.getChild=function(ut){return this.element.querySelector(ut)},K.hasChildren=function(){return this.element.hasChildNodes()},K.scrollToTop=function(){this.element.scrollTop=0},K.scrollToChildElement=function(ut,st){var nt=this;if(ut){var J=this.element.offsetHeight,rt=this.element.scrollTop+J,Qt=ut.offsetHeight,Lt=ut.offsetTop+Qt,Rt=st>0?this.element.scrollTop+Lt-rt:ut.offsetTop;requestAnimationFrame(function(){nt._animateScroll(Rt,st)})}},K._scrollDown=function(ut,st,nt){var J=(nt-ut)/st,rt=J>1?J:1;this.element.scrollTop=ut+rt},K._scrollUp=function(ut,st,nt){var J=(ut-nt)/st,rt=J>1?J:1;this.element.scrollTop=ut-rt},K._animateScroll=function(ut,st){var nt=this,J=this.element.scrollTop,rt=!1;st>0?(this._scrollDown(J,4,ut),J<ut&&(rt=!0)):(this._scrollUp(J,4,ut),J>ut&&(rt=!0)),rt&&requestAnimationFrame(function(){nt._animateScroll(ut,st)})},ot}();function Qe(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Ie=function(){function ot(nt){var J=nt.element,rt=nt.classNames;if(this.element=J,this.classNames=rt,!(J instanceof HTMLInputElement||J instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}var K,ut,st=ot.prototype;return st.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var nt=this.element.getAttribute("style");nt&&this.element.setAttribute("data-choice-orig-style",nt),this.element.setAttribute("data-choice","active")},st.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var nt=this.element.getAttribute("data-choice-orig-style");nt?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",nt)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},st.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},st.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},st.triggerEvent=function(nt,J){(function(rt,Qt,Lt){Lt===void 0&&(Lt=null);var Rt=new CustomEvent(Qt,{detail:Lt,bubbles:!0,cancelable:!0});rt.dispatchEvent(Rt)})(this.element,nt,J)},K=ot,(ut=[{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(nt){this.element.value=nt}}])&&Qe(K.prototype,ut),ot}();function Ue(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Ze=function(ot){var K,ut,st,nt;function J(rt){var Qt,Lt=rt.element,Rt=rt.classNames,ce=rt.delimiter;return(Qt=ot.call(this,{element:Lt,classNames:Rt})||this).delimiter=ce,Qt}return ut=ot,(K=J).prototype=Object.create(ut.prototype),K.prototype.constructor=K,K.__proto__=ut,st=J,(nt=[{key:"value",get:function(){return this.element.value},set:function(rt){var Qt=rt.map(function(Lt){return Lt.value}).join(this.delimiter);this.element.setAttribute("value",Qt),this.element.value=Qt}}])&&Ue(st.prototype,nt),J}(Ie);function b1(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var k1=function(ot){var K,ut,st,nt;function J(rt){var Qt,Lt=rt.element,Rt=rt.classNames,ce=rt.template;return(Qt=ot.call(this,{element:Lt,classNames:Rt})||this).template=ce,Qt}return ut=ot,(K=J).prototype=Object.create(ut.prototype),K.prototype.constructor=K,K.__proto__=ut,J.prototype.appendDocFragment=function(rt){this.element.innerHTML="",this.element.appendChild(rt)},st=J,(nt=[{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(rt){var Qt=this,Lt=document.createDocumentFragment();rt.forEach(function(Rt){return ce=Rt,Y=Qt.template(ce),void Lt.appendChild(Y);var ce,Y}),this.appendDocFragment(Lt)}}])&&b1(st.prototype,nt),J}(Ie),A1={containerOuter:function(ot,K,ut,st,nt,J){var rt=ot.containerOuter,Qt=Object.assign(document.createElement("div"),{className:rt});return Qt.dataset.type=J,K&&(Qt.dir=K),st&&(Qt.tabIndex=0),ut&&(Qt.setAttribute("role",nt?"combobox":"listbox"),nt&&Qt.setAttribute("aria-autocomplete","list")),Qt.setAttribute("aria-haspopup","true"),Qt.setAttribute("aria-expanded","false"),Qt},containerInner:function(ot){var K=ot.containerInner;return Object.assign(document.createElement("div"),{className:K})},itemList:function(ot,K){var ut=ot.list,st=ot.listSingle,nt=ot.listItems;return Object.assign(document.createElement("div"),{className:ut+" "+(K?st:nt)})},placeholder:function(ot,K){var ut=ot.placeholder;return Object.assign(document.createElement("div"),{className:ut,innerHTML:K})},item:function(ot,K,ut){var st=ot.item,nt=ot.button,J=ot.highlightedState,rt=ot.itemSelectable,Qt=ot.placeholder,Lt=K.id,Rt=K.value,ce=K.label,Y=K.customProperties,dt=K.active,Ht=K.disabled,ee=K.highlighted,he=K.placeholder,Le=Object.assign(document.createElement("div"),{className:st,innerHTML:ce});if(Object.assign(Le.dataset,{item:"",id:Lt,value:Rt,customProperties:Y}),dt&&Le.setAttribute("aria-selected","true"),Ht&&Le.setAttribute("aria-disabled","true"),he&&Le.classList.add(Qt),Le.classList.add(ee?J:rt),ut){Ht&&Le.classList.remove(rt),Le.dataset.deletable="";var t1="Remove item",m1=Object.assign(document.createElement("button"),{type:"button",className:nt,innerHTML:t1});m1.setAttribute("aria-label","Remove item: '"+Rt+"'"),m1.dataset.button="",Le.appendChild(m1)}return Le},choiceList:function(ot,K){var ut=ot.list,st=Object.assign(document.createElement("div"),{className:ut});return K||st.setAttribute("aria-multiselectable","true"),st.setAttribute("role","listbox"),st},choiceGroup:function(ot,K){var ut=ot.group,st=ot.groupHeading,nt=ot.itemDisabled,J=K.id,rt=K.value,Qt=K.disabled,Lt=Object.assign(document.createElement("div"),{className:ut+" "+(Qt?nt:"")});return Lt.setAttribute("role","group"),Object.assign(Lt.dataset,{group:"",id:J,value:rt}),Qt&&Lt.setAttribute("aria-disabled","true"),Lt.appendChild(Object.assign(document.createElement("div"),{className:st,innerHTML:rt})),Lt},choice:function(ot,K,ut){var st=ot.item,nt=ot.itemChoice,J=ot.itemSelectable,rt=ot.selectedState,Qt=ot.itemDisabled,Lt=ot.placeholder,Rt=K.id,ce=K.value,Y=K.label,dt=K.groupId,Ht=K.elementId,ee=K.disabled,he=K.selected,Le=K.placeholder,t1=Object.assign(document.createElement("div"),{id:Ht,innerHTML:Y,className:st+" "+nt});return he&&t1.classList.add(rt),Le&&t1.classList.add(Lt),t1.setAttribute("role",dt>0?"treeitem":"option"),Object.assign(t1.dataset,{choice:"",id:Rt,value:ce,selectText:ut}),ee?(t1.classList.add(Qt),t1.dataset.choiceDisabled="",t1.setAttribute("aria-disabled","true")):(t1.classList.add(J),t1.dataset.choiceSelectable=""),t1},input:function(ot,K){var ut=ot.input,st=ot.inputCloned,nt=Object.assign(document.createElement("input"),{type:"text",className:ut+" "+st,autocomplete:"off",autocapitalize:"off",spellcheck:!1});return nt.setAttribute("role","textbox"),nt.setAttribute("aria-autocomplete","list"),nt.setAttribute("aria-label",K),nt},dropdown:function(ot){var K=ot.list,ut=ot.listDropdown,st=document.createElement("div");return st.classList.add(K,ut),st.setAttribute("aria-expanded","false"),st},notice:function(ot,K,ut){var st=ot.item,nt=ot.itemChoice,J=ot.noResults,rt=ot.noChoices;ut===void 0&&(ut="");var Qt=[st,nt];return ut==="no-choices"?Qt.push(rt):ut==="no-results"&&Qt.push(J),Object.assign(document.createElement("div"),{innerHTML:K,className:Qt.join(" ")})},option:function(ot){var K=ot.label,ut=ot.value,st=ot.customProperties,nt=ot.active,J=ot.disabled,rt=new Option(K,ut,!1,nt);return st&&(rt.dataset.customProperties=st),rt.disabled=J,rt}},W1=function(ot){return{type:Be,active:ot}},S1=function(ot,K){return{type:de,id:ot,highlighted:K}},Z1=function(ot){var K=ot.value,ut=ot.id,st=ot.active,nt=ot.disabled;return{type:we,value:K,id:ut,active:st,disabled:nt}},o2=function(ot){return{type:"SET_IS_LOADING",isLoading:ot}};function d2(ot,K){for(var ut=0;ut<K.length;ut++){var st=K[ut];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(ot,st.key,st)}}var Q2="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,w2={},P2=function(){var ot,K,ut;function st(J,rt){var Qt=this;J===void 0&&(J="[data-choice]"),rt===void 0&&(rt={}),this.config=i.a.all([U,st.defaults.options,rt],{arrayMerge:function(Le,t1){return[].concat(t1)}});var Lt,Rt,ce,Y,dt=(Lt=this.config,Rt=U,ce=Object.keys(Lt).sort(),Y=Object.keys(Rt).sort(),ce.filter(function(Le){return Y.indexOf(Le)<0}));dt.length&&console.warn("Unknown config option(s) passed",dt.join(", "));var Ht=typeof J=="string"?document.querySelector(J):J;if(!(Ht instanceof HTMLInputElement||Ht instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement=Ht.type===Xe,this._isSelectOneElement=Ht.type===u1,this._isSelectMultipleElement=Ht.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"),rt.addItemFilter&&typeof rt.addItemFilter!="function"){var ee=rt.addItemFilter instanceof RegExp?rt.addItemFilter:new RegExp(rt.addItemFilter);this.config.addItemFilter=ee.test.bind(ee)}if(this._isTextElement?this.passedElement=new Ze({element:Ht,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new k1({element:Ht,classNames:this.config.classNames,template:function(Le){return Qt._templates.option(Le)}}),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(Le,t1){var m1=Le.id||Le.name&&Le.name+"-"+x(2)||x(4);return t1+"-"+m1.replace(/(:|\.|\[|\]|,)/g,"")}(this.passedElement.element,"choices-"),this._direction=this.passedElement.dir,!this._direction){var he=window.getComputedStyle(this.passedElement.element).direction;he!==window.getComputedStyle(document.documentElement).direction&&(this._direction=he)}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(Le){Qt._presetChoices.push({value:Le.value,label:Le.innerHTML,selected:Le.selected,disabled:Le.disabled||Le.parentNode.disabled,placeholder:Le.value===""||Le.hasAttribute("placeholder"),customProperties:Le.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()}ot=st,ut=[{key:"defaults",get:function(){return Object.preventExtensions({get options(){return w2},get templates(){return A1}})}}],(K=null)&&d2(ot.prototype,K),ut&&d2(ot,ut);var nt=st.prototype;return nt.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)}},nt.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)},nt.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},nt.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},nt.highlightItem=function(J,rt){if(rt===void 0&&(rt=!0),!J)return this;var Qt=J.id,Lt=J.groupId,Rt=Lt===void 0?-1:Lt,ce=J.value,Y=ce===void 0?"":ce,dt=J.label,Ht=dt===void 0?"":dt,ee=Rt>=0?this._store.getGroupById(Rt):null;return this._store.dispatch(S1(Qt,!0)),rt&&this.passedElement.triggerEvent(ye,{id:Qt,value:Y,label:Ht,groupValue:ee&&ee.value?ee.value:null}),this},nt.unhighlightItem=function(J){if(!J)return this;var rt=J.id,Qt=J.groupId,Lt=Qt===void 0?-1:Qt,Rt=J.value,ce=Rt===void 0?"":Rt,Y=J.label,dt=Y===void 0?"":Y,Ht=Lt>=0?this._store.getGroupById(Lt):null;return this._store.dispatch(S1(rt,!1)),this.passedElement.triggerEvent(ye,{id:rt,value:ce,label:dt,groupValue:Ht&&Ht.value?Ht.value:null}),this},nt.highlightAll=function(){var J=this;return this._store.items.forEach(function(rt){return J.highlightItem(rt)}),this},nt.unhighlightAll=function(){var J=this;return this._store.items.forEach(function(rt){return J.unhighlightItem(rt)}),this},nt.removeActiveItemsByValue=function(J){var rt=this;return this._store.activeItems.filter(function(Qt){return Qt.value===J}).forEach(function(Qt){return rt._removeItem(Qt)}),this},nt.removeActiveItems=function(J){var rt=this;return this._store.activeItems.filter(function(Qt){return Qt.id!==J}).forEach(function(Qt){return rt._removeItem(Qt)}),this},nt.removeHighlightedItems=function(J){var rt=this;return J===void 0&&(J=!1),this._store.highlightedActiveItems.forEach(function(Qt){rt._removeItem(Qt),J&&rt._triggerChange(Qt.value)}),this},nt.showDropdown=function(J){var rt=this;return this.dropdown.isActive||requestAnimationFrame(function(){rt.dropdown.show(),rt.containerOuter.open(rt.dropdown.distanceFromTopWindow),!J&&rt._canSearch&&rt.input.focus(),rt.passedElement.triggerEvent(q,{})}),this},nt.hideDropdown=function(J){var rt=this;return this.dropdown.isActive?(requestAnimationFrame(function(){rt.dropdown.hide(),rt.containerOuter.close(),!J&&rt._canSearch&&(rt.input.removeActiveDescendant(),rt.input.blur()),rt.passedElement.triggerEvent(X,{})}),this):this},nt.getValue=function(J){J===void 0&&(J=!1);var rt=this._store.activeItems.reduce(function(Qt,Lt){var Rt=J?Lt.value:Lt;return Qt.push(Rt),Qt},[]);return this._isSelectOneElement?rt[0]:rt},nt.setValue=function(J){var rt=this;return this.initialised?(J.forEach(function(Qt){return rt._setChoiceOrItem(Qt)}),this):this},nt.setChoiceByValue=function(J){var rt=this;return!this.initialised||this._isTextElement||(Array.isArray(J)?J:[J]).forEach(function(Qt){return rt._findAndSelectChoiceByValue(Qt)}),this},nt.setChoices=function(J,rt,Qt,Lt){var Rt=this;if(J===void 0&&(J=[]),rt===void 0&&(rt="value"),Qt===void 0&&(Qt="label"),Lt===void 0&&(Lt=!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 rt!="string"||!rt)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(Lt&&this.clearChoices(),typeof J=="function"){var ce=J(this);if(typeof Promise=="function"&&ce instanceof Promise)return new Promise(function(Y){return requestAnimationFrame(Y)}).then(function(){return Rt._handleLoadingState(!0)}).then(function(){return ce}).then(function(Y){return Rt.setChoices(Y,rt,Qt,Lt)}).catch(function(Y){Rt.config.silent||console.error(Y)}).then(function(){return Rt._handleLoadingState(!1)}).then(function(){return Rt});if(!Array.isArray(ce))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: "+typeof ce);return this.setChoices(ce,rt,Qt,!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?Rt._addGroup({id:parseInt(Y.id,10)||null,group:Y,valueKey:rt,labelKey:Qt}):Rt._addChoice({value:Y[rt],label:Y[Qt],isSelected:Y.selected,isDisabled:Y.disabled,customProperties:Y.customProperties,placeholder:Y.placeholder})}),this._stopLoading(),this},nt.clearChoices=function(){return this._store.dispatch({type:Ke}),this},nt.clearStore=function(){return this._store.dispatch({type:"CLEAR_ALL"}),this},nt.clearInput=function(){var J=!this._isSelectOneElement;return this.input.clear(J),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(W1(!0))),this},nt._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,rt=this._isSelectElement,Qt=this._currentState.items!==this._prevState.items;J&&(rt&&this._renderChoices(),Qt&&this._renderItems(),this._prevState=this._currentState)}},nt._renderChoices=function(){var J=this,rt=this._store,Qt=rt.activeGroups,Lt=rt.activeChoices,Rt=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return J.choiceList.scrollToTop()}),Qt.length>=1&&!this._isSearching){var ce=Lt.filter(function(he){return he.placeholder===!0&&he.groupId===-1});ce.length>=1&&(Rt=this._createChoicesFragment(ce,Rt)),Rt=this._createGroupsFragment(Qt,Lt,Rt)}else Lt.length>=1&&(Rt=this._createChoicesFragment(Lt,Rt));if(Rt.childNodes&&Rt.childNodes.length>0){var Y=this._store.activeItems,dt=this._canAddItem(Y,this.input.value);dt.response?(this.choiceList.append(Rt),this._highlightChoice()):this.choiceList.append(this._getTemplate("notice",dt.notice))}else{var Ht,ee;this._isSearching?(ee=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,Ht=this._getTemplate("notice",ee,"no-results")):(ee=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,Ht=this._getTemplate("notice",ee,"no-choices")),this.choiceList.append(Ht)}},nt._renderItems=function(){var J=this._store.activeItems||[];this.itemList.clear();var rt=this._createItemsFragment(J);rt.childNodes&&this.itemList.append(rt)},nt._createGroupsFragment=function(J,rt,Qt){var Lt=this;return Qt===void 0&&(Qt=document.createDocumentFragment()),this.config.shouldSort&&J.sort(this.config.sorter),J.forEach(function(Rt){var ce=function(dt){return rt.filter(function(Ht){return Lt._isSelectOneElement?Ht.groupId===dt.id:Ht.groupId===dt.id&&(Lt.config.renderSelectedChoices==="always"||!Ht.selected)})}(Rt);if(ce.length>=1){var Y=Lt._getTemplate("choiceGroup",Rt);Qt.appendChild(Y),Lt._createChoicesFragment(ce,Qt,!0)}}),Qt},nt._createChoicesFragment=function(J,rt,Qt){var Lt=this;rt===void 0&&(rt=document.createDocumentFragment()),Qt===void 0&&(Qt=!1);var Rt=this.config,ce=Rt.renderSelectedChoices,Y=Rt.searchResultLimit,dt=Rt.renderChoiceLimit,Ht=this._isSearching?P:this.config.sorter,ee=function(D1){if(ce!=="auto"||Lt._isSelectOneElement||!D1.selected){var U1=Lt._getTemplate("choice",D1,Lt.config.itemSelectText);rt.appendChild(U1)}},he=J;ce!=="auto"||this._isSelectOneElement||(he=J.filter(function(D1){return!D1.selected}));var Le=he.reduce(function(D1,U1){return U1.placeholder?D1.placeholderChoices.push(U1):D1.normalChoices.push(U1),D1},{placeholderChoices:[],normalChoices:[]}),t1=Le.placeholderChoices,m1=Le.normalChoices;(this.config.shouldSort||this._isSearching)&&m1.sort(Ht);var n1=he.length,E1=this._isSelectOneElement?[].concat(t1,m1):m1;this._isSearching?n1=Y:dt&&dt>0&&!Qt&&(n1=dt);for(var K1=0;K1<n1;K1+=1)E1[K1]&&ee(E1[K1]);return rt},nt._createItemsFragment=function(J,rt){var Qt=this;rt===void 0&&(rt=document.createDocumentFragment());var Lt=this.config,Rt=Lt.shouldSortItems,ce=Lt.sorter,Y=Lt.removeItemButton;return Rt&&!this._isSelectOneElement&&J.sort(ce),this._isTextElement?this.passedElement.value=J:this.passedElement.options=J,J.forEach(function(dt){var Ht=Qt._getTemplate("item",dt,Y);rt.appendChild(Ht)}),rt},nt._triggerChange=function(J){J!=null&&this.passedElement.triggerEvent(at,{value:J})},nt._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))},nt._handleButtonAction=function(J,rt){if(J&&rt&&this.config.removeItems&&this.config.removeItemButton){var Qt=rt.parentNode.getAttribute("data-id"),Lt=J.find(function(Rt){return Rt.id===parseInt(Qt,10)});this._removeItem(Lt),this._triggerChange(Lt.value),this._isSelectOneElement&&this._selectPlaceholderChoice()}},nt._handleItemAction=function(J,rt,Qt){var Lt=this;if(Qt===void 0&&(Qt=!1),J&&rt&&this.config.removeItems&&!this._isSelectOneElement){var Rt=rt.getAttribute("data-id");J.forEach(function(ce){ce.id!==parseInt(Rt,10)||ce.highlighted?!Qt&&ce.highlighted&&Lt.unhighlightItem(ce):Lt.highlightItem(ce)}),this.input.focus()}},nt._handleChoiceAction=function(J,rt){if(J&&rt){var Qt=rt.dataset.id,Lt=this._store.getChoiceById(Qt);if(Lt){var Rt=J[0]&&J[0].keyCode?J[0].keyCode:null,ce=this.dropdown.isActive;Lt.keyCode=Rt,this.passedElement.triggerEvent(mt,{choice:Lt}),Lt.selected||Lt.disabled||this._canAddItem(J,Lt.value).response&&(this._addItem({value:Lt.value,label:Lt.label,choiceId:Lt.id,groupId:Lt.groupId,customProperties:Lt.customProperties,placeholder:Lt.placeholder,keyCode:Lt.keyCode}),this._triggerChange(Lt.value)),this.clearInput(),ce&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},nt._handleBackspace=function(J){if(this.config.removeItems&&J){var rt=J[J.length-1],Qt=J.some(function(Lt){return Lt.highlighted});this.config.editItems&&!Qt&&rt?(this.input.value=rt.value,this.input.setWidth(),this._removeItem(rt),this._triggerChange(rt.value)):(Qt||this.highlightItem(rt,!1),this.removeHighlightedItems(!0))}},nt._startLoading=function(){this._store.dispatch(o2(!0))},nt._stopLoading=function(){this._store.dispatch(o2(!1))},nt._handleLoadingState=function(J){J===void 0&&(J=!0);var rt=this.itemList.getChild("."+this.config.classNames.placeholder);J?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?rt?rt.innerHTML=this.config.loadingText:(rt=this._getTemplate("placeholder",this.config.loadingText),this.itemList.append(rt)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?rt.innerHTML=this._placeholderValue||"":this.input.placeholder=this._placeholderValue||"")},nt._handleSearch=function(J){if(J&&this.input.isFocussed){var rt=this._store.choices,Qt=this.config,Lt=Qt.searchFloor,Rt=Qt.searchChoices,ce=rt.some(function(dt){return!dt.active});if(J&&J.length>=Lt){var Y=Rt?this._searchChoices(J):0;this.passedElement.triggerEvent(Vt,{value:J,resultCount:Y})}else ce&&(this._isSearching=!1,this._store.dispatch(W1(!0)))}},nt._canAddItem=function(J,rt){var Qt=!0,Lt=typeof this.config.addItemText=="function"?this.config.addItemText(rt):this.config.addItemText;if(!this._isSelectOneElement){var Rt=function(ce,Y,dt){return dt===void 0&&(dt="value"),ce.some(function(Ht){return typeof Y=="string"?Ht[dt]===Y.trim():Ht[dt]===Y})}(J,rt);this.config.maxItemCount>0&&this.config.maxItemCount<=J.length&&(Qt=!1,Lt=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&Rt&&Qt&&(Qt=!1,Lt=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(rt):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&Qt&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(rt)&&(Qt=!1,Lt=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(rt):this.config.customAddItemText)}return{response:Qt,notice:Lt}},nt._searchChoices=function(J){var rt=typeof J=="string"?J.trim():J,Qt=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(rt.length<1&&rt===Qt+" ")return 0;var Lt=this._store.searchableChoices,Rt=rt,ce=[].concat(this.config.searchFields),Y=Object.assign(this.config.fuseOptions,{keys:ce}),dt=new o.a(Lt,Y).search(Rt);return this._currentValue=rt,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(function(Ht){return{type:e1,results:Ht}}(dt)),dt.length},nt._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()},nt._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()},nt._onKeyDown=function(J){var rt,Qt=J.target,Lt=J.keyCode,Rt=J.ctrlKey,ce=J.metaKey,Y=this._store.activeItems,dt=this.input.isFocussed,Ht=this.dropdown.isActive,ee=this.itemList.hasChildren(),he=String.fromCharCode(Lt),Le=We,t1=je,m1=a1,n1=yt,E1=it,K1=ne,D1=Se,U1=me,e2=Pe,R1=Rt||ce;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(he)&&this.showDropdown();var y2=((rt={})[n1]=this._onAKey,rt[m1]=this._onEnterKey,rt[E1]=this._onEscapeKey,rt[K1]=this._onDirectionKey,rt[U1]=this._onDirectionKey,rt[D1]=this._onDirectionKey,rt[e2]=this._onDirectionKey,rt[t1]=this._onDeleteKey,rt[Le]=this._onDeleteKey,rt);y2[Lt]&&y2[Lt]({event:J,target:Qt,keyCode:Lt,metaKey:ce,activeItems:Y,hasFocusedInput:dt,hasActiveDropdown:Ht,hasItems:ee,hasCtrlDownKeyPressed:R1})},nt._onKeyUp=function(J){var rt=J.target,Qt=J.keyCode,Lt=this.input.value,Rt=this._store.activeItems,ce=this._canAddItem(Rt,Lt),Y=We,dt=je;if(this._isTextElement)if(ce.notice&&Lt){var Ht=this._getTemplate("notice",ce.notice);this.dropdown.element.innerHTML=Ht.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var ee=(Qt===Y||Qt===dt)&&!rt.value,he=!this._isTextElement&&this._isSearching,Le=this._canSearch&&ce.response;ee&&he?(this._isSearching=!1,this._store.dispatch(W1(!0))):Le&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},nt._onAKey=function(J){var rt=J.hasItems;J.hasCtrlDownKeyPressed&&rt&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},nt._onEnterKey=function(J){var rt=J.event,Qt=J.target,Lt=J.activeItems,Rt=J.hasActiveDropdown,ce=a1,Y=Qt.hasAttribute("data-button");if(this._isTextElement&&Qt.value){var dt=this.input.value;this._canAddItem(Lt,dt).response&&(this.hideDropdown(!0),this._addItem({value:dt}),this._triggerChange(dt),this.clearInput())}if(Y&&(this._handleButtonAction(Lt,Qt),rt.preventDefault()),Rt){var Ht=this.dropdown.getChild("."+this.config.classNames.highlightedState);Ht&&(Lt[0]&&(Lt[0].keyCode=ce),this._handleChoiceAction(Lt,Ht)),rt.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),rt.preventDefault())},nt._onEscapeKey=function(J){J.hasActiveDropdown&&(this.hideDropdown(!0),this.containerOuter.focus())},nt._onDirectionKey=function(J){var rt,Qt,Lt,Rt=J.event,ce=J.hasActiveDropdown,Y=J.keyCode,dt=J.metaKey,Ht=Se,ee=me,he=Pe;if(ce||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var Le,t1=Y===Ht||Y===he?1:-1,m1="[data-choice-selectable]";if(dt||Y===he||Y===ee)Le=t1>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);Le=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",e2=E1[U1];e2;){if(e2.matches(K1))return e2;e2=e2[U1]}return e2}}(n1,m1,t1):this.dropdown.element.querySelector(m1)}Le&&(rt=Le,Qt=this.choiceList.element,(Lt=t1)===void 0&&(Lt=1),rt&&(Lt>0?Qt.scrollTop+Qt.offsetHeight>=rt.offsetTop+rt.offsetHeight:rt.offsetTop>=Qt.scrollTop)||this.choiceList.scrollToChildElement(Le,t1),this._highlightChoice(Le)),Rt.preventDefault()}},nt._onDeleteKey=function(J){var rt=J.event,Qt=J.target,Lt=J.hasFocusedInput,Rt=J.activeItems;!Lt||Qt.value||this._isSelectOneElement||(this._handleBackspace(Rt),rt.preventDefault())},nt._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},nt._onTouchEnd=function(J){var rt=(J||J.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(rt)&&((rt===this.containerOuter.element||rt===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),J.stopPropagation()),this._wasTap=!0},nt._onMouseDown=function(J){var rt=J.target;if(rt instanceof HTMLElement){if(Q2&&this.choiceList.element.contains(rt)){var Qt=this.choiceList.element.firstElementChild,Lt=this._direction==="ltr"?J.offsetX>=Qt.offsetWidth:J.offsetX<Qt.offsetLeft;this._isScrollingOnIe=Lt}if(rt!==this.input.element){var Rt=rt.closest("[data-button],[data-item],[data-choice]");if(Rt instanceof HTMLElement){var ce=J.shiftKey,Y=this._store.activeItems,dt=Rt.dataset;"button"in dt?this._handleButtonAction(Y,Rt):"item"in dt?this._handleItemAction(Y,Rt,ce):"choice"in dt&&this._handleChoiceAction(Y,Rt)}J.preventDefault()}}},nt._onMouseOver=function(J){var rt=J.target;rt instanceof HTMLElement&&"choice"in rt.dataset&&this._highlightChoice(rt)},nt._onClick=function(J){var rt=J.target;this.containerOuter.element.contains(rt)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&rt!==this.input.element&&!this.dropdown.element.contains(rt)&&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))},nt._onFocus=function(J){var rt,Qt=this,Lt=J.target;this.containerOuter.element.contains(Lt)&&((rt={}).text=function(){Lt===Qt.input.element&&Qt.containerOuter.addFocusState()},rt["select-one"]=function(){Qt.containerOuter.addFocusState(),Lt===Qt.input.element&&Qt.showDropdown(!0)},rt["select-multiple"]=function(){Lt===Qt.input.element&&(Qt.showDropdown(!0),Qt.containerOuter.addFocusState())},rt)[this.passedElement.element.type]()},nt._onBlur=function(J){var rt=this,Qt=J.target;if(this.containerOuter.element.contains(Qt)&&!this._isScrollingOnIe){var Lt,Rt=this._store.activeItems.some(function(ce){return ce.highlighted});((Lt={}).text=function(){Qt===rt.input.element&&(rt.containerOuter.removeFocusState(),Rt&&rt.unhighlightAll(),rt.hideDropdown(!0))},Lt["select-one"]=function(){rt.containerOuter.removeFocusState(),(Qt===rt.input.element||Qt===rt.containerOuter.element&&!rt._canSearch)&&rt.hideDropdown(!0)},Lt["select-multiple"]=function(){Qt===rt.input.element&&(rt.containerOuter.removeFocusState(),rt.hideDropdown(!0),Rt&&rt.unhighlightAll())},Lt)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},nt._onFormReset=function(){this._store.dispatch({type:"RESET_TO",state:this._initialState})},nt._highlightChoice=function(J){var rt=this;J===void 0&&(J=null);var Qt=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(Qt.length){var Lt=J;Array.from(this.dropdown.element.querySelectorAll("."+this.config.classNames.highlightedState)).forEach(function(Rt){Rt.classList.remove(rt.config.classNames.highlightedState),Rt.setAttribute("aria-selected","false")}),Lt?this._highlightPosition=Qt.indexOf(Lt):(Lt=Qt.length>this._highlightPosition?Qt[this._highlightPosition]:Qt[Qt.length-1])||(Lt=Qt[0]),Lt.classList.add(this.config.classNames.highlightedState),Lt.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(xe,{el:Lt}),this.dropdown.isActive&&(this.input.setActiveDescendant(Lt.id),this.containerOuter.setActiveDescendant(Lt.id))}},nt._addItem=function(J){var rt=J.value,Qt=J.label,Lt=Qt===void 0?null:Qt,Rt=J.choiceId,ce=Rt===void 0?-1:Rt,Y=J.groupId,dt=Y===void 0?-1:Y,Ht=J.customProperties,ee=Ht===void 0?null:Ht,he=J.placeholder,Le=he!==void 0&&he,t1=J.keyCode,m1=t1===void 0?null:t1,n1=typeof rt=="string"?rt.trim():rt,E1=m1,K1=ee,D1=this._store.items,U1=Lt||n1,e2=ce||-1,R1=dt>=0?this._store.getGroupById(dt):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 t2=n2.value,Z2=n2.label,I2=n2.id,s2=n2.choiceId,Yt=n2.groupId,le=n2.customProperties,pe=n2.placeholder,De=n2.keyCode;return{type:Re,value:t2,label:Z2,id:I2,choiceId:s2,groupId:Yt,customProperties:le,placeholder:pe,keyCode:De}}({value:n1,label:U1,id:y2,choiceId:e2,groupId:dt,customProperties:ee,placeholder:Le,keyCode:E1})),this._isSelectOneElement&&this.removeActiveItems(y2),this.passedElement.triggerEvent(Jt,{id:y2,value:n1,label:U1,customProperties:K1,groupValue:R1&&R1.value?R1.value:void 0,keyCode:E1}),this},nt._removeItem=function(J){if(!J||!S("Object",J))return this;var rt=J.id,Qt=J.value,Lt=J.label,Rt=J.choiceId,ce=J.groupId,Y=ce>=0?this._store.getGroupById(ce):null;return this._store.dispatch(function(dt,Ht){return{type:He,id:dt,choiceId:Ht}}(rt,Rt)),Y&&Y.value?this.passedElement.triggerEvent(re,{id:rt,value:Qt,label:Lt,groupValue:Y.value}):this.passedElement.triggerEvent(re,{id:rt,value:Qt,label:Lt}),this},nt._addChoice=function(J){var rt=J.value,Qt=J.label,Lt=Qt===void 0?null:Qt,Rt=J.isSelected,ce=Rt!==void 0&&Rt,Y=J.isDisabled,dt=Y!==void 0&&Y,Ht=J.groupId,ee=Ht===void 0?-1:Ht,he=J.customProperties,Le=he===void 0?null:he,t1=J.placeholder,m1=t1!==void 0&&t1,n1=J.keyCode,E1=n1===void 0?null:n1;if(rt!=null){var K1=this._store.choices,D1=Lt||rt,U1=K1?K1.length+1:1,e2=this._baseId+"-"+this._idNames.itemChoice+"-"+U1;this._store.dispatch(function(R1){var y2=R1.value,n2=R1.label,t2=R1.id,Z2=R1.groupId,I2=R1.disabled,s2=R1.elementId,Yt=R1.customProperties,le=R1.placeholder,pe=R1.keyCode;return{type:r1,value:y2,label:n2,id:t2,groupId:Z2,disabled:I2,elementId:s2,customProperties:Yt,placeholder:le,keyCode:pe}}({id:U1,groupId:ee,elementId:e2,value:rt,label:D1,disabled:dt,customProperties:Le,placeholder:m1,keyCode:E1})),ce&&this._addItem({value:rt,label:D1,choiceId:U1,customProperties:Le,placeholder:m1,keyCode:E1})}},nt._addGroup=function(J){var rt=this,Qt=J.group,Lt=J.id,Rt=J.valueKey,ce=Rt===void 0?"value":Rt,Y=J.labelKey,dt=Y===void 0?"label":Y,Ht=S("Object",Qt)?Qt.choices:Array.from(Qt.getElementsByTagName("OPTION")),ee=Lt||Math.floor(new Date().valueOf()*Math.random()),he=!!Qt.disabled&&Qt.disabled;Ht?(this._store.dispatch(Z1({value:Qt.label,id:ee,active:!0,disabled:he})),Ht.forEach(function(Le){var t1=Le.disabled||Le.parentNode&&Le.parentNode.disabled;rt._addChoice({value:Le[ce],label:S("Object",Le)?Le[dt]:Le.innerHTML,isSelected:Le.selected,isDisabled:t1,groupId:ee,customProperties:Le.customProperties,placeholder:Le.placeholder})})):this._store.dispatch(Z1({value:Qt.label,id:Qt.id,active:!1,disabled:Qt.disabled}))},nt._getTemplate=function(J){var rt;if(!J)return null;for(var Qt=this.config.classNames,Lt=arguments.length,Rt=new Array(Lt>1?Lt-1:0),ce=1;ce<Lt;ce++)Rt[ce-1]=arguments[ce];return(rt=this._templates[J]).call.apply(rt,[this,Qt].concat(Rt))},nt._createTemplates=function(){var J=this.config.callbackOnCreateTemplates,rt={};J&&typeof J=="function"&&(rt=J.call(this,E)),this._templates=i()(A1,rt)},nt._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 Zt({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new $t({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new $t({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new W({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},nt._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)},nt._addPredefinedGroups=function(J){var rt=this,Qt=this.passedElement.placeholderOption;Qt&&Qt.parentNode.tagName==="SELECT"&&this._addChoice({value:Qt.value,label:Qt.innerHTML,isSelected:Qt.selected,isDisabled:Qt.disabled,placeholder:!0}),J.forEach(function(Lt){return rt._addGroup({group:Lt,id:Lt.id||null})})},nt._addPredefinedChoices=function(J){var rt=this;this.config.shouldSort&&J.sort(this.config.sorter);var Qt=J.some(function(Rt){return Rt.selected}),Lt=J.findIndex(function(Rt){return Rt.disabled===void 0||!Rt.disabled});J.forEach(function(Rt,ce){var Y=Rt.value,dt=Rt.label,Ht=Rt.customProperties,ee=Rt.placeholder;if(rt._isSelectElement)if(Rt.choices)rt._addGroup({group:Rt,id:Rt.id||null});else{var he=!(!rt._isSelectOneElement||Qt||ce!==Lt)||Rt.selected,Le=Rt.disabled;rt._addChoice({value:Y,label:dt,isSelected:he,isDisabled:Le,customProperties:Ht,placeholder:ee})}else rt._addChoice({value:Y,label:dt,isSelected:Rt.selected,isDisabled:Rt.disabled,customProperties:Ht,placeholder:ee})})},nt._addPredefinedItems=function(J){var rt=this;J.forEach(function(Qt){typeof Qt=="object"&&Qt.value&&rt._addItem({value:Qt.value,label:Qt.label,choiceId:Qt.id,customProperties:Qt.customProperties,placeholder:Qt.placeholder}),typeof Qt=="string"&&rt._addItem({value:Qt})})},nt._setChoiceOrItem=function(J){var rt=this;({object:function(){J.value&&(rt._isTextElement?rt._addItem({value:J.value,label:J.label,choiceId:J.id,customProperties:J.customProperties,placeholder:J.placeholder}):rt._addChoice({value:J.value,label:J.label,isSelected:!0,isDisabled:!1,customProperties:J.customProperties,placeholder:J.placeholder}))},string:function(){rt._isTextElement?rt._addItem({value:J}):rt._addChoice({value:J,label:J,isSelected:!0,isDisabled:!1})}})[H(J).toLowerCase()]()},nt._findAndSelectChoiceByValue=function(J){var rt=this,Qt=this._store.choices.find(function(Lt){return rt.config.valueComparer(Lt.value,J)});Qt&&!Qt.selected&&this._addItem({value:Qt.value,label:Qt.label,choiceId:Qt.id,groupId:Qt.groupId,customProperties:Qt.customProperties,placeholder:Qt.placeholder,keyCode:Qt.keyCode})},nt._generatePlaceholderValue=function(){if(this._isSelectElement){var J=this.passedElement.placeholderOption;return!!J&&J.text}var rt=this.config,Qt=rt.placeholder,Lt=rt.placeholderValue,Rt=this.passedElement.element.dataset;if(Qt){if(Lt)return Lt;if(Rt.placeholder)return Rt.placeholder}return!1},st}();p.default=P2}]).default},typeof t=="object"&&typeof O=="object"?O.exports=w():typeof define=="function"&&define.amd?define([],w):typeof t=="object"?t.Choices=w():v.Choices=w()},477:function V(Q,O,t,C,R){C(),t.root="bk-root",t.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,t,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)),e=/^[-+]?\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=>e.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)}}t.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}`}}t.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,t,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)}}t.PreTextView=p,p.__name__="PreTextView";class T extends w.Markup{constructor(o){super(o)}}t.PreText=T,v=T,T.__name__="PreText",v.prototype.default_view=p},480:function V(Q,O,t,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((e,s)=>{(0,p.classes)(e).toggle(T.active,i===s)})}}t.RadioButtonGroupView=c,c.__name__="RadioButtonGroupView";class o extends g.ButtonGroup{constructor(i){super(i)}}t.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,t,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 e=(0,g.div)({class:[c.input_group,this.model.inline?c.inline:null]});this.el.appendChild(e);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]));e.appendChild(m)}}change_active(e){this.model.active=e}}t.RadioGroupView=o,o.__name__="RadioGroupView";class r extends T.InputGroup{constructor(e){super(e)}}t.RadioGroup=r,w=r,r.__name__="RadioGroup",w.prototype.default_view=o,w.define(({Boolean:i,Int:e,String:s,Array:a,Nullable:u})=>({active:[u(e),null],labels:[a(s),[]],inline:[i,!1]}))},482:function V(Q,O,t,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractRangeSliderView{}t.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)}}t.RangeSlider=c,v=c,c.__name__="RangeSlider",v.prototype.default_view=T,v.override({format:"0[.]00"})},483:function V(Q,O,t,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")}}t.SelectView=r,r.__name__="SelectView";class i extends c.InputWidget{constructor(s){super(s)}}t.Select=i,w=i,i.__name__="Select",w.prototype.default_view=r,w.define(({String:e,Array:s,Tuple:a,Dict:u,Or:l})=>{const d=s(l(e,a(e,e)));return{value:[e,""],options:[l(d,u(d)),[]]}})},484:function V(Q,O,t,C,R){C();var v;const w=(0,Q(1).__importStar)(Q(153)),g=Q(461),p=Q(8);class T extends g.AbstractSliderView{}t.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)}}t.Slider=c,v=c,c.__name__="Slider",v.prototype.default_view=T,v.override({format:"0[.]00"})},485:function V(Q,O,t,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}}t.SpinnerView=i,i.__name__="SpinnerView";class e extends w.NumericInput{constructor(a){super(a)}}t.Spinner=e,v=e,e.__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,t,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}}t.TextAreaInputView=c,c.__name__="TextAreaInputView";class o extends g.TextLikeInput{constructor(i){super(i)}}t.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,t,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)}}t.ToggleView=c,c.__name__="ToggleView";class o extends g.AbstractButton{constructor(i){super(i)}}t.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 t=`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(t),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,t))},g=reactExports.useCallback(w,[t,R]);return reactExports.useEffect(()=>{g(C())},[V,O,Q,C,g]),jsx("div",{id:t,className:"stBokehChart","data-testid":"stBokehChart"})}const BokehChart$1=reactExports.memo(BokehChart);export{BokehChart$1 as default};
@@ -1,4 +1,4 @@
1
- import{bw as x,r as g,bJ as ae,bK as T,bL as w,y as le,G as ce,j as S,bM as se,az as ue,z as de,bs as fe,aE as ge,bB as he,bt as be,bc as me,bN as ve,bO as pe}from"./index.9wBA4A4f.js";import{a as $e}from"./useBasicWidgetState.C207Y3_O.js";import"./FormClearHelper.BBpErIGP.js";var L=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ye=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,y=encodeURIComponent(`
1
+ import{bv as x,r as g,bI as ae,bJ as T,bK as w,y as le,G as ce,j as S,bL as se,az as ue,z as de,br as fe,aE as ge,bA as he,bs as be,bb as me,bM as ve,bN as pe}from"./index.Blgy4CCd.js";import{a as $e}from"./useBasicWidgetState.GQaAM6uH.js";import"./FormClearHelper.D3S2tctS.js";var L=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ye=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ke(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,y=encodeURIComponent(`
2
2
  <svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
4
4
  </svg>
@@ -6,4 +6,4 @@ import{bw as x,r as g,bJ as ae,bK as T,bL as w,y as le,G as ce,j as S,bM as se,a
6
6
  <svg width="17" height="13" viewBox="0 0 17 13" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <path d="M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z" fill="`.concat(s,`"/>
8
8
  </svg>
9
- `)),h=l.borders.checkboxBorderRadius,b=ke(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat(y,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:we(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=x("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:xe(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var z=x("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});z.displayName="Input";z.displayName="Input";var H=x("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});H.displayName="Toggle";H.displayName="Toggle";var D=x("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},$.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Oe(e){var t=Pe();return function(){var r=F(e),i;if(t){var l=F(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Ce(this,i)}}function Ce(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},F(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},K=function(e){Fe(o,e);var t=Oe(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Le(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===L.toggle?"left":"right":a,y=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,O=i.children,C=i.required,Y=i.title,j=n.Root,V=n.Checkmark,W=n.Label,N=n.Input,A=n.Toggle,U=n.ToggleTrack,Z=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(N)||z,te=T(A)||H,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},k={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:C,$disabled:b,$value:R},X=O&&g.createElement(Q,$({$labelPlacement:s},k,w(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},O):O);return g.createElement(Z,$({"data-baseweb":"checkbox",title:Y||null,$labelPlacement:s},k,ie,w(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===L.toggle?g.createElement(re,$({},k,w(U)),g.createElement(te,$({},k,w(A)))):g.createElement(J,$({},k,w(V))),g.createElement(ee,$({value:R,name:f,checked:d,required:C,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":C||null,disabled:b,type:m,ref:y,onClick:Ee},k,oe,w(N))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(K,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:L.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=$e({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:ze,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:y,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(K,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?L.toggle:L.default,labelPlacement:ye.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:y.none,marginTop:y.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function ze(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
9
+ `)),h=l.borders.checkboxBorderRadius,b=ke(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat(y,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:we(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=x("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:xe(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var z=x("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});z.displayName="Input";z.displayName="Input";var H=x("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});H.displayName="Toggle";H.displayName="Toggle";var D=x("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},$.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Ce(e){var t=Pe();return function(){var r=F(e),i;if(t){var l=F(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},F(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},K=function(e){Fe(o,e);var t=Ce(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Le(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===L.toggle?"left":"right":a,y=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,C=i.children,O=i.required,Y=i.title,j=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,Z=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||z,te=T(N)||H,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},k={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=C&&g.createElement(Q,$({$labelPlacement:s},k,w(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},C):C);return g.createElement(Z,$({"data-baseweb":"checkbox",title:Y||null,$labelPlacement:s},k,ie,w(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===L.toggle?g.createElement(re,$({},k,w(U)),g.createElement(te,$({},k,w(N)))):g.createElement(J,$({},k,w(V))),g.createElement(ee,$({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:y,onClick:Ee},k,oe,w(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(K,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:L.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=$e({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:ze,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:y,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(K,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?L.toggle:L.default,labelPlacement:ye.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:y.none,marginTop:y.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function ze(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
@@ -0,0 +1 @@
1
+ import{n as u,r as o,y as w,z as y,j as i,D as h,aE as v,aR as n,aS as m,aT as k,F as z,G as R}from"./index.Blgy4CCd.js";const L=u("button",{target:"e1rpgzpk0"})(({theme:t})=>({fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.base,color:t.colors.fadedText60,backgroundColor:t.colors.transparent,fontFamily:"inherit",margin:t.spacing.none,border:"none",boxShadow:"none",padding:t.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:t.colors.primary}})),B=u("div",{target:"e1rpgzpk1"})(({theme:t})=>({display:"flex",flexDirection:"row",gap:t.spacing.lg,"> span":{marginTop:t.spacing.twoXS}})),C=u("div",{target:"e1rpgzpk3"})(({theme:t})=>({display:"flex",flexDirection:"column",gap:t.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:t.fontSizes.sm,lineHeight:t.lineHeights.base,div:{display:"inline-flex"}}));function E(t){const s=R(t);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:t.spacing.md,width:t.sizes.toastWidth,marginTop:t.spacing.sm,borderTopLeftRadius:t.radii.default,borderTopRightRadius:t.radii.default,borderBottomLeftRadius:t.radii.default,borderBottomRightRadius:t.radii.default,paddingTop:t.spacing.lg,paddingBottom:t.spacing.lg,paddingLeft:t.spacing.twoXL,paddingRight:t.spacing.twoXL,backgroundColor:s?t.colors.gray10:t.colors.gray90,color:t.colors.bodyText,boxShadow:s?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:t.colors.fadedText40,width:t.fontSizes.lg,height:t.fontSizes.lg,marginRight:`calc(-1 * ${t.spacing.lg} / 2)`,":hover":{color:t.colors.bodyText}}}}}function D(t){if(t.length>104){let a=t.replace(/^(.{104}[^\s]*).*/,"$1");return a.length>104&&(a=a.substring(0,104).split(" ").slice(0,-1).join(" ")),a.trim()}return t}function H({body:t,icon:s,width:a}){const r=w(),d=D(t),c=t!==d,[e,b]=o.useState(!c),[f,S]=o.useState(0),x=o.useCallback(()=>{b(!e)},[e]),l=o.useMemo(()=>E(r),[r]),g=o.useMemo(()=>y(B,{expanded:e,children:[s&&i(h,{iconValue:s,size:"xl",testid:"stToastDynamicIcon"}),y(C,{children:[i(v,{source:e?t:d,allowHTML:!1,isToast:!0}),c&&i(L,{"data-testid":"stToastViewButton",onClick:x,children:e?"view less":"view more"})]})]}),[c,e,t,s,d,x]);o.useEffect(()=>{if(r.inSidebar)return;const p=n.info(g,{overrides:{...l}});return S(p),()=>{n.update(p,{overrides:{Body:{style:{transitionDuration:0}}}}),n.clear(p)}},[]),o.useEffect(()=>{n.update(f,{children:g,overrides:{...l}})},[f,g,l]);const T=i(k,{kind:m.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:a});return i(z,{children:r.inSidebar&&T})}const M=o.memo(H);export{M as default};